mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-03-31 17:55:36 +00:00
ws: don't attempt to parse TLS files when running without TLS
This commit is contained in:
parent
72c66e6e1a
commit
7b06bf8736
3 changed files with 8 additions and 7 deletions
|
|
@ -10,7 +10,7 @@ use serde::Deserialize;
|
|||
use aquatic_common::cli::LogLevel;
|
||||
|
||||
/// aquatic_http configuration
|
||||
///
|
||||
///
|
||||
/// Does not support running behind a reverse proxy.
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
#[serde(default, deny_unknown_fields)]
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ use aquatic_common::cli::LogLevel;
|
|||
use aquatic_toml_config::TomlConfig;
|
||||
|
||||
/// aquatic_ws configuration
|
||||
///
|
||||
///
|
||||
/// Running behind a reverse proxy is supported, but IPv4 peer requests have
|
||||
/// to be proxied to IPv4 requests, and IPv6 requests to IPv6 requests.
|
||||
#[derive(Clone, Debug, PartialEq, TomlConfig, Deserialize)]
|
||||
|
|
|
|||
|
|
@ -47,13 +47,14 @@ pub fn run(config: Config) -> ::anyhow::Result<()> {
|
|||
let (sentinel_watcher, sentinel) = PanicSentinelWatcher::create_with_sentinel();
|
||||
let priv_dropper = PrivilegeDropper::new(config.privileges.clone(), config.socket_workers);
|
||||
|
||||
let opt_tls_config = config
|
||||
.network
|
||||
.enable_tls
|
||||
.then_some(Arc::new(create_rustls_config(
|
||||
let opt_tls_config = if config.network.enable_tls {
|
||||
Some(Arc::new(create_rustls_config(
|
||||
&config.network.tls_certificate_path,
|
||||
&config.network.tls_private_key_path,
|
||||
)?));
|
||||
)?))
|
||||
} else {
|
||||
None
|
||||
};
|
||||
|
||||
let mut executors = Vec::new();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue