This article will help you set you Raspberry Pi as a Shadowsocks client(rather than a gateway or a router in your house) to access websites blocked by GFW.
- You should have a overseas server with shadowsocks server already installed and configured
- Install Shadowsocks with Python
sudo pip3 install shadowsocks
3. Add a config file with basic proxy info
{
"server":"",
"server_port":,
"local_port":1080,
"password":"",
"timeout":300,
"method":""
}
You can store the config file as/etc/ss-config.json
4. If your meet EVP_CIPHER_CTX_cleanup
error, it’s an OpenSSL used by Shadowsocks outdated version problem, see solution here
5. Start the shadowsocks process
/usr/local/bin/sslocal -c /etc/ss-config.json start
you can let this command in daemon mode with -d
parameter.
6. Convert socks traffic to HTTP through Polipo
apt install polipo
add config file
sudo nano /etc/polipo/config
add following topic content at the end of the config file
socksParentProxy = "127.0.0.1:1080"socksProxyType = socks5chunkHighMark = 50331648objectHighMark = 16384serverMaxSlots = 64serverSlots = 16serverSlots1 = 32proxyAddress = "0.0.0.0"proxyPort = [ADD CUSTOM PORT HERE]
restart the polipo process
/etc/init.d/polipo restart
set HTTP and HTTPS proxy
export http_proxy='127.0.0.1:[CUSTOM PORT ABOVE IN POLIPO CONFIG]'export https_proxy='127.0.0.1:[CUSTOM PORT ABOVE IN POLIPO CONFIG]'
to make these export
commands work permanent, add them to system path.
7. Connection test
curl http://ip-api.com/json // HTTP proxy
curl https://api.myip.com // HTTPS proxy