question on use raw socket to a implement HTTP Proxy Server


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

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

I opened a raw socket as:


and binds to 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* 7 7469/test-http-proxy

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

HTTP Proxy: 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.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!