Skip to content

Hysteria2

Hysteria2 runs over QUIC (UDP) with aggressive congestion control, and is usually far faster than TCP protocols on lossy or congested evening-peak routes. Pair it with REALITY: one TCP line and one UDP line, each a backup for the other.

TransportUDP (QUIC)
Coressing-box, mihomo, Xray (v26.3.27 or later); plus the official standalone server
Domain and certificatea certificate is needed; a self-signed one works
Common clientsv2rayN, v2rayNG, Shadowrocket, Clash Verge Rev, sing-box, NekoBox

From the menu

  • sing-box: main menu 24 (Nodes)3 (Hysteria2)
  • mihomo: main menu 343
  • Xray: main menu 448
  • Official standalone server: main menu 7 (Hysteria2)1 (Install / reconfigure); afterwards you can change the password, bandwidth limit and certificate, and "Show share link" exports it

The sing-box and mihomo menus can generate a self-signed certificate for you.

sing-box Hysteria2 node menu

From the command line

bash
psm node add sing-box hysteria2 --tag my-hy2 --port 8443 \
  --sni hk.example.com \
  --cert-path /etc/psm/certs/hk.crt --key-path /etc/psm/certs/hk.key \
  --obfs-pass OBFS_PASSWORD --hop-ports 20000-20999
OptionMeaning
--sni, --cert-path, --key-paththe certificate; add --insecure 1 for a self-signed one
--passwordthe authentication password; generated when left out
--obfs-passturn obfuscation on with this password
--obfs-type salamander|geckoobfuscation type, Salamander by default; Gecko needs sing-box 1.14+, mihomo 1.19.26+ or Xray v26.3.27+
--hop-ports START-ENDport hopping: forward this UDP range to the node's port
--ech trueadd ECH (sing-box / mihomo)

Port hopping

Some providers throttle or block a single UDP port. With port hopping, the client keeps changing its port within a range, and the server's firewall rules forward the whole range to the same node. PSM writes the forwarding rules and restores them after a reboot; see Port hopping.

Allow the node's port and the whole hopping range (both UDP) in your cloud provider's security group.

Export for clients

bash
psm node export sing-box hysteria2 my-hy2

prints a hysteria2:// link that already carries the port hopping and obfuscation settings:

Hysteria2 share link

Hysteria2 node settings from psm node show

Released under the AGPL-3.0 license · For lawful use only; follow the laws where you live