From b5a899947c2205093dc1e5aa808133660038c03f Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 18 Nov 2015 13:50:06 -0500 Subject: [PATCH 1/4] README.md : specify requirements for inclusion in the repository. closes #3 --- README.md | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/README.md b/README.md index 9ccdf63..d568ac3 100644 --- a/README.md +++ b/README.md @@ -4,3 +4,74 @@ listing public peers ## Adding your public node's credentials If you've created a public node, and would like to have it listed here, fork the repo, add a valid .json file, and submit a PR. + +## Nodeinfo.json + +This repository is meant to extend the [nodeinfo.json standard](https://github.com/hyperboria/docs/blob/master/cjdns/nodeinfo-json.md "nodeinfo.json standard, from Hyperboria's docs repo"). +`nodeinfo.json` is a valid [JSON](http://www.json.org/ "the Javascript Object Notation standard") file hosted on a webserver's root which displays information about that node: + +* services it hosts +* who operates the node +* where the node is located + +There are a number of individuals who have taken to analyzing data exposed by their nodes' cjdns admin interfaces, and by crawling webservers for html and structured JSON. +Centralized listings make it easier for anyone to view information which node operators have volunteered, though, it should be trivial for you to verify this information by virtue of it being self-hosted. + +## Naming conventions + +Node operators who have voluntarily included information about their nodes' location are making it easier to create a programmatic method of finding peers who are in your vicinity. +The specification includes seven fields which make this possible: + +1. continent +2. region +3. municipality +4. latitude +5. longitude +6. altitude +7. uri + +Numbers 4-6 provide exact coordinates of a node. The structure of this repository will adhere to the hierarchy imposed by the first three. +As such, if you'd like to list your node here, you will need to determine [your continent code](https://github.com/hyperboria/docs/blob/master/cjdns/nodeinfo-json.md#regarding-continent-codes), your region, and your municipality. + +Your continent should be relatively unambiguous, however, your region likely isn't. +For our purposes, it only matters in that other members of your region should agree. +Like hashtags, they are most effective when consistent and descriptive. +Start by finding someone else in your area, and follow their lead. + +Assuming `peers/` is the repository root, your peering credentials should be located in `peers/{continent}/{region}/{municipality}/`. + +By following this scheme, we make it possible for users to programmatically find peers in their vicinity, which should make adoption of [cjdns](https://github.com/cjdelisle/cjdns) easier. + +## JSON formatting + +* Your credentials must be [valid JSON](http://jsonlint.com/). +* They should be small enough so as to be inserted into a `cjdroute.conf` **as is** without triggering the [connectTo-overflow bug](https://github.com/hyperboria/docs/blob/master/bugs/connectTo-overflow.md). +* They must contain the necessary fields: + + ip/port + + password + + publicKey +* They should also contain a means of contacting the operator + + +``` +"192.168.1.5:10326": { + "login": "default-login", + "password":"nq1uhmf06k8c5594jqmpgy26813b81s", + "publicKey":"ssxlh80x0bqjfrnbkm1801xsxyd8zd45jkwn1zhlnccqj4hdqun0.k", + "peerName":"your-name-goes-here" +} +``` + +> Note: the snippet above is **not valid json**. It would need to be wrapped in an additional block of curly braces `{ }` +> +> We will create a linter that validates such blocks (coming soon). + +## Naming your entry + +Files should be named to match your node's public key, with a `.json` trailing, like so: + +`ssxlh80x0bqjfrnbkm1801xsxyd8zd45jkwn1zhlnccqj4hdqun0.k.json` + +This allows anyone crawling the directory to easily check whether they'd already added a node without having to read the file itself. + + From d6ad2d8ec35d8b665ce7d83bdad92e717688a9be Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 18 Nov 2015 13:59:15 -0500 Subject: [PATCH 2/4] README.md : credential files aren't valid JSON, so exclude the .json and use .k --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d568ac3..5cdeda4 100644 --- a/README.md +++ b/README.md @@ -68,9 +68,9 @@ By following this scheme, we make it possible for users to programmatically find ## Naming your entry -Files should be named to match your node's public key, with a `.json` trailing, like so: +Files should be named to match your node's public key, like so: -`ssxlh80x0bqjfrnbkm1801xsxyd8zd45jkwn1zhlnccqj4hdqun0.k.json` +`ssxlh80x0bqjfrnbkm1801xsxyd8zd45jkwn1zhlnccqj4hdqun0.k` This allows anyone crawling the directory to easily check whether they'd already added a node without having to read the file itself. From d8a6e6ac47820d4f04818bc4930285062789bef7 Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 18 Nov 2015 14:14:02 -0500 Subject: [PATCH 3/4] add ansuz.science as a public peer in london --- EU/uk/london/ansuz.science.k | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 EU/uk/london/ansuz.science.k diff --git a/EU/uk/london/ansuz.science.k b/EU/uk/london/ansuz.science.k new file mode 100644 index 0000000..946bdd8 --- /dev/null +++ b/EU/uk/london/ansuz.science.k @@ -0,0 +1,6 @@ +"139.162.219.143:2331":{ + "password":"ALcVwciz1enkZTE1SvBjj7WX2gZwtcTa", + "publicKey":"bddc5j6sc45hlrdnccu120zwnmm2z0qlbfkxn9n8xbs0vqgx9fh0.k", + "user":"ansuz", + "contact":"ansuz@transitiontech.ca", +} From 6258073e6d923fd8a871e2686f7256c813353e7c Mon Sep 17 00:00:00 2001 From: ansuz Date: Wed, 18 Nov 2015 14:16:29 -0500 Subject: [PATCH 4/4] README.md : modify naming conventions slightly --- README.md | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 5cdeda4..4c32877 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ listing public peers ## Adding your public node's credentials -If you've created a public node, and would like to have it listed here, fork the repo, add a valid .json file, and submit a PR. +If you've created a public node, and would like to have it listed here, fork the repo, add a keyfile, and submit a PR. ## Nodeinfo.json @@ -68,10 +68,5 @@ By following this scheme, we make it possible for users to programmatically find ## Naming your entry -Files should be named to match your node's public key, like so: - -`ssxlh80x0bqjfrnbkm1801xsxyd8zd45jkwn1zhlnccqj4hdqun0.k` - -This allows anyone crawling the directory to easily check whether they'd already added a node without having to read the file itself. - +You can name your file whatever you want, but for simplicity's sake, avoid characters which will need to be escaped at the command line.