Get the App
SLTechnology News&Howtos  ›  Servers  › 

Setting shadowsocks+polipo Global proxy in linux Environment

Shulou Source: shulou.com Published: 2022-06-02 01:32:16 11月13日 Update

1. Install shadowsocks

Sudo apt-get install python-pip

Sudo pip install shadowsocks

2. Create a configuration file shadowsocks.json, where the server address, port number and password are purchased or used for free (such as www.ishadowsocks.org)

{"server": "xxxx.com", "server_port": 52239, "local_address": "127.0.0.1", "local_port": 1080, "password": "SOME_PASSWORD", "timeout": 600, "method": "aes-256-cfb", "fast_open": false}

3. Start shadowsocks

Sslocal-c shadowsocks.json

4. Install polipo for secondary forwarding (shadowsocks communicates with socks5 protocol and needs to be used with browser plug-in. If you want to use it globally, you can use polipo for secondary forwarding)

Sudo apt-get install polipo

5. Edit the configuration file and save it to / etc/polipo/config

# This file only needs to list configuration variables that deviate# from the default values. See / usr/share/doc/polipo/examples/config.sample# and "polipo-v" for variables you can tweak and further information. LogSyslog = truelogFile = / var/log/polipo/polipo.log proxyAddress = "0.0.0.0" socksParentProxy = "127.0.0.1 Vera 1080" socksProxyType = socks5 chunkHighMark = 50331648objectHighMark = 16384 serverMaxSlots = 64serverSlots = 16serverSlots1 = 32

6. Restart the polipo service

Sudo service polipo restart

7. Set environment variables (can be added to the ~ / .bashrc file so that all shell can be accessed by global SOCKS5)

Export http_proxy= "http://127.0.0.1:8123"

Export https_proxy= "https://127.0.0.1:8123"

8. Check whether the google main page can be obtained through socks5 protocol.

Curl www.google.com

If successful, it means that it can be accessed.

Summary

The above is the whole content of this article. I hope the content of this article has a certain reference and learning value for everyone's study or work. Thank you for your support. If you want to know more about it, please see the relevant links below.

Tags: Content files services global server learning configuration environment success home page value variables slogans available through address password that is plug-ins more browser Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Microsoft Linux Shulou Tech Info Apple