TUN inbound: Reply fake pong to ICMP ping (#6015)

https://github.com/XTLS/Xray-core/pull/6015#issuecomment-4321525342
This commit is contained in:
yiguodev
2026-05-02 06:51:42 +08:00
committed by GitHub
parent 7f7fc5a829
commit 2fff03720d
5 changed files with 386 additions and 3 deletions
+4 -2
View File
@@ -41,10 +41,12 @@ Here is simple Xray config snippet to enable the inbound:
- IPv4 and IPv6
- TCP and UDP
- ICMP Echo (ping)
## LIMITATION
- No ICMP support
- Only ICMP Echo request/reply is supported; other ICMP message types are ignored
- ICMP Echo replies are generated locally by the TUN stack; they do not validate real remote ICMP reachability
- Connections are established to any host, as connection success is only a mark of successful accepting packet for proxying. Hosts that are not accepting connections or don't even exists, will look like they opened a connection (SYN-ACK), and never send back a single byte, closing connection (RST) after some time. This is the side effect of the whole process actually being a proxy, and not real network layer 3 vpn
## CONSIDERATIONS
@@ -248,4 +250,4 @@ Set the environment variable `xray.tun.fd` (or `XRAY_TUN_FD`) to the fd number b
Build using gomobile for iOS framework integration:
```
gomobile bind -target=ios
```
```