VXVX Docs

Hysteria2

Hysteria2ServerConfig 与 Hysteria2ClientConfig

Proto:protos/proto/vx/proxy/hysteria/hysteria.proto

Hysteria2 基于 QUIC。TLS 在协议内通过 tlsConfig 配置(TlsConfig),而非 TransportConfig.tls

Hysteria2ServerConfig

users

允许的用户;认证密码在 secret

obfs

流量混淆,见 ObfsConfig

bandwidth

服务端带宽上限,见 BandwidthConfig

quic

QUIC 调优,见 QuicConfig

ignoreClientBandwidth
bool

忽略客户端上报的带宽提示

tlsConfig

服务端 TLS 证书与设置

addresses
string[]

监听 / 对外宣告的地址

{
  "@type": "type.googleapis.com/vx.proxy.hysteria.Hysteria2ServerConfig",
  "users": [{ "secret": "auth-password" }],
  "tlsConfig": {
    "certificates": [{ "certificateFilepath": "/path/cert.pem", "keyFilepath": "/path/key.pem" }]
  }
}

Hysteria2ClientConfig

auth
string

认证密码,与服务器 users[].secret 对应

tlsConfig

客户端 TLS(SNI、allowInsecure、ECH、证书固定等)

quic

QUIC 调优

fastOpen
bool

启用 QUIC 0-RTT 快速打开

bandwidth

客户端带宽声明(上传 maxTx、下载 maxRx

obfs

Salamander 混淆

{
  "@type": "type.googleapis.com/vx.proxy.hysteria.Hysteria2ClientConfig",
  "auth": "auth-password",
  "tlsConfig": { "serverName": "example.com" }
}

QuicConfig

窗口字段有两组:MB 字段(initialStreamReceiveWindow 等,uint32,内部 × 1 MiB)与 bytes 字段(initialStreamReceiveWindowBytes 等,uint64)。MB 字段非零时优先;均为零时使用 bytes 字段或平台默认值。

initialStreamReceiveWindow
uint32

初始流接收窗口(MiB)

maxStreamReceiveWindow
uint32

最大流接收窗口(MiB)

initialConnectionReceiveWindow
uint32

初始连接接收窗口(MiB)

maxConnectionReceiveWindow
uint32

最大连接接收窗口(MiB)

initialStreamReceiveWindowBytes
uint64

初始流接收窗口(字节)

maxStreamReceiveWindowBytes
uint64

最大流接收窗口(字节)

initialConnectionReceiveWindowBytes
uint64

初始连接接收窗口(字节)

maxConnectionReceiveWindowBytes
uint64

最大连接接收窗口(字节)

maxIdleTimeout
uint32

空闲超时(,默认 30)

keepAlivePeriod
uint32

Keep-alive 周期(,默认 10)

disablePathMtuDiscovery
bool

禁用 QUIC 路径 MTU 发现

maxIncomingStreams
uint32

最大入站流数(仅服务端

ObfsConfig

salamander 为当前唯一混淆类型(oneof)。

salamander

Salamander 混淆配置

SalamanderConfig

password
string

混淆密码

BandwidthConfig

maxTx / maxRx 单位为 Mbps(内部转换为字节/秒)。

maxTx
uint32

上传带宽上限。客户端为上传;服务端为允许的最大上传

maxRx
uint32

下载带宽上限。客户端为下载;服务端为允许的最大下载

相关

  • TLStlsConfig 字段
  • 出站 — UDP 出站

评论