Open xiaozefeng opened 3 years ago
# install apt install python-pip apt install wget wget https://codeload.github.com/shadowsocks/shadowsocks/zip/master pip install shadowsocks-master.zip
sudo vim /usr/local/bin/shadowsocks.sh 内容如下
sudo vim /usr/local/bin/shadowsocks.sh
#!/bin/bash sudo /usr/bin/sslocal -c /etc/shadowsocks/config.json -d $1
配置/etc/shadowsocks/config.json
/etc/shadowsocks/config.json
{ "server":"服务地址", "server_port":服务端口, "local_address": "127.0.0.1", "local_port":1080, "password":"服务密码", "timeout":300, "method":"加密方式", "fast_open": false, "workers": 1, "prefer_ipv6": false }
shadowsocks.sh start|stop|restart
apt install privoxy # config cd /etc/privoxy sudo mv config config.back vim config # 填入一下内容 user-manual /usr/share/doc/privoxy/user-manual confdir /etc/privoxy logdir /var/log/privoxy filterfile default.filter logfile logfile listen-address 127.0.0.1:8118 listen-address [::1]:8118 toggle 1 enable-remote-toggle 0 enable-remote-http-toggle 0 enable-edit-actions 0 enforce-blocks 0 buffer-limit 4096 enable-proxy-authentication-forwarding 0 forwarded-connect-retries 0 accept-intercepted-requests 0 allow-cgi-request-crunching 0 split-large-forms 0 keep-alive-timeout 5 tolerate-pipelining 1 socket-timeout 300 forward-socks5t / 127.0.0.1:1080 . # 重启 systemctl restart privoxy # 设置http | https 代理 export http_proxy='http://localhost:8118' export https_proxy='https://localhost:8118' # 验证 curl https://www.google.com
shadowsocks安装
配置
sudo vim /usr/local/bin/shadowsocks.sh
内容如下配置
/etc/shadowsocks/config.json
启动|停止|重启
shadowsocks.sh start|stop|restart
命令行使用