Ccross the Great Firewall
Across the Great Wall we can reach every corner in the world.
The Great Firewall of China (GFW) is the combination of legislative and technological actions that have been taken by the Chinese government. For more information, visit https://en.wikipedia.org/wiki/Great_Firewall.
How to deploy tools on the server to cross GFW? I will give a brief introduction, use CentOS 7+ as my server OS. (please refer to https://sspai.com/post/39828)
Shell Script
Easy way to install Shadowsocks-Python/ShadowsocksR/Shadowsocks-Go/Shadowsocks-libev, refer to https://teddysun.com/486.html. You can see all the souce code in https://github.com/teddysun/shadowsocks_install.
Update: it’s highly recommended to use Twist to setup Shadowsocks-libev server.
Installation
Become root, and run commands as follows:
1 | wget --no-check-certificate -O shadowsocks-all.sh https://raw.githubusercontent.com/teddysun/shadowsocks_install/master/shadowsocks-all.sh |
This script run shadowsocks at startup.
Usage
1 | # Shadowsocks-Python |
Uninstallation
Become root, and run command as follows:
1 | ./shadowsocks-all.sh uninstall |
It only uninstall one version.
Install by Yourself
For more information, visit https://shadowsocks.org/en/download/servers.html.
Shadowsocks-libev
For more information, visit https://github.com/shadowsocks/shadowsocks-libev#build-from-source-with-centos. See also https://gist.github.com/aa65535/ea090063496b0d3a1748.
Build From Source With CentOS:
1 | # If you are using CentOS 7, you need to install these requirements to build from source code: |
Or install From Repository:
1 | # enable repo via dnf |
Usage:
1 | # edit the configuration file |
ShadowsocksR
For more information, visit https://github.com/shadowsocksr-rm/shadowsocksr. See also: https://github.com/Ssrbackup/shadowsocks-rss.
ShadowsocksR is over, a person continues the work of ShadowsocksR (he named it as ShadowsocksRR), please visit https://github.com/shadowsocksrr/shadowsocksr/tree/akkariiin/dev.
1 | # if not preinstall git, install git |
If you clone it into “/shadowsocksr”, move to “/shadowsocksr”, then run:
1 | # (optional) change branch to akkariiin/master (SSRR) |
Move to “/shadowsocksr/shadowsocks”, then run:
1 | python server.py -p 443 -k password -m aes-128-cfb -O auth_aes128_md5 -o tls1.2_ticket_auth_compatible |
You can also use a configuration file instead (recommend). If your SSR directory is ~/shadowsocksr
, edit the file “~/shadowsocksr/user-config.json”.
Then, run server.py:
1 | # move to "~/shadowsocksr/shadowsocks" |
Other way:
1 | # to run in the background |
V2Ray
For more information, visit https://www.v2ray.com.
Become root, and run command as follows:
1 | bash <(curl -L -s https://install.direct/go.sh) |
This shell script will run V2Ray at startup (support system with Systemd or Debian/Ubuntu).
If succeed, you need:
1 | # edit the file |
BBR: to accelerate
For more information, visit https://github.com/google/bbr.
Shell Script
Easy way of deploying BBR, from https://teddysun.com/489.html.
Become root, and run commands as follows:
1 | wget --no-check-certificate https://github.com/teddysun/across/raw/master/bbr.sh |
Enter y and it will reboot automatically. You can edit /etc/sysctl.conf
to optimize performance, see https://jasper-1024.github.io/2016/06/27/VPS%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91%E6%95%99%E7%A8%8B%E7%B3%BB%E5%88%972/.
Or Deploy it by Yourself
For more information, visit iMeiji/shadowsocks_install/wiki and Vultr Docs: How to Deploy Google BBR on CentOS 7.
Install new Linux Kernel
Visit http://elrepo.org/linux/kernel/el7/x86_64/RPMS/ to find the latest kernel.
1 | # replace kernel |
Enable BBR
1 | # check if kernel version >= 4.9 |
Clients
Some clients:
Description | Address |
---|---|
Shadowsocks for Windows | https://github.com/shadowsocks/shadowsocks-windows/releases |
Shadowsocks for Android | https://github.com/shadowsocks/shadowsocks-android |
Shadowsocks-Qt5, a cross-platform shadowsocks GUI client | https://github.com/shadowsocks/shadowsocks-qt5 |
ShadowsocksR for Windows, use 7-Zip to extract the ShadowsocksR archive | https://github.com/shadowsocksrr/shadowsocksr-csharp |
ShadowsocksR for Andriod | https://github.com/shadowsocksrr/shadowsocksr-android |
Clash for Windows | https://github.com/erguotou520/electron-ssr |
V2Ray-core | https://github.com/v2ray/v2ray-core |
V2RayN for Windows, friendly to new hand | https://github.com/v2ray/v2rayN |
other V2Ray client | https://www.v2ray.com/chapter_01/3rd_party.html |
Shadowsocks-libev
Install Shadowsocks-libev on Arch Linux.
References:
- Arch Wiki: https://wiki.archlinux.org/index.php/Shadowsocks_(简体中文)
- Arch Wiki: https://wiki.archlinux.org/index.php/Shadowsocks
Install shadowsocks-libev.
1 | sudo pacman -S shadowsocks-libev |
Edit /etc/shadowsocks/config.json
. For more information of config.json, visit https://shadowsocks.org/en/config/quick-guide.html.
1 | sudo mkdir /etc/shadowsocks |
An example of /etc/shadowsocks/config.json
.
1 | { |
start it using the configuration file
1 | ss-local -c /etc/shadowsocks/config.json |
use systemd to start and auto-start
1 | # start |
Shadowsocksr-libev
Install Shadowsocksr-libev on Arch Linux.
AUR: https://aur.archlinux.org/packages/shadowsocksr-libev/
See also:
https://eatradish.moe/2017/04/07/zai-arch-zhong-shi-yong-shadowsocksr/- https://sakiiily.moe/2017/04/07/zai-arch-zhong-shi-yong-shadowsocksr/
Install shadowsocksr-libev.
1 | yaourt -S shadowsocksr-libev |
Edit /etc/shadowsocks/config.json
. For more information of config.json, visit SSR Wiki: Python client setup (Mult language).
1 | sudo mkdir /etc/shadowsocks |
An example of /etc/shadowsocks/config.json
.
1 | { |
start and auto-start.
1 | # start |
Proxy SwithyOmega for Chrome
Changing proxy settings has never been so convenient. Take Proxy SwithyOmega for Chrome as a modern version of the “Proxy Settings” dialog, designed to be simpler, quicker and more powerful, specially optimized for Chrome.