Use mask_host for TLS emulation fetcher

This commit is contained in:
ivulit 2026-02-21 10:22:51 +03:00
parent 379a69a419
commit 9ad8fe3138
No known key found for this signature in database
1 changed files with 4 additions and 2 deletions

View File

@ -461,10 +461,12 @@ match crate::transport::middle_proxy::fetch_proxy_secret(proxy_secret_path).awai
cache.load_from_disk().await;
let port = config.censorship.mask_port;
let mask_host = config.censorship.mask_host.clone()
.unwrap_or_else(|| config.censorship.tls_domain.clone());
// Initial synchronous fetch to warm cache before serving clients.
for domain in tls_domains.clone() {
match crate::tls_front::fetcher::fetch_real_tls(
&domain,
&mask_host,
port,
&domain,
Duration::from_secs(5),
@ -488,7 +490,7 @@ match crate::transport::middle_proxy::fetch_proxy_secret(proxy_secret_path).awai
tokio::time::sleep(Duration::from_secs(base_secs + jitter_secs)).await;
for domain in &domains {
match crate::tls_front::fetcher::fetch_real_tls(
domain,
&mask_host,
port,
domain,
Duration::from_secs(5),