User Tools

Site Tools


howtos:curl_and_sni

Curl doesn't use SNI default so you need to do some flick-flacks to get it done:

curl -vk --resolve sni_value_example.com:port:real_destination_ip https://sni_value_example.com:port

“sni_value_example.com:port:real_destination_ip” this part is all about getting curl to the right destination by injection “sni_value_example.com” into curl's own DNS cache.

https://sni_value_example.com:port” is again about getting curl to insert the SNI header into the client ssl handshake by using a DNS name (which is then controlled by the –resolve statement).

curl -kv --resolve dr.dk:443:10.22.33.44 https://dr.dk

10.22.33.44 is the server you want to hit.

dr.dk is the SNI name you want to send to the server.

howtos/curl_and_sni.txt · Last modified: 09/03/2021 12:45 by domingo