shadowsocks使用说明
一个可穿透防火墙的快速代理。
服务端
安装
Debian / Ubuntu:
apt-get install python-pip
pip install shadowsocksCentOS:
yum install python-setuptools && easy_install pip
pip install shadowsocksWindows:
参见 在 Windows 上安装服务端
Notice: this page is for server side. If you are looking for clients, visit clients.
Server deployment on Windows is discouraged, since the select API performs very poor. If you want to serve many users, you should always set up your server on Linux. Please visit README for more details.
- Download and install Python for Windows, you can download x86-64 MSI installer in 64bit Windows.
- During installation you should install
pip
- Install OpenSSL for Windows. If you installed 64bit Python, you should install 64bit OpenSSL.
- Install shadowsocks like Linux. In Command Prompt, type command line
- If you want to use
salsa20orchacha20encryption, download libsodium and put dll files (without path) intoC:\Windows\System32orC:\Windows\SysWOW64(32bit Python on 64bit Windows).
使用
ssserver -p 443 -k password -m rc4-md5如果要后台运行:
sudo ssserver -p 443 -k password -m rc4-md5 --user nobody -d start如果要停止:
sudo ssserver -d stop如果要检查日志:
sudo less /var/log/shadowsocks.log用 -h 查看所有参数。你也可以使用 配置文件 进行配置。
You can use a configuration file instead of command line arguments.
Create a config file /etc/shadowsocks.json. Example:
{
"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
}Explanation of the fields:
| Name | Explanation |
|---|---|
| server | the address your server listens |
| server_port | server port |
| local_address | the address your local listens |
| local_port | local port |
| password | password used for encryption |
| timeout | in seconds |
| method | default: "aes-256-cfb", see Encryption |
| fast_open | use TCP_FASTOPEN, true / false |
| workers | number of workers, available on Unix/Linux |
To run in the foreground:
ssserver -c /etc/shadowsocks.jsonTo run in the background:
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop服务器搭建
建议选择 Ubuntu 14.04 LTS 作为服务器以便使用 TCP Fast Open。除非有明确理由,不建议用对新手不友好的 CentOS。
为了更好的性能,VPS 尽量选择 XEN 或 KVM,不要使用 OpenVZ。
客户端
在你本地的 PC 或手机上使用图形客户端。具体使用参见它们的使用说明。
