Choose a better source port when possible
Closed this issue · 1 comments
Stebalien commented
Specifically, on Linux, this library should:
- Use the netlink interface to figure out which local address the kernel would pick as the source address when dialing some destination address.
- Check to see if we're listening on any ports bound to that address. If so, use that as the source port when dialing.
Stebalien commented
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.