Skip to content

hysteria ​

Hysteria v1 (protocol version 3) over QUIC: the first stream of a connection carries the hellos that authenticate the client and fix the speeds; after that there is a QUIC stream for each TCP connection or UDP session, and UDP goes as QUIC datagrams. Congestion control is Brutal at the negotiated speed. Compatible with sing-box hysteria. For new installations Hysteria 2 is better.

TLS (the tls block) is required; the default ALPN is hysteria. The shared QUIC fields are in quic.md.

A speed is given either as a string with units (up: "100 Mbps"; also Kbps, Gbps, and MBps for bytes) or as a number of megabits (up_mbps: 100). The string takes precedence over the number.

Inbound ​

FieldTypeDefaultMeaning
up, up_mbpsstring / numberrequiredThe server's send speed
down, down_mbpsstring / numberrequiredThe server's receive speed
userslist of {name, auth, auth_str}—Users: auth_str is the password as a string, auth bytes in base64
obfs{xplus: {password}}—XPlus obfuscation; the kind is a key, password is required

Socket settings are the listener block. The deprecated recv_window_conn, recv_window_client, max_conn_client, disable_mtu_discovery apply if the corresponding fields of the quic block are not set.

Outbound ​

FieldTypeDefaultMeaning
serverhost:portrequiredThe server address; the port can be omitted with hop
hopblock—Port hopping: ports — a list of "port" or "start:end"; interval — the port change interval, 30s by default, no less than 5s
up, up_mbpsstring / numberrequiredThe client's send speed
down, down_mbpsstring / numberrequiredThe client's receive speed
auth_str, authstring / base64—The user's password
obfs{xplus: {password}}—XPlus obfuscation; the kind is a key, password is required
networktcp, udp or a listbothWhat to pass

The deprecated recv_window_conn, recv_window, disable_mtu_discovery work as for the inbound. Blocks: tls (required), dial.

Example ​

yaml
inbounds:
  hy-in:
    hysteria:
      listen: ":8443"
      up: "200 Mbps"
      down_mbps: 200
      obfs:
        xplus:
          password: obfs-secret
      users:
        - name: alice
          auth_str: secret
      tls:
        certificate_path: /etc/ours/cert.pem
        key_path: /etc/ours/key.pem
outbounds:
  hy-out:
    hysteria:
      server: hy.example.com:8443
      up_mbps: 50
      down: "200 Mbps"
      auth_str: secret
      obfs:
        xplus:
          password: obfs-secret
      tls:
        sni: hy.example.com
route:
  final:
    outbound: hy-out

GPL-3.0-or-later