CentOS7安装¥¥客户端

安装¥¥

yum install python-setuptools && easy_install pip
pip install git+https://github.com/shadowsocks/shadowsocks.git@master

配置¥¥

sudo mkdir /etc/shadowsocks
sudo vi /etc/shadowsocks/shadowsocks.json
{    "server":"x.x.x.x",
    "server_port":1035,
    "local_address": "127.0.0.1",
    "local_port":1080,
    "password":"password",
    "timeout":300,
    "method":"aes-256-gcm",
    "fast_open": false,
    "workers": 1
 }

新建启动脚本文件/etc/systemd/system/shadowsocks.service,内容如下:

[Unit]
Description=Shadowsocks
[Service]
TimeoutStartSec=0ExecStart=/usr/bin/sslocal -c /etc/shadowsocks/shadowsocks.json
[Install]
WantedBy=multi-user.target

启动

systemctl enable shadowsocks.service
systemctl start shadowsocks.service
systemctl status shadowsocks.service

测试

curl --socks5 127.0.0.1:1080 http://httpbin.org/ip

安装配置privoxy
安装

yum install privoxy -y
systemctl enable privoxy
systemctl start privoxy
systemctl status privoxy

修改配置文件/etc/privoxy/config

listen-address 127.0.0.1:8118 # 8118 是默认端口,不用改
forward-socks5t / 127.0.0.1:1080 . #转发到本地端口,注意最后有个点

设置代理

# vi /etc/profile 
在最后添加如下信息
PROXY_HOST=127.0.0.1
export all_proxy= 
export ftp_proxy= 
export http_proxy= 
export https_proxy= 
export no_proxy=localhost,172.16.0.0/16,192.168.0.0/16.,127.0.0.1,10.10.0.0/16
# 重载环境变量
source /etc/profile

测试代理

curl -I www.google.com HTTP/1.1 200 OK

我自己测试的时候没成功

链接:https://blog.51cto.com/lookingdream/2299145