Disable SSHKEYLOGFILE by default in masque client
This commit is contained in:
parent
62686a3410
commit
d69a4d4df2
@ -6,6 +6,7 @@ use tokio::net::UdpSocket;
|
|||||||
use std::{
|
use std::{
|
||||||
net::{Ipv4Addr, SocketAddr},
|
net::{Ipv4Addr, SocketAddr},
|
||||||
path::PathBuf,
|
path::PathBuf,
|
||||||
|
sync::Arc,
|
||||||
time::Duration,
|
time::Duration,
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -76,11 +77,12 @@ async fn main() {
|
|||||||
auth,
|
auth,
|
||||||
} = ClientArgs::parse();
|
} = ClientArgs::parse();
|
||||||
|
|
||||||
let tls_config = match root_cert_path {
|
let mut tls_config = match root_cert_path {
|
||||||
Some(path) => mullvad_masque_proxy::client::client_tls_config_from_cert_path(path.as_ref())
|
Some(path) => mullvad_masque_proxy::client::client_tls_config_from_cert_path(path.as_ref())
|
||||||
.expect("Failed to get TLS config"),
|
.expect("Failed to get TLS config"),
|
||||||
None => mullvad_masque_proxy::client::default_tls_config(),
|
None => mullvad_masque_proxy::client::default_tls_config(),
|
||||||
};
|
};
|
||||||
|
Arc::get_mut(&mut tls_config).unwrap().key_log = Arc::new(rustls::KeyLogFile::new());
|
||||||
|
|
||||||
let _keylog = rustls::KeyLogFile::new();
|
let _keylog = rustls::KeyLogFile::new();
|
||||||
|
|
||||||
|
@ -597,7 +597,6 @@ fn new_connect_request(
|
|||||||
Ok(request)
|
Ok(request)
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: resuse the same TLS code from `mullvad-api` maybe
|
|
||||||
pub fn default_tls_config() -> Arc<rustls::ClientConfig> {
|
pub fn default_tls_config() -> Arc<rustls::ClientConfig> {
|
||||||
static TLS_CONFIG: LazyLock<Arc<rustls::ClientConfig>> =
|
static TLS_CONFIG: LazyLock<Arc<rustls::ClientConfig>> =
|
||||||
LazyLock::new(|| client_tls_config_with_certs(read_cert_store()));
|
LazyLock::new(|| client_tls_config_with_certs(read_cert_store()));
|
||||||
@ -616,7 +615,6 @@ fn client_tls_config_with_certs(certs: rustls::RootCertStore) -> Arc<rustls::Cli
|
|||||||
config.alpn_protocols = vec![b"h3".to_vec()];
|
config.alpn_protocols = vec![b"h3".to_vec()];
|
||||||
|
|
||||||
let approver = Approver {};
|
let approver = Approver {};
|
||||||
config.key_log = Arc::new(rustls::KeyLogFile::new());
|
|
||||||
config
|
config
|
||||||
.dangerous()
|
.dangerous()
|
||||||
.set_certificate_verifier(Arc::new(approver));
|
.set_certificate_verifier(Arc::new(approver));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user