Storage server for Oxen Service Nodes
Go to file
2022-02-04 10:56:44 -04:00
.github/ISSUE_TEMPLATE Update issue templates 2019-04-17 13:46:28 +10:00
.vscode check the difficulty every 10 mins 2019-06-06 17:13:17 +10:00
cmake Add check for -latomic (needed for armhf build) 2021-07-06 15:53:23 -03:00
common Change unprefixed netid to 05 for testnet instead of 00 2021-06-21 22:34:33 -03:00
contrib Add omq-rpc contrib script for SS RPC probing 2021-08-16 20:55:16 -03:00
crypto libfmt-8 compatibility fixes 2022-02-04 10:56:44 -04:00
httpserver libfmt-8 compatibility fixes 2022-02-04 10:56:44 -04:00
network-tests Add network test check for "t" field 2021-09-03 00:52:56 -03:00
storage Ensure foreign key support is enabled 2021-09-25 13:54:54 -03:00
unit_test Rename badly named hex_to_u64, document it, and test it. 2021-06-16 22:29:38 -03:00
utils Make startup more synchronous; oxenmq update 2021-06-23 17:57:06 -03:00
vendors Properly set include dirs for locally build sqlite3 2021-07-05 20:42:50 -03:00
.clang-format Run clang-format 2019-03-19 14:47:55 +11:00
.dockerignore docker support 2019-04-26 10:35:05 +00:00
.drone.jsonnet git submodules in parallel 2021-10-18 13:48:22 -03:00
.gitignore Ignore swapfiles and reject localhost binding 2019-07-25 13:12:44 +10:00
.gitmodules Remove embedded jemalloc submodule 2021-06-29 15:40:27 -03:00
CMakeLists.txt 2.2.1 version bump 2021-10-31 11:07:59 -03:00
Dockerfile Allow http in onion requests to an external server 2021-03-29 17:28:34 +11:00
LICENSE Add MIT license 2018-11-16 02:04:02 +11:00
Makefile No longer require POW for message storage 2021-03-26 12:01:47 +11:00
mock_lokid.py Always strip the 05 from start of client request pubkeys 2019-03-28 15:33:41 +11:00
README.md Update Oxen mentions 2021-08-17 11:58:45 +10:00

Oxen-storage-server

Storage server for Oxen Service Nodes

Requirements:

  • Boost >= 1.66 (for boost.program_options)
  • OpenSSL >= 1.1.1a (for X25519 curves)
  • sodium >= 1.0.17 (for ed25119 to curve25519 conversion)
  • autoconf (for building jemalloc)

You can, however, download and build static versions these dependencies (other than autoconf) as part of the build by adding the -DBUILD_STATIC_DEPS=ON option to cmake.

Can use RelWithDebInfo instead of Release if you want to include debug symbols to provide developers with valueable core dumps from crashes. Also make sure you don't have an older (than 4.3.0) libzmq header in /usr/local/include, if so please install a new version.

git submodule update --init --recursive
mkdir build && cd build
cmake -DDISABLE_SNODE_SIGNATURE=OFF -DCMAKE_BUILD_TYPE=Release ..
cmake --build .
./oxen-storage 0.0.0.0 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