telehash / telehash.github.io

Contents of the site
http://telehash.org/
Other
483 stars 59 forks source link

Consider implementation of an invite system for private meshes #107

Closed RainaBatwing closed 9 years ago

RainaBatwing commented 9 years ago

In an effort to do away with seeds.json, I'd like telehash libraries to include functionality to encode the current user's address (ip, port, maybe public key?) in to a compact string representation. This would ideally be presented in something humanly friendly, like the growing standard in p2p networks: base58. Libraries should include functionality to connect to a mesh network using an invite code, instead of hard coded seeds. This provides a few cool effects:

  1. People like being invited to private systems, and like having the privilege of being able to invite other friends, sometimes turning them in to advocates "anyone want an invite to x?"
  2. Social apps are generally only useful if you have friends on them anyway, so invites provide a better user experience by excluding people until they have friends to play with.
  3. It's easy to explain how it works and visualise. It's a very teachable concept.
  4. base58 encoding is much more compact than ipv4 or ipv6 representation, and more compact than base32, can include some crypto token or a checksum to provide useful error messages when the code is entered incorrectly, and is resilient to mistyping by avoiding characters that look similar when read off another screen or written down.
  5. seeds.json is awful because operating a private mesh requires operating one or more reliable nodes to introduce new nodes to the network. The people p2p networks are probably most useful for are least equipped to run this sort of infrastructure (kids learning to code).
RainaBatwing commented 9 years ago

Symmetric NAT and Port Restricted cone NAT could pose a problem - in this case, both sides would need to generate invites an exchange them, in order to start sending packets at each other.

This isn't unprecedented - many web services require you enter a friend's email address or other globally unique identifier in order to send them an invite.

quartzjer commented 9 years ago

This is actually exactly the goal of the URI draft (and related issue).

The URI is designed to allow a "router" to act as a public/accessible coordinator such that private nodes don't have to reveal their network location directly. They are flexible enough to be generic as a general address that can be published, or a specific one-time-use-only invite token.

I'm going to close this issue so that we can follow-up on any related topics in the URI issue :)