shadowsocks setting

Posted by moloach on 2019-03-10

步骤

  1. 申请服务器
    vultr 教程

  2. 可以安装锐速或者谷歌BBR
    锐速
    BBR

  3. 问题解决

    • 可以ping通, 但是不能连接ssh 解决方案
    • 利用内外网检测端口是否开放
    • 如果内网屏蔽,外网可以
  1. 工具
    内网检测工具
    外网检测端口 工具

安装shadowsocks

安装shadowsocks

Debian/Ubuntu

1
2
apt-get install python-pip
pip install shadowsocks

Centos:

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

开启服务

1
2
3
4
5
6
7
8
9
10
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

设置配置文件

You can use a configuration file instead of command line arguments.

Create a config file /etc/shadowsocks.json. Example:

1
2
3
4
5
6
7
8
9
10
{
"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:

1
ssserver -c /etc/shadowsocks.json

To run in the background:

1
2
ssserver -c /etc/shadowsocks.json -d start
ssserver -c /etc/shadowsocks.json -d stop

参考网站:

  1. https://www.vultrcn.com/
  2. shadowsock 安装使用指令