Skip to content

Comments

DNS-Hosts: appending matched-results again#4702

Merged
yuhan6665 merged 1 commit intoXTLS:mainfrom
patterniha:fix-bug-6
May 6, 2025
Merged

DNS-Hosts: appending matched-results again#4702
yuhan6665 merged 1 commit intoXTLS:mainfrom
patterniha:fix-bug-6

Conversation

@patterniha
Copy link
Collaborator

@patterniha patterniha commented May 6, 2025

Unmarshalling json in golang will not respect order.

So, sorting h.matchers.Match(domain) in #4673 is useless and the order of the results is still messed up, Because json.Unmarshal messed up the order of domains at the very beginning.

So, I temporarily reverted this to the previous state (appending matched-results).

///

I need to change json.Unmarshal for hosts to completely fix this issue.

@patterniha patterniha changed the title DNS: appending hosts results again DNS: appending hosts matched-results again May 6, 2025
@patterniha patterniha changed the title DNS: appending hosts matched-results again DNS-Hosts: appending matched-results again May 6, 2025
@yuhan6665
Copy link
Member

Can you do a proper git revert?

@patterniha
Copy link
Collaborator Author

Can you do a proper git revert?

No, it should not be reverted, the number-1 in #4673 is OK.

@yuhan6665 yuhan6665 merged commit 59aa5e1 into XTLS:main May 6, 2025
36 checks passed
@yuhan6665
Copy link
Member

Ok I see it now. Thanks!

@patterniha patterniha deleted the fix-bug-6 branch May 6, 2025 23:55
@patterniha
Copy link
Collaborator Author

patterniha commented May 7, 2025

I need to change json.Unmarshal for hosts to completely fix this issue

Done: #4706

In fact, if I knew I could solve "json.Unmarshal" problem so soon, I wouldn't have opened this PR at all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants