Bash Terminal command line, using Privoxy to turn the socks agent into an HTTP proxy

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.