TunnlTo / desktop-app

TunnlTo is a Windows WireGuard VPN client built for split tunnelling.
https://tunnl.to
1.11k stars 53 forks source link

ISSUE:When my server IP address changes, the client can't connect #170

Closed aooom closed 3 months ago

aooom commented 3 months ago

When my server IP address changes, the client can't connect, although restarting can solve the problem, but I need to go to the remote computer to restart

vithusel commented 3 months ago

This is a known issue with even the official Wireguard client when using DNS to resolve the server address.

The server IP is only refreshed during initialisation and if the IP changes post enabling connection then the connectivity drops.

I believe there was a few attempts to resolve this issue but it simply never was completed.

I know a handful of clients have implemented their own checks to verify connection is still functional using their own methods. One simple check would be to ping the server once every minute or so and if the connection fails, automatically try restarting the session with some logic to eventually give up after x amounts of retries.

You can do this using windows task scheduler which will perform the IP check. Kill TunnlTo if the check fails and reload the service until the developer can potentially put in his own check (if he decides to add this feature).

You will need to create a script for this. Happy to provide a example if needed but a quick Google should be enough. You can use exit 1 and 0 to set the success or fail status within batch which task scheduler can pick up on.

wiresock commented 3 months ago

The WireSock VPN CLI includes an optional fallback configuration feature. If it detects issues with the primary configuration, it automatically switches to a backup one. You can configure both the primary and backup settings identically. In case of a dynamic DNS change, WireSock detects the interruption and reconnects using the backup configuration. This approach guarantees a re-resolution of the DNS, even when the configurations are the same.