This tool provides a minimalistic server that accepts RTR connections and sends router keys to connected routers.
A typical PDU exchange can be found within the RFC specification here.
In detail, the tool does the following:
- server listens for incoming connections
- upon connection, server sends cache response PDU
- server sends all router key PDUs
- server sends end of data PDU with maximum retry time value (2 hours)
- server closes connection and starts listening again
This Repository provides a way of generating router keys which can be used with the server. The router keys can be generated by executing the following command
./gen-keys AMOUNT DIR
Keep in mind that the keys/
directory must already exist. See the
Examples for more.
The server is started by specifying a host address, a port and one of two router key options (see Examples).
Router keys must either already exist or can be generated by the server on startup. Important: router keys generated by this tool are dummy router keys are by no means valid! They should not be used for anything else but testing!
To start the server with existing router keys, simply point to the
directory storing the router keys with the --keypath PATH
option
./cache.py HOST PORT --keypath PATH
By default, the server will look for .cert
files. If the router keys have
a different file extension, specify it using the --ext EXT
option
./cache.py HOST PORT --keypath PATH --ext EXT
Important: regardless of the file extension, the router key must still be
a valid x509 certificate!
This option is only regarded if in combination with the --keypath
option.
Using the -d
option will ignore the --ext
option.
To generate dummy router keys by the server, use the -d AMOUNT
option
./cache.py HOST PORT -d AMOUNT
To generate 100 router keys in the keys/
directory, run
./gen-keys 100 keys/
Show all options for the server with -h
or --help
./cache.py --help
Start a server on 0.0.0.0:8383
with existing router keys
./cache.py 0.0.0.0 8383 --keypath path/to/keys
Specify a different file extension for router keys
./cache.py 0.0.0.0 8383 --keypath path/to/keys --ext xyz
Start a server on 0.0.0.0:8383
and generate 100 dummy router keys
./cache.py 0.0.0.0 8383 -d 100