Post-quantum cryptography is breaking government censors
本文为原文前 6,000 字符的节选翻译,完整内容请查看原文。
Ever since Discord got banned here in 2024, I’ve had my selfhosted Amnezia VPN turned on 24/7. It works great, but every once in a while, I’ll have to turn off my VPN to do something with my real IP, and I’ll forget to turn it back on. And somehow, if I wait long enough, Discord will MAGICALLY come back to life on its own!
自从 2024 年 Discord 在这里被封锁以来,我一直 24/7 全天候开启自建的 Amnezia VPN。它运行良好,但偶尔我不得不关闭 VPN 以使用真实 IP 进行操作,之后却忘了重新开启。不知何故,如果我等待的时间足够长,Discord 竟然会“奇迹般”地自动恢复正常!
For almost two years I attributed this to race conditions in middleboxes because I could replicate a similar behavior by going to a website like roblox.com (yes roblox too), and holding down refresh until it too magically loaded before breaking again on the next refresh. I didn’t look into it much past that. I figured the censor was just getting overwhelmed and letting some requests it can’t process through.
近两年来,我一直将其归因于中间件(middleboxes)中的竞争条件,因为我可以通过访问像 roblox.com(是的,roblox 也是如此)这样的网站来重现类似的行为:按住刷新键不放,直到它奇迹般地加载出来,然后在下一次刷新时又再次中断。我没有对此进行深入研究,只是认为审查系统可能不堪重负,从而放行了一些它无法处理的请求。
Turns out the real explanation is far more interesting than anything I could’ve imagined. If you live in Turkey and your ISP isn’t Superonline, you probably think I’m crazy because you’ve never experienced this before. But I promise I’ll make it make sense.
事实证明,真正的解释比我能想象到的任何事情都要有趣得多。如果你住在土耳其,且你的互联网服务提供商(ISP)不是 Superonline,你可能会觉得我疯了,因为你从未经历过这种情况。但我保证我会让你明白其中的缘由。
How countries ban websites Internet freedom around the world looks something like this: Free Partly free Not free 94 Iceland, 94 out of 100 91 Estonia, 91 out of 100 85 Canada, 85 out of 100 78 Japan, 78 out of 100 74 Germany, 74 out of 100 73 United States, 73 out of 100 65 South Korea, 65 out of 100 51 India, 51 out of 100 48 Indonesia, 48 out of 100 37 Kazakhstan, 37 out of 100 31 Turkey Turkey, 31 out of 100 28 Egypt, 28 out of 100 25 Saudi Arabia, 25 out of 100 22 Vietnam, 22 out of 100 17 Russia, 17 out of 100 13 Iran, 13 out of 100 9 China, 9 out of 100 n/a North Korea, not rated Freedom on the Net 2025 scores out of 100 by Freedom House.
各国如何封锁网站?全球互联网自由度大致如下:自由、部分自由、不自由。冰岛 94 分,爱沙尼亚 91 分,加拿大 85 分,日本 78 分,德国 74 分,美国 73 分,韩国 65 分,印度 51 分,印度尼西亚 48 分,哈萨克斯坦 37 分,土耳其 31 分,埃及 28 分,沙特阿拉伯 25 分,越南 22 分,俄罗斯 17 分,伊朗 13 分,中国 9 分,朝鲜未评级(数据来源:自由之家《2025 年网络自由度》报告,满分 100 分)。
Literally every country on Earth has some level of network interference, and it correlates heavily with real-life freedoms. Countries on the left of the graph tend to focus more on security and copyright enforcement, while more authoritarian-leaning countries take drastic measures to interfere with any kind of traffic they don’t like.
地球上几乎每个国家都存在某种程度的网络干扰,这与现实生活中的自由度高度相关。图表左侧的国家倾向于更多地关注安全和版权执行,而更倾向于威权主义的国家则采取严厉措施,干扰任何它们不喜欢的流量。
The cheapest and most common method is DNS poisoning, where your ISP returns you fake results to plaintext DNS queries. This works surprisingly well because every ISP has to run a DNS server, and very few people even know what that is or bother to change whatever DHCP hands out.
最廉价且最常见的方法是 DNS 污染,即你的 ISP 对明文 DNS 查询返回虚假结果。这种方法效果出奇地好,因为每个 ISP 都必须运行 DNS 服务器,而很少有人知道那是什么,或者懒得去更改 DHCP 分配的设置。
For a while, Turkey was in a weird spot where it was banning popular services left and right like Youtube and even Wikipedia, but did so with primitive methods that were so easy to bypass, even non-technical people like my mom knew how to change their DNS settings to unblock every website.
有一段时间,土耳其处于一种奇怪的状态:它到处封锁 Youtube 和维基百科等热门服务,但所用的方法非常原始,极易绕过,以至于像我母亲这样非技术人员都知道如何更改 DNS 设置来解锁所有网站。
By 2018 latest, government controlled ISPs reportedly obtained PacketLogic DPI devices to step up their censorship game and crack down on DNS workarounds, which became ever more important as TLS reached near complete adoption. Superonline today is almost certainly running the same gear.
最迟到 2018 年,据报道,政府控制的 ISP 获得了 PacketLogic DPI 设备,以加强审查力度并打击 DNS 绕过行为。随着 TLS 协议几乎全面普及,这一点变得愈发重要。如今的 Superonline 几乎肯定也在运行同样的设备。
Deep Packet Inspection The next level in censorship is looking at and vetting specific packets passing through your infrastructure, which is way more computationally expensive and difficult to pull off. The machines doing this have to be fast enough to not slow down customer traffic, they have to be correct without letting requests slip through, and they have to be resilient without ossifying any specific protocol.
深度包检测(DPI):审查的下一个层级是查看并审查通过基础设施的特定数据包,这在计算成本上要高得多,实现难度也更大。执行此操作的机器必须足够快,以免拖慢客户流量;必须准确无误,不能让请求漏网;还必须具有弹性,不能导致任何特定协议僵化。
For some context, your device connects to websites by wrapping its requests in multiple different layers. For HTTP/2 (the most common HTTP protocol at the moment), it layers TLS on TCP on IP. Middleboxes that do deep packet inspection have to understand every protocol under the one they care about (in this case it’s all of them) and be able to unwrap messages they were never meant to read. That’s where the “deep” part of DPI comes from.
背景说明:你的设备通过将请求封装在多个不同的层中来连接网站。对于 HTTP/2(目前最常见的 HTTP 协议),它在 IP 之上叠加 TCP,再在 TCP 之上叠加 TLS。执行深度包检测的中间件必须理解其关注协议之下的每一个协议(在这种情况下是所有协议),并能够解包它们本不该读取的消息。这就是 DPI 中“深度”一词的由来。
The TLS protocol has a field on the ClientHello record your client sends when initiating its connection called Server Name Indication (SNI), that tells the server which domain it’s trying to connect to. Sadly this gets sent in plaintext as the machine you’re connecting to might be hosting multiple websites and will need to know which site’s certificate to respond with. Censors take advantage of this to drop or reset connections to blocked domains without having to care about DNS or encrypted traffic.
TLS 协议在客户端发起连接时发送的 ClientHello 记录中有一个字段,称为服务器名称指示(SNI),它告诉服务器客户端试图连接的域名。遗憾的是,该字段以明文形式发送,因为你连接的机器可能托管了多个网站,需要知道用哪个网站的证书进行响应。审查者利用这一点来丢弃或重置到被封锁域名的连接,而无需关心 DNS 或加密流量。