In China, the so-called GFW often contaminates DNS results like
$ dig @220.127.116.11 archive.org ;; QUESTION SECTION: ;archive.org. IN A ;; ANSWER SECTION: archive.org. 2662 IN A 18.104.22.168
22.214.171.124 is a fake IP. We have to use the TCP mode for DNS query:
$ dig @126.96.36.199 +tcp archive.org ;; QUESTION SECTION: ;archive.org. IN A ;; ANSWER SECTION: archive.org. 237 IN A 188.8.131.52
Now we get the real IP
In System Preferences -> Network, the Advanced... button can open a tab for setting DNS. However, I can only add the IP addresses of DNS servers but cannot do anything else. So my question is: how can I force the default DNS query working in the TCP mode?
PS: I don't want to modify the
/etc/hosts file to circumvent this problem as it's inconvenient. If there's any elegant method that can solve this problem, it will save me much time :) Thanks.