Files
sing-box-extended-mirror/docs/configuration/shared/multiplex.zh.md
T

85 lines
1.3 KiB
Markdown
Raw Normal View History

### 入站
2022-08-24 17:31:32 +08:00
```json
{
"enabled": true,
"padding": false,
"brutal": {}
}
```
2022-08-24 17:31:32 +08:00
### 出站
2022-08-24 17:31:32 +08:00
```json
{
"enabled": true,
"protocol": "smux",
"max_connections": 4,
"min_streams": 4,
"max_streams": 0,
"padding": false,
"brutal": {}
2022-08-24 17:31:32 +08:00
}
```
### 入站字段
#### enabled
启用多路复用支持。
#### padding
如果启用,将拒绝非填充连接。
#### brutal
2023-12-14 22:23:52 +08:00
参阅 [TCP Brutal](/zh/configuration/shared/tcp-brutal/)。
### 出站字段
2022-08-24 17:31:32 +08:00
#### enabled
2022-08-25 09:45:22 +08:00
启用多路复用。
2022-08-24 17:31:32 +08:00
#### protocol
多路复用协议
| 协议 | 描述 |
|-------|------------------------------------|
| smux | https://github.com/xtaci/smux |
| yamux | https://github.com/hashicorp/yamux |
2023-04-20 11:16:22 +08:00
| h2mux | https://golang.org/x/net/http2 |
2022-08-24 17:31:32 +08:00
2023-04-20 11:16:22 +08:00
默认使用 h2mux。
2022-08-24 17:31:32 +08:00
#### max_connections
2022-08-25 09:45:22 +08:00
最大连接数量。
2022-08-24 17:31:32 +08:00
2022-08-25 09:45:22 +08:00
与 `max_streams` 冲突。
2022-08-24 17:31:32 +08:00
#### min_streams
2022-08-25 09:45:22 +08:00
在打开新连接之前,连接中的最小多路复用流数量。
2022-08-24 17:31:32 +08:00
2022-08-25 09:45:22 +08:00
与 `max_streams` 冲突。
2022-08-24 17:31:32 +08:00
#### max_streams
2022-08-25 09:45:22 +08:00
在打开新连接之前,连接中的最大多路复用流数量。
2022-08-24 17:31:32 +08:00
2023-04-20 11:16:22 +08:00
与 `max_connections` 和 `min_streams` 冲突。
#### padding
!!! info
需要 sing-box 服务器版本 1.3-beta9 或更高。
启用填充。
#### brutal
2023-12-14 22:23:52 +08:00
参阅 [TCP Brutal](/zh/configuration/shared/tcp-brutal/)。