Skip to content
This repository has been archived by the owner on Mar 25, 2022. It is now read-only.

Commit

Permalink
oldnet: skip cjdns routing by peering everyone with each other
Browse files Browse the repository at this point in the history
License: MIT
Signed-off-by: Lars Gierth <larsg@systemli.org>
  • Loading branch information
Lars Gierth committed May 17, 2016
1 parent de96a23 commit fc651c7
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 16 deletions.
25 changes: 22 additions & 3 deletions oldnet/roles/cjdns/templates/cjdroute.conf.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
},
"interfaces": {
"UDPInterface": [
{% for interface in cjdns_udp_interfaces %}
{
"bind": "{{ interface.bind }}",
"bind": "{{ cjdns_udp6_interface.bind }}",
"connectTo": {
{% for peer in interface.peers %}
{% for peer in cjdns_udp6_interface.peers %}
"{{ peer.connect_to }}": {
"publicKey": "{{ peer.public_key }}",
"password": "{{ peer.password }}",
Expand All @@ -19,7 +18,27 @@
{% endfor %}
}
},
{
"bind": "{{ cjdns_udp4_interface.bind }}",
"connectTo": {
{% for peer in cjdns_udp4_interface.peers %}
"{{ peer.connect_to }}": {
"publicKey": "{{ peer.public_key }}",
"password": "{{ peer.password }}",
"peerName": "{{ peer.peer_name }}"
},
{% endfor %}
{% for hostname in cjdns_identities.keys() %}
{% if hostname != inventory_hostname %}
"{{ hostvars[hostname].ansible_ssh_host }}:54321": {
"publicKey": "{{ cjdns_identities[hostname].public_key }}",
"password": "{{ cjdns_authorized_passwords.solarnet }}",
"peerName": "{{ hostname }}.i.ipfs.io"
},
{% endif %}
{% endfor %}
}
},
]
},
"authorizedPasswords": [
Expand Down
27 changes: 14 additions & 13 deletions oldnet/secrets.yml.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,20 @@ cjdns_identities:

# interfaces for incoming and outgoing UDP peering
# it's useful to add a comment with contact/location information for each peer
cjdns_udp_interfaces:
- bind: [::]:54321
peers:
- connect_to: [1234::56]:65432
public_key: the-peers-public-key.k
password: the-password
peer_name: the-human-readable-peer
- bind: 0.0.0.0:54321
peers:
- connect_to: 1.2.3.4:65432
public_key: the-peers-public-key.k
password: the-password
peer_name: the-human-readable-peer
cjdns_udp6_interface:
bind: [::]:54321
peers:
- connect_to: [1234::56]:65432
public_key: the-peers-public-key.k
password: the-password
peer_name: the-human-readable-peer
cjdns_udp4_interface:
bind: 0.0.0.0:54321
peers:
- connect_to: 1.2.3.4:65432
public_key: the-peers-public-key.k
password: the-password
peer_name: the-human-readable-peer

# passwords for incoming peerings
cjdns_authorized_passwords:
Expand Down

0 comments on commit fc651c7

Please sign in to comment.