Skip to content

Commit

Permalink
add: packetEncoding v4
Browse files Browse the repository at this point in the history
  • Loading branch information
mkmark authored and xiaokangwang committed Sep 2, 2024
1 parent 10f5ec3 commit c192e65
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 3 deletions.
14 changes: 13 additions & 1 deletion docs/config/protocols/shadowsocks.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,9 @@ Shadowsocks 的配置分为两部分,`InboundConfigurationObject` 和 `Outboun
"password": "密码",
"level": 0,
"network": "tcp",
"ivCheck": false
"ivCheck": false,
"udp": false,
"packetEncoding": "None"
}
```

Expand Down Expand Up @@ -59,6 +61,16 @@ Shadowsocks 的配置分为两部分,`InboundConfigurationObject` 和 `Outboun

目前此功能默认不启用,但是在未来版本中会默认处于启用状态。

> `udp`: true | false
是否开启 UDP 协议的支持。默认值为 `false`

> `packetEncoding`: "None" | "Packet"
UDP 包编码方式,默认值为 `None`
当该值为 `None` 时,UDP 将根据目标地址被映射 (Address and Port-Dependent Mapping)。
当该值为 `Packet` 时,UDP 将被端点独立映射 (Endpoint Independent Mapping),此 UDP 行为也被称为 FullCone 或 NAT1。

## OutboundConfigurationObject

```json
Expand Down
9 changes: 8 additions & 1 deletion docs/config/protocols/socks.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ Socks 协议版本。 (v4.42.2+)
],
"udp": false,
"ip": "127.0.0.1",
"userLevel": 0
"userLevel": 0,
"packetEncoding": "None"
}
```

Expand Down Expand Up @@ -139,6 +140,12 @@ SOCKS5 通过 `UDP ASSOCIATE` 命令建立 UDP 会话。服务端在对客户端
用户等级,所有连接使用这一等级。

> `packetEncoding`: "None" | "Packet"
UDP 包编码方式,默认值为 `None`
当该值为 `None` 时,UDP 将根据目标地址被映射 (Address and Port-Dependent Mapping)。
当该值为 `Packet` 时,UDP 将被端点独立映射 (Endpoint Independent Mapping),此 UDP 行为也被称为 FullCone 或 NAT1。

### AccountObject

```javascript
Expand Down
9 changes: 8 additions & 1 deletion docs/config/protocols/trojan.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ Trojan 的配置分为两部分,`InboundConfigurationObject` 和 `OutboundConf
{
"dest": 80
}
]
],
"packetEncoding": "None"
}
```

Expand All @@ -38,6 +39,12 @@ Trojan 的配置分为两部分,`InboundConfigurationObject` 和 `OutboundConf
一个数组,包含一系列强大的回落分流配置(可选)。

> `packetEncoding`: "None" | "Packet"
UDP 包编码方式,默认值为 `None`
当该值为 `None` 时,UDP 将根据目标地址被映射 (Address and Port-Dependent Mapping)。
当该值为 `Packet` 时,UDP 将被端点独立映射 (Endpoint Independent Mapping),此 UDP 行为也被称为 FullCone 或 NAT1。

### ClientObject

```json
Expand Down

0 comments on commit c192e65

Please sign in to comment.