-
-
Notifications
You must be signed in to change notification settings - Fork 214
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 rewrite support to custom DNS #449
Conversation
Codecov Report
@@ Coverage Diff @@
## development #449 +/- ##
===============================================
+ Coverage 94.26% 95.57% +1.30%
===============================================
Files 33 35 +2
Lines 2722 2780 +58
===============================================
+ Hits 2566 2657 +91
+ Misses 118 85 -33
Partials 38 38
Continue to review full report at Codecov.
|
This commit extracts rewriting logic from `ConditionalUpstreamResolver` into the new `RewriterResolver`, and uses that to enable rewriting for the `CustomDNSResolver`. `RewriterResolver` wraps a resolver and applies the rewrite to the request that is forwarded to the inner resolver. It also introduces a new optional interface: `NamedResolver`. This allows a `Resolver` to choose what its user friendly name is, instead of always being its type name.
38c27f3
to
dc9ccd5
Compare
Force pushed to fix |
Thanks for your work. It looks good. 👍 |
Main commit message:
I use this feature to have an alternative way of spelling my domain which is a bit long.
Comes in handy when manually poking around.
Also did some smaller changes to tests such as unifying
MockResolver
andresolverMock
.