holepunchto / hyperswarm

A distributed networking stack for connecting peers.
https://docs.holepunch.to
MIT License
1.03k stars 84 forks source link

relay first, holepunch later #177

Closed billiegoose closed 6 days ago

billiegoose commented 1 week ago

Currently the swarm doesn't greedily use relays and then switch over to the holepunched connection. I don't know if that's the behavior we want but if it is, then this is my attempt to rectify that.

Given that hyperdht currently STOPS holepunching if a LAN connection is relayed, this could drastically increase the load on the relays unless that behavior is also fixed.

billiegoose commented 1 week ago

TODO: add test

Submitted for review to generate discussion.

billiegoose commented 6 days ago

punting this as part of the major "don't treat the LAN differently" future change.