zaneschepke / wgtunnel

An alternative Android client app for WireGuard VPN
https://zaneschepke.com/wgtunnel-docs
MIT License
942 stars 48 forks source link

[BUG] - Auto tunnel fails to restart if switching from an ipv6 enabled network to an ipv4 only one #371

Open seppiola opened 2 months ago

seppiola commented 2 months ago

Describe the bug Auto tunnel fails to ping ipv6 endpoint if switching from an ipv6 network to an ipv4 only one, not eventually restarting the tunnel if "restart on ping fail is enabled".

Smartphone:

To Reproduce Steps to reproduce the behavior:

  1. Enable " restar on ping fail".
  2. Connect to a wg peer using ipv6.
  3. Switch to a network (wifi or mobile data) which only uses ipv4.
  4. The tunnel never gets restarted.

Expected behavior If unable to ping because of network changes making the app unable to do so, like missing ipv6 connectivity, just consider it a ping fail after a timeout and restart the tunnel.

Additional context I actually think maybe a different solution could be considered for cases like this, namely endpoints with changing ips. It has been discussed in #6 and I actually even left a comment some time ago with my suggestions, though probably nobody saw that since the issue had already been closed. As far as I understand in the meantime auto tunnel has been improved a bit and can now also be used with always on vpn, which is indeed a welcome change, but the core of the issue remains for me and I still think enpoint dns reresolution should be handled in a different way.

zaneschepke commented 5 days ago

Hey! Thanks for these detailed write ups and Im sorry I missed your original message. Ill take some time to review your solution more in depth and get back with my thoughts. Thanks again!