|
| 1 | +--- |
| 2 | +icon: material/lan |
| 3 | +--- |
| 4 | + |
| 5 | +# Neighbor Resolution |
| 6 | + |
| 7 | +Match LAN devices by MAC address and hostname using |
| 8 | +[`source_mac_address`](/configuration/route/rule/#source_mac_address) and |
| 9 | +[`source_hostname`](/configuration/route/rule/#source_hostname) rule items. |
| 10 | + |
| 11 | +Neighbor resolution is automatically enabled when these rule items exist. |
| 12 | +Use [`route.find_neighbor`](/configuration/route/#find_neighbor) to force enable it for logging without rules. |
| 13 | + |
| 14 | +## Linux |
| 15 | + |
| 16 | +Works natively. No special setup required. |
| 17 | + |
| 18 | +Hostname resolution requires DHCP lease files, |
| 19 | +automatically detected from common DHCP servers (dnsmasq, odhcpd, ISC dhcpd, Kea). |
| 20 | +Custom paths can be set via [`route.dhcp_lease_files`](/configuration/route/#dhcp_lease_files). |
| 21 | + |
| 22 | +## Android |
| 23 | + |
| 24 | +!!! quote "" |
| 25 | + |
| 26 | + Only supported in graphical clients. |
| 27 | + |
| 28 | +Requires Android 11 or above and ROOT. |
| 29 | + |
| 30 | +Must use [VPNHotspot](https://github.com/Mygod/VPNHotspot) to share the VPN connection. |
| 31 | +ROM built-in features like "Use VPN for connected devices" can share VPN |
| 32 | +but cannot provide MAC address or hostname information. |
| 33 | + |
| 34 | +Set **IP Masquerade Mode** to **None** in VPNHotspot settings. |
| 35 | + |
| 36 | +Only route/DNS rules are supported. TUN include/exclude routes are not supported. |
| 37 | + |
| 38 | +### Hostname Visibility |
| 39 | + |
| 40 | +Hostname is only visible in sing-box if it is visible in VPNHotspot. |
| 41 | +For Apple devices, change **Private Wi-Fi Address** from **Rotating** to **Fixed** in the Wi-Fi settings |
| 42 | +of the connected network. Non-Apple devices are always visible. |
| 43 | + |
| 44 | +## macOS |
| 45 | + |
| 46 | +Requires the standalone version (macOS system extension). |
| 47 | +The App Store version can share the VPN as a hotspot but does not support MAC address or hostname reading. |
| 48 | + |
| 49 | +See [VPN Hotspot](/manual/misc/vpn-hotspot/#macos) for Internet Sharing setup. |
0 commit comments