Proxy - ShadowSocks (socks5)

1. set up shadowsocks server

install ss for both server and client

Debian/Ubuntu

apt-get install python-pip
pip install shadowsocks

MacOs

brew install shadowsocks-libev

start service

  • linux
    ssserver -p 123 -k <PWD> --fast-open --workers 2 -d start

or, edit /etc/shadowsocks-libev/config.json, then start as service

service shadowsocks-libev  restart

start client

  • Debian/Ubuntu

    apt-get install netcat-openbsd
    nohup sslocal –fast-open -p 123 -l 9999 -k -s <SERVER_ADDRESS>

  • MacOs

install as service

brew services start shadowsocks-libev

manual run

/usr/local/opt/shadowsocks-libev/bin/ss-local -c /usr/local/etc/shadowsocks-libev.json -u

2. start applications

2.1 setup chrome plugin

install the “proxy SwitchyOmega” plugin for chrome, set proxy to: type socks5, addr 127.0.0.1, port 9999

2.2 setup ssh

.ssh/config

host github.com
  identityfile ~/.ssh/hasee
  ProxyCommand nc -x 127.0.0.1:9999 %h %p

2.3 setup aptitude/apt-get

apt-get install tsocks

edit tsocks config /etc/tsocks.conf

server = 127.0.0.1
server_type = 5
server_port = 9999

try it out

tsocks apt-get update

2.4 setup git

proxy="SOCKS 127.0.0.1:9999" git clone xxxxx