nixCraft Linux Forum

nixCraft

Linux / UNIX Tech Support Forum

question on use raw socket to a implement HTTP Proxy Server

This is a discussion on question on use raw socket to a implement HTTP Proxy Server within the Networking, Firewalls and Security forums, part of the Mastering Servers category; Hi, I am trying to implement a HTTP proxy server using raw socket. I create a alias IP address on ...

Register free or login to your existing account and remove all advertisements.


Go Back   nixCraft Linux Forum > Mastering Servers > Networking, Firewalls and Security

Linux answers from nixCraft.


Networking, Firewalls and Security No it's not a secret. Talk about firewalls and security issues.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 10-26-2009, 11:00 PM
Junior Member
User
 
Join Date: Oct 2009
OS: Ubuntu
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 0
yu_zyy is on a distinguished road
Default question on use raw socket to a implement HTTP Proxy Server

Hi,

I am trying to implement a HTTP proxy server using raw socket.

I create a alias IP address on eth1:0 192.168.0.200 on my linux box

I opened a raw socket as:

fd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);

and binds to 192.168.0.200 and port 3080

bind(fd, (struct sockaddr *) &addr, sizeof(addr));

However when I use netstat it shows the port as 255 as the following:

raw 0 0 192.168.0.200:255 0.0.0.0:* 7 7469/test-http-proxy

I changed the Firefox connection settings to Manual proxy configuration as:

HTTP Proxy: 192.168.0.200 Port:3080

I got this error from Firefox, and I did not receive any packets from the raw socket.

The browser is configured to use a proxy server, but the proxy refused a connection.

* Is the browser's proxy configuration correct? Check the settings and try again.
* Does the proxy service allow connections from this network?
* Still having trouble? Consult your network administrator or Internet provider for assistance.


Any ideas or pointers are appreciated.

yu_zyy
Reply With Quote
Reply

Tags
http proxy , linux , raw socket


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Want to implement reverse proxy with apache kumarat9pm Proxy Servers 2 12-05-2009 02:14 AM
Proxy server logs upanwar Proxy Servers 2 09-28-2008 11:17 AM
socket programming - practicing sathiya Linux software 1 05-17-2008 08:31 PM
Proxy Server on Linux basha CentOS / RHEL / Fedora 0 03-12-2008 02:37 AM
Lighttpd socket with multiple subdomains or single IP muks Web servers 2 03-17-2007 05:48 AM


All times are GMT +5.5. The time now is 05:12 AM.


Powered by vBulletin® Version 3.8.4 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2009 nixCraft. All rights reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38