xtaci / smux

A Stream Multiplexing Library for golang with least memory usage(TDMA)
MIT License
1.27k stars 189 forks source link

NAT traversal? #65

Closed WinstonPrivacy closed 4 years ago

WinstonPrivacy commented 4 years ago

We've been encountering an issue with certain customers whose ISPs are NAT'ing their UDP connections. This is causing pipes to disconnect due to NOPs no longer being sent back to the originating client.

Example:

  1. Client A establishes connection using port 1234
  2. ISP translates port 1234 to 23456
  3. Client B handles connection and returns frames on A:23456. This works fine.
  4. After 2-3 minutes, ISP translates port 1234 to 32767
  5. Client B keeps pinging port A:23456.
  6. Client A closes the connection due to keepalive no longer working

This seems incredibly common... is there a solution in place already?

WinstonPrivacy commented 4 years ago

Resolved. Not a kcp issue.