hyperboria / peers

A geographically sorted list of public peering credentials for joining Hyperboria
203 stars 74 forks source link

support 'open peers' listings #12

Open ansuz opened 9 years ago

ansuz commented 9 years ago

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.

Kubuxu commented 9 years ago

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 9 years ago

:+1:

Kubuxu commented 9 years ago

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.

kyrias commented 8 years ago

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.

kpcyrd commented 8 years ago

Might want to look into promisc for inspiration.