hyperboria/peers

support 'open peers' listings

ansuz opened this issue · 5 comments

ansuz commented

Where 'open peers' are defined as an endpoint supporting a programmatic way to request and receive valid cjdns peering credentials with a unique password, as opposed to many peers sharing one published password.

I was thinking about simple POST HTTP request with possible additional data like ie. username, contact.

Response code would be either 200 with valid peering info (that could be copy-pasted, possibly including expires metadata), 503 if open peer reached its capacity, 403 if user was blocked and (some code) for "I don't want you" for some reason (I could require you to have valid nodeinfo).

Request and response format should be somewhat standardised as json(MIME application/json), in case of refusal reason field with string would be nice.

Exchange should happen over cjdns or if clearnet is to be used: https.

We have to yet specify (some code), I was thinking about 418 (I am teapot)

ansuz commented

👍

With @NateBrune we've come to an agreement.

Open peers will be accessible as http pages with GET endpoint hosting what ever user interface you want and POST providing dumb request/registration JSON interface. This way open peers pages can be used in browser to get peering info and in CLI/programs.

I'd sort of want something half-open, where it would try to send a verification code to the contact address that's needed to actually get the credentials, because I'd want to get a somewhat reliable way to contact my peers.

Might want to look into promisc for inspiration.