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

Many tun interfaces created #184

Open
dkoppenh opened this issue Apr 28, 2024 · 5 comments
Open

Many tun interfaces created #184

dkoppenh opened this issue Apr 28, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@dkoppenh
Copy link

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

@dkoppenh dkoppenh added the bug Something isn't working label Apr 28, 2024
@zaneschepke
Copy link
Owner

Hello! Is this in kernel mode or userspace mode?

@dkoppenh
Copy link
Author

dkoppenh commented May 11, 2024 via email

@j-hamsta
Copy link

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!

@zaneschepke
Copy link
Owner

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!

@dkoppenh
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants