Skip to content

Commit

Permalink
feat: update DNS configuration to use custom DNS for non-OpenWRT plat…
Browse files Browse the repository at this point in the history
…forms

Signed-off-by: Dengfeng Liu <[email protected]>
  • Loading branch information
liudf0716 committed Jan 10, 2025
1 parent abc0a44 commit 6acb5a4
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/wd_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -1457,10 +1457,11 @@ thread_evdns_parse_trusted_domain_2_ip(void *arg)
}

evdns_base_set_option(dnsbase, "timeout", config_get_config()->dns_timeout);
// thanks to the following article
// http://www.wuqiong.info/archives/13/
evdns_base_set_option(dnsbase, "randomize-case:", "0");//TurnOff DNS-0x20 encoding
evdns_base_nameserver_ip_add(dnsbase, "127.0.0.1");//LocalDNS
evdns_base_set_option(dnsbase, "randomize-case", "0");//TurnOff DNS-0x20 encoding
if (is_openwrt_platform())
evdns_base_nameserver_ip_add(dnsbase, "127.0.0.1");//LocalDNS
else
evdns_base_nameserver_ip_add(dnsbase, "1.1.1.1");//custom DNS

struct evutil_addrinfo hints;
LOCK_DOMAIN();
Expand Down

0 comments on commit 6acb5a4

Please sign in to comment.