A Gemini protocol server written in Rust.
- Configuration via environment variables
- Proper logging
- Serve images
- Read and send file in chunks instead of serving whole file from memory
- Expand to serve other protocols (spartan, scroll, titan etc.)
- Async I/O?
OpenSSL
cargo build --releaseGenerate your TLS keys:
openssl genrsa -out key.pem 2048 openssl req -new -key key.pem -out request.pem openssl x509 -req -days 36500 -in request.pem -signkey key.pem -out cert.pemEnvironment variables with examples:
- GEMINI_SERVER_HOSTNAME="0.0.0.0:1965"
- GEMINI_SERVER_TLS_KEY_FILENAME="/where/you/put/key.pem"
- GEMINI_SERVER_TLS_CERT_FILENAME="/where/you/put/cert.pem"
- GEMINI_SERVER_ROOT_DIRECTORY="/files/to/serve"
- RUST_LOG="debug"
Example command:
GEMINI_SERVER_TLS_KEY_FILENAME=/home/user/server/key.pem \ GEMINI_SERVER_TLS_CERT_FILENAME=/home/user/server/cert.pem \ GEMINI_SERVER_ROOT_DIRECTORY=/gemini-root \ RUST_LOG=debug \ ./target/release/gemini-grs