Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Widget shows another ip address when setup a VPN via TUN device #45

Open
chaneyzorn opened this issue Jun 3, 2023 · 4 comments
Open

Comments

@chaneyzorn
Copy link

~ $ 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?

@marcnause
Copy link

marcnause commented Jun 3, 2023

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.

@ulrich-mayer
Copy link

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

@marek22k
Copy link

marek22k commented Sep 1, 2023

I guess I have the reverse problem.

Are you sure you are using the latest version?

@fhteagle
Copy link

fhteagle commented May 2, 2024

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...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants