0%

How to save your VPS from GFW

Recently I came back shanghai for some days. Previously I was relying on a google cloud server to serve as the vpn, which is somehow too expensive. Considering I won’t be in China for too long, I just canceled it several weeks before, and built a simple v2ray server on the seedbox (a vps for torrenting) I have instead. It seems a nake ip connection to the vps goes too far that on the second day I arrived in Shanghai, the new vpn got blocked.

Here is how I saved it.

1. Use a domain name

The ip got banned, so I use a domain name instead. The domain is bought on tencent cloud, and I use cloudflare as the dns server.

2. Setup v2ray server

Just following the best v2ray install script.

3. Use WS + TLS + CF to hide the traffic

This is the key to re-use the blocked ip. CF will gives you a new ip address. And WS+TLS will hide the traffic so the GFW can’t tell it’s a vpn. The speed is said to be slower than the direct ip connection. However, I didn’t feel any difference (My VPS is in France). A detailed tutorial can be found here

4. Turn off Ipv6 resolving

My client doesn’t support ipv6, but the CF DNS constainly returns ipv6 address for my domain. I was wondering this could be done on the client side, but it seems this is actually handles by the dns server. However, Cloudflare declares that no turn-off for ipv6 is allowed, unless using the linux api command. I just followed [this article] (url=https://lishuma.com/archives/3229) to turn off the ipv6 resolving.

Finally, the vpn is back again. Also the vps could be reached using the domain (ssh, website etc.)