fc00 / peers-api

find hyperboria peers via http(s)
https://peers.fc00.io
GNU Affero General Public License v3.0
6 stars 2 forks source link

return node locations along with peering credentials #3

Closed ansuz closed 7 years ago

ansuz commented 8 years ago

Currently, if you search for a node by its location (continent, for example) it will return all nodes satisfying that constraint. That list can be very long, and individual nodes are returned with no indication of where they are within that large zone.

Nodes could be returned with an added location field, like so:

{
  "result": [
    {
      "185.125.216.67:24297": {
        "contact": "contact@bunjlabs.com",
        "login": "default-login",
        "password": "c5q2j63x5nkmt2yg2vjmlnfuh1jnjjf",
        "peerName": "h.bunjlabs.com",
        "publicKey": "5dkw4x4tczb6x164qklggbgfy35cs5uxjl6tyyu4slu7nm4062q0.k",
        "location": [
            "EU",
            "ru",
            "moscow"
        ]
      }
    }
  ]
}
ansuz commented 7 years ago

Implemented upstream in this commit