- Rust 1.80+ (with Cargo)
- OpenSSL development libraries (for rustls)
cargo build --release
The binary will be at target/release/DoneZero.
# Development cargo run # Production ./target/release/DoneZero
The server will:
- Detect local network interfaces
- Generate a self-signed certificate (if not present)
- Bind to the first non-loopback IP on port 8443
Certificates are stored in the certs/ directory:
certs/cert.pem— Server certificatecerts/key.pem— Private key
To use your own certificate, replace these files before starting the server.
Currently, configuration is compile-time. Future versions will support environment variables and config files.
Default values:
- Port: 8443
- QR rotation interval: 3 seconds
- Handshake TTL: 60 seconds
- Max verification attempts: 3
- Access Token min TTL: 300 seconds
- Access Token max TTL: 900 seconds
- Refresh Token TTL: 3600 seconds
FROM rust:1.80-slim as builder WORKDIR /app COPY . . RUN cargo build --release FROM debian:bookworm-slim RUN apt-get update && apt-get install -y ca-certificates COPY --from=builder /app/target/release/DoneZero /usr/local/bin/ EXPOSE 8443 CMD ["DoneZero"]
- Run behind a reverse proxy (nginx/traefik) for additional TLS termination
- Use firewall rules to restrict access to the LAN subnet
- Enable traffic padding for high-security environments
- Regularly rotate certificates
- Monitor logs for suspicious activity