zaneschepke / wgtunnel

An alternative Android client app for WireGuard VPN

Home Page:https://zaneschepke.com/wgtunnel-docs

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Many tun interfaces created

dkoppenh opened this issue · comments

When auto-tunnelling is active, it appears that new tun interfaces are created and never removed. I saw tun0-tun9 created after using the app for a while. Stopping auto-tunnelling removes those.

The problem is that I bind my torrent client to a particular interface, and I constantly have to change that binding since I never know how many interfaces WG Tunnel has created.

  • Device: LG Wing
  • Android Version: 13
  • App Version: 3.4.2

To Reproduce
Run the auto-tunnelling for a while, and have it connect/disconnect (or possibly switch source IPs, such as when roaming mobile towers)

Expected behavior
tun interface is removed when it's no longer being used

Hello! Is this in kernel mode or userspace mode?

I can confirm this issue (even on two devices in different situations) when auto-tunneling is enabled. It seems to be related to the "Restart on Ping Fail" option. If this setting is enabled and the mobile device is connected to an unreliable network, multiple tunnels (usually two) are established to the same peer. Common examples of unreliable networks include Wi-Fi, where the connection is stable but data transfer is unreliable (e.g., when far from the access point), or mobile network connections on fast-moving trains.

The bug disappeared for me when I disabled the "Restart on Ping Fail" option. I hope this information is helpful!

I can confirm this issue (even on two devices in different situations) when auto-tunneling is enabled. It seems to be related to the "Restart on Ping Fail" option. If this setting is enabled and the mobile device is connected to an unreliable network, multiple tunnels (usually two) are established to the same peer. Common examples of unreliable networks include Wi-Fi, where the connection is stable but data transfer is unreliable (e.g., when far from the access point), or mobile network connections on fast-moving trains.

The bug disappeared for me when I disabled the "Restart on Ping Fail" option. I hope this information is helpful!

This is very helpful. Thanks for the additional information!

FWIW, the first time I noticed this, I had 10 interfaces (tun0-9).

Thanks for the tip, I'll play around with that "Restart on Ping Fail" option