Installing Privoxy
# ubuntu/debiansudo Apt-get Install privoxy# centossudo yum install privoxy# Mac osxsudo Port Install Privoxy
Modifying a configuration file
vi/etc/privoxy/config# HTTP parent looks like this:# forward-socks4 / 127.0.0.1:1080 . # # To chain Privoxy and Tor, both running on the same system, you# would use something like:# forward-socks5/
127.0.0.1:1080
Mainly forward-socks these two lines, 1080 is the port that the socks agent opens, modifies according to oneself actual situation
After the configuration is complete, restart the Privoxy,sudo service privoxy restart
Add Agent Switch function
VI ~/.BASHRC, add the following code:
function Proxy_off () { unset http_proxy unset https_proxy unset ftp_proxy unset rsync_proxy Echo -E "Agent closed"}function proxy_on () { export no_proxy= "localhost,127.0.0.1,localaddress,.localdomain.com" Export http_proxy= "http://127.0.0.1:8118" export https_proxy= $http _proxy export ftp_proxy= $http _proxy export rsync_proxy= $http _proxy export http_proxy= $http _proxy export https_proxy= $http _proxy Export ftp_proxy= $http _proxy export rsync_proxy= $http _proxy echo-e "open proxy"}
At the time of use, when you need to turn on the HTTP proxy, enter it at the command line:proxy_on
This situation is most used in the command line need to link the server, the wall needs escalator, such as download Android source code, Chromium source ...
Recommended site for a escalator: HTTP://T.CN/RTKOBRK
Bash Terminal command line, using Privoxy to turn the socks agent into an HTTP proxy