Hysteria2
Hysteria2ServerConfig 与 Hysteria2ClientConfig
Proto:protos/proto/vx/proxy/hysteria/hysteria.proto
Hysteria2 基于 QUIC。TLS 在协议内通过 tlsConfig 配置(TlsConfig),而非 TransportConfig.tls。
Hysteria2ServerConfig
ignoreClientBandwidthbool
忽略客户端上报的带宽提示
addressesstring[]
监听 / 对外宣告的地址
{
"@type": "type.googleapis.com/vx.proxy.hysteria.Hysteria2ServerConfig",
"users": [{ "secret": "auth-password" }],
"tlsConfig": {
"certificates": [{ "certificateFilepath": "/path/cert.pem", "keyFilepath": "/path/key.pem" }]
}
}Hysteria2ClientConfig
authstring
认证密码,与服务器 users[].secret 对应
fastOpenbool
启用 QUIC 0-RTT 快速打开
{
"@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 字段或平台默认值。
initialStreamReceiveWindowuint32
初始流接收窗口(MiB)
maxStreamReceiveWindowuint32
最大流接收窗口(MiB)
initialConnectionReceiveWindowuint32
初始连接接收窗口(MiB)
maxConnectionReceiveWindowuint32
最大连接接收窗口(MiB)
initialStreamReceiveWindowBytesuint64
初始流接收窗口(字节)
maxStreamReceiveWindowBytesuint64
最大流接收窗口(字节)
initialConnectionReceiveWindowBytesuint64
初始连接接收窗口(字节)
maxConnectionReceiveWindowBytesuint64
最大连接接收窗口(字节)
maxIdleTimeoutuint32
空闲超时(秒,默认 30)
keepAlivePerioduint32
Keep-alive 周期(秒,默认 10)
disablePathMtuDiscoverybool
禁用 QUIC 路径 MTU 发现
maxIncomingStreamsuint32
最大入站流数(仅服务端)
ObfsConfig
salamander 为当前唯一混淆类型(oneof)。
SalamanderConfig
passwordstring
混淆密码
BandwidthConfig
maxTx / maxRx 单位为 Mbps(内部转换为字节/秒)。
maxTxuint32
上传带宽上限。客户端为上传;服务端为允许的最大上传
maxRxuint32
下载带宽上限。客户端为下载;服务端为允许的最大下载