www/privoxy is a non-caching web proxy with filtering, conditional forwarding & privacy enhancing capabilities. It is a good idea to use Privoxy as a gateway to SOCKS. The traffic flow should look like:
Browser -> caching_proxy -> privoxy {user-agent TAG filtering} -> a) Internet OR b) SOCKS proxy
Edit the /usr/local/etc/privoxy/user.action file as below:
From what I have learned, browser-based on the fly proxy changers should NOT be used with SOCKS due to potential data leak. There are instead two options:
a) Use a user-agent switcher/changer add-on, if all requests go through Privoxy and you are sure the switcher does its job correctly.
b) Use an entirely separate browser dedicated to SOCKS use only and encode the header of this browser to the TAG filter.
The privoxy TAG filter will forward traffic to SOCKS or not, based on what user-agent string it receives from the browser.
Browser -> caching_proxy -> privoxy {user-agent TAG filtering} -> a) Internet OR b) SOCKS proxy
Edit the /usr/local/etc/privoxy/user.action file as below:
Code:
# Tag every request with the User-Agent header. Client-header taggers are
# first to be executed and can be used to control every other action.
{+client-header-tagger{user-agent}}
/
# Tagging doesn't change action, sections with TAG patterns do
# Use different forwarding based on user-agent
{+forward-override{forward-socks5 192.168.0.XXX:9050 .} \
+client-header-filter{hide-tor-exit-notation} }
TAG:^User-Agent: Some user agent string etc
# Spoof accept-language and user agent for normal & socks use
{+hide-accept-language{en-ca} \
+hide-user-agent{Mozilla/5.0 (X11; Linux i686; rv:10.0) Gecko/20100101 Firefox/10.0) KHTML (like Gecko)} }
/
From what I have learned, browser-based on the fly proxy changers should NOT be used with SOCKS due to potential data leak. There are instead two options:
a) Use a user-agent switcher/changer add-on, if all requests go through Privoxy and you are sure the switcher does its job correctly.
b) Use an entirely separate browser dedicated to SOCKS use only and encode the header of this browser to the TAG filter.
The privoxy TAG filter will forward traffic to SOCKS or not, based on what user-agent string it receives from the browser.