holepunchto / hyperdht

The DHT powering Hyperswarm
https://docs.holepunch.to
MIT License
323 stars 46 forks source link

Implement blind relay support #135

Closed kasperisager closed 1 year ago

kasperisager commented 1 year ago

This PR implements client connection support for the blind relay protocol (https://github.com/holepunchto/blind-relay). This allows peers running in both client and server mode to establish connections to other peers through blind relays. Additionally, an initial implementation of a connection pool has been added, providing a way to more efficiently manage and deduplicate connections to other peers. When provided with a connection pool, peers will use the pool for outbound connections to blind relays.

kasperisager commented 1 year ago

Removed use of the connection pool for outbound connections to relays for now and instead destroy the relay socket when the raw stream closes. This isn't optimal, but should at least be correct.

lanmower commented 1 year ago

Thank you both of you, this is huge. 🙏🥳