reqwest icon indicating copy to clipboard operation
reqwest copied to clipboard

Allow override for TLS's SNI server_name

Open jsenkpiel-godaddy opened this issue 1 year ago • 3 comments

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...

jsenkpiel-godaddy avatar Mar 14 '24 23:03 jsenkpiel-godaddy

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

milen-denev avatar Mar 23 '24 16:03 milen-denev

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

jsenkpiel-godaddy avatar Apr 08 '24 22:04 jsenkpiel-godaddy

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.

milen-denev avatar Apr 09 '24 15:04 milen-denev