由于一些大家都懂的原因,访问GitHub或者Google需要进行特殊的”配置”。
之前一直用ssh的方式,最近发现了ShadowSocks,折腾一下发现稳定性、速度都比ssh要好很多,推荐给大家使用。
这个是一个Socks5代理本地映射+远程服务器的套件,写的非常好,具体可以见主页。
1、服务器端安装
echo "deb http://shadowsocks.org/debian squeeze main" >> /etc/apt/sources.listsudo apt-get updatesudo apt-get install shadowsocks
如果你用的不是Debian,也可以用编译的方式(Server有Python、Node等等很多种) ,具体点 这里。
2、服务器端配置
sudo vim /etc/shadowsocks/config.json
形如:
{ "server":"127.0.0.1", "server_port":8388, "local_port":1080, "password":"barfoo!", "timeout":60, "method":null}
除了method改成”aes-256-cfb” 、ip改成服务器的ip外,其他根据需要自己修改就可以了。
最后启动
sudo /etc/init.d/shadowsocks start
3、客户端配置
客户端支持Linux、Windows等,具体见这里。
下面以Linux为例。
wget dl.chenyufei.info/shadowsocks/shadowsocks-local-linux64-1.1.3.gzgunzip shadowsocks-local-linux64-1.1.3.gzchmod a+x shadowsocks-local-linux64-1.1.3
然后运行客户端,配置要与服务器端设置的一致:
./shadowsocks-local-linux64-1.1.3 -d=true -k="服务器的密码" -m="aes-256-cfb" -l=8700 -p=服务器的端口 -s="服务器的ip"
如果运行成功会有提示,最后就是设置本地浏览器的代理就可以了。
PS:如果觉得client命令太长,也可以用 alias。
?
原文地址:Linux下配置ShadowSocks(Server&Client), 感谢原作者分享。 如果前世五百次眸回,才换来今生的擦肩而过。