dndx / phantun

Transforms UDP stream into (fake) TCP streams that can go through Layer 3 & Layer 4 (NAPT) firewalls/NATs.
Apache License 2.0
1.67k stars 134 forks source link

[Feature Request] HeartBeat Support(NAT Support) #30

Open Handsome1080P opened 2 years ago

Handsome1080P commented 2 years ago

Feature Request:

for nat,need hearbeat or keepalive

dndx commented 2 years ago

This is something I considered, however, I didn't add it due to the consideration that UDP protocols like WireGuard already have PersistentKeepalive which would keep the connections open, so I did not found TCP keepalive that important to add in the short term.

Handsome1080P commented 2 years ago

Yup,wg has the keepalive setting,but other udp tunnels not have one.Just follow ur priority.Thx

kckm commented 2 years ago

I think let those udp tunnels that don't support keepalive join the heartbeat feature to be right.

andreadaoud commented 1 year ago

I think keep-alive is needed. If keep-alive packet is not received in-time, we must treat connection as broken, and re-establish TCP connection. WireGuard PersistentKeepalive cannot achieve this.

Ginurx commented 3 months ago

Yup,wg has the keepalive setting,but other udp tunnels not have one.Just follow ur priority.Thx

Your issue can be temporarily addressed by setting a cron job which pings your server using nmap UDP scan.