wangyu- / udp2raw

A Tunnel which Turns UDP Traffic into Encrypted UDP/FakeTCP/ICMP Traffic by using Raw Socket,helps you Bypass UDP FireWalls(or Unstable UDP Environment)
MIT License
7.16k stars 1.16k forks source link

Server keep sending old heart beat after client restart #459

Closed Mukou-Aoi closed 1 year ago

Mukou-Aoi commented 1 year ago

When running under icmp mode, if client is restarted while server is running, server will keep sending old heart beat to client even after reconnect.

On client size this results in icmp id mis-match,ignored messages, on server side this is shown as multiple lines of heart beat sent<xxx,yyy> messages with different ids (xxx.yyy)

The amount of exccesive (old) heat beat messages increas every time the client is restarted, until server finally gives up.

Restart server while client is running doesn't cause this problem, client will only send heart beat to server with new ids after reconnect.

wangyu- commented 1 year ago

When running under icmp mode, if client is restarted while server is running, server will keep sending old heart beat to client even after reconnect.

how do you restart the client? kill and re-run the client, or use the reconnect command from --pipe?

if it's kill and re-run, then it's as expected. The server is able to serve multiple clients concurrently, it doesn't give up the previous client until the heart beat timeouts.

Mukou-Aoi commented 1 year ago

Yes, it was kill and re-run (client is using udp2raw-multiplatform on Windows which doesn't support pipe)

I suppose I could workaround this by restart server via ssh as well when restarting the client. (I'm the only user and I only need one client at a time)