Linux上搭建shadowsocks
1.shadowsocks服务端安装
参考官方文档Shadowsocks使用说明:
Centos:
yum install python-setuptools && easy_install pip
pip install shadowsocks
Debian / Ubuntu:
apt-get install python-pip
pip install shadowsocks
通过配置文件进行配置,创建一个配置文件 /etc/shadowsocks.json
内容如下:
注意:密码需要自己重新设置
{
"server":"my_server_ip",
"server_port":8388,
"local_address": "127.0.0.1",
"local_port":1080,
"password":"mypassword",
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
或(多个SS账号)
{
"server":"0.0.0.0",
"port_password":{
"8381":"xxxxxxx",
"8382":"xxxxxxx",
"8383":"xxxxxxx",
"8384":"xxxxxxx"
},
"timeout":300,
"method":"aes-256-cfb",
"fast_open": false
}
配置说明:
字段 | 说明 |
---|---|
server | ss服务监听地址 |
server_port | ss服务监听端口 |
local_address | 本地的监听地址 |
local_port | 本地的监听端口 |
password | 密码 |
timeout | 超时时间,单位秒 |
method | 加密方法,默认是:"aes-256-cfb"请参阅加密 |
fast_open | 使用TCP_FASTOPEN, true / false |
workers | workers数,只支持Unix/Linux系统 |
前台运行:
ssserver -c /etc/shadowsocks.json
后台运行:
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop
日志:
shadowsocks的日志保存在 /var/log/shadowsocks.log
2.shadowsocks客户端安装
下载地址:
Windows
https://github.com/shadowsocks/shadowsocks-windows/releases
Mac OS X
https://github.com/shadowsocks/ShadowsocksX-NG/releases
Linux
https://github.com/shadowsocks/shadowsocks-qt5/wiki/Installation
https://github.com/shadowsocks/shadowsocks-qt5/releases
IOS
https://itunes.apple.com/app/apple-store/id1070901416?pt=2305194&ct=shadowsocks.org&mt=8
https://github.com/shadowsocks/shadowsocks-iOS/releases
Android
https://play.google.com/store/apps/details?id=com.github.shadowsocks
https://github.com/shadowsocks/shadowsocks-android/releases
3.手机使用教程:
由于时间问题,我还没有写完,到时候补上