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

Draft code to add TlsConnect trait #2139

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

zh-jq-b
Copy link
Contributor

@zh-jq-b zh-jq-b commented Feb 7, 2024

See #2137

I add a TlsConnect trait in this draft PR, it will be possible for users to use other tls crates to do DoT or DoH.

What do you think about this?

@djc
Copy link
Collaborator

djc commented Feb 7, 2024

I've skimmed this and I wonder if all of this complexity is necessary. I feel like we should rebuild the network stuff to lean more heavily on dynamic dispatch, bridging directly from RuntimeProvider to something like a Pin<Box<dyn Future<Output = Pin<Box<dyn Stream<Item = Result<DnsResponse, ProtoError>>>>>>>.

@bluejekyll
Copy link
Member

@djc, I think that might be beyond the scope of the motivation for this change?

@zh-jq-b This seems inline with the existing design I think. At least for the standard socket stuff, this should work. I think there's a lot of complexity with what happens with quic and h3.

@zh-jq-b
Copy link
Contributor Author

zh-jq-b commented Feb 22, 2024

This seems inline with the existing design I think.

Yes, the current rustls/openssl/native-tls feature can be changed to this way, and then DoH can make use of them. I can try to prepare a PR if you think it's acceptable.

At least for the standard socket stuff, this should work. I think there's a lot of complexity with what happens with quic and h3.

Yes. This can be delayed after the TLS part get resolved.

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.

None yet

3 participants