Skip to content

Instantly share code, notes, and snippets.

@seanyinx
Created May 20, 2018 00:46
Show Gist options
  • Select an option

  • Save seanyinx/a0f98db452bef173b8f0f7538145a99f to your computer and use it in GitHub Desktop.

Select an option

Save seanyinx/a0f98db452bef173b8f0f7538145a99f to your computer and use it in GitHub Desktop.

Shadowsocks

installing shadowsocks

yum install python-pip 
pip install shadowsocks

add /etc/shadowsocks.json

{
      "enable" : true,
      "password" : "password",
      "method" : "rc4-md5",
      "remarks" : "",
      "server" : "proxy.hostname",
      "server_port" : proxy.port,
      "local_port" : 1080,
      "timeout" : 600,
      "remarks_base64" : ""
}

run shadowsocks

nohup sslocal -c /etc/shadowsocks.json /dev/null 2>&1 &

Privoxy

download privoxy

www.privoxy.org

install privoxy from source

sudo yum install autoconf
cd <privoxy-src-path>
autoheader && autoconf 
./configure 
make && make install

configure /usr/local/etc/privoxy/config

modify the following lines

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

run privoxy

privoxy --user privoxy /usr/local/etc/privoxy/config

edit /etc/profile

export http_proxy=http://127.0.0.1:8118
export https_proxy=http://127.0.0.1:8118

apply changes

source /etc/profile

do a test run

curl www.google.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment