Hysteria2 vs WireGuard: the difference and which one to use

WireGuard is a VPN tunnel built into the Linux kernel: a pair of keys, little overhead, no disguise, and packets that are easy to recognise. Hysteria2 is a proxy on QUIC that looks like HTTP/3, answers strangers as a website and keeps its speed on lossy lines with its own congestion control. Take WireGuard for a home network, a router or linking sites where it isn't blocked, and Hysteria2 for lossy mobile links or networks that cut WireGuard; where UDP is closed, neither works.

Updated

WireGuard config: server and clients with QR, AmneziaWG up to 3.1, keys

WireGuard and Hysteria2 in one list. A WireGuard .conf file and a hysteria2:// link both go into Profiles → Add and connect on Windows, macOS, Linux and Android.

Download Veli for free
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

WireGuard: a key pair on each side
wg genkey | tee private.key | wg pubkey > public.key

The 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.

Hysteria2: the official install script for Linux
bash <(curl -fsSL https://get.hy2.sh/)

It installs the latest version and a systemd service. The settings live in a YAML file, below.

Hysteria2: a minimal server config
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: true

Without 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

How we write and check

In Veli

WireGuard and Hysteria2 in one list

A WireGuard .conf file and a hysteria2:// link both go into Profiles → Add and connect on Windows, macOS, Linux and Android. On a computer, the Hysteria2 profile follows rules by app and by site in Apps and sites, while WireGuard takes rules by IP address only.

Profiles → Add → “Your own server” installs WireGuard or AmneziaWG on your VPS over SSH; Hysteria2 the app doesn't install, so set it up by hand and add its link. The kill switch is off by default; turn it on on Home or in Settings → Security if nothing should go past the tunnel when it drops.

FAQ

Is Hysteria2 faster than WireGuard?

On lossy lines, usually yes, because it resends lost data inside QUIC at a steady rate. On a clean line the difference is small. Measure both on your own network.

Can WireGuard run over TCP?

No. Its documentation says it explicitly doesn't, because TCP inside TCP performs badly. Tools such as udp2raw wrap its UDP in TCP from outside.

Is Hysteria2 a VPN like WireGuard?

Not by itself: it is a proxy for connections. A client app turns it into a VPN for the whole device, but it doesn't build a private network between devices as WireGuard does.

Why is WireGuard blocked when Hysteria2 works?

WireGuard's packets have a fixed type byte and fixed handshake sizes, so a simple rule finds them. Hysteria2 looks like HTTP/3, which many networks pass.

Which is more secure, Hysteria2 or WireGuard?

Both use modern ciphers: WireGuard its Noise handshake with ChaCha20-Poly1305, Hysteria2 the TLS 1.3 inside QUIC. With Hysteria2, keep the certificate check on: insecure=1 without a pinned fingerprint lets anyone on the path stand in.

Can I run Hysteria2 and WireGuard on one server?

Yes. Both use UDP, so give them different ports, for example 443 for Hysteria2 and 51820 for WireGuard.

WireGuard and Hysteria2 side by side

Veli is a free client for Windows, macOS, Linux and Android: a WireGuard .conf file and a hysteria2:// link go into one list of profiles.