Use mask_host for TLS emulation fetcher

This commit is contained in:
ivulit 2026-02-21 10:22:51 +03:00
parent 1a525f7d29
commit 6ce25c6600
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; cache.load_from_disk().await;
let port = config.censorship.mask_port; 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. // Initial synchronous fetch to warm cache before serving clients.
for domain in tls_domains.clone() { for domain in tls_domains.clone() {
match crate::tls_front::fetcher::fetch_real_tls( match crate::tls_front::fetcher::fetch_real_tls(
&domain, &mask_host,
port, port,
&domain, &domain,
Duration::from_secs(5), 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; tokio::time::sleep(Duration::from_secs(base_secs + jitter_secs)).await;
for domain in &domains { for domain in &domains {
match crate::tls_front::fetcher::fetch_real_tls( match crate::tls_front::fetcher::fetch_real_tls(
domain, &mask_host,
port, port,
domain, domain,
Duration::from_secs(5), Duration::from_secs(5),