mirror of
https://github.com/SagerNet/sing-box.git
synced 2026-04-13 20:28:32 +10:00
Add proxy support for ICMP echo request
This commit is contained in:
@@ -7,7 +7,8 @@ icon: material/new-box
|
||||
:material-plus: [interface_address](#interface_address)
|
||||
:material-plus: [network_interface_address](#network_interface_address)
|
||||
:material-plus: [default_interface_address](#default_interface_address)
|
||||
:material-plus: [preferred_by](#preferred_by)
|
||||
:material-plus: [preferred_by](#preferred_by)
|
||||
:material-alert: [network](#network)
|
||||
|
||||
!!! quote "Changes in sing-box 1.11.0"
|
||||
|
||||
@@ -226,7 +227,15 @@ Sniffed client type, see [Protocol Sniff](/configuration/route/sniff/) for detai
|
||||
|
||||
#### network
|
||||
|
||||
`tcp` or `udp`.
|
||||
!!! quote "Changes in sing-box 1.13.0"
|
||||
|
||||
Since sing-box 1.13.0, you can match ICMP echo (ping) requests via the new `icmp` network.
|
||||
|
||||
Such traffic originates from `TUN`, `WireGuard`, and `Tailscale` inbounds and can be routed to `Direct`, `WireGuard`, and `Tailscale` outbounds.
|
||||
|
||||
Match network type.
|
||||
|
||||
`tcp`, `udp` or `icmp`.
|
||||
|
||||
#### domain
|
||||
|
||||
|
||||
@@ -7,7 +7,8 @@ icon: material/new-box
|
||||
:material-plus: [interface_address](#interface_address)
|
||||
:material-plus: [network_interface_address](#network_interface_address)
|
||||
:material-plus: [default_interface_address](#default_interface_address)
|
||||
:material-plus: [preferred_by](#preferred_by)
|
||||
:material-plus: [preferred_by](#preferred_by)
|
||||
:material-alert: [network](#network)
|
||||
|
||||
!!! quote "sing-box 1.11.0 中的更改"
|
||||
|
||||
@@ -223,7 +224,15 @@ icon: material/new-box
|
||||
|
||||
#### network
|
||||
|
||||
`tcp` 或 `udp`。
|
||||
!!! quote "sing-box 1.13.0 中的更改"
|
||||
|
||||
自 sing-box 1.13.0 起,您可以通过新的 `icmp` 网络匹配 ICMP 回显(ping)请求。
|
||||
|
||||
此类流量源自 `TUN`、`WireGuard` 和 `Tailscale` 入站,并可路由至 `Direct`、`WireGuard` 和 `Tailscale` 出站。
|
||||
|
||||
匹配网络类型。
|
||||
|
||||
`tcp`、`udp` 或 `icmp`。
|
||||
|
||||
#### domain
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
icon: material/new-box
|
||||
---
|
||||
|
||||
!!! quote "Changes in sing-box 1.13.0"
|
||||
|
||||
:material-alert: [reject](#reject)
|
||||
|
||||
!!! quote "Changes in sing-box 1.12.0"
|
||||
|
||||
:material-plus: [tls_fragment](#tls_fragment)
|
||||
@@ -42,6 +46,10 @@ See `route-options` fields below.
|
||||
|
||||
### reject
|
||||
|
||||
!!! quote "Changes in sing-box 1.13.0"
|
||||
|
||||
Since sing-box 1.13.0, you can reject (or directly reply to) ICMP echo (ping) requests using `reject` action.
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "reject",
|
||||
@@ -58,9 +66,17 @@ For non-tun connections and already established connections, will just be closed
|
||||
|
||||
#### method
|
||||
|
||||
For TCP and UDP connections:
|
||||
|
||||
- `default`: Reply with TCP RST for TCP connections, and ICMP port unreachable for UDP packets.
|
||||
- `drop`: Drop packets.
|
||||
|
||||
For ICMP echo requests:
|
||||
|
||||
- `default`: Reply with ICMP host unreachable.
|
||||
- `drop`: Drop packets.
|
||||
- `reply`: Reply with ICMP echo reply.
|
||||
|
||||
#### no_drop
|
||||
|
||||
If not enabled, `method` will be temporarily overwritten to `drop` after 50 triggers in 30s.
|
||||
|
||||
@@ -2,6 +2,10 @@
|
||||
icon: material/new-box
|
||||
---
|
||||
|
||||
!!! quote "sing-box 1.13.0 中的更改"
|
||||
|
||||
:material-alert: [reject](#reject)
|
||||
|
||||
!!! quote "sing-box 1.12.0 中的更改"
|
||||
|
||||
:material-plus: [tls_fragment](#tls_fragment)
|
||||
@@ -38,6 +42,10 @@ icon: material/new-box
|
||||
|
||||
### reject
|
||||
|
||||
!!! quote "sing-box 1.13.0 中的更改"
|
||||
|
||||
自 sing-box 1.13.0 起,您可以通过 `reject` 动作拒绝(或直接回复)ICMP 回显(ping)请求。
|
||||
|
||||
```json
|
||||
{
|
||||
"action": "reject",
|
||||
@@ -54,9 +62,17 @@ icon: material/new-box
|
||||
|
||||
#### method
|
||||
|
||||
对于 TCP 和 UDP 连接:
|
||||
|
||||
- `default`: 对于 TCP 连接回复 RST,对于 UDP 包回复 ICMP 端口不可达。
|
||||
- `drop`: 丢弃数据包。
|
||||
|
||||
对于 ICMP 回显请求:
|
||||
|
||||
- `default`: 回复 ICMP 主机不可达。
|
||||
- `drop`: 丢弃数据包。
|
||||
- `reply`: 回复以 ICMP 回显应答。
|
||||
|
||||
#### no_drop
|
||||
|
||||
如果未启用,则 30 秒内触发 50 次后,`method` 将被暂时覆盖为 `drop`。
|
||||
|
||||
Reference in New Issue
Block a user