DNS-Hosts: return only first matched-result#4706
DNS-Hosts: return only first matched-result#4706patterniha wants to merge 1 commit intoXTLS:mainfrom patterniha:hosts2
Conversation
|
As discussed, we'd like to keep host config simple. Which means host config should just be a map, should not respect any order. |
|
This change was suggested by a telegram-user and I think it should be done, because we can have multiple-ips for each result, and there is no need for appending. /// Anyway, this is depends on opinion and it doesn't really matter. What really matters is "happy-eyeballs" and "dns-new-featutes" PR, i solved are your problems and answered all your questions But after a month, they still haven't merged. I need them for serverless-for-Iran-anti-sanction-versiom. Many users are waiting for this configuration and this configuration solves the problem of many users in iran. Many users will actually no longer need to buy a VPN in iran. They will also be useful for other uses and Chinese users will also benefit. |
we should not append matched-results in
hosts, reason: #4673 (comment)///
I tried to solve this problem in #4673 but it didn't work, because
json.Unmarshalhad messed up the order and the first matched-result was not necessarily the first matched-result to appear in the json.///
but now I changed
json.Unmarshalas well and the problem is completely solved.(In fact, if I knew I could solve "json.Unmarshal" problem so soon, I wouldn't have opened #4702 at all)