Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the domain matching method of the mix-list matcher. #246

Merged
merged 1 commit into from
Oct 30, 2020
Merged

Fix the domain matching method of the mix-list matcher. #246

merged 1 commit into from
Oct 30, 2020

Conversation

LEXUGE
Copy link
Contributor

@LEXUGE LEXUGE commented Oct 28, 2020

Currently, domain:le.com using mix-list method would cause www.google.com to match, which is unintended.
Also, currently the implementation causes le.com to fail matching domain:le.com as it is written as idx>0.

This fixes the aforementioned two issues.

Tested on my machine.

@codecov
Copy link

codecov bot commented Oct 28, 2020

Codecov Report

Merging #246 into master will decrease coverage by 3.25%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #246      +/-   ##
==========================================
- Coverage   55.97%   52.72%   -3.26%     
==========================================
  Files          13       13              
  Lines         661      569      -92     
==========================================
- Hits          370      300      -70     
+ Misses        241      220      -21     
+ Partials       50       49       -1     
Impacted Files Coverage Δ
core/outbound/clients/resolver/udp_resolver.go 60.00% <0.00%> (-11.43%) ⬇️
core/outbound/clients/resolver/tcp_resolver.go 25.00% <0.00%> (-8.34%) ⬇️
core/outbound/clients/resolver/tcptls_resolver.go 38.70% <0.00%> (-7.01%) ⬇️
core/outbound/dispatcher.go 52.87% <0.00%> (-4.42%) ⬇️
core/hosts/hosts.go 64.40% <0.00%> (-3.71%) ⬇️
core/outbound/clients/resolver/base_resolver.go 36.95% <0.00%> (-3.24%) ⬇️
core/outbound/clients/resolver/https_resolver.go 65.21% <0.00%> (-2.79%) ⬇️
core/outbound/clients/resolver/address.go 79.66% <0.00%> (-2.70%) ⬇️
core/common/ipset.go 91.42% <0.00%> (-1.52%) ⬇️
core/matcher/suffix/tree.go 86.48% <0.00%> (-0.75%) ⬇️
... and 3 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29cd667...b2bb021. Read the comment docs.

@shawn1m shawn1m merged commit 5912121 into shawn1m:master Oct 30, 2020
@shawn1m
Copy link
Owner

shawn1m commented Oct 30, 2020

Merged. Thanks!

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