Protocols

Hysteria2 protocol: how it works and which client to use

Hysteria2 is an open-source proxy protocol built on QUIC, the UDP-based transport behind HTTP/3, with its own congestion control designed for speed on unreliable and lossy networks. By default it imitates HTTP/3, and with Salamander enabled it turns packets into outwardly random data. It needs UDP, which makes it a strong choice for long-distance and mobile links but rules it out on networks that block UDP.

Published 26 November 202610 min readBy the Phoenix VPN team

Hysteria2 illustration: glowing orange waves of a fast connection running smoothly across a dark grid
On this page

How Hysteria2 works

Hysteria2 (Hysteria 2 in its documentation) is the second generation of the open-source Hysteria project. The Hysteria 2 protocol is a new design and does not work with Hysteria 1.x, so your server and clients must all run version 2 (Hysteria 2 vs 1).

The same program runs as a server or a client, and in TUN mode the client sends all of your device’s traffic through the server (Hysteria README). Apps such as Hiddify call this VPN mode, which is why people talk about a Hysteria2 VPN, although strictly speaking it is a proxy protocol.

Built on QUIC

QUIC is the transport underneath HTTP/3, the newest version of the web’s protocol. It runs over UDP rather than TCP and encrypts even its own control information, such as sequence numbers and acknowledgements (About HTTP/3). Hysteria2 carries each TCP connection you open as a separate stream inside one QUIC connection, and UDP traffic, such as calls, games or DNS lookups, as QUIC datagrams (protocol specification).

Looking like an HTTP/3 website

A Hysteria2 server runs a real HTTP/3 web server. Your client proves it belongs by sending a special HTTP/3 request with your password, and only then does the connection switch to the proxy protocol (protocol specification).

Anyone without the password, including an active probe, gets an ordinary web response, such as another website shown through a reverse proxy. Without a masquerade setting, every request gets “404 Not Found”, so the docs recommend serving real content when disguise matters (masquerade settings). Since version 2.11, the client also imitates Google Chrome’s QUIC handshake by default, so its fingerprint stands out less (client settings).

The TLS certificate

QUIC always uses TLS, so the server needs a certificate. The official server guide assumes a domain pointing to your server, so Hysteria can get one automatically from Let’s Encrypt or ZeroSSL; you can also bring your own. A self-signed certificate works if the client trusts it, and the client guide strongly recommends pinning its fingerprint (pinSHA256) if you turn off verification with insecure. The server name (SNI) in the handshake is visible to the network unless you enable Encrypted Client Hello, supported since version 2.10.

Salamander: when QUIC itself is blocked

Imitating HTTP/3 helps only where HTTP/3 is allowed. For networks that block QUIC or HTTP/3 specifically but not UDP in general, Hysteria2 has optional obfuscation (obfuscation settings). Salamander scrambles every packet with a key derived from a password you choose and a fresh random value, so packets look like random bytes with no pattern (protocol specification). The server and every client need the same obfuscation password; with the wrong one, the connection simply times out.

HTTP/3 and Salamander are separate modes, not two kinds of obfuscation running at once: with Salamander on, the server no longer works as an HTTP/3 website. Random-looking UDP has its own trade-off: on networks that only let through traffic they can identify, it can stand out more than HTTP/3 does.

Congestion control: Brutal and BBR

Every connection has to decide how fast to send; that is the job of congestion control. Classic algorithms slow down when packets go missing, assuming the network is overloaded. On a weak mobile signal or a long international route, packets also get lost for other reasons, so the connection keeps braking when it could go faster. Hysteria2 offers two approaches (congestion control details):

  • BBR, the default, was originally developed by Google for TCP. It estimates the available bandwidth from changes in round-trip time and needs no settings.
  • Brutal is Hysteria’s own algorithm. You tell it your connection’s real speed, and it sends at that fixed rate instead of slowing down when packets are lost or delays change. If it falls short, it measures the loss and sends faster to make up for it. The docs say it is particularly effective at seizing bandwidth on congested, best-effort networks, hence the name.

The client decides per direction: enter upload and download speeds in its bandwidth section and that direction uses Brutal; leave them out and it uses BBR. A server can cap each client’s speed or ignore client bandwidth settings altogether, which the docs suggest for owners who prefer fairness to other traffic (bandwidth negotiation).

Brutal is only as good as the number you give it. Below your real speed it simply works as a speed limit; above what the link can carry, in the docs’ words, you get “a slow, unstable connection and wasted data”.

Your connection

  1. Your deviceHysteria2 inside QUIC
  2. The networkSees HTTP/3, or random-looking UDP with Salamander
  3. Hysteria2 serverChecks your password; to anyone else it's a website
  4. InternetYour traffic goes on from here

On a lossy link

  1. Packet lossA weak signal or a long, busy route
  2. Congestion controlBrutal keeps the sending rate instead of backing off
  3. Stable speedLost data is resent without slowing down
How Hysteria2 looks to the network, and how Brutal keeps its pace on a lossy link when your bandwidth setting is accurate.

Clients usually import all of this as one share link (URI scheme):

hysteria2://PASSWORD@your.domain.net:443/?sni=your.domain.net&obfs=salamander&obfs-password=OBFS_PASSWORD#my-server

The part before @ is your password; obfs and obfs-password appear only with obfuscation, and self-signed setups add insecure=1 and pinSHA256. Bandwidth is deliberately left out, because it depends on each user’s connection. Treat the link like a password: anyone who has it can use your server.

Where Hysteria2 works and where it doesn’t

Hysteria2 is at its best where the link itself is the problem: packet loss, long distances, congested routes or mobile data. It can also help on networks that recognise VPN protocols by their signatures but let HTTP/3 through, which can include office, school or hotel Wi-Fi, mobile networks, and countries that filter traffic with deep packet inspection (DPI). Its limits:

  • It needs UDP. A network that blocks UDP blocks Hysteria2 too, and there a TCP-based protocol such as VLESS + REALITY is the usual fallback. Recent versions can disguise the connection as TCP with a third-party tool, mimic, but only on Linux and with root rights on both ends (Mimic).
  • UDP can be throttled. Some providers block or slow down long-lived UDP connections, often only on the port in use. Port hopping is the documented workaround: the client connects to a range of ports that the server accepts, such as 20000–50000, and switches to another every 30 seconds by default. If the restriction covers all UDP, it does not help (Port Hopping).
  • Your server’s IP is still visible. Neither masquerading nor Salamander changes where packets go, so the IP can be blocked or land on a reputation list; the usual fix is a new server or IP. A CDN can’t hide it either, because CDNs can’t carry Hysteria’s proxy protocol (Can I use a CDN?).
  • Settings must match. The password, obfuscation type and password, server name and certificate trust all have to agree with the server, and a mismatch usually shows up as a timeout or a certificate error (Troubleshooting). Because the client imitates Chrome, a server with an Ed25519 certificate fails the handshake; use ECDSA or RSA (client settings).
  • Not everything gets faster. The gain applies to TCP traffic inside the tunnel: Hysteria2 does not reduce the packet loss of UDP traffic itself, so HTTP/3 inside it gets no speed-up, and the docs suggest turning off QUIC in your browser when you use VPN mode (About HTTP/3). QUIC also needs more processing power than TCP, so weak devices and cheap, CPU-throttled VPS plans can limit your speed (Performance).

Results depend on settings and filtering methods; obfuscation does not hide your exit IP from websites.

Pros and cons

Pros

  • Built for speed on lossy, long-distance and mobile links, with Brutal or BBR congestion control.
  • Looks like HTTP/3 by default, and the server answers probes like a real website.
  • Salamander for networks that block QUIC, and port hopping for networks that throttle one UDP port.
  • Carries both TCP and UDP traffic, so calls and games work through it too.
  • Open source, with one program for server and client and a long list of third-party apps.

Cons

  • Needs UDP, so it is of little use where UDP is blocked or heavily throttled.
  • Brutal needs an honest bandwidth figure, and too high a number makes things worse.
  • The server needs a TLS certificate, ideally with a domain.
  • The server’s IP can still be blocked, and a CDN can’t front it.
  • Self-hosting means you handle the server, updates and IP changes yourself.

Set up Hysteria2 yourself or use an app

Running your own Hysteria2 server suits you if you like running servers and want to choose every setting. The official server guide covers a basic setup, and the installation script installs and upgrades Hysteria on common Linux distributions, though you still write the config yourself. Here is what each route takes.

Set it up yourself Phoenix VPN
Server Rent a VPS with a public IP outside the restricted network, and keep it patched Phoenix’s dedicated servers with multi-gigabit links, nothing to rent
Server install Install Hysteria with the official script and write the config, or use a web panel such as H UI Nothing to install on a server: you use the Phoenix VPN app
TLS certificate and masquerade Point a domain at the server for an automatic certificate, or pin a self-signed one; choose what to masquerade as Nothing to configure
Obfuscation password Choose HTTP/3 or Salamander, and set the same obfuscation password on the server and every device Nothing to set: pick Hysteria2 in the app, or let Smart Connection choose a protocol that gets through; Phoenix keeps the disguise settings current
Client app Install a Hysteria2 client such as Hiddify, v2rayN or Shadowrocket, import the link and enter your real bandwidth VPN apps for Windows, Android and Android TV; iPhone/iPad and macOS coming soon
Updates and IP changes Keep the server and clients updated; if the IP gets blocked, move to a new server or IP and send new links to every device No server of your own to update; Smart Connection checks which protocols get through on your network, picks the best country and connects; a blocked server IP is replaced on Phoenix’s side
Other protocols Each extra protocol, such as VLESS + REALITY or WireGuard, means more server setup and another client profile VLESS + REALITY, Hysteria2, Shadowsocks and WireGuard, all in every plan
Logs You decide what your server logs; you also rely on your hosting provider No activity logs: browsing history, DNS queries and traffic content are not stored
Devices As many as your server and setup handle Ember 3, Phoenix 6, Inferno 10
Time to connect Often an hour or more the first time, depending on experience Install the app, then one tap

If you go the DIY route, the Hysteria docs keep a list of third-party apps. Hiddify and v2rayN document Hysteria2 support on GitHub, and our guide to VLESS clients compares the main multi-protocol apps.

Hysteria2 compared with other protocols

No protocol wins on every network. The table shows typical behaviour; real results depend on configuration and on the network. For a broader overview, see VPN protocols compared.

Protocol Transport What a network observer sees On unstable or lossy networks Best for
Hysteria2 UDP (QUIC) Traffic that looks like HTTP/3 to a website; random-looking UDP with Salamander; the IP is still your server’s Typically strong: a customised QUIC built for unreliable, lossy links, with Brutal or BBR congestion control Speed on lossy, long-distance or mobile links where UDP is not blocked or throttled
VLESS + REALITY TCP A TLS 1.3 connection to a well-known site’s name, with a browser-like handshake Fine on stable links; as TCP, it typically slows down under heavy packet loss Networks that spot VPN and proxy protocols with DPI but allow ordinary HTTPS, including ones that block UDP
Shadowsocks 2022 TCP and UDP A stream of random-looking bytes with no recognisable protocol Light, with little overhead; behaves much like the underlying TCP or UDP Simple, low-overhead proxying where random-looking traffic is not treated as suspicious
WireGuard UDP A recognisable WireGuard handshake and packet format Generally good: a lean UDP tunnel that copes well with changing networks Speed and efficiency on networks that do not block VPNs

For the projects’ own descriptions, see the Hysteria README and the Shadowsocks 2022 specification, which calls its traffic indistinguishable from a random byte stream.

Phoenix VPN is an obfuscated VPN for networks that block VPNs with four protocols, VLESS + REALITY, Hysteria2, Shadowsocks and WireGuard, all in every plan. Hysteria2 is the one to try when you see packet loss or an unstable route and a regular connection isn’t delivering; where UDP is blocked, VLESS + REALITY, which runs over TCP, is the better pick. Or tap Smart Connection: it checks which protocols get through on your network, picks the best country and connects. Phoenix and Inferno come with a 3-day free trial, and you can cancel anytime. Compare plans or download Phoenix VPN.

Frequently asked questions

Do I need a domain and TLS certificate for Hysteria2?

You need a TLS certificate, because QUIC always uses TLS. The official guide assumes a domain that points to your server, so Hysteria can get a certificate automatically. A self-signed certificate also works if your clients trust it, ideally by pinning its fingerprint.

Does Hysteria2 work if UDP is blocked?

Usually not, because Hysteria2 runs over QUIC, which uses UDP. Port hopping helps when only one UDP port is blocked or throttled, and a Linux-only fake-TCP option exists for advanced setups. Where UDP is blocked outright, a TCP-based protocol such as VLESS + REALITY is usually the better choice.

What does Salamander do in Hysteria2?

Salamander is optional obfuscation. It scrambles every packet with a key based on a shared password, so the traffic looks like random UDP rather than QUIC or HTTP/3. The server and every client need the same password, and while it is on, the server no longer works as an HTTP/3 website.

Which client apps support Hysteria2?

For your own server, common clients include Hiddify (Android, iPhone, Windows, macOS and Linux), v2rayN (Windows, Linux and macOS) and Shadowrocket (iPhone and iPad), as well as the official command-line client. If you don't want to run a server, Phoenix VPN includes Hysteria2 in every plan, with nothing to configure.

Is Hysteria2 faster than WireGuard?

It depends on the link. On a clean, stable connection WireGuard is very fast and light. On lossy, long-distance or mobile links, Hysteria2 tends to hold its speed better, especially with Brutal and an accurate bandwidth setting. Real results depend on the server, the route and your network.

Phoenix VPN team · Written and fact-checked by the people who build Phoenix VPN.

Skip the setup
One tap to a protocol that works

Smart Connection checks which protocols get through on your network, picks the best country and connects. Phoenix and Inferno plans come with a 3-day free trial.