搭建shadowsocks服务端
具体参考这里
https://github.com/clowwindy/shadowsocks/wiki/Shadowsocks-%E4%BD%BF%E7%94%A8%E8%AF%B4%E6%98%8E
https://github.com/madeye/shadowsocks-libev
首先检查下Python 版本,要有 2.6 or 2.7.
python --version Python 2.7.4
这个ubuntu的服务器上一般都有吧.
然后官网上直接要用pip装shadowsocks,有些人可能会出现命令错误,还要安装些东西
apt-get install python-gevent python-pip
然后就可以
pip install shadowsocks
安装shadowsocks了。
接下来配置也比较简单,
新建一个 config.json,或者其他名字的都行,位置可以放在/etc/shadowsocks/下(默认没有这个文件,你要自己创建一个),或者home或者其他地方。
内容是
{ "server":"my_server_ip", "server_port":8388, "local_port":1080, "password":"barfoo!", "timeout":600, "method":"aes-256-cfb" }
具体含义wiki上给的也很清楚
server 服务器 IP (IPv4/IPv6),注意这也将是服务端监听的 IP 地址 server_port 服务器端口 local_port 本地端端口 password 用来加密的密码 timeout 超时时间(秒) method 加密方法,可选择 "bf-cfb", "aes-256-cfb", "des-cfb", "rc4", 等等。默认是一种不安全的加密,推荐用 "aes-256-cfb"
我只更改了加密方式和密码,加密方式推荐用bf-cfg,因为aes-256-cfb系统默认貌似不支持,会报错。想支持这些加密方式你还要安装
apt-get install python-m2crypto
然后就可以启动服务了。
ssserver -c /etc/shadowsocks/config.json
或者直接
/etc/init.d/shadowsocks start
当然了,你不可能一直开着ssh,所以还是
nohup ssserver -c /etc/shadowsocks/config.json > log &
然后可以关了SSH。
或者更直接的开机自启动,添加到rc.local
/usr/local/bin/ssserver -c /etc/shadowsocks/config.json
安卓手机可以安装“影梭”然后配置,其他手机自行google。
更多客户端在这儿
https://github.com/clowwindy/shadowsocks/wiki/Ports-and-Clients
原文连接http://www.hceasy.com/2013/12/shadowsocks-%E6%9C%8D%E5%8A%A1%E7%AB%AF%E9%83%A8%E7%BD%B2/
本文由瞎悟学习网作者:hiovo 发表,其版权均为本站所有,文章内容系作者个人观点瞎悟学习,不代表对观点赞同或支持。如需转载,请注明文章来源。