Accessing Blocked Services from Inside China
Most people who move to Shanghai or Shenzhen for work find out within their first week that their normal internet workflow just stops. Gmail is unreachable. GitHub throws connection timeouts. The apps they relied on for daily tasks become completely inaccessible. I dealt with this firsthand when I was managing a development team that needed to push code to GitHub while our office was in Hangzhou. We went through two months of broken CI/CD pipelines before we figured out what was actually happening. The connection wasn't being dropped at the ISP level. Something deeper was resetting the sessions.
The Great Firewall Goes Dark Chinas Crackdown On Free Speech And The Worlds Most Powerful Firewall
The technical mechanism behind the blocking is called GFWPlus in the gray-hat community, but officially it is the Golden Shield Project. It operates through a combination of IP-level blacklisting, deep packet inspection, and DNS poisoning. When you try to reach a blocked domain, the GFW intercepts your DNS query and returns a fabricated response that points nowhere. For direct IP connections, it sends TCP RST packets that tear the handshake apart before it completes. This is not a simple firewall rule set. It dynamically learns which protocols your traffic is using and adjusts its inspection depth accordingly. That is why the same VPN tunnel that works on Monday morning might fail by Tuesday afternoon without any change on your end. The blocklists rotate frequently. Google's CDN IPs get added to the blacklist faster than you can update your resolver settings. The workaround I ended up using involved a combination of VMess over WebSocket with TLS fragmentation and a relay server hosted outside mainland China. The key detail that most guides miss is the fragmentation part. Standard V2Ray or Xray configurations with vmess over ws do not survive the DPI inspection reliably because the SNI and early TLS handshake bytes are enough for the GFW to classify the traffic as a VPN tunnel. Adding TLS record layer fragmentation breaks those predictable byte patterns apart so the inspection system cannot identify the protocol fingerprint.
You configure this by setting the fragment option in your client config. The payload gets split into random-sized chunks sent across multiple TLS records. A typical configuration looks like this: "outbounds": [{"settings": {"fragment": {"packets": "tlshello", "length": "100-200", "interval": "10-20"}}}] This adds roughly 30 to 50 percent latency overhead. A connection that normally responds in 180 milliseconds will take between 230 and 270. For most workflows this is acceptable. Video calls will still stutter. You just have to decide what you are optimizing for.
Get the Full Details

Here is the part nobody likes to admit. Even with a properly configured fragmented VMess setup, your connection will still drop occasionally. The GFW does randomized active probing. It sends crafted packets to known proxy ports to test whether any active tunnel is responding. If your VPS outside China happens to be on an IP range that has been flagged recently, your clients will experience sudden timeouts that last anywhere from ten minutes to several hours depending on how aggressively that IP range is being tested. There is no permanent fix for that. The only reliable mitigation is to have a backup relay server on a different hosting provider and automatically switch when the primary fails. I built a simple health-check script that pings baidu.com every thirty seconds through the tunnel. If it returns nothing for two consecutive checks, it swaps the outbound node in the Xray config and reloads the daemon. That cut my downtime from roughly four hours per week down to maybe twenty minutes. Another problem that beginners consistently overlook is port blocking at the enterprise level. Even if your personal VPN works on your home connection, your office network likely has additional DPI layered on top of whatever the ISP is doing. Cisco and Palo Alto appliances configured with Chinese threat intel feeds will block VPN traffic regardless of what protocol you are using. In those cases, you need to route through an SSH tunnel on port 443 instead. Most corporate firewalls allow HTTPS traffic on that port without question, so you wrap your VPN traffic inside an encrypted SSH connection to a remote server and let the VPN traffic flow through there. The setup takes about fifteen minutes once you have a VPS configured.
There are also legal considerations you should be aware of before setting anything up. Operating a VPN relay server inside China without a licensed ISP connection is technically illegal under the Telecommunications Regulations. Using a VPN as an individual consumer to access foreign websites exists in a gray area that has not been systematically enforced against average users. But if you run a proxy service that others connect through, that crosses into a different category entirely. There have been prosecutions for that specific behavior. The practical reality is that the blocking infrastructure keeps improving. What worked reliably in 2022 requires more configuration steps in 2025. TLS fingerprinting is now sophisticated enough to identify tools like Outline and ShadowsocksR by the way they negotiate cipher suites. Plain obfs4 bridges get detected and blocked within days of deployment in some regions. The fragmentation technique mentioned above is currently one of the more durable approaches because it changes the TLS record structure in a way that is difficult for DPI systems to distinguish from legitimate fragmented HTTPS traffic without breaking actual legitimate connections in the process. If you need access primarily for browsing and email, a cheap shared VPS in Singapore or Japan paired with a fragmented Xray setup is sufficient for most people. It costs around eight dollars per month for the server and takes about forty-five minutes to configure correctly. If you need it for development workflows with frequent large file transfers, you will want to add CDN-style masking on the relay side. Cloudflare's CDN in front of your VPS makes the traffic look like regular Cloudflare traffic to the inspection system. That adds another layer of protection against IP-based blocking and reduces the frequency of the random probing drops I described earlier. The tradeoff is that Cloudflare's free tier gets you nowhere near enough bandwidth for serious work, and the Pro plan runs about twenty dollars a month on top of your VPS cost.
The whole ecosystem moves too fast for any single configuration to stay reliable indefinitely. Expect to spend time adjusting your setup every few months. The alternatives are to rely on physical SIM cards from Hong Kong carriers when traveling near the border, or to accept that certain tools will remain unavailable and find domestic substitutes. Most companies operating in China eventually do the latter. They stop trying to route everything through overseas services and instead build their infrastructure locally with whatever Chinese platforms are available. It is slower, more frustrating, and completely boring. That is usually the most sustainable path.
