micahmo / WgServerforWindows

Wg Server for Windows (WS4W) is a desktop application that allows running and managing a WireGuard server endpoint on Windows
MIT License
943 stars 92 forks source link

Server keeps trying to handshake after client disconnects #161

Closed floschwend closed 6 months ago

floschwend commented 6 months ago

Dear community,

I just finished the setup of WireGuard (0.5.3) using this awesome tool (2.0.11). It works perfectly fine.

However, I noticed that after my client disconnects, the server seems to try to handshake with the disconnected client every 5s.

My client's public IP is 194.X.X.X

WireGuard server log:

2024-04-25 16:46:24.170: [TUN] [wg_server] Sending handshake initiation to peer 1 (194.X.X.X:5093)
2024-04-25 16:46:29.225: [TUN] [wg_server] Handshake for peer 1 (194.X.X.X:5093) did not complete after 5 seconds, retrying (try 2)
2024-04-25 16:46:29.225: [TUN] [wg_server] Sending handshake initiation to peer 1 (194.X.X.X:5093)
2024-04-25 16:46:34.244: [TUN] [wg_server] Handshake for peer 1 (194.X.X.X:5093) did not complete after 5 seconds, retrying (try 3)
2024-04-25 16:46:34.244: [TUN] [wg_server] Sending handshake initiation to peer 1 (194.X.X.X:5093)
2024-04-25 16:46:39.322: [TUN] [wg_server] Handshake for peer 1 (194.X.X.X:5093) did not complete after 5 seconds, retrying (try 4)
2024-04-25 16:46:39.322: [TUN] [wg_server] Sending handshake initiation to peer 1 (194.X.X.X:5093)
2024-04-25 16:46:44.436: [TUN] [wg_server] Handshake for peer 1 (194.X.X.X:5093) did not complete after 5 seconds, retrying (try 5)

This goes on and on and on. Is this to be expected? Seems a bit strange. I couldn't find much on Google. Not sure if it's an actual issue, but it doesn't feel right.

As mentioned, connecting/disconnecting with the client works fine.

Any idea what I could do?

floschwend commented 6 months ago

After around 8 minutes it stopped ("... did not complete after 20 attempts, giving up..."). So I guess that's fine then.