diff --git a/Cargo.toml b/Cargo.toml index fde902b7a570..4aeb9d9def7d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -93,6 +93,7 @@ dns-over-native-tls-vendored = [ "shadowsocks-service/dns-over-native-tls-vendored", ] dns-over-https = ["shadowsocks-service/dns-over-https"] +dns-over-h3 = ["shadowsocks-service/dns-over-h3"] # Enable logging output logging = ["log4rs"] diff --git a/crates/shadowsocks-service/src/config.rs b/crates/shadowsocks-service/src/config.rs index 548cc31da7b2..880d4804ab2b 100644 --- a/crates/shadowsocks-service/src/config.rs +++ b/crates/shadowsocks-service/src/config.rs @@ -2086,7 +2086,10 @@ impl Config { #[cfg(feature = "hickory-dns")] "google" => DnsConfig::HickoryDns(ResolverConfig::google()), - #[cfg(all(feature = "hickory-dns", feature = "dns-over-tls"))] + #[cfg(all( + feature = "hickory-dns", + any(feature = "dns-over-tls", feature = "dns-over-native-tls") + ))] "google_tls" => DnsConfig::HickoryDns(ResolverConfig::google_tls()), #[cfg(all(feature = "hickory-dns", feature = "dns-over-https"))] "google_https" => DnsConfig::HickoryDns(ResolverConfig::google_https()), @@ -2095,14 +2098,20 @@ impl Config { #[cfg(feature = "hickory-dns")] "cloudflare" => DnsConfig::HickoryDns(ResolverConfig::cloudflare()), - #[cfg(all(feature = "hickory-dns", feature = "dns-over-tls"))] + #[cfg(all( + feature = "hickory-dns", + any(feature = "dns-over-tls", feature = "dns-over-native-tls") + ))] "cloudflare_tls" => DnsConfig::HickoryDns(ResolverConfig::cloudflare_tls()), #[cfg(all(feature = "hickory-dns", feature = "dns-over-https"))] "cloudflare_https" => DnsConfig::HickoryDns(ResolverConfig::cloudflare_https()), #[cfg(feature = "hickory-dns")] "quad9" => DnsConfig::HickoryDns(ResolverConfig::quad9()), - #[cfg(all(feature = "hickory-dns", feature = "dns-over-tls"))] + #[cfg(all( + feature = "hickory-dns", + any(feature = "dns-over-tls", feature = "dns-over-native-tls") + ))] "quad9_tls" => DnsConfig::HickoryDns(ResolverConfig::quad9_tls()), #[cfg(all(feature = "hickory-dns", feature = "dns-over-https"))] "quad9_https" => DnsConfig::HickoryDns(ResolverConfig::quad9_https()),