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

Allow override for TLS's SNI server_name #2179

Open
jsenkpiel-godaddy opened this issue Mar 14, 2024 · 3 comments
Open

Allow override for TLS's SNI server_name #2179

jsenkpiel-godaddy opened this issue Mar 14, 2024 · 3 comments

Comments

@jsenkpiel-godaddy
Copy link

jsenkpiel-godaddy commented Mar 14, 2024

I would like hyper_rustls::HttpsConnectorBuilder::with_server_name's functionality but in reqwest. (or, but less perferably, the equivalent method for openssl which is described here https://martin.baillie.id/wrote/controlling-client-sni-with-hyper/#hyper).

This is because there is a server I need to talk to where I need to set different HOST headers from the TLS connection's SNI.

I'm not quite sure I follow how the http connector is set up from config to contribute a PR here...

@milen-denev
Copy link

Have you tried ClientBuilder::new().resolve(host, socket_addr) where socket_addr is type of std::net::SocketAddr ?

@jsenkpiel-godaddy
Copy link
Author

I don't necessarily have static IPs that I can point to for this use.

@milen-denev
Copy link

I don't necessarily have static IPs that I can point to for this use.

Then use a dns resolving library before creating the SocketAddr.

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

No branches or pull requests

2 participants