!!! quote "sing-box 1.11.0 中的更改"
:material-alert: [masquerade](#masquerade)
:material-alert: [ignore_client_bandwidth](#ignore_client_bandwidth)
{
"type": "hysteria2",
"tag": "hy2-in",
... // 监听字段
"up_mbps": 100,
"down_mbps": 100,
"obfs": {
"type": "salamander",
"password": "cry_me_a_r1ver"
},
"users": [
{
"name": "tobyxdd",
"password": "goofy_ahh_password"
}
],
"ignore_client_bandwidth": false,
"tls": {},
"masquerade": "", // 或 {}
"brutal_debug": false
}
!!! warning "与官方 Hysteria2 的区别"
官方程序支持一种名为 **userpass** 的验证方式,
本质上上是将用户名与密码的组合 `<username>:<password>` 作为实际上的密码,而 sing-box 不提供此别名。
要将 sing-box 与官方程序一起使用, 您需要填写该组合作为实际密码。
参阅 监听字段。
支持的速率,默认不限制。
与 ignore_client_bandwidth 冲突。
QUIC 流量混淆器类型,仅可设为 salamander。
如果为空则禁用。
QUIC 流量混淆器密码.
Hysteria 用户
认证密码。
当 up_mbps 和 down_mbps 未设定时:
命令客户端使用 BBR 拥塞控制算法而不是 Hysteria CC。
当 up_mbps 和 down_mbps 已设定时:
禁止客户端使用 BBR 拥塞控制算法。
==必填==
TLS 配置, 参阅 TLS。
HTTP3 服务器认证失败时的行为 (URL 字符串配置)。
| Scheme | 示例 | 描述 |
|---|---|---|
file |
file:///var/www |
作为文件服务器 |
http/https |
http://127.0.0.1:8080 |
作为反向代理 |
如果 masquerade 未配置,则返回 404 页。
与 masquerade.type 冲突。
HTTP3 服务器认证失败时的行为 (对象配置)。
| Type | 描述 | 字段 |
|---|---|---|
file |
作为文件服务器 | directory |
proxy |
作为反向代理 | url, rewrite_host |
string |
返回固定响应 | status_code, headers, content |
如果 masquerade 未配置,则返回 404 页。
与 masquerade 冲突。
文件服务器根目录。
反向代理目标 URL。
重写请求头中的 Host 字段到目标 URL。
固定响应状态码。
固定响应头。
固定响应内容。
启用 Hysteria Brutal CC 的调试信息日志记录。