shadowsocks使用说明

一个可穿透防火墙的快速代理。

服务端

安装

Debian / Ubuntu:

apt-get install python-pip
pip install shadowsocks

CentOS:

yum install python-setuptools && easy_install pip
pip install shadowsocks

Windows:

参见 在 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.

  1. Download and install Python for Windows, you can download x86-64 MSI installer in 64bit Windows.
  2. During installation you should install pip
    Python
  3. Install OpenSSL for Windows. If you installed 64bit Python, you should install 64bit OpenSSL.
  4. Install shadowsocks like Linux. In Command Prompt, type command line
  5. If you want to use salsa20 or chacha20 encryption, download libsodium and put dll files (without path) into C:\Windows\System32 or C:\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:

NameExplanation
serverthe address your server listens
server_portserver port
local_addressthe address your local listens
local_portlocal port
passwordpassword used for encryption
timeoutin seconds
methoddefault: "aes-256-cfb", see Encryption
fast_openuse TCP_FASTOPEN, true / false
workersnumber of workers, available on Unix/Linux

To run in the foreground:

ssserver -c /etc/shadowsocks.json

To 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 或手机上使用图形客户端。具体使用参见它们的使用说明。

评论
暂无评论