Posts Use shadowsocks in Linux
Post
Cancel

Use shadowsocks in Linux

Use shadowsocks(ss) in Linux(Centos)

Engineers or technicians especially from mainland China usually encounter the Internet problem (blocked). Many tools and methods have beed used to search the Internet freely for Windows and Mac OS. Here I made a very simple note to record how to use ss in my Centos Server.

Install ss by pip

pip install shadowsocks

Get ss account and password

How to get ss ID and password is beyond this note. Example:

Address Port Method Password 172.104.106.212 8099 aes-256-cfb eIW0Dnk69454e6nSwuspv9DmS201tQ0D


## Make a config file for ss ID
```json
\# ss.json
{
  "server":"172.104.106.212",
  "server_port":8099,
  "local_port":1080,
  "password":"eIW0Dnk69454e6nSwuspv9DmS201tQ0D",
  "timeout":600,
  "method":"aes-256-cfb"
}

Run sslocal

sudo sslocal -c ss.json -d start You can check it by ps aux |grep sslocal

Install privoxy

And now suppose that, privoxy is already installed. If not, please install it by yourself.

Modify the privoxy config file

Modify ‘/etc/privoxy/config’ to keep listen-address and forward-socks5t lines with no # ahead.

listen-address 127.0.0.1:8118
forward-socks5t / 127.0.0.1:1080 .

Run privoxy service

systemctl restart privoxy
systemctl enable privoxy

Activate proxy

Open terminal and export http_proxy variable to http://127.0.0.1:8118 export http_proxy=http://127.0.0.1:8118

Check google.com

curl google.com The ss works successfully if the curl cmd gives response like:

OLDER POSTS NEWER POSTS

Comments powered by Disqus.

Contents

Search Results