-
Notifications
You must be signed in to change notification settings - Fork 63
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
Possibility to utilize the SNI as an options in Routers #268
Comments
This could be done in a similar way to #234 And we could implement this for DoT as well since we'd be able to get the SNI name there too. With DoH it's a little more interesting since we could have 2 names, one used for SNI in the TLS handshake, and the other in the request URL. They typically are the same, but don't have to be. I'm leaning towards using the name in the TLS handshake to be consistent with DoT. |
I agree! |
SHould I create another ticket for |
I can add that at the same time, basically including the listener-ID and allow routing based on it. |
Thinking a bit more about this. If we have the listenerID available for routing, is the TLS name still needed? Wouldn't it be mostly redundant? The listenerID is much more flexible since it allows routing for plain UDP/TCP as well. |
We need both, I have one listener having multiple certs/domains attached to it for example. I could have one listener/address for multiple domain-names/SNI's and then determine with routing what to do per SNI. The listenerID is great for listeners that don't support SNI like UDP/TCP (and perhaps DoQ and DOH3 as well). |
If it helps as an example, this is how I do it in DNSDIST for the moment, front-ending RouteDNS and using different listeners to cope with it:
In above i use the listening port (listenerID equivalent) to determine which listener and combine it either with the doh-path or the sni to set the pool of servers to use (different listeners/IP on localhost with RouteDNS). If you don't know DNSDIST, sorry for the noise :-). Above would be nice and snug in Above would be used by DOT/DOH client as following So my (single) certificate includes all domain-names used above. In routedns routers it would look something like this (I guesss):
|
There's now a first draft implementation on the I also added the ability to specify servername in the client TLS options so it's easier to work with certs where the SAN doesn't match the endpoint address. |
Cannot build:
|
The |
Works using the PR indeed. There seems to be a conflict in the Error at runtime: The static in question:
Testing now, will give an update later today. |
Seems to work, did a quick run, need to test longer/better but at first sight the routes with Maybe: when a route is hit, we have a clearer way of displaying why the route was selected? |
So far so good, works as expected. I also solved the
I think the mentioned key needs a newer version of the MiekG DNS Module but I am not sure. I always update the modules for my builds, but didn't for the PR version. |
Good idea, I updated all of the deps. Backported to this branch as well. You may see conflicts in go.mod/go.sum if you pull the latest from the branch |
Coolio, running this now for more then 4 days without any problems! |
We might need to revisit this, SNI/Servername works with DOH (including QUIC transport) and DOT, but NOT for DOQ. |
Seems to work as expected now. |
Seems that |
Where we now have the
doh-path
feature to be utilized inrouters
/routes
rules, which was introduced in #234, it would be nice if we could use the SNI as well (hostname passed in the request), for both all TLS and HTTPS based requests.So if a client does a request using
https://dns.domain.tld/dns-query
, there will the following options in routes availblesni
would containdns.domain.tld
doh-path
will contain/dns-query
(already works as per Feature Request: use DOH path as selection criteria. #234)When using
tls://another.dns.domain.tld
, doh-path will be empty andsni
would containanother.dns.domain.tld
.Maybe we need another option/variable called
dns-type
, based on what kind of query, it will returndo53
,doh
,dot
,doq
, etc ... ?I use NGINX as front-end now to "steer" traffic based on the hostname (DoT) or path (DoH) and would be nice to simplify the chain. For example:
tls://dns-unfiltered.domain.com
- No Filteringtls://dns-filtered.domain.com
- Filteringtls://dns-minimal.comain.com
- A bit of filteringetc...
The text was updated successfully, but these errors were encountered: