Go to file
2021-04-01 10:46:35 +11:00
.github/workflows Don't use nightly 2021-03-25 11:38:06 +11:00
src Make file handling async 2021-04-01 10:32:25 +11:00
.gitignore Add file storage & retrieval tests 2021-03-19 11:18:03 +11:00
.rustfmt.toml Add .rustfmt.toml 2021-03-25 10:56:16 +11:00
BUILDING.md Add BUILDING.md 2021-04-01 10:46:35 +11:00
Cargo.lock Merge branch 'logging' of github.com:msgmaxim/rust-session-open-group-server into main 2021-03-31 15:45:26 +11:00
Cargo.toml Merge branch 'logging' of github.com:msgmaxim/rust-session-open-group-server into main 2021-03-31 15:45:26 +11:00
LICENSE Add license 2021-03-22 16:36:03 +11:00
README.md Update README 2021-03-31 15:37:03 +11:00

example workflow

API Documentation

CLI Reference

Requirements

Dependency Version
rustup 1.50.0
openssl 1.1.1

Setup

Step 1: Generate an X25519 key pair

openssl genpkey -algorithm x25519 -out x25519_private_key.pem
openssl pkey -in x25519_private_key.pem -pubout -out x25519_public_key.pem

Make sure you're pointing to the right openssl installation (e.g. macOS provides an old default implementation that doesn't have the X25519 algorithm).

Step 2: Build the project

cargo build --release

The Linux Rust installer assumes that you already have a C linker installed. If this is not the case you'll see error: linker 'cc' not found. To fix this, run:

apt update
sudo apt install build-essential

Step 3: Run it

./target/release/session-open-group-server

Command line arguments:

Command Default Description
x25519-public-key x25519_public_key.pem Path to X25519 public key
x25519-private-key x25519_private_key.pem Path to X25519 private key
port 80 Port to bind to
host 0.0.0.0 IP to bind to
log-file None Path to the log file. If not provided, logs are only printed to stdout.

If you want to run with TLS enabled:

Command Default Description
tls false Run in TLS mode
tls-certificate tls_certificate.pem Path to TLS certificate
tls-private-key tls_private_key.pem Path to TLS private key

Note that the default is * not * to run in TLS mode. This is because normally the server communicates through onion requests, eliminating the need for TLS.