Are you an LLM? You can read better optimized documentation at /config/transports/hysteria.md for this page in Markdown format
Hysteria
Hysteria2 的底层 QUIC 传输的 Xray 实现,通常搭配 hysteria出站 和 hysteria入站 使用,此时兼容其官方实现。
HysteriaObject
HysteriaObject 对应 StreamSettingsObject 中的 hysteriaSettings 项。
json
{
// outbound 示例,同样可用于 inbound
"outbounds": [
{
// ...
"streamSettings": {
"network": "hysteria",
"hysteriaSettings": {
"version": 2,
"auth": "password",
"udpIdleTimeout": 60,
"masquerade": {
"type": "",
"dir": "",
"url": "",
"rewriteHost": false,
"insecure": false,
"content": "",
"headers": {
"key": "value"
},
"statusCode": 0
}
}
}
}
]
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
version: number
Hysteria 版本,必须为 2。
auth: string
Hysteria 认证密码,服务端和客户端需要保持一致。
搭配 hysteria inbound 时将会被 users 覆盖 (如果存在)
udpIdleTimeout: number
单位秒,默认 60。
单条 quic native udp 连接空闲等待时间,过大应该不会严格遵守,可能会先被 policy 掐断。
masquerade: MasqObject
http3 页面伪装。
MasqObject
json
{
"type": "",
"dir": "",
"url": "",
"rewriteHost": false,
"insecure": false,
"content": "",
"headers": {
"key": "value"
},
"statusCode": 0
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
2
3
4
5
6
7
8
9
10
11
12
13
14
15
type: "file" | "proxy" | "string"
不填为默认的 404 页面。
dir: string
type 为 file 时的配置项。
url: string
type 为 proxy 时的配置项。
rewriteHost: false | true
type 为 proxy 时的配置项。
insecure: false | true
type 为 proxy 时的配置项。
content: string
type 为 string 时的配置项。
headers: map{ string, string }
type 为 string 时的配置项。
statusCode: int
type 为 string 时的配置项。