Storage server for Oxen Service Nodes
Find a file
2019-03-25 10:52:53 +11:00
.vscode First iteration 2018-10-30 15:52:08 +11:00
contrib Missing files 2019-03-04 11:27:41 +11:00
crypto Parse lokinet-identity for snode address 2019-03-21 11:12:29 +11:00
external use ports instead of snode addresses for testing 2019-03-22 10:54:25 +11:00
httpserver Added new macro definitions for pow and encryption 2019-03-25 10:52:53 +11:00
pow Added base32z encoding function and refactored utils into own folder 2019-03-21 11:12:29 +11:00
storage Added include and ran linter 2019-03-25 10:35:21 +11:00
unit_test Run clang-format 2019-03-19 14:47:55 +11:00
utils Added include and ran linter 2019-03-25 10:35:21 +11: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
LICENSE Add MIT license 2018-11-16 02:04:02 +11:00
README.md implement crypto library for channel encryption, using OpenSSL and libsodium 2019-02-27 11:52:14 +11: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)
mkdir build
cd build
cmake ../httpserver -DBOOST_ROOT="path to boost" -DOPENSSL_ROOT_DIR="path to openssl"
cmake --build .
./httpserver 127.0.0.1 8080

(The paths for Boost and OpenSSL need only to be provided if not installed on the system)

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