VPN & blocking 15 min read By KRAKOBIT

Why a VPN connects but goes silent in Iran, yet works in China

In China Reality gets through 91% of the time, in Iran 71%. Why the two toughest censors break VPNs differently and what works today.

China and Iran block the internet for different reasons and with different tools. China runs a permanent, precise filter at the country’s edge. It almost never switches the internet off entirely, but it has spent more than twenty years learning to recognise VPNs by how their traffic looks. Iran runs a kill switch. Its filter is cruder, but the Iranian state is willing to cut mobile internet, leave only approved sites open or keep only the domestic network running. For someone using a VPN the difference is tangible. In China, disguised protocols usually work smoothly until a specific server gets caught. In Iran, connection quality swings with politics, and connections more often break after they seem to have been established.

What DPI, Reality, UDP and the other terms here mean

You cannot talk about censorship without a few terms. Here they are without jargon.

Term What it means in plain words
DPI Equipment at the provider that looks not only at where traffic goes but also at what it looks like inside
SNI The site name a device states in plain text at the start of a secure connection. The content is encrypted, the destination is visible
Connection reset A forged “conversation over” signal the firewall sends to both sides
Active probing The firewall itself connects to a suspicious server and checks whether it is a VPN
TCP and UDP Two ways of delivering data. Almost the entire web runs on TCP. UDP is faster and is used by calls, games and WireGuard
Handshake The first packets in which the app and the server agree on a connection
Reality A protocol from the VLESS family that disguises a VPN connection as an ordinary visit to a real major website
XHTTP A way to hide a VPN inside ordinary web requests, as if a browser were loading a page
AmneziaWG WireGuard with disguise added by the Amnezia team, runs over UDP

Why XHTTP behaves differently in the two countries is covered in the KRAKOBIT article XHTTP in China and Iran: why one protocol behaves so differently.

Why do China and Iran block differently?

China is woven into the global economy. Exporters, universities, cloud providers and the gaming industry need the outside internet, so censorship has to be surgical: remove what is inconvenient without hurting trade.

The second pillar of the Chinese model is its own ecosystem. WeChat, Baidu, Douyin, Taobao and Alipay cover almost every need, and the average user does not suffer much without Google and YouTube. The Great Firewall does not need to catch everyone. It only needs to make circumvention inconvenient and risky.

Iran has no such ecosystem. The national messengers Rubika, Eitaa and Bale have been promoted for years, but the audience still sits in Instagram and Telegram through circumvention tools. Iranian officials and surveys have at various times put the share of VPN users at between half and 80% of the internet audience (estimate, figures vary widely). When most people use circumvention, a precise filter loses its point. What remains is pressure on the whole network at once: throttling, shutdowns, allowing only selected services.

Hence the main difference. China pays with technology, Iran pays with its economy. China invests in detection. Iran accepts collateral damage: on shutdown days banks, online shops and ride-hailing apps stop working, and this is considered an acceptable price.

How does China’s Great Firewall work?

The Golden Shield project started in 1998. Filtering at the international gateways of three state operators, China Telecom, China Unicom and China Mobile, grew into what is called the Great Firewall. The system mostly sits not in the path of traffic but beside it. It copies the stream, analyses the copy and intervenes: it injects a fake site address or sends a reset signal to both sides. This design is cheap and does not slow the network even at huge volumes.

Techniques were added in layers. Old ones were not removed, new ones were stacked on top.

Period What appeared in China What stopped working
2000s Spoofed site addresses, IP blocking, connection resets on keywords Direct access to banned sites
2010s Filtering by site name inside secure connections (SNI) Blocked sites over HTTPS
2011-2012 Active probing of suspicious servers Tor bridges
2019-2020 Detection of Shadowsocks by packet length and timing plus probing Shadowsocks
from November 2021 Blocking traffic that looks like pure encrypted noise Shadowsocks and VMess without disguise
autumn 2022 Mass blocking of servers running proxies over TLS, according to user reports collected by GFW Report Trojan and V2Ray with TLS

These stages are described in open research: the 2012 paper on Tor blocking, the GFW Report study of Shadowsocks presented at the IMC conference in 2020, and the 2023 USENIX Security paper on the detector of fully encrypted traffic.

The last paper shows the Chinese signature well. The firewall looks at the first bytes of a connection. If they look like random noise and resemble no known protocol, the connection is treated as suspicious. Old proxies encrypted everything and looked exactly like noise. Developers responded with protocols that do not hide but pretend to be ordinary web traffic: Reality and XHTTP.

The second signature is active probing. If a server raises suspicion, the firewall connects to it from Chinese addresses and watches how it reacts to garbage or to replayed packets. If it answers like a proxy, its IP gets blocked. That is why in China it is usually a specific server that dies, not a whole protocol.

China has never shut down the whole country. There is a regional precedent: in Xinjiang, after the 2009 unrest, the internet was cut for about ten months. Legally, unlicensed VPNs have been banned since the 2017 campaign by the Ministry of Industry and Information Technology, but enforcement is selective and more often targets sellers than users.

How does censorship in Iran work?

In Iran, all international connectivity passes through one state company, the Telecommunication Infrastructure Company (TIC). That makes the kill switch physically simple: there is one point where the outside world is switched off.

The second pillar is the National Information Network (NIN). It is a domestic segment with Iranian data centres, hosting providers, banks and government services that keeps running when the outside internet is off. China does not need such a construction, its domestic internet is self-sufficient anyway. Iran needs it to cut off the world without stopping the state.

Date What happened in Iran
2009 Facebook and Twitter blocked after protests
April 2018 Telegram blocked
November 2019 Near-total shutdown of the country for about a week, according to NetBlocks connectivity fell to 5% of normal
2020 Researchers from the Geneva project at the University of Maryland describe the protocol filter
September 2022 Protests after the death of Mahsa Amini: Instagram and WhatsApp blocked, daily evening mobile internet shutdowns
February 2024 The Supreme Council of Cyberspace bans unlicensed VPNs
December 2024 WhatsApp and Google Play unblocked
June 2025 War with Israel: connectivity with the outside world close to zero for several days

The Iranian filter is technically simpler than the Chinese one, but it has a technique that China does not use permanently: a protocol whitelist. On key ports a connection passes only if a permitted protocol is recognised in the first packets, such as ordinary web traffic or a site address lookup. Anything unrecognised is cut. A protocol that does not pretend to be ordinary web traffic does not survive on these ports.

The rest is a brute-force arsenal. Blocks on entire address ranges of foreign hosting providers, throttling of the international link and of UDP on tense days, mobile whitelists that leave only approved sites open. Even large companies get hit: KRAKOBIT covered the outage of the Firefox built-in VPN in Iran and what Mozilla said about it separately.

Another Iranian feature is tiered internet. Some users, such as universities, state media, certain businesses and officials, get access with lighter filtering. China also makes exceptions for large companies through licensed corporate channels, but in Iran access has become an open privilege.

Iran vs China: a comparison in one table

Parameter China Iran
Goal Precise filtering without harming the economy Control at any cost
Control point Gateways of three operators TIC monopoly on the external link
Full national shutdown Never 2019, 2025, regular regional and mobile shutdowns
Domestic network Not needed, the ecosystem is self-sufficient NIN as a substitute for the outside world
Main technique against VPNs Traffic behaviour analysis and server probing Protocol whitelist, address blocks, throttling
Rule stability High, rules change slowly Swing with politics
VPN legal status Unlicensed banned since 2017 Unlicensed banned since 2024
Share of VPN users Minority (estimate) Majority (estimate)
False positives The system avoids them The system accepts them

What does HopFox VPN data show?

Theory is best checked against live connections. HopFox VPN shared aggregates for the week from 30 October to 5 November 2026: the share of successful connections by the country of the user’s network and by protocol. Across three protocols combined there were 49,498 attempts in China and 50,834 in Iran. The samples are almost equal, which makes the comparison meaningful.

To separate censorship from problems with the servers and the app itself, control countries without heavy filtering sit alongside: Japan, Hong Kong, Germany and the US.

Country Reality XHTTP AmneziaWG
China 91% (27,699 attempts) 89% (19,423) 34% (2,376)
Iran 71% (21,027) 62% (27,141) 32% (2,666)
Japan 92% (1,756) 91% (1,355) no data
Hong Kong 91% (2,037) 89% (1,694) no data
Germany 76% (2,259) 66% (2,948) no data
US 72% (520) no data no data

The first thing that stands out: the spread among control countries is large on its own, from 66% to 92%. So connection success depends on many factors besides censorship: the quality of users’ networks, server load, the behaviour of the app.

Against this background, China on Reality and XHTTP sits at the level of Japan and Hong Kong, at the top of the control range. That matches the Chinese signature: a protocol that looks like an ordinary visit to a real site is not touched en masse by a cautious firewall.

Iran is 20-27 percentage points below China (Reality: 91% versus 71%, XHTTP: 89% versus 62%), but only 4-5 points below Germany. So the honest conclusion is more modest than one would like. With equal samples, the gap between China and Iran is real, but the success rate alone does not prove that Iranian censors create the whole difference. Failure reasons say much more, and they come below.

A separate note on why Reality and XHTTP inside Iran cannot be compared directly. In Iran the server puts XHTTP first, and after a failure the app switches to another protocol on its own. As a result, different protocols receive different groups of users and networks, and the figures reflect more than protocol quality. For comparison: on Russian networks of the same service the ratio is reversed, XHTTP 74%, Reality 66%. No protocol ranking can be drawn from this data.

How to read the weekly figures

The HopFox VPN data contains two kinds of figures. The overall share is calculated over all attempts in seven days. “Before” and “after” describe the level at the start and at the end of the period. The overall figure does not have to sit exactly in the middle: if one part of the week had more attempts, the total leans towards that part. Take China on Reality: 93% at the start, 91% at the end and 91% for the week overall. Hong Kong on Reality shows 95% and 90% at the edges and 91% in total, Japan 90% and 93% at the edges and 92% in total.

What changed during the week?

Country and protocol Before After Control countries
Iran, Reality 74% 68% Germany 75% → 76%, Japan 90% → 93%
Iran, XHTTP 64% 61% Germany 67% → 64%
China, Reality 93% 91% Hong Kong 95% → 90%
China, XHTTP 91% 89% Hong Kong 88% → 89%, Japan 90% → 91%
Iran, AmneziaWG 34% 31% no data
China, AmneziaWG 34% 34% no data

The 3-point drop of Iranian XHTTP mirrors Germany exactly, so it cannot be attributed to censors. Chinese Reality lost 2 points while Hong Kong lost 5: this also looks more like a shared server story in the region. Chinese XHTTP slipped 2 points against a small rise in Hong Kong and Japan, but for a one-week window this is within normal fluctuation (estimate).

One row stands out: Reality in Iran fell 6 points while it grew in Germany and Japan. It is the only change of the week that looks specifically Iranian.

The main limitation still applies: this is one network of one service, not the whole country.

Why does a VPN in Iran connect but stay silent?

Failure reasons say more about the difference between the two systems than percentages do.

Failure reason Iran China
Tunnel is up, but no answer through it 10,596 3,044
Same, on the test web request through the tunnel 2,074 not among frequent
No answer from any location on this network 2,588 not among frequent
No AmneziaWG handshake, UDP blocked 1,309 1,307

The “silent tunnel” occurs 12,670 times in Iran and 3,044 times in China. With an almost equal number of attempts, that is about four times more often: roughly a quarter of all Iranian attempts versus about 6% of Chinese ones (estimate, since the app retries with another protocol after a failure).

This kind of failure means the connection to the server was established but data does not flow through it. It looks like a system that lets the start of a conversation through and chokes it later, once enough signs have accumulated. Some cases may also come from congested links, so this is a sign, not proof. The same failure type is visible on networks in Azerbaijan (1,075) and Russia (893), while the data has no breakdown for control countries.

The Chinese firewall more often acts earlier: it prevents the connection from being established or blocks the server address entirely. The Iranian one more often lets you connect but not use the connection.

The “no answer from any location” line appears among frequent reasons only for Iran, about 5% of attempts. This is a situation where all servers in different countries are unreachable from the user’s network. It happens with whitelists, with blocks on foreign hosting address ranges, or when a particular operator’s external link is cut. China does not work this way: it does not switch off the entire outside world for a single network. Iran does it regularly.

Why do UDP protocols struggle in both China and Iran?

AmneziaWG gets through in 34% of cases in China and 32% in Iran. The main failure reason is the same: the handshake does not pass because UDP is closed on the user’s network. Such failures are almost equal: 1,309 in Iran and 1,307 in China, roughly half of all AmneziaWG attempts in each country.

Here the two systems converge, though by different paths. China has long been suspicious of unfamiliar UDP. Iran, in tense periods, chokes UDP on the international link altogether. In both countries, protocols that run over TCP and look like ordinary web traffic beat protocols over UDP. AmneziaWG cannot be compared with control countries from this data: no such aggregates exist. KRAKOBIT explained in more detail why AmneziaWG connects only now and then in the article AmneziaWG in Iran and China: why it connects only now and then.

What works in China and Iran today?

Putting research and HopFox VPN data together, the picture looks like this. A broader overview including Russia is in VPN in China, Iran and Russia: what is blocked and what works.

What works reliably in China:

  • protocols that pose as an ordinary visit to a real site, above all VLESS Reality;
  • XHTTP, which hides traffic inside ordinary web requests.

What does not work in China:

  • OpenVPN and plain WireGuard, recognised by their first packets;
  • Shadowsocks without extra disguise;
  • servers that, when probed by the firewall, do not behave like an ordinary web server.

What works better than the rest in Iran:

  • Reality and XHTTP, but with noticeably worse stability than in China;
  • setups with an intermediate server inside Iran, where traffic first goes into the domestic network and from there abroad (according to descriptions by users and developers, not present in the HopFox VPN data);
  • tools that bypass the filter without any VPN servers at all: KRAKOBIT reported in early November on Shroudly, which bypasses Iran’s filtering without a VPN, an account or servers.

What does not work in Iran:

  • protocols that fail the protocol whitelist on web ports;
  • almost any circumvention on days of full shutdown or mobile whitelists: if the external link is off, disguise does not help.

Where are the two systems heading?

China keeps improving detection. Each generation of circumvention lives until the firewall learns to tell it apart from normal web traffic, and then developers find the next disguise. It is a technology race, and in it China barely touches ordinary users: a specific server suffers, not the whole network.

Iran is moving towards a model where the outside internet becomes the exception: whitelists, tiered access, the domestic network as the main one. Here the race is less technical than political. The most advanced protocol is powerless on the day the external link is closed.

In recent years Russia has been moving somewhere in between. From China it borrows DPI techniques on TSPU equipment, from Iran the readiness to shut down mobile internet across entire regions. How TSPU blocks individual servers was covered by KRAKOBIT in the news story on a Habr author’s personal study.

For the user, the bottom line of the difference is simple. In China, a failure usually means one server is gone, and after a while everything works again. In Iran, a failure can mean an entire network has no way out for several days, and no protocol will change that.