Skip to content
network-securityintermediate#great-firewall#censorship#china#vpn#dns#tls#network-security

How the Great Firewall of China Works: Censorship Methods and What Gets Through

How China's Great Firewall censors traffic: DNS injection, SNI resets, QUIC filtering, IP blocks, active probing of proxies, and which routes still work for a visitor.

The Great Firewall (GFW) is China's national filter on its international internet links. It is a collection of devices that read DNS queries, TLS handshakes, QUIC packets and the shape of encrypted tunnels, and act on each with a different technique and a different blocklist.

Traffic from abroad into China crosses the same border links, and part of the filter still acts on it. A TLS handshake sent from Kuala Lumpur to a server in mainland China that names a blocked site in SNI is reset as it would be from Beijing. Inbound DNS and QUIC behaviour has changed since the papers. The QUIC study saw inbound blocking stop at most vantage points on 30 September 2024 and everywhere on 13 March 2025, and a pwnsy check on 17 November 2026 found mainland servers still answering QUIC for www.google.com and www.youtube.com from outside. A DNS query for a blocked name sent from Malaysia on 13 November 2026 got no injected reply, although the published DNS studies measured injection from US servers. The 2021 to 2023 fully encrypted traffic block applied only to connections leaving China for data-centre ranges. The SNI filter is the part you can still check from home before you travel.

This guide walks through each censorship method in the order a connection meets it, then the routes that get a visitor through, the legal position, and a list to finish before the flight.

Where the firewall sits

The filtering devices sit on the links between China's three big carriers (China Telecom, China Unicom, China Mobile) and the rest of the internet. Traceroute-style measurements in the 2025 QUIC study put the QUIC blocking devices at the same hop as the older DNS injectors, nine to twelve hops in from the client depending on the city.

Two kinds of device do the work:

  • On-path injectors copy traffic, inspect it, and race a forged reply back to the client. They cannot drop the real packet, so they have to answer first. DNS injection and TCP resets work this way.
  • In-path filters sit in the forwarding path and can drop packets. IP null-routing works this way.

QUIC blocking is a hybrid of the two: the Initial packet that triggers it reaches the server, and the packets after it are dropped.

Domestic traffic between two Chinese hosts never crosses these links, which is why domestic sites stay fast while foreign ones fail.

The censor's toolkit

DNS injection

When a client asks for the address of a banned domain, an injector on the border sees the UDP query, builds a forged answer pointing at a wrong IP, and sends it back before the real resolver can reply. The client accepts the first answer that arrives.

The FOCI 2020 paper Triplet Censors found three separate injectors running side by side, each with its own packet fingerprint:

InjectorDNS and IP traitsDomains it answered for
1DNS TTL 60, Authoritative Answer flag set, incrementing IP TTL88
2AA flag off, Don't Fragment on, random IP TTL24,729
3AA flag off, IP ID 0, fixed IP TTL22,948

A single query for a censored name can therefore come back with two or three forged answers. The pool of forged addresses was 1,510 IPs until 23 November 2019, when it shrank to 216. Injector 3 also copies the TTL of your probe into its reply, which breaks the usual trick of finding a censor by sending packets with a rising TTL: the first injected reply appeared only when the probe's TTL reached 29, for an injector 15 hops away (a probe TTL of 2n minus 1 for n hops).

The injector answers even when the target IP runs no DNS server at all. Sending a query for twitter.com to a Chinese web server that has nothing listening on port 53, and getting an answer, was the classic proof of injection. The mechanics of forged DNS in general are in DNS spoofing explained.

Resolver pollution

Forged answers escape. When a resolver outside China forwards a query whose path crosses the border, the injected reply can land in its cache and be served to users who never touched China. GFWatch (USENIX Security 2021) tested an average of 411 million domains a day for nine months and found 311,000 censored by the DNS filter. About 77,000 of those had forged records polluting public resolvers such as Google and Cloudflare at some point, and 41,000 harmless domains were caught by over-broad filter rules.

Encrypted DNS (DoH or DoT) stops the injector from reading or answering the query, because the query is inside TLS. Inside China it still leaves the next three methods in place, and Google's DoH service sits behind the same blocks as the rest of Google.

SNI resets

A TLS connection opens with a ClientHello that names the site in the Server Name Indication (SNI) field, in clear text (see how the TLS handshake works). The firewall reads that name. If it is on the list, it injects forged TCP RST packets toward both ends, and the client sees connection reset by peer immediately after sending the ClientHello.

OONI documented this against its own domains: from July 2023, TLS handshakes to any subdomain of ooni.org or ooni.io were reset on several Chinese networks, alongside DNS answers pointing at bogon or unrelated addresses.

Encrypted Client Hello (ECH) hides the real name, but few sites that China blocks deploy it, and a blocked outer SNI defeats it.

QUIC SNI filtering since April 2024

HTTP/3 runs over QUIC on UDP. The QUIC Initial packet is encrypted, but with keys anyone can derive from values in the packet header, so a passive observer can decrypt it and read the TLS ClientHello inside. From 7 April 2024 the firewall began doing exactly that at scale, according to Exposing and Circumventing SNI-based QUIC Censorship (USENIX Security 2025).

What the researchers measured:

  • A single Initial packet with a listed SNI triggers a block. The firewall then drops client-to-server UDP for that source IP, destination IP and destination port for 180 seconds.
  • It inspects only the first datagram of a flow, and only packets whose source port is higher than the destination port (normal client behaviour).
  • It does not reassemble an Initial split across datagrams, and it blocks QUIC version 1 only.
  • The QUIC blocklist is a separate list, roughly 60% the size of the DNS list. Of 58,207 names ever blocked over QUIC, 38,451 support HTTP/3 at all.
  • Blocking was less reliable during the day and strongest in the early morning, which the authors put down to limited processing capacity.

Clients adapted after publication. Firefox 137 enabled SNI slicing (splitting the name across packets) by default on 30 April 2025, and quic-go 0.52.0 added it in May 2025, which carried the fix into sing-box, V2Ray, Xray and Hysteria.

IP and port blocking

Once a server is confirmed as a proxy, or hosts a banned service, its address gets null-routed. In the October 2022 wave against TLS-based proxies, GFW Report found the listening port blocked first, and whole IP addresses blocked once users moved to another port (Net4People #129). Google, Facebook and Twitter address ranges are blocked this way, so an SNI test alone cannot show they are censored; their blocking happens before any handshake.

If your server is unreachable from China but answers normally from Malaysia, the block is on the border links and the server itself is fine.

Active probing of proxies

The firewall classifies encrypted tunnels in two steps. First a passive pass looks at the first data packet of a connection: its length, its entropy, and whether it matches a known protocol. Then, for connections that look like a proxy, it sends probes of its own from Chinese IP addresses.

The IMC 2020 study How China Detects and Blocks Shadowsocks ran Shadowsocks servers for about four months and recorded more than 50,000 probes from more than 12,000 unique Chinese IPs. The probes came in two kinds:

  • Replays of the first packet from a real user connection, sometimes byte-for-byte and sometimes with a few bytes changed, sent seconds to days later.
  • Random payloads of specific lengths (most of them 221 bytes) that matched no earlier connection.

A probe tries to make the server behave in a way only a proxy would. Older stream-cipher Shadowsocks servers timed out on short inputs and reset on longer ones, which gave them away. AEAD versions that always time out, and servers that reject replays, leak far less. To see what such a probe learns from a given server and port, run it through the VPN protocol fingerprint tool, which probes Shadowsocks, Trojan, REALITY and Hysteria2 the way a censor would.

The fully encrypted traffic block, 2021 to 2023

In early November 2021 the firewall began passively blocking connections whose first packet looked completely random, with no probing at all. How the Great Firewall of China Detects and Blocks Fully Encrypted Traffic (USENIX Security 2023) reverse-engineered the rule. A connection was exempt if its first payload met any one of these:

Illustrated cybersecurity scene for How the Great Firewall of China Works: Censorship Methods and What Gets Through
Illustration for How the Great Firewall of China Works: Censorship Methods and What Gets Through.
  1. Average set bits per byte at or below 3.4, or at or above 4.6 (random data sits near 4).
  2. First six bytes all printable ASCII.
  3. More than half the bytes printable ASCII.
  4. More than 20 consecutive printable ASCII bytes.
  5. Starts like TLS or HTTP (GET , POST and so on).

Anything that failed every test was blocked, but only for about 26% of connections and only on connections from China toward specific IP ranges of popular data centres such as DigitalOcean, Linode and Amazon. Shadowsocks, VMess and obfs4 all fit the "random" profile. The authors estimated that applying the rule to all traffic would have blocked about 0.6% of normal connections by mistake, and their artifact notes confirm the dynamic blocking had stopped by 15 March 2023. Circumvention tools shipped countermeasures from January 2022, such as prefixing a printable header or shifting the bit count.

Throttling

Users widely report that unclassified encrypted tunnels slow sharply in the evening peak and around politically sensitive dates, while domestic sites stay fast. Published measurement of exact hours and rates is thin, so treat it as a hypothesis. The QUIC study's finding that blocking reliability varies with time of day shows that capacity limits do shape when the firewall acts. A tunnel speed test at 10:00, 21:00 and 02:00 over a few days, logged with the speed by hour of day view, tells you whether your own route has an evening drop.

Censorship inside the apps

The network filter is one layer. Chinese platforms also filter inside their own apps. Citizen Lab's One App, Two Systems (2016) found that WeChat applied keyword filtering only to accounts registered with a mainland Chinese phone number, and that the filtering stayed on after the user linked an international number. Group chats blocked more keywords than one-to-one chats, and blocked messages simply failed to arrive with no notice to the sender or the recipients. A VPN does nothing about this: the filtering happens on the platform's servers.

What gets through

For a visitor, each route is a trade between setup effort, speed, and how long it survives the methods above.

RouteSurvivalWhy
Home-routed roaming SIM or eSIMHighData is carried back to the home carrier (or the reseller's gateway in Hong Kong or Singapore) before it reaches the internet, so it never crosses the filters. Some travel eSIMs break out locally on a Chinese network and are filtered like a local SIM.
VLESS + REALITYHighLooks like a TLS session to a real, unblocked site. A prober without the key is forwarded to that site and sees its genuine certificate.
TrojanHighReal TLS with a real certificate on port 443. Wrong or missing credentials get the fallback web page, so a prober sees an ordinary website.
Hysteria2MediumQUIC-based and fast on lossy links, and it answers probes as an HTTP/3 server. UDP is throttled or blocked in some provinces and periods, and its SNI is subject to the QUIC filter.
Shadowsocks 2022MediumA salt pool and timestamps (SIP022) reject the replay probes from the IMC 2020 study. Its bytes still look random from the first packet, the profile the 2021 to 2023 block targeted, so keep it as a backup line.
Tor with SnowflakeMedium to lowVanilla Tor is blocked. Snowflake bridges work intermittently and are slow; OONI recommends Orbot with Snowflake for submitting measurements from China.
Commercial VPN appsVariesLarge shared IP ranges get blocked in bulk. Stealth modes help. Reachability changes week to week.
Plain WireGuard, OpenVPN, IKEv2LowFixed handshakes that deep packet inspection recognises in the first packet.

Home-routed roaming

Roaming needs nothing installed; the cost is price and the latency of the round trip to the home gateway. The China trip check reads your exit route: an ASN outside China (Maxis, CelcomDigi, a Hong Kong carrier) means the traffic was not broken out locally, and China Telecom, Unicom or Mobile means it is filtered.

TLS-imitating proxies: REALITY and Trojan

REALITY borrows the TLS handshake of a real third-party site, so there is no certificate of your own to fingerprint. Pick a cover site that is reachable from China and plausible for your server's hosting provider. Neither protocol helps if the server's IP is blocked for other reasons, such as sitting in a data-centre range with heavy proxy traffic.

Tor, WireGuard and OpenVPN

Snowflake disguises a Tor connection as WebRTC through short-lived volunteer proxies, which suits low-bandwidth work such as submitting OONI measurements; the anonymity side is in how Tor works. A WireGuard handshake initiation is a fixed 148-byte message with a fixed type byte, an OpenVPN session starts with a recognisable opcode, and plain WireGuard and OpenVPN can work briefly on a fresh IP. How they compare outside a censored network is in what a VPN is and how it works.

Checking any of this from outside

The SNI filter still fires on inbound handshakes, so you can test it from home. The Great Firewall check sends a TLS ClientHello naming your hostname to calibrated web servers inside mainland China and reports whether the SNI filter cuts it, next to OONI's in-country verdict. A clean SNI result says nothing about IP or DNS blocking, so read the two together. The censorship radar ranks VPN providers and domains by OONI reachability in China with a daily series.

China's rules require international connections to pass through licensed gateways and operators. A January 2017 notice from the Ministry of Industry and Information Technology launched a 14-month campaign against unapproved cross-border connections and stated that VPN services need government approval. On paper, a personal VPN to your own server is therefore unauthorised.

In practice, reported enforcement has focused on people who sell VPN access and on residents, with a few local fines reported for individual users. Prosecutions of short-stay visitors for personal use are rarely reported. Foreign companies use licensed cross-border lines, and roaming data is a licensed carrier service. Practical guidance:

  • Keep use personal and low-key. Do not resell access, share configs in groups, or advertise a server.
  • Measure the firewall from outside China, and avoid active tests from inside the country. They can draw attention, and OONI warns that running its probe in China carries risk.

For a specific situation, ask a lawyer who practises Chinese law.

Before you fly

  1. Install every client at home. OONI Probe, Orbot, and your proxy clients (v2rayNG, Shadowrocket, sing-box, Hysteria) go on before departure. ooni.org and the OONI API have been blocked in China since July 2023, and Chinese app stores carry few VPN apps.
  2. Buy a home-routed eSIM and confirm it. Activate it, then check the exit route on the China trip check as soon as you land.
  3. Stand up two protocols on two IPs. One REALITY or Trojan, one Hysteria2, on different providers, so one block leaves the other working.
  4. Fingerprint your own servers. Point the fingerprint tool at each port and confirm a probe sees only a website or silence.
  5. Save baselines. Record leak test, MTU and speed results through each tunnel at home, so you have numbers to compare against once inside.
  6. Sweep your work sites. Run the domains you depend on (Google Workspace, GitHub, Notion, your company VPN endpoint) through the Great Firewall check and the censorship radar.
  7. Set DNS inside the tunnel. A lookup that leaks to a Chinese resolver gets a forged answer even while the tunnel is up.

Verdict

The Great Firewall is a layered filter that has been reverse-engineered in unusual detail: three DNS injectors, an SNI reset, a QUIC decryptor with its own blocklist, a passive classifier, and a fleet of probers. Each layer has a known weakness, and the firewall has changed behaviour after papers were published, so any result here can go stale.

For a short trip, a home-routed roaming eSIM is the answer: nothing to configure and nothing for the firewall to see. For a longer stay or work on local Wi-Fi, run a TLS-imitating proxy (REALITY or Trojan) with a Hysteria2 backup on a separate IP, installed and tested before you leave. Plain WireGuard and OpenVPN belong at home.

Sources & further reading

Related guides