Refactor ProxyOverides to be optional
Build Mumble Web 2 / linux_build (push) Successful in 1m37s
Build Mumble Web 2 / windows_build (push) Successful in 2m26s

This commit is contained in:
2026-01-10 17:29:49 -07:00
parent eab8f1d6a7
commit 51f05593ac
5 changed files with 33 additions and 32 deletions
+7 -7
View File
@@ -78,12 +78,12 @@ async fn main() -> Result<()> {
.map_err(|e| anyhow!("could not install crypto provider {e:?}"))?;
let mut client_config = ProxyOverides {
proxy_url: match &server_config.proxy_url {
Some(url) => Some(url.to_string()),
None => None,
},
cert_hash: None,
any_server: false,
proxy_url: server_config
.proxy_url
.as_ref()
.map(|url| url.to_string())
.unwrap_or_default(),
cert_hash: Vec::new(),
};
let (cert, key) = match (&server_config.cert_path, &server_config.key_path) {
@@ -102,7 +102,7 @@ async fn main() -> Result<()> {
let cert = cert_params.self_signed(&key_pair)?;
let hash = hmac_sha256::Hash::hash(cert.der().as_ref());
client_config.cert_hash = Some(hash.into());
client_config.cert_hash = hash.into();
(cert.pem().into(), key_pair.serialize_pem().into())
}