Storage server for Oxen Service Nodes
Find a file
2019-04-10 12:15:22 +10:00
.vscode First iteration 2018-10-30 15:52:08 +11:00
contrib Missing files 2019-03-04 11:27:41 +11:00
crypto Add disable encryption to cmake for forseeable future and remove the header check for client requests 2019-04-08 13:33:11 +10:00
external use ports instead of snode addresses for testing 2019-03-22 10:54:25 +11:00
httpserver Merge pull request #56 from msgmaxim/start-new-swarm-once 2019-04-10 12:12:09 +10:00
pow Simplify build flow with a top-level makefile and cmakelist 2019-04-09 10:25:12 +10:00
storage Check that the timestamp the client sends is not in the future or already expired, also snuck in formatting utils functions copied from lokid to use 4 spaces 2019-04-09 16:21:04 +10:00
unit_test Simplify build flow with a top-level makefile and cmakelist 2019-04-09 10:25:12 +10:00
utils Check that the timestamp the client sends is not in the future or already expired, also snuck in formatting utils functions copied from lokid to use 4 spaces 2019-04-09 16:21:04 +10:00
.clang-format Run clang-format 2019-03-19 14:47:55 +11:00
.gitignore Sending the last hash with a message request 2018-11-14 15:03:11 +11:00
CMakeLists.txt Rename CmakeLists to CMakeLists to appease Linux 2019-04-10 12:15:22 +10:00
LICENSE Add MIT license 2018-11-16 02:04:02 +11:00
Makefile Simplify build flow with a top-level makefile and cmakelist 2019-04-09 10:25:12 +10:00
mock_lokid.py Always strip the 05 from start of client request pubkeys 2019-03-28 15:33:41 +11:00
README.md Simplify build flow with a top-level makefile and cmakelist 2019-04-09 10:25:12 +10:00

loki-storage-server

Storage server for Loki Service Nodes

Requirements:

  • Boost >= 1.66 (for boost.beast)
  • OpenSSL >= 1.1.1a (for X25519 curves)
  • sodium (for ed25119 to curve25519 conversion)
make
./httpserver 127.0.0.1 8080

The paths for Boost and OpenSSL can be specified by exporting the variables in the terminal before running make:

export OPENSSL_ROOT_DIR = ...
export BOOST_ROOT= ...

Then using something like Postman (https://www.getpostman.com/) you can hit the API:

post data

HTTP POST http://127.0.0.1/store
body: "hello world"
headers:
- X-Loki-recipient: "mypubkey"
- X-Loki-ttl: "86400"
- X-Loki-timestamp: "1540860811000"
- X-Loki-pow-nonce: "xxxx..."

get data

HTTP GET http://127.0.0.1/retrieve
headers:
- X-Loki-recipient: "mypubkey"
- X-Loki-last-hash: "" (optional)

unit tests

mkdir build_test
cd build_test
cmake ../unit_test -DBOOST_ROOT="path to boost" -DOPENSSL_ROOT_DIR="path to openssl"
cmake --build .
./Test --log_level=all