Storage server for Oxen Service Nodes
Go to file
2019-04-26 16:05:14 +10:00
.github/ISSUE_TEMPLATE Update issue templates 2019-04-17 13:46:28 +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 Load the private key and generate the public key in main instead of channelEncryption 2019-04-16 16:10:40 +10:00
external use ports instead of snode addresses for testing 2019-03-22 10:54:25 +11:00
httpserver Merge pull request #80 from msgmaxim/fix-warnings 2019-04-26 11:40:47 +10:00
pow Update calculations to expect ttl to be in milliseconds instead of seconds, require non-zero ttl because might make PoW target nonsense 2019-04-10 16:17:08 +10:00
storage Proper use of sqlite error message 2019-04-26 16:05:14 +10:00
unit_test Revert "Use std:: instead of boost:: for chrono and thread" 2019-04-16 15:48:49 +10:00
utils Run clang format 2019-04-10 17:15:45 +10:00
vendors Moved all vendor code under vendors and add make format 2019-04-11 16:40:50 +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
.travis.yml Build on travis CI 2019-04-16 09:30:27 +10:00
CMakeLists.txt Rename CmakeLists to CMakeLists to appease Linux 2019-04-10 12:15:22 +10:00
install-deps-linux.sh Build on travis CI 2019-04-16 09:30:27 +10:00
LICENSE Add MIT license 2018-11-16 02:04:02 +11:00
Makefile Build on travis CI 2019-04-16 09:30:27 +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