diff --git a/gui/src/imp/desktop.rs b/gui/src/imp/desktop.rs index f3caa3f..2e64380 100644 --- a/gui/src/imp/desktop.rs +++ b/gui/src/imp/desktop.rs @@ -284,7 +284,7 @@ pub async fn network_connect( address: String, username: String, event_rx: &mut UnboundedReceiver, - gui_config: &ProxyOverides, + proxy_overides: &ProxyOverides, ) -> Result<(), Error> { info!("connecting"); diff --git a/gui/src/imp/web.rs b/gui/src/imp/web.rs index 6bbff66..201784e 100644 --- a/gui/src/imp/web.rs +++ b/gui/src/imp/web.rs @@ -329,7 +329,7 @@ pub async fn network_connect( address: String, username: String, event_rx: &mut UnboundedReceiver, - gui_config: &ProxyOverides, + proxy_overides: &ProxyOverides, ) -> Result<(), Error> { info!("connecting"); @@ -342,7 +342,7 @@ pub async fn network_connect( ) .ey()?; - if let Some(server_hash) = &gui_config.cert_hash { + if let Some(server_hash) = &proxy_overides.cert_hash { let hash = web_sys::js_sys::Uint8Array::from(server_hash.as_slice()); web_sys::js_sys::Reflect::set(&object, &"value".into(), &hash).ey()?; } diff --git a/proxy/src/main.rs b/proxy/src/main.rs index a65c86f..dcf5c78 100644 --- a/proxy/src/main.rs +++ b/proxy/src/main.rs @@ -77,7 +77,7 @@ async fn main() -> Result<()> { .install_default() .map_err(|e| anyhow!("could not install crypto provider {e:?}"))?; - let mut client_config = ProxyOverides { + let mut proxy_overides = ProxyOverides { proxy_url: match &server_config.proxy_url { Some(url) => Some(url.to_string()), None => None, @@ -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()); + proxy_overides.cert_hash = Some(hash.into()); (cert.pem().into(), key_pair.serialize_pem().into()) } @@ -123,13 +123,13 @@ async fn main() -> Result<()> { let rustls_config = RustlsConfig::new(Keycert::new().cert(cert.as_slice()).key(key.as_slice())); info!( - "client config:\n{}", - toml::to_string_pretty(&client_config)? + "proxy overides:\n{}", + toml::to_string_pretty(&proxy_overides)? ); let config_craft = ConfigCraft { server_config: server_config.clone(), - client_config, + proxy_overides, }; let status_craft = StatusCraft { @@ -252,14 +252,14 @@ impl StatusCraft { #[derive(Clone)] pub struct ConfigCraft { server_config: Arc, - client_config: ProxyOverides, + proxy_overides: ProxyOverides, } #[craft] impl ConfigCraft { #[craft(handler)] async fn get_config(&self) -> Json { - Json(self.client_config.clone()) + Json(self.proxy_overides.clone()) } #[craft(handler)]