Skip to content

Commit

Permalink
added support for https
Browse files Browse the repository at this point in the history
  • Loading branch information
kolja committed Dec 13, 2024
1 parent 8346262 commit bb9b1e1
Show file tree
Hide file tree
Showing 11 changed files with 395 additions and 25 deletions.
196 changes: 193 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[package]
name = "orca"
version = "0.1.9"
version = "0.1.10"
edition = "2021"

[dependencies]
tokio = "1.41.0"
actix-web = "4"
actix-web = { version = "4.9", features = ["rustls-0_23"]}
actix-files = "0.6"
env_logger = "0.11"
futures = "0.3"
Expand All @@ -26,6 +26,8 @@ rand = "0.8.5"
regex = "1.11.1"
rust-embed = { version = "8.5.0", features = ["include-exclude"] }
once_cell = "1.20"
rustls = "0.23.20"
rustls-pemfile = "2.2"

[target.'cfg(unix)'.dependencies]
openssl = { version = "0.10", features = ["vendored"] }
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@ A simple OPDS Server for Calibre written in Rust
## Configuration

If you point the environment variable `ORCA_CONFIG` to a `.toml` file, that's where the configuration will be read from. Otherwise, it will look for a file named `orca.toml` or `orca/config.toml` in `$HOME/.config/`.

The server will either start as HTTP or HTTPS server depending on the value of 'protocol'. If you set it to 'https', you have to provide a path to a certificate and a key file.
```toml
[server]
ip = "<your_ip>"
port = 8080
protocol = "https" # or "http"
cert = "/path/to/cert.pem"
key = "/path/to/key.pem"

[authentication]
alice = "468a286ae97d67f84b56:94Gxd6BCmgkBAtMEIxjW"
Expand Down
Loading

0 comments on commit bb9b1e1

Please sign in to comment.