In China, the so-called GFW often contaminates DNS results like
$ dig @188.8.131.52 archive.org ;; QUESTION SECTION: ;archive.org. IN A ;; ANSWER SECTION: archive.org. 2662 IN A 184.108.40.206
220.127.116.11 is a fake IP. We have to use the TCP mode for DNS query:
$ dig @18.104.22.168 +tcp archive.org ;; QUESTION SECTION: ;archive.org. IN A ;; ANSWER SECTION: archive.org. 237 IN A 22.214.171.124
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.