On this page
Side by side
Transport
Hysteria2QUIC over UDP, port 443 by default
WireGuardUDP only; TCP is left out on purpose
Disguise
Hysteria2Looks like HTTP/3; Salamander turns every packet into random bytes
WireGuardNone: the project says it doesn't focus on obfuscation
What a censor sees
Hysteria2A QUIC handshake with a readable server name; a stranger gets 404 or a website
WireGuardPacket type in the first byte, three zero bytes, handshakes of 148 and 92 bytes
Speed on lossy links
Hysteria2Lost data is resent inside QUIC, at a set rate (Brutal) or with BBR
WireGuardA lost packet is lost for the app's TCP, which slows down
Setup
Hysteria2A certificate (a domain, or self-signed and pinned), a password, one YAML file
WireGuardA key pair per side and a .conf file; in the Linux kernel since 5.6
Clients
Hysteria2Hysteria's own program, sing-box, mihomo, Xray and apps built on them
WireGuardOfficial clients for Windows, macOS, iOS, Android, Linux and BSD; many routers
A tunnel and a proxy
WireGuard works with IP packets. Each side has a key pair; the other side's public key and AllowedIPs say which addresses go to whom. The handshake is Noise_IKpsk2 with Curve25519, ChaCha20-Poly1305 and BLAKE2s, and it repeats every few minutes so that keys keep changing. The device gets an address in a private network: besides going out to the internet, it can reach home devices or join two offices.
Hysteria2 works with connections. The client logs in over HTTP/3 (POST /auth, success is the status 233), then carries each TCP connection in a QUIC stream and UDP packets in QUIC datagrams. It takes connections out through the server, but builds no network between devices. A client app makes it a VPN for the whole device with a virtual adapter (TUN).
WireGuard's documentation explains why there is no TCP mode: TCP inside TCP performs badly, and wrapping UDP in TCP is left to tools above it, such as udp2raw.
Speed when packets get lost
WireGuard adds no reliability of its own. A packet lost on the way is missing for good, and the program's TCP inside the tunnel sees it, asks for it again across the whole path and lowers its rate, just as it would without a VPN. On a clean wired line that is fine, and on Linux all of this happens inside the kernel.
Hysteria2 splits the path. Between the app and the client, and between the server and the site, ordinary TCP runs on good links; the lossy stretch in the middle belongs to QUIC. With a line speed set in bandwidth, Brutal mode keeps sending at that rate and compensates for loss; without one, BBR estimates the line's bandwidth rather than reading every loss as congestion. On mobile data, busy Wi-Fi and long routes this usually means Hysteria2 keeps more of its speed.
- Don't overstate
bandwidth. Hysteria's docs warn that a rate above the line's real capacity causes congestion and an unstable connection. - A clean line: the difference is small; the gain shows only where packets are really lost.
- Check yours: both on one server, measured in the same place at the same time.
What a censor sees
WireGuard looks the same everywhere: the first byte is the message type from 1 to 4, followed by three zero bytes, and handshake messages are exactly 148 and 92 bytes long. Its documentation says plainly that obfuscation should happen in a layer above it. In September 2021 users of several providers in Russia reported WireGuard failing for days; in his summary on the WireGuard mailing list David Fifield noted that a pattern for BitTorrent's uTP would also match WireGuard's first handshake message. A stranger who sends packets without the server's public key gets no answer at all.
Hysteria2 is QUIC, and the first QUIC packet is protected with keys derived from its own header (RFC 9001), so a filter can read the server name. China's firewall has blocked QUIC by that name since 7 April 2024 (Zohaib and colleagues, USENIX Security 2025); the paper lists Hysteria 2.6.2 from June 2025 among the tools whose QUIC library now splits the name across frames. Since 2.11 the client's handshake copies Chrome's. Salamander makes every packet look random, at the cost of the HTTP/3 disguise. A stranger without the password gets 404 Not Found, or a website set in masquerade.
Neither hides the server's IP address, and port hopping in Hysteria2 helps only where one long UDP flow on one port gets slowed.
Setting up a server
wg genkey | tee private.key | wg pubkey > public.keyThe private key goes into [Interface] of its own .conf file, the public key into [Peer] on the other side. No certificate or domain is needed.
bash <(curl -fsSL https://get.hy2.sh/)It installs the latest version and a systemd service. The settings live in a YAML file, below.
acme:
domains:
- vpn.example.com
email: admin@example.com
auth:
type: password
password: p4ssw0rd-Example
masquerade:
type: proxy
proxy:
url: https://www.example.com/
rewriteHost: trueWithout listen it takes port 443. Instead of acme you can give your own tls certificate and key; a self-signed one is pinned on the client with pinSHA256. Remove masquerade and strangers get 404.
When to pick which
- A home network, a NAS, joining two offices: WireGuard. It gives a real private network and is built into many routers.
- WireGuard works on your network: keep it. A disguise only matters where the plain protocol is cut.
- Mobile data, crowded Wi-Fi, a server far away: Hysteria2.
- WireGuard is blocked, UDP gets through: Hysteria2, with Salamander if QUIC itself is blocked.
- No domain: WireGuard is simpler; Hysteria2 then needs a self-signed certificate pinned in the link.
- UDP is closed: neither; take a TCP protocol such as VLESS with Reality. Hysteria's Mimic dresses UDP as TCP but needs Linux with root on both ends.
Sources
- WireGuard: protocol and cryptography
- WireGuard: known limitations
- Hysteria 2 protocol specification
- Hysteria 2 docs: server setup
- Hysteria 2 docs: full client config
- RFC 9001: Using TLS to secure QUIC
- Zohaib et al.: SNI-based QUIC censorship of the GFW (USENIX Security 2025)
- WireGuard mailing list: reports of WireGuard blocking in Russia, 2021