Deprioritize DNS sniffed domains
This commit is contained in:
@@ -155,14 +155,7 @@ impl Session {
|
||||
|
||||
pub fn effective_destination(&self) -> io::Result<Cow<'_, SocksAddr>> {
|
||||
let mut target_domain = None;
|
||||
if crate::option::DNS_DOMAIN_SNIFFING.load(std::sync::atomic::Ordering::Relaxed) {
|
||||
if let Some(domain) = &self.dns_sniffed_domain {
|
||||
target_domain = Some(domain);
|
||||
}
|
||||
}
|
||||
if target_domain.is_none()
|
||||
&& crate::option::TLS_DOMAIN_SNIFFING.load(std::sync::atomic::Ordering::Relaxed)
|
||||
{
|
||||
if crate::option::TLS_DOMAIN_SNIFFING.load(std::sync::atomic::Ordering::Relaxed) {
|
||||
if let Some(domain) = &self.tls_sniffed_domain {
|
||||
target_domain = Some(domain);
|
||||
}
|
||||
@@ -174,6 +167,13 @@ impl Session {
|
||||
target_domain = Some(domain);
|
||||
}
|
||||
}
|
||||
if target_domain.is_none()
|
||||
&& crate::option::DNS_DOMAIN_SNIFFING.load(std::sync::atomic::Ordering::Relaxed)
|
||||
{
|
||||
if let Some(domain) = &self.dns_sniffed_domain {
|
||||
target_domain = Some(domain);
|
||||
}
|
||||
}
|
||||
|
||||
if let Some(domain) = target_domain {
|
||||
Ok(Cow::Owned(SocksAddr::try_from((
|
||||
|
||||
Reference in New Issue
Block a user