Because of China’s Great Firewall, Chinese people must circumvent restrictions to post on Facebook, use Google services, stream videos on YouTube, and so on.
VPN is a popular tool in China for accessing blocked content and services. In 2012, a Chinese programmer designed Shadowsocks to bypass Internet censorship in China and shared it on GitHub. Shadowsocks, or SS for short, became popular among Chinese Internet users.
Since Shadowsocks and a VPN are easily confused, I would like to give an introduction from four parts.
What is a VPN?
On the one hand, both VPNs and Shadowsocks unblock websites for you. On the other hand, a private network will be built by the VPN to transfer data at the network level. A VPN, known as a virtual private network, encrypts your communications online. It is widely used in corporate and university networks. When you connect to a VPN, you are actually connecting to a private network. Your Internet access is via this private network. Whether the communication between you and the VPN is encrypted or not depends on the VPN protocol used.
What is SS / SSR?
SS (Shadowsocks): It was created by clowwindy to bypass the GFW in 2012. The developer then found it useful to unlock websites because traffic goes through it is difficult to detect while it ensures a fast Internet connection. That’s why clowwindy shared it with others on GitHub. However, in 2015, the creator was under pressure from the Chinese government. In consequence, clowwindy removed code on Github and pledged not to participate in any maintenance or update of Shadowsocks.
SSR (ShadowsocksR): After what happened to Shadowsocks in 2015, another developer, breakwa11, claimed that SS could easily be recognized by GFW. Thus, breakwa11 created ShadowsocksR based on Shadowsocks that support traffic obfuscation.
Later, breakwa11 was also forced to remove all code on GitHub and discontinue the development of Shadowsocks. Relevant groups were also deleted. Since many people forked SSR, new versions based on SSR continued to be released. SSRR is a well-known example.
How does Shadowsocks work?
SS and SSR work in the same way. They are SOCKS5-based proxies. SOCKS proxies transmit data packets no matter what transfer protocol is used. SOCKS proxies are much faster than other application-level proxies. The SOCKS5 proxy sends your data request via a connection between you and the proxy server, which forwards your request to the destination. During this process, your data request will not be routed through a dedicated tunnel. There is no additional processing when the data packet is sent to the proxy server. If you want to check your Gmail, you can achieve this by sending a request to a Hong Kong server over a SOCKS5 connection. Afterward, your Hong Kong server receiving your request will visit Google and return the result of that request to you.
Shadowsocks offers three modes. Direct connection mode does not redirect your traffic through the proxy server. The settings preset for some apps will continue to work in this mode. When PAC mode is enabled, only traffic to GFW-blocked websites is routed through the proxy server. In global mode, all traffic is redirected through the proxy server. Users can choose a mode that suits their needs.
Pros and cons of a VPN and SS
Shadowsocks is born for circumventing geo-blocks. It is based on the SOCKS5 proxy but is different from a normal proxy. Because it has some features specifically designed to bypass the GFW.
There is no private tunnel between the client and the server. The client communicates with the server you want to access through the proxy server. All data should be transferred via the proxy server.
VPN is the abbreviation for virtual private network. Connecting to a VPN means connecting to a private network. All Internet traffic should reach the destination via this private network. At the same time, the IP address of the user also becomes the IP address assigned by the VPN.
Comparison of a VPN and Shadowsocks:
Shadowsocks is open-source and can be constantly evolving.
The SOCKS5 does not require any handshake except for a TCP connection. Each request forwards only one connection and does not require a connection all the time. Thus, it is relatively fast and energy-efficient for mobile devices.
Shadowsocks can disguise the traffic as normal HTTP / SOCKS traffic, making it hard to detect. While VPNs can be easily detected and blocked.
Shadowsocks let users decide what traffic is routed through the proxy server by selecting different modes. However, all traffic should be routed through the VPN.
Shadowsocks can only redirect traffic. While a VPN encrypts traffic and ensures data security.
A user can mask the IP address with that of the VPN server. So the user can switch location.
SS / SSR would be better for those who just want to bypass Internet censorship. It cost you less money to get SS / SSR. While a VPN is relatively more expensive. Although there are some free VPNs, we do not recommend users to select them. If you care more about data security, you should opt for a reputable VPN.