pub fn set_dns_formatted(&mut self, dns: &str) -> Result<(), Error> {
        self.dns = match dns {
            "system" => DnsConfig::System,

            #[cfg(feature = "hickory-dns")]
            "google" => DnsConfig::HickoryDns(ResolverConfig::google()),
            #[cfg(all(feature = "hickory-dns", feature = "dns-over-tls"))]
            "google_tls" => DnsConfig::HickoryDns(ResolverConfig::google_tls()),
            #[cfg(all(feature = "hickory-dns", feature = "dns-over-https"))]
            "google_https" => DnsConfig::HickoryDns(ResolverConfig::google_https()),
            #[cfg(all(feature = "hickory-dns", feature = "dns-over-h3"))]
            "google_h3" => DnsConfig::HickoryDns(ResolverConfig::google_h3()),

            #[cfg(feature = "hickory-dns")]
            "cloudflare" => DnsConfig::HickoryDns(ResolverConfig::cloudflare()),
            #[cfg(all(feature = "hickory-dns", feature = "dns-over-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"))]
            "quad9_tls" => DnsConfig::HickoryDns(ResolverConfig::quad9_tls()),
            #[cfg(all(feature = "hickory-dns", feature = "dns-over-https"))]
            "quad9_https" => DnsConfig::HickoryDns(ResolverConfig::quad9_https()),

            nameservers => self.parse_dns_nameservers(nameservers)?,
        };

        Ok(())
    }
Set DNS configuration in string format

1. `[(unix|tcp|udp)://]host[:port][,host[:port]]...`
2. Pre-defined. Like `google`, `cloudflare`
crates/shadowsocks-service/src/config.rs