Create a SOCKS proxy that does nothing

I am trying to create a SOCKS proxy in C ++ that runs as a background process on localhost.

If the user's browser is configured to use a proxy server, I want all HTTP requests to go through the normal TCP / IP stack. those. the browser will behave exactly as usual.

Eventually I will add another layer that checks if the requested resource meets certain criteria and if this will handle the request differently. But for now, I'm just trying to solve the main problem ... how do I create a SOCKS proxy that doesn't change anything?

+2


source to share


2 answers


I would look at the Squid project, depending on what you need.

http://www.squid-cache.org/

GPL licensed source.



Insanely nice for a lot of good things.

Jacob

+1


source


It is much easier to create an HTTP proxy, then SOCKS4 / SOCKS5 over HTTP is human readable, but SOCKS protocols are not. Here's an example HTTP proxy I'm building for experience a few years ago. It worked fine with older browsers, it is now broken as it cannot handle persistent connections, but it is still a good source for learning how it works.



You might rather be using an existing HTTP proxy software like Squid.

+1


source







All Articles