ICMP via direct outbound ignores network_type/network_strategy on Android (always uses default network)
Operating system
Android
System version
16
Installation type
sing-box for Android Graphical Client
If you are using a graphical client, please provide the version of the client.
1.14.2
Version
Description
System version
Android 16, Samsung Galaxy S26 Ultra (SM-S948B)
Description
ICMP echo requests routed to a direct outbound ignore the outbound's network_strategy / network_type dial fields and are always sent through the device's default network, while TCP, UDP and DNS on the same outbound correctly use the requested network.
Setup: the phone has two networks at the same time — mobile data (rmnet_data0, default network) and a USB Ethernet adapter (eth0) connected to a corporate LAN. The TUN inbound captures only the corporate subnets via route_address, and the only outbound is a direct outbound with network_strategy: fallback and network_type: ["ethernet"].
- TCP to internal hosts works (e.g.
curl https://<internal host>reaches the server via Ethernet). - DNS queries to the internal DNS server through a UDP DNS server with the same dial fields work.
- ICMP (
ping 10.220.18.1, the LAN gateway) gets no reply.
The ICMP connection is matched and forwarded to the correct outbound, but no reply is received:
router: pre-match: forward icmp connection from 198.18.0.1 to 10.220.18.1 via outbound/direct[lan]
router: flow closed: connection reset, upload 252 B, download 0 BWith the same profile, after disabling mobile data (so Ethernet becomes the default network), ping works:
network: updated default interface eth0, index 130, type ethernet
router: pre-match: forward icmp connection from 198.18.0.1 to 10.220.18.1 via outbound/direct[lan]
router: flow closed: connection reset, upload 252 B, download 252 BThe gateway itself answers ICMP when pinged without sing-box and with mobile data disabled.
So it looks like the ICMP path of the direct outbound does not bind the socket to the network selected by network_type, and always uses the default network.
Expected behavior
ICMP echo forwarded through a direct outbound should honor network_strategy / network_type like TCP and UDP do, i.e. go out via eth0.
Actual behavior
ICMP always leaves through the default network (mobile data) and gets no reply.
Configuration
{
"log": { "level": "debug" },
"dns": {
"servers": [
{ "type": "local", "tag": "dns-local" },
{
"type": "udp",
"tag": "dns-lan",
"server": "156.54.17.165",
"network_strategy": "fallback",
"network_type": ["ethernet"]
}
],
"rules": [
{ "domain_suffix": ["mycompany.local", "mycompany.it"], "server": "dns-lan" }
],
"final": "dns-local"
},
"inbounds": [
{
"type": "tun",
"tag": "tun-in",
"address": ["198.18.0.1/30"],
"auto_route": true,
"route_address": [
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16",
"156.54.0.0/16",
"163.162.0.0/16",
"194.243.135.0/24"
]
}
],
"outbounds": [
{
"type": "direct",
"tag": "lan",
"network_strategy": "fallback",
"network_type": ["ethernet"]
}
],
"route": {
"auto_detect_interface": true,
"default_domain_resolver": "dns-local",
"rules": [
{ "action": "sniff" },
{ "protocol": "dns", "action": "hijack-dns" }
],
"final": "lan"
}
}Logs
Relevant excerpts are above.
Related
Possibly related to #3755 (ICMP on Android/iOS not following the selected outbound path).
Reproduction
See above.
Logs
I prefer not to publish sensitive data. I can send logs privately if requested.Supporter
- I am a sponsor
Integrity requirements
- I confirm that I have read the documentation, understand the meaning of all the configuration items I wrote, and did not pile up seemingly useful options or default values.
- I confirm that I have provided the server and client configuration files and process that can be reproduced locally, instead of a complicated client configuration file that has been stripped of sensitive data.
- I confirm that I have provided the simplest configuration that can be used to reproduce the error I reported, instead of depending on remote servers, TUN, graphical interface clients, or other closed-source software.
- I confirm that I have provided the complete configuration files and logs, rather than just providing parts I think are useful out of confidence in my own intelligence.
Source: SagerNet/sing-box