Surge uses a customized DNS client to support advanced features. It may behave differently from the DNS client of your operating system.
Upstream DNS Server
Surge uses the DNS server addresses from the operating system by default. You can override them using the
[General] dns-server = 18.104.22.168, 22.214.171.124
Use the keyword
system to append additional DNS servers to the system's setting. (Duplicate servers will be ignored)
[General] dns-server = system, 126.96.36.199, 188.8.131.52
Surge simultaneously queries all DNS servers to improve performance, similar to dnsmasq with '--all-servers' parameter. The first answer from servers will be used. Surge iOS app and Surge Dashboard will show which server responds first. If Surge has not received any answer in 2 seconds, it will query all servers again. After four retries, Surge will give up and report a DNS error.
Some domain names may have poorly-performing authoritative name servers, causing upstream DNS servers to return empty answers due to server-side timeout or other connectivity issues. Surge will report an empty DNS error if all upstream DNS servers explicitly return empty DNS answers or if some servers return empty answers and others fail to respond in 2 seconds.
When IPv6 is available and enabled, Surge DNS client will send both A and AAAA questions to upstream DNS Servers. The first A or AAAA answer returned will be used.