Use socks proxy in Linux command line

Source: Internet
Author: User
Article title: use socks proxy in Linux command line. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

In this magical country, we can't do without agents for a moment. Not only is it because you know it, but also because the IP address assigned to us is insufficient.

Because the environment variable http_proxy = "http: // proxy-ip: port" in Linux CL is used as the http proxy, I once thought that socks proxy also has an environment variable socks_proxy. It wasn't until recently that I found myself so stupid.

In Linux CL, the socks proxy is used. you can use the tsocks software. The official website is here: http://tsocks.sourceforge.net/but it has not been updated for a while. However, this software package is usually included in the source of the released version, which can be directly installed.

After the installation is complete, edit the/etc/tsocks. conf file. Make sure to modify the following four lines:

Local = 192.168.1.0/255.255.255.0 // no proxy is used locally

Server = 192.168.1.1 // proxy ip

Server_port = 1080 // port

Server_type = 5 // socks 4 or 5

After saving, use tsocks to start the program, for example:

Tsocks apt-get update

Related Article

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.