1. ss服务端设置
    端口:8301
    密码:XXX.password

/usr/bin/python /usr/bin/ssserver -c /etc/shadowsocks.json -d start
[root@li1604-128 ~]# cat /etc/shadowsocks.json
{
“server”:”0.0.0.0”,
“local_address”:”127.0.0.1”,
“local_port”:10800,
“port_password”:{
“8301”:”XXX.password”
},

"timeout":300,
"method":"aes-256-cfb",
"fast_open": false

}

#kcp server 与 客户端下载地址:
http://onayasfq5.bkt.clouddn.com/kcptun-linux-amd64-20170322.tar.gz

  1. kcptun 服务端设置
    nohup ./server_linux_amd64 -l :29900 -t 127.0.0.1:8301 -key XXX.password -mtu 1400 -sndwnd 2048 -rcvwnd 2048 -mode fast2 > kcptun.log 2>&1 &

kcptun version 20170322
kcptun 加速端口:29900
默认:启用压缩

  1. kcp client设置
    ./client_linux_amd64 -r “139.162.120.128:29900” -l “:8301” -key XXX.password -mode fast2

Application -> KCP Client(8301/tcp) -> KCP Server(29900/udp) -> Server(8301/tcp)

  1. ss 客户端设置

vi shadowsocks.json
{
“server”:”127.0.0.1”,
“server_port”:8301,
“local_port”:8080,
“password”:”XXX.password”,
“timeout”:600,
“method”:”aes-256-cfb”
}

sslocal -c shadowsocks.json

  1. 使用cow 做http代理
    cow 下载地址:https://github.com/cyfdecyf/cow/releases

mkdir -p ~/.cow
vi ~/.cow/rc

listen = http://127.0.0.1:7777
proxy = ss://aes-256-cfb:XXX.password@127.0.0.1:8301

###########

启用cow
cow-linux64-0.9.8 ./data
2017/03/29 16:08:54 COW 0.9.8 listen http 127.0.0.1:7777, PAC url http://127.0.0.1:7777/pac

这时 在浏览器中 设置使用http代理 端口 7777即可

——-kcptun server不稳定 定时重启解决

cp server_linux_amd64 /usr/bin/kcptun

vi /usr/lib/systemd/system/kcptun.service
[Unit]
Description=udp tunnel based on kcp protocol
After=network.target

[Service]
EnvironmentFile=-/etc/default/kcptun
ExecStart=/usr/bin/kcptun $KCPTUN_OPTS
Restart=on-failure

[Install]
WantedBy=multi-user.target

/etc/default/kcptun
KCPTUN_OPTS=”-l :29900 -t 127.0.0.1:8301 -key XXX.password –crypt none -mode fast2”

systemctl reload kcptun

  • /1 systemctl restart kcptun.service

####客户端设置
cp client_linux_amd64 /usr/bin/kcptun

vi /usr/lib/systemd/system/kcptun.service
[Unit]
Description=udp tunnel based on kcp protocol
After=network.target

[Service]
EnvironmentFile=-/etc/default/kcptun
ExecStart=/usr/bin/kcptun $KCPTUN_OPTS
Restart=on-failure

[Install]
WantedBy=multi-user.target

/etc/default/kcptun
KCPTUN_OPTS=”-r 139.162.120.128:29900 -l 0.0.0.0:8301 -key XXX.password –crypt none -mode fast2”

systemctl reload kcptun

  • /1 systemctl restart kcptun.service