-
-
Notifications
You must be signed in to change notification settings - Fork 137
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
Any plan to add support for DoT (preferred) or DoH? #98
Comments
I always wanted to add a lot of the security features of the DNS protocol itself. But, mostly because of time constraints, never had the chance to really work on that yet. Adding the transport layer over HTTPS is another thing. |
Hello @MichaCo It seems the industry is shifting toward DoH instead of DoT. What would be needed to bring DoH (RFC 8484) support to this library? I'm willing to take some time to start working on it, but I'm not sure where to begin. Thanks. |
@Indigo744 |
@jol64 I didn't want to sound negative of course. I've never implied that DoH was better than DoT or anything like that. Both exists and both implementation are needed. It's just that we need to pick one and start on it. |
Hi @jol64 and @Indigo744 The only implementation for properly managing HttpClients so far is IHttpClientFactory which is in one of those Microsoft extension packages. So, I'm looking for a good idea / API approach for that which does not involve any other 3rd part dependency - if you guys have a good idea, let me know |
@MichaCo would HttpClient itself be ok? |
In our codebase we use RestClient from Easy.Common. But then again it's another dependency. We could implement an internal RestClient based on this with only the parts we're interested in. It shouldn't be too hard I guess. |
@Indigo744 After looking at RestClient, that's just a wrapper for HttpClient and doesn't take care of lifetime of the message handler either. Not sure how that would help ;) @jol64 using a new HttpClient instance per request is the worst thing you can do. Your OS will run out of sockets in no time. |
@MichaCo yeah sorry I didn't read properly your message and replied too quickly. I can think of 2 options:
Thoughts? |
I think maybe you can let users pass in their own httpclient? My project has its own HttpClientFactory to unify the life cycle of httpclient, maybe you can consider supporting users to pass in their own httpclient? |
It would be great if it supports DoH. I have some needs about it. |
My project for this weekend was https://github.com/nd1012/wan24-DNS , and I'd like to attach to this issue, 'cause my future plans for the project are looking forward to add DoH support, and I'd really love to use your library for that, if possible. About the For this reason I'd like to suggest that your library implements a simple default factory, but supports (and recommends) a custom factory also. There should also be an option which tells your code if a But in total, as you'd not like to reference an additional package, you'd have to separate DoH support into an own extension library, and open the API of this library to make it even possible to extend it in the way which would be required to allow plugin processing. Which is not a trivial task, I'd say. More a release 2.0.0. Another option would be to use a different http client implementation (which would also imply to reference another package) - nah, that's not really an option, as this would blow up your package a lot for sure. Anyway, I'm looking forward to use DnsClient.NET for DoH in the future, too! Hope there is a good solution. Maybe a HttpClient object pool? I think I'd not be too hard to implement an own |
@MichaCo I implemented rudimentary DoT support in a local copy, primarily as part of my monitoring application.
I could share this as a starting point in case you are interested. The redundancy of copy&paste could be reduced by replacing TcpClient in DnsTcpMessageHandler.QueryInternal with a kind of facade to the NetworkStream (my copy uses two args, one NetworkStream, one SslStream/Stream). A similar approach could be used if connection pooling shall be supported. UseTcpOnly could be implicit for NamedIPEndPoint.. |
@MichaCo I am using DnsClient.NET and working out quite well, however, now DoT and DoH capabilities are a must. So, any plans or ETA for DoT at least? |
both require a means for authentication in addition to an IPEndpoint. My preference is a server name.
Thanks, Joachim
The text was updated successfully, but these errors were encountered: