Skip to content

Commit

Permalink
Merge #584: TSL support
Browse files Browse the repository at this point in the history
1afe234 feat: [#426] disable TimeoutAccceptor when TSL is enabled (Jose Celano)
284d235 feat: [#426] add TSL support (Jose Celano)
969ffff feat: [#426] add TSL info to the [net] section in the config toml file (Jose Celano)
5d82968 chore(deps): add cargo dependencies to parse TSL config (Jose Celano)
e29eb01 feat: use custom axum-server wrapper with timeouts (Jose Celano)
b948573 chore(deps): [#426] add cargo dependencies to use a custom axum server with timeouts (Jose Celano)
bcebcab chore: format Cargo.toml (Jose Celano)

Pull request description:

  TSL support. Allow using HTTPs providing the cert and cert key.

  ### TOML

  ```toml
  [net]
  port = 3001

  [net.tsl]
  ssl_cert_path = "./storage/index/lib/tls/localhost.crt"
  ssl_key_path = "./storage/index/lib/tls/localhost.key"
  ```

  ### JSON

  ```json
  {
    "net": {
      "port": 3001,
      "tsl": {
        "ssl_cert_path": "./storage/index/lib/tls/localhost.crt",
        "ssl_key_path": "./storage/index/lib/tls/localhost.key"
      }
    }
  }
  ```

  The TSL configuration is optional, but if you have that toml table (`[net.tsl]`), it must contain the fields. This is an invalid configuration:

  ```
  [net.tsl]
  ssl_cert_path = ""
  ssl_key_path = ""
  ```

  See torrust/torrust-tracker#853.

  ### Subtasks

  - [x] Migrate to [axum-server](https://github.com/programatik29/axum-server).
  - [x] Add a wrapper to [axum-server](https://github.com/programatik29/axum-server) with timeouts.
  - [x] Add TSL values to the configuration.
  - [x] Start with TSL support when enabled in the configuration.

Top commit has no ACKs.

Tree-SHA512: 542e08f28c29cc9097596f6f9787339324737ec64892577536b2b3f04da4d29f122f4d49459d99ce5a3ba98f67c74bf9163077e28ae1e7f838fdf97ca9e423b4
  • Loading branch information
josecelano committed May 16, 2024
2 parents 7926c91 + 1afe234 commit b2d864a
Show file tree
Hide file tree
Showing 14 changed files with 797 additions and 62 deletions.
195 changes: 187 additions & 8 deletions Cargo.lock

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

Loading

0 comments on commit b2d864a

Please sign in to comment.