Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow additional data as part of announce #17

Open
KrishnaPG opened this issue Feb 1, 2020 · 1 comment
Open

Allow additional data as part of announce #17

KrishnaPG opened this issue Feb 1, 2020 · 1 comment

Comments

@KrishnaPG
Copy link

Could you please accept additional user-data as part of the announcement API (and add that user-supplied data to the built-in lookup data and put it on the DHT)?

For example, along with peer host, port, would like to have publicKey, compression, P2P offers etc. all part of the announcement, so that discovered peers can be connected correctly. This also facilitates ICE like features, as the P2P connection offers can be retrieved from the discovery results.

IP is just one network layout option. Announcer might want to offer multiple connection facilities, and currently, @hyperswarm/discovery and DHT seems to be hardcoding the DHT lookup values to be {host, port} (essentially IPV4), which is too restrictive. Allowing custom values to be added to the announcer record in the DHT allows, say, p2p peer ids, IPV6 records, Proxy info, STUN offers, publicKeys etc. to be supplied by the user if needed, making it possible for the clients to take the best possible connection option and connect the right way.

@mafintosh
Copy link
Contributor

The DHT has built in STUN.

No plans to change the announce message atm, but could be tweaked in the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants