Setting up shadowsocks+polipo global proxy in Linux environment

Setting up shadowsocks+polipo global proxy in Linux environment

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 for the server you purchased or use 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 uses socks5 protocol for communication and needs to be used with browser plug-ins. If you want to use it globally in the system, 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 = true
logFile = /var/log/polipo/polipo.log
 
proxyAddress = "0.0.0.0"
 
socksParentProxy = "127.0.0.1:1080"
socksProxyType = socks5
 
chunkHighMark = 50331648
objectHighMark = 16384
 
serverMaxSlots = 64
serverSlots = 16
serverSlots1 = 32

6. Restart polipo service
sudo service polipo restart

7. Set environment variables (can be added to ~/.bashrc file to enable global SOCKS5 access for all shells)
export http_proxy="http://127.0.0.1:8123"
export https_proxy="https://127.0.0.1:8123"

8. Check whether you can get the Google homepage through the socks5 protocol
curl www.google.com
If successful, access is possible.

Summarize
The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. Thank you for your support of 123WORDPRESS.COM. If you want to learn more about this, please check out the following links

You may also be interested in:
  • Using shadowsocks to build a LAN transparent gateway

<<:  Implementing custom scroll bar with native js

>>:  A quick solution to the error #1929 Incorrect datetime value: '''' for column ''createtime'' when using MySQL 5.x or above

Recommend

How does the composite index of MySQL take effect?

Table of contents background Understanding compos...

Using CSS3 to create header animation effects

Netease Kanyouxi official website (http://kanyoux...

How to remove inline styles defined by the style attribute (element.style)

When modifying Magento frequently, you may encount...

Best Practices for Implementing Simple Jira Projects with React+TS

A set of projects for training react+ts Although ...

Introduction to /etc/my.cnf parameters in MySQL 5.7

Below are some common parameters of /etc/my.cnf o...

react-diagram serialization Json interpretation case analysis

The goal of this document is to explain the Json ...

CSS to achieve Skeleton Screen effect

When loading network data, in order to improve th...

Example of implementing login effect with vue ElementUI's from form

Table of contents 1. Build basic styles through E...

How to manage multiple projects on CentOS SVN server

One demand Generally speaking, a company has mult...

Some useful meta setting methods (must read)

<meta name="viewport" content="...

Nginx request limit configuration method

Nginx is a powerful, high-performance web and rev...

Apache Bench stress testing tool implementation principle and usage analysis

1: Throughput (Requests per second) A quantitativ...