- Nov 8, 2018
- Reaction Score
[SIZE=4]Shadowsocks is an open source socks5 proxy that can be used to bypass firewall and unblock websites. Originally developed by a Chinese called
You do not have permission to view link Log in or register now., now the application has been implemented in all kinds of programming languages such as C, C++, Go, Python and the like. This Tutorial will guide you through setting up your own Shadowsocks server and how to use it on your desktop computer, android and iOS. I assume you already have access to a VPS or dedicated server.
[SIZE=5]Shadowsocks VS VPN[/SIZE]
[SIZE=4]As you may already know, you can use VPN (Virtual Private Network) to bypass firewall and protect your anonymity on the web. Do you need another software like shadowsocks to do the same? One thing you can find is that When you are using VPN, all your Internet traffic is routed through VPN. Because VPN servers are usually located outside your country, this can slow down your Internet speed especially when you are visiting websites inside your country.
Shadowsocks comes to the rescue! Besides a global proxy setting, shadowsocks can also be setup in a way that some of your applications go through shadowsocks and other applications go through normal traffic. For example, you can use Google Chrome to bypass firewall, visit Google, Facebook, YouTube and use Firefox to visit sites that isn’t blocked in your area.
By the way, shadowsocks client will automatically reconnect to shadowsocks server if there’s a disconnect. Although you can configure VPN client to do the same, but that will take extra work.
[SIZE=5]Setting Up Shadowsocks on Your Server[/SIZE]
[SIZE=4]There are many ways to install shadowsocks on Linux server, but I will show you the easiest way. First, install python pip and then use pip to install shadowsocks. m2crypto will make encryption a little faster.
CentOS/RHELsudo apt-get install python-pip python-m2crypto
sudo pip install shadowsocks
Create a configuration file with a command line text editor like nano.sudo yum install m2crypto python-setuptools
sudo easy_install pip
sudo pip install shadowsocks
Put the following text into the file.sudo nano /etc/shadowsocks.json
Explanation of each field:
- [SIZE=4]server: your hostname or server IP (IPv4/IPv6).[/SIZE]
- [SIZE=4]server_port: server port number.[/SIZE]
- [SIZE=4]local_port: local port number.[/SIZE]
- [SIZE=4]password: a password used to encrypt transfer.[/SIZE]
- [SIZE=4]timeout: connections timeout in seconds.[/SIZE]
- [SIZE=4]method: encryption method, “bf-cfb”, “aes-256-cfb”, “des-cfb”, “rc4”, etc. Default is table, which is not secure. “aes-256-cfb” is recommended.[/SIZE]
To stop shadowsocks server:sudo ssserver -c /etc/shadowsocks.json -d start
Restart Shadowsocks server:sudo ssserver -d stop
Check Shadowsocks logsudo ssserver -c /etc/shadowsocks.json -d restart
If necessary, you can always manually download the python version fromless /var/log/shadowsocks.log
You do not have permission to view link Log in or register now..
You may need to allow traffic through your Shadowsocks server port in iptables firewall by running command: sudo iptables -I INPUT -p tcp --dport 8000 -j ACCEPT
[SIZE=5]Auto Start on System Boot[/SIZE]
[SIZE=4]If you want shadowsocks server to automatically start on system boot, then edit /etc/rc.local file
Add the following line to the file above exit 0 linesudo nano /etc/rc.local
[/SIZE]/usr/bin/python /usr/local/bin/ssserver -c /etc/shadowsocks.json -d start