Hysteria 2
Hysteria 2 uses QUIC over UDP with authentication and encrypted transport. Yuhaiin supports it as an outgoing node and as a server-side inbound.
Before you configure
Section titled “Before you configure”- Host (with UDP port), authentication token and TLS identity of the Hysteria 2 server.
- Optional Salamander obfuscation password if the server enables it.
- Optional upload/download bandwidth limits and port/address hopping settings.
- For a server inbound, a QUIC listening network, TLS certificate and matching auth.
Example outbound node
Section titled “Example outbound node”The following is a template, not a working server account. Replace every hostname, address, key and credential with values from your server operator. The typed chain format is for the current backend; normally use Destinations → Nodes instead of pasting JSON into the Web UI.
{ "id": "example-node", "name": "Hysteria 2 example", "origin": "manual", "group": "examples", "enabled": true, "chain": [ { "type": "hysteria2", "hysteria2": { "host": "vpn.example.com:443", "auth": "REPLACE_ME", "tls": { "enable": true, "servernames": [ "vpn.example.com" ] } } } ]}Compatibility and security limits
Section titled “Compatibility and security limits”- Hysteria 2 requires a suitable UDP route; an upstream TCP-only proxy cannot transparently carry native QUIC.
- Upload/download bandwidth fields are bytes per second in the current contract; zero selects automatic congestion control.
- Port hopping and address hopping are optional; not every server is configured for them.
- Client and server must agree on TLS/obfuscation; do not disable certificate verification to work around wrong SNI.
If it doesn’t connect
Section titled “If it doesn’t connect”- Check UDP reachability first; TCP Ping via another node does not prove UDP can traverse the network.
- Match auth and Salamander password with server settings.
- If hopping fails, temporarily disable it and confirm the base server endpoint works.
- Check server certificate hostname and your client’s configured TLS server name.
Where to go next
Section titled “Where to go next”Check the outbound node tutorial and network diagnostics. For exact fields, behavior and test coverage see the backend source. Avoid sharing saved credentials or full node exports in public support requests.
Bandwidth and hopping: exact field units
Section titled “Bandwidth and hopping: exact field units”The Go node contract uses upload_bps and download_bps in bytes per second, not bits per second. Zero selects automatic congestion control rather than a hard zero-throughput limit. If a provider gives bit/s rates, convert units before entering an API payload; check the Web UI’s own units rather than assuming they are the same.
The client can also use hop_addresses and optional hop_interval_seconds, min_hop_interval_seconds and max_hop_interval_seconds. These intervals are seconds; zero selects the implementation default of 30 seconds. Fixed and random hopping intervals cannot be configured together, and the contract requires a minimum of five seconds.
Port/address hopping is not a magic connectivity fix. First confirm the base host can authenticate over UDP and validate TLS, then add the hopping settings expected by the server.
Advanced: distinguish transport failure from authentication
Section titled “Advanced: distinguish transport failure from authentication”| Symptom | Inspect first |
|---|---|
| UDP packets never reach the server | Local firewall, provider UDP endpoint, intermediate proxy capabilities |
| QUIC/TLS handshake fails | TLS identity, server name, certificate chain and network path |
| QUIC connects but requests are rejected | Hysteria authentication token and server policy |
| Only hopping fails | Base endpoint first; interval and address/port pool second |
| Small requests work; large transfers fail | MTU/path changes and negotiated congestion control |
The server-side Hysteria 2 inbound is a separate typed configuration from the client outbound. Do not copy outbound fields directly into an inbound object. Refer to the inbound contract and Advanced inbounds for listener/TLS requirements.