WiFi-Widget
WiFi-Widget copied to clipboard
Widget shows another ip address when setup a VPN via TUN device
~ $ ifconfig
Warning: cannot open /proc/net/dev (Permission denied). Limited output.
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1 (UNSPEC)
tun0: flags=81<UP,POINTOPOINT,RUNNING> mtu 9000
inet 172.19.0.1 netmask 255.255.255.252 destination 172.19.0.1
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 500 (UNSPEC)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.199.166 netmask 255.255.255.0 broadcast 192.168.199.255
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 3000 (UNSPEC)
widget presents the ipv4 address as 172.19.0.1 when VPN enabled via TUN device (such as clash).
Is it possible to select the specified port to show the address? Or filter out the tun port directly?
I have the same issue using NetGuard (https://netguard.me/). I know that my network uses IPs in the 192.168.1.x range, but the widget displays 10.1.10.1 as my IP address, which is the IP address in the local VPN which is provided by NetGuard.
edit: The displayed netmask is also the netmask of the local VPN.
I guess I have the reverse problem. When connected via wireguard I still see the IP address granted by the wifi I am connected to but not the one the traffic uses
I guess I have the reverse problem.
Are you sure you are using the latest version?
Same here on LineageOS 19. ip a
in termux reports:
- wlan0 device has static IP as 10.0.0.17/24
- tun0 (wireguard) has dynamic IP as 10.2.0.4/32
10.2.0.4/32 is displayed for IPsitelocal in the widget.
Ideas to improve this:
- whitelist a set of devices to display the IP for (wlan0, tun*, etc)
- one time manual "add to widget" picker UI element for currently seen IP devices + remove from widget UI Element
- blacklist devices to not display on widget
Not sure which is easiest to implement / useful for the most number of people. My guess is the picker idea...