-
Notifications
You must be signed in to change notification settings - Fork 248
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
add support for hyphen separated wildcard domains #246
base: master
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## master #246 +/- ##
==========================================
+ Coverage 70.21% 70.23% +0.01%
==========================================
Files 39 39
Lines 2377 2392 +15
==========================================
+ Hits 1669 1680 +11
- Misses 509 512 +3
- Partials 199 200 +1
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, thank you for the contribution!
Could you please also add unit-tests for that?
Sample configurations for the test:
conf := []string{
"0.0.0.1",
"[/a.x/]0.0.0.2",
"[/*-b.a.x/]0.0.0.3",
"[/b.a.x/]0.0.0.4",
"[/*-c.b.a.x/]0.0.0.5",
"[/c.b.a.x/]#",
}
conf := []string{
"0.0.0.1",
"[/a.x/]0.0.0.2",
"[/*.a.x/]0.0.0.3",
"[/*-b.a.x/]0.0.0.4",
"[/b.a.x/]0.0.0.5",
}
"[/*-a.b.c/]0.0.0.1",
"[/*-.b.c/]0.0.0.2",
"[/*.b-x.c/]0.0.0.3"
@marriva, hello. The Dnsmasq's documentation states:
AFAIK, it doesn't apply any special handling for domains (and patterns) with hyphens. As per the man page, Dnsmasq supports the following wildcard pattern types:
Thus the PR seems a bit incomplete in terms of adding support for the last pattern type since it only handles the @ameshkov, what do you think? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello!
Please add support for wildcards separated by a hyphen as in dnsmasq.
For example,
*-dev.example.org
and*-prod.example.org
I need to use different upstreams for
something-dev.example.org
andsomething-prod.example.org