• Joanne Hugé's avatar
    New --country option; add country in addresses · 85d77bd8
    Joanne Hugé authored
    This commit concerns networks that use the --same-country option.
    We recently discovered that the IP geolocation database contains
    incorrect entries. To work around this, the protocol needs to be
    changed by adding the country as 4th field in addresses (the first 3
    are: ip, port, protocol) and the new --country option allows a node
    to announce a country that differs from the one the GeoIP DB.
    
    Thanks to the previous commits it's possible to implement backward
    compatibility, by not sending the 4th field (country) to nodes that
    can't parse it. Of course, these old nodes would continue to not
    create appropriate tunnels and after a while, the administrator of
    the network may decide to increase registry's --min-protocol (7).
    
    In a network with only nodes that implement this last version of the
    protocol, the nodes may only use the GeoIP DB to resolve their own IPs.
    
    See merge request nexedi/re6stnet!27
    85d77bd8
tunnel.py 40.6 KB