# 翻墙协议六代演进 · 交互图解 (proxy-evolution) > An interactive, single-file web visualization explaining six generations of anti-censorship proxy protocols — from Shadowsocks (2012) to XHTTP with post-quantum REALITY (2024). Packets flow past a simulated "censor node" at each protocol's real speed; users can trigger active-probe attacks, enable packet-loss simulation, and play four canned censorship scenarios. Live demo: https://alloevil.github.io/proxy-evolution/ Source: https://github.com/alloevil/proxy-evolution Language: Chinese (zh-CN), English docs in README.en.md License: MIT · Single HTML file · Zero dependencies · Works offline ## The six generations 1. **Shadowsocks (SS, 2012)** — replaces the plaintext SOCKS5 forwarding with symmetric encryption; it imitates no real protocol. Lightweight and stateless, but the first packet is high-entropy and the entropy of the first 32 packet lengths gives traffic analysis a handle (the sssniff tool detects SS/SSR exactly this way). 2. **ShadowsocksR / VMess (2015)** — adds obfuscation (HTTP/TLS disguise, WebSocket) and replay protection (VMess timestamps). Weakness: "TLS-in-TLS" record-length nesting is a detection signature. 3. **VLESS (2020) / Trojan (2018)** — moves encryption to outer TLS 1.3; VLESS itself is just instructions. Trojan forwards unauthenticated visitors to a preset endpoint (by default the local HTTP server, usually configured as a real site). Weakness: TLS-stack fingerprints (JA3/JA4 come from the ClientHello, not the certificate) may differ from a real browser, and self-signed certificates fail validation. 4. **Hysteria2 / TUIC (2022–2023)** — QUIC-based (UDP). Head-of-line freedom is stream-level, not packet-level (streams sharing one lost UDP packet are blocked together); Hysteria2's Brutal congestion control refuses to back off on loss and slightly over-sends past the configured bandwidth, so it barely slows down on weak networks — but only when a bandwidth is configured. Weakness: UDP/443 is conspicuous and easily throttled or blocked by protocol. 5. **REALITY (2023) / AnyTLS (2025)** — REALITY completes the X25519 handshake with the server's own keypair (the client's `password` is the server's public key); legitimate clients are handed to the proxy, while probers are relayed to the real website and receive its real CA-signed certificate. Certificate validation, page fetching, and fingerprint comparison all fail. AnyTLS randomizes TLS record sizes to defeat statistical detection. 6. **XHTTP + post-quantum REALITY (2024)** — XHTTP (formerly SplitHTTP, released Dec 2024, Xray-core) splits upstream and downstream into separate HTTP requests that traverse a CDN, borrowing the CDN edge's real certificate and traffic profile. Combined with X25519MLKEM768 post-quantum key exchange (Xray v25.5.16+), ML-DSA-65 post-quantum certificate verification (v25.7.26+), and ECH (Encrypted Client Hello), the origin server is hidden behind the CDN and the SNI itself is encrypted. ## Key concepts explained - **Active probing**: a censor connects directly to a suspected proxy server, pretending to be a client, and inspects the returned certificate and page content. Each generation's defense escalates: meaningless ciphertext (SS) → fake HTTP shape (SSR) → real TLS but checkable certificate (VLESS/Trojan) → relay to real website (REALITY) → CDN treats it as an ordinary visitor (XHTTP). - **Head-of-line blocking**: in TCP+TLS, one lost packet stalls the entire connection. QUIC retransmits per-stream over UDP, so a loss on one stream doesn't block others. - **Brutal congestion control** (Hysteria2): does not reduce sending rate on packet loss; claims a fixed share of bandwidth. Excellent on lossy links, aggressive on shared ones. - **ECH (Encrypted Client Hello)**: encrypts the SNI in the TLS ClientHello, so a network observer cannot see which domain is being visited. - **Post-quantum TLS**: X25519MLKEM768 hybrid key exchange and ML-DSA-65 signature verification defend against "record now, decrypt later" attacks by future quantum computers. ## Interactive features - Six-generation selector (click / arrow keys / deep links like #reality, #xhttp) - Real-time packet animation whose speed *is* the data: SS 80px/s vs QUIC 95px/s; with "weak network" on, TCP stacks halve and show retransmit markers while QUIC speeds up - Active probe experiment with a dedicated REALITY "relay theater" (probe forwarded to a real-website node) - Six-generation sweep: probe all six sequentially, stringing verdicts into one evolutionary line - Four censorship scenario scripts: active probe attack, deep packet inspection, UDP blockade, weak long-haul link (RTT 300ms + 8% loss) - Comparison panel: four metrics (peak speed, weak-network performance, probe resistance, realism) with hover highlight and click-to-sort ## Six-generation parameter table All values below are **relative illustrative scores (0–100)** for building intuition, not benchmark data. Packet speed is the actual animation speed used in the visualization (px/s), so the visual speed difference *is* the data. | # | Generation | Year | Peak speed | Weak network | Probe resistance | Realism | Packet speed (normal / weak, px/s) | Packet loss tolerance | Probe verdict | |---|---|---|---|---|---|---|---|---|---| | 1 | Shadowsocks (SS) | 2012 | 80 | 45 | 25 | 15 | 80 / 44 | 20% retransmit | risk — identifiable | | 2 | SSR / VMess | 2015 | 75 | 40 | 50 | 30 | 75 / 40 | 22% retransmit | mid — partially exposed | | 3 | VLESS / Trojan | 2018–2020 | 88 | 55 | 70 | 70 | 88 / 55 | 15% retransmit | mid — partially exposed | | 4 | Hysteria2 / TUIC | 2022–2023 | 95 | 92 | 55 | 45 | 95 / **128** (faster!) | 3%, no retransmit marker | mid — partially exposed | | 5 | REALITY / AnyTLS | 2023 / 2025 | 88 | 55 | 95 | 98 | 88 / 55 | 15% retransmit | safe — indistinguishable | | 6 | XHTTP + post-quantum REALITY | 2024 | 86 | 58 | 92 | 96 | 86 / 58 | 12% retransmit | safe — indistinguishable | Notable: under packet loss, generation 4 (QUIC) **speeds up** (95 -> 128 px/s) because Hysteria2's Brutal congestion control refuses to back off, while all TCP-stack generations (1, 2, 3, 5, 6) roughly halve. This is the single most visible difference in the animation. ## Censorship scenario outcomes Four canned scripts; each narrates its steps in real time. | Scenario id | Title | Network | Plot | Ending verdicts | |---|---|---|---|---| | `probe` | 主动探测攻击 (Active probe attack) | normal | Censor connects to each generation, comparing certificate and content | gen1 risk, gen2 mid, gen3 mid, gen4 mid, gen5 safe, gen6 safe | | `dpi` | 深度包检测 (Deep packet inspection) | weak | Classifier scans packet-length entropy / timing / JA3-JA4 fingerprints (only where a ClientHello exists) | gen1 risk, gen2 risk, gen3 mid, gen4 mid, gen5 safe, gen6 safe | | `udp` | UDP 封锁 (UDP blockade) | weak | udp/443 throttled to 50kbps; generation 4 is throttled and the client switches to a REALITY/XHTTP (TCP) node (client-side fallback) | gen4 risk -> gen5 safe (recovered) | | `weaknet` | 弱网远距离 (Weak long-haul link) | weak, 0.5x speed | RTT 300ms + 8% loss | gen1 risk, gen2 risk, gen3 mid, gen5 mid, gen4 safe (QUIC unaffected), gen6 mid (CDN hop) | ## Machine-readable data - **data.json** — full dataset: all six generations (protocol stack layers, badges, explanation points, animation parameters, probe verdicts, comparison scores) and all four scenario scripts (step-by-step events). Text fields are duplicated as `innovationText` / `encWhereText` / `pointsText` / `probeText` with HTML stripped, for direct quoting. URL: https://alloevil.github.io/proxy-evolution/data.json - **sitemap.xml** / **robots.txt** at the same origin. ## Technical Single `index.html`, vanilla JS + CSS, no dependencies, no build step. Animation uses requestAnimationFrame with a watchdog that self-heals if the loop dies. All six generations' data (speed, loss rate, verdicts, scenario steps) lives in a single GENS / PRESETS array; `data.json` is generated from it by `build-data.py` so the two never drift. ## Caveats Comparison scores are relative illustrative values for building intuition, not benchmark data. This project is for studying technical principles only.