一、Shadowsocks介绍

Shadowsocks(中文名称:影梭)是使用Python等语言开发的、基于Apache许可证开源的代理软件。Shadowsocks使用socks5代理,用于保护网络流量。Shadowsocks分为服务器端和客户端。在使用之前,需要先将服务器端部署在支持Python等的服务器上面,然后通过客户端连接并创建本地代理。此外用户也可以选择购买基于Shadowsocks的商业服务,以获得更加稳定可靠的服务,或者免去自行部署的麻烦。目前开发者Clowwindy由于一些原因已宣布停止维护,shadowsocksR 的作者已表示会继续开发新版本。

对于想要使用SS的用户来说,相比在网路上买一些月供几十的SS服务商的出售的SS账户,自己倒不如买个便宜点的VPS自己构建一个SS服务器,为防止VPS资源过剩,自己也可以干点别的事情,这里给出了使用三种语言搭建SS服务器的一键安装脚本,供大家使用。

二、Python一键脚本

wget --no-check-certificate https://raw.githubusercontent.com/CUBEGWZ/Shadowsocks/master/Python/shadowsocks.sh
chmod +x shadowsocks.sh
./shadowsocks.sh 2>&1 | tee shadowsocks.log
/etc/shadowsocks.json
{
"server":"0.0.0.0",
"server_port":8585,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"password",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
/etc/shadowsocks.json
{
"server":"0.0.0.0",
"local_address":"127.0.0.1",
"local_port":1080,
"port_password":{
"8585":"password0",
"9001":"password1",
"9002":"password2",
"9003":"password3",
"9004":"password4"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}

三、GO一键脚本

wget --no-check-certificate https://raw.githubusercontent.com/CUBEGWZ/Shadowsocks/master/Go/shadowsocks-go.sh
chmod +x shadowsocks-go.sh
./shadowsocks-go.sh 2>&1 | tee shadowsocks-go.log
/etc/shadowsocks.json
{
"port_password":{
"8585":"password0",
"9001":"password1",
"9002":"password2",
"9003":"password3",
"9004":"password4"
},
"method":"aes-256-cfb",
"timeout":600
}

四、Libev一键脚本

wget --no-check-certificate https://raw.githubusercontent.com/CUBEGWZ/Shadowsocks/master/Libev/shadowsocks-libev.sh
chmod +x shadowsocks-libev.sh
{
"server":["[::0]","0.0.0.0"],
"server_port":your_server_port,
"local_address":"127.0.0.1",
"local_port":1080,
"password":"password",
"timeout":600,
"method":"aes-256-cfb"
}

五、Shadowsocks操作命令

/etc/init.d/shadowsocks start/etc/init.d/shadowsocks stop/etc/init.d/shadowsocks restart/etc/init.d/shadowsocks status