libp2p/go-reuseport-transport

Choose a better source port when possible

Closed this issue · 1 comments

Specifically, on Linux, this library should:

  1. Use the netlink interface to figure out which local address the kernel would pick as the source address when dialing some destination address.
  2. Check to see if we're listening on any ports bound to that address. If so, use that as the source port when dialing.

We now have a library, github.com/libp2p/go-netroute, that provides a cross-platform way to do this. We should switch to this library.