Skip to content

Commit 7999f7e

Browse files
committed
Transport: Refine Hysteria & quicParams
1 parent 061d946 commit 7999f7e

6 files changed

Lines changed: 42 additions & 30 deletions

File tree

docs/config/transport.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1236,8 +1236,18 @@ FinalMask 在核心处理完包括 TLS/REALITY 在内的传输层加密后,对
12361236
}
12371237
```
12381238

1239+
用于 XHTTP H3 以及 hysteria 的 QUIC 配置调整。其中 XHTTP
1240+
12391241
> `congestion`: reno | bbr | brutal | force-brutal
12401242
1243+
拥塞控制算法,Hysteria 默认为 `brutal`,XHTTP H3 默认使用 `bbr`
1244+
1245+
`reno`/`bbr`: 知名算法。
1246+
1247+
`brutal`: 与对端协商固定发包速率或降级到 BBR,只支持 Hysteria 传输(因为 XHTTP 无协商机制)。
1248+
1249+
`force-brutal`: 同 `brutal`,但强制使上行使用 `brutalUp` 固定发包速率,无视对端协商。
1250+
12411251
> `debug`: false | true
12421252
12431253
启用 bbr/brutal congestion control 日志。
@@ -1250,7 +1260,7 @@ FinalMask 在核心处理完包括 TLS/REALITY 在内的传输层加密后,对
12501260

12511261
格式用户友好,支持各种常见的比特每秒写法,包括 `1000000` `100kb` `20 mb` `100 mbps` `1g` `1 tbps` 等等等,大小写不敏感,单位之间可以带或者不带空格,无单位时默认为 bps(比特每秒),不能低于 65535 bps。
12521262

1253-
协商行为和 Hysteria 原版一致
1263+
协商行为和 Hysteria brutal 一致
12541264

12551265
服务端的值将限制客户端可以选择的最大 Brutal 模式速率,为 0 表示不限制客户端。
12561266

docs/config/transports/hysteria.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Hysteria
22

3-
::: tip
4-
搭配 `hysteria protocol` 时默认启用 `quic native udp`
5-
6-
搭配 `hysteria inbound``auth` 将会被 `clients` 覆盖 (如果存在)
7-
8-
搭配其他 `protocol` 能否代理 `udp` 取决于该 `protocol` 是否具有 `uot` 能力
9-
10-
启用 `finalmask.udp` 后将会破坏 `masquerade` 的页面伪装
11-
:::
3+
Hysteria2 的底层 QUIC 传输的 Xray 实现,通常搭配 hysteria[出站](../outbounds/hysteria.md) 和 hysteria[入站](../inbounds/hysteria.md) 使用,此时兼容其官方实现。
124

135
## HysteriaObject
146

@@ -45,6 +37,8 @@ Hysteria 版本,必须为 2。
4537
4638
Hysteria 认证密码,服务端和客户端需要保持一致。
4739

40+
搭配 `hysteria inbound` 时将会被 `clients` 覆盖 (如果存在)
41+
4842
> `udpIdleTimeout`: number
4943
5044
单位秒,默认 60。

docs/en/config/transport.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1219,8 +1219,18 @@ Same as the TCP version.
12191219
}
12201220
```
12211221

1222+
Used for QUIC configuration tuning of XHTTP H3 and Hysteria.
1223+
12221224
> `congestion`: reno | bbr | brutal | force-brutal
12231225
1226+
Congestion control algorithm. Hysteria defaults to `brutal`, XHTTP H3 defaults to `bbr`.
1227+
1228+
`reno`/`bbr`: Well-known algorithms.
1229+
1230+
`brutal`: Negotiates a fixed packet sending rate with the peer or falls back to BBR. Only supported with Hysteria transport (since XHTTP has no negotiation mechanism).
1231+
1232+
`force-brutal`: Same as `brutal`, but forces upstream to use the `brutalUp` fixed packet sending rate, ignoring peer negotiation.
1233+
12241234
> `debug`: false | true
12251235
12261236
Enable bbr/brutal congestion control logging.
@@ -1233,7 +1243,7 @@ Upload/Download rate limits. Default is 0.
12331243

12341244
The format is user-friendly and supports various common bit-per-second notations, including `1000000`, `100kb`, `20 mb`, `100 mbps`, `1g`, `1 tbps`, etc. It is case-insensitive, and spaces between the number and unit are optional. If no unit is specified, it defaults to bps (bits per second). It cannot be lower than 65535 bps.
12351245

1236-
The negotiation behavior is consistent with the original Hysteria:
1246+
The negotiation behavior is consistent with Hysteria brutal:
12371247

12381248
The server's value limits the maximum Brutal mode rate that the client can choose. 0 means no limit on the client.
12391249

docs/en/config/transports/hysteria.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Hysteria
22

3-
::: tip
4-
When used with the `hysteria protocol`, `quic native udp` is enabled by default.
5-
6-
When used with `hysteria inbound`, `auth` will be overridden by `clients` (if it exists).
7-
8-
Whether other `protocols` can proxy `udp` depends on whether that `protocol` has `uot` capabilities.
9-
10-
Enabling `finalmask.udp` will break the `masquerade` page masquerading.
11-
:::
3+
Xray implementation of the underlying QUIC transport for Hysteria2, typically used with hysteria [outbound](../outbounds/hysteria.md) and hysteria [inbound](../inbounds/hysteria.md), and is compatible with the official implementation in this case.
124

135
## HysteriaObject
146

@@ -45,6 +37,8 @@ Hysteria version, must be 2.
4537
4638
Hysteria authentication password. Must be consistent between the server and the client.
4739

40+
When used with `hysteria inbound`, it will be overridden by `clients` (if it exists).
41+
4842
> `udpIdleTimeout`: number
4943
5044
Unit: seconds, default 60.

docs/ru/config/transport.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1250,8 +1250,18 @@ FinalMask применяет последний слой маскировки к
12501250
}
12511251
```
12521252

1253+
Используется для настройки параметров QUIC для XHTTP H3 и Hysteria.
1254+
12531255
> `congestion`: reno | bbr | brutal | force-brutal
12541256
1257+
Алгоритм управления перегрузкой. Hysteria по умолчанию использует `brutal`, XHTTP H3 по умолчанию использует `bbr`.
1258+
1259+
`reno`/`bbr`: Известные алгоритмы.
1260+
1261+
`brutal`: Согласовывает фиксированную скорость отправки пакетов с другой стороной или переключается на BBR. Поддерживается только в транспорте Hysteria (поскольку XHTTP не имеет механизма согласования).
1262+
1263+
`force-brutal`: Аналогично `brutal`, но принудительно использует фиксированную скорость отправки `brutalUp` для исходящего трафика, игнорируя согласование с другой стороной.
1264+
12551265
> `debug`: false | true
12561266
12571267
Включить логирование в режиме bbr/brutal congestal control.
@@ -1264,7 +1274,7 @@ FinalMask применяет последний слой маскировки к
12641274

12651275
Формат удобен для пользователя, поддерживает различные распространенные записи бит в секунду, включая `1000000`, `100kb`, `20 mb`, `100 mbps`, `1g`, `1 tbps` и т.д. Регистр не важен, пробелы между единицами необязательны. Без единиц измерения по умолчанию используется bps (бит в секунду), значение не может быть ниже 65535 bps.
12661276

1267-
Поведение согласования соответствует оригинальной Hysteria:
1277+
Поведение согласования соответствует Hysteria brutal:
12681278

12691279
Значение на сервере ограничивает максимальную скорость режима Brutal, которую может выбрать клиент; 0 означает отсутствие ограничений для клиента.
12701280

docs/ru/config/transports/hysteria.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,6 @@
11
# Hysteria
22

3-
::: tip
4-
При использовании с протоколом `hysteria`, `quic native udp` включен по умолчанию.
5-
6-
При использовании с `hysteria inbound`, `auth` будет переопределен `clients` (если он существует).
7-
8-
Возможность использования других `протоколов` в качестве прокси для `udp` зависит от наличия у этого `протокола` возможностей `uot`.
9-
10-
Включение `finalmask.udp` нарушит работу маскировки страниц `masquerade`.
11-
:::
3+
Реализация Xray базового QUIC-транспорта для Hysteria2, обычно используется с hysteria [исходящим](../outbounds/hysteria.md) и hysteria [входящим](../inbounds/hysteria.md), и в этом случае совместима с официальной реализацией.
124

135
## HysteriaObject
146

@@ -45,6 +37,8 @@
4537
4638
Пароль аутентификации Hysteria, должен совпадать на сервере и клиенте.
4739

40+
При использовании с `hysteria inbound` будет переопределён `clients` (если он существует).
41+
4842
> `udpIdleTimeout`: number
4943
5044
Единица измерения: секунды, по умолчанию 60.

0 commit comments

Comments
 (0)