Set Shadowsocks as HTTP proxy on Raspberry Pi

项月亮
1 min readJul 4, 2021

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.

  1. You should have a overseas server with shadowsocks server already installed and configured
  2. 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

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

No responses yet

Write a response