13 bypass GFW

13.1 V2Ray

The next generation, to be continued.

13.2 shadowsocks

13.2.1 installing

  • sudo apt -y install python-pip python-m2crypto 16
  • sudo -H pip install shadowsocks
  • Chrome extension SwitchyOmega.

13.2.2 configuration file

sudo mkdir /etc/shadowsocks

sudo vim /etc/shadowsocks/ipv4.json

    "server":      "my ipv4",
    "server_port": 21,
    "local_port":  1084,
    "password":    "my password",
    "fast_open":   true

13.2.3 managing by systemd

sudo vim /etc/systemd/system/shadowsocks-ipv4.service

Description=Shadowsocks client ipv4

ExecStart=/usr/local/bin/ssserver -c /etc/shadowsocks/ipv4.json

  • for client, use sslocal instead of sserver, and add User=nobody
  • for CentOS, use /usr/bin/ instead of /usr/local/bin/

13.2.4 details

Refer to https://github.com/shadowsocks/shadowsocks/wiki/Configuration-via-Config-File .

  1. server_port



    I use 80 for ipv4, since 80 < 443 and 4 < 6.

  2. local_port

    It’s ignored by ssserver, but I add it so that I can just directly copy the configuration files from local to server without any modifications.

  3. method

    They are so many different opinions. I finally gave up and chose to just trust the developers 17.

  4. fast_open

    sudo vim /etc/sysctl.d/local.conf

    # turn on TCP Fast Open on both client and server side
    net.ipv4.tcp_fastopen = 3
    sudo sysctl --system
  5. workers

    For example, if you set to 4, you will get 4 child process.



  1. According to https://github.com/shadowsocks/shadowsocks/wiki/Encryption, installing M2Crypto will make encryption a little faster.↩︎

  2. They will choose the best method for me, I even don’t bother to set it.↩︎

  3. That method trades off RAM for speed. Actually, there are only a few free memory left on my VPS, so it can hardly perform anything else after turning on this feature.↩︎