README (1352B)
1 clortho is a very simple key/value server written using python 3.5 and aiohttp 2 3 key namespace is per-client IP address, and there is no authentication. It 4 supports direct connections from clients, and X-Forwarded-For for use with 5 proxies. I shouldn't have to mention that running this on an open network isn't 6 a good idea. 7 8 Get a key value by requesting http://server/keystore/<key> 9 10 curl http://server/keystore/louis 11 12 If the key has been set it will return a 200 status with the value. If the key 13 is not set it will return a 404 and a message: 14 15 louis doesn't exist for 192.168.1.100 16 17 18 set a key value by POST to http://server/keystore/<key> with value=<value> 19 20 curl --http1.0 --F value=keymaster http://server/keystore/louis 21 OK 22 23 If the key was set it will return a 200 and an OK message. If there was a 24 problem it will return a 404 and ERROR as the response. 25 26 One key, version, is hard-coded. This can be used to check to see if the 27 keyserver is running, or which API version it is using. 28 29 curl http://server/keystore/version 30 version: 0.1 31 32 The key store is read from the file specified by --keystore or from clortho.dat 33 in the current directory. It is written on shutdown (SIGINT or SIGTERM). The 34 store is simply a pickle of the keystore dict. 35 36 The IP address and port to listen to can be set with --host and --port and 37 default to 127.0.0.1 and 9001 38