User Tools

Site Tools


howtos:curl_and_sni

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
howtos:curl_and_sni [09/03/2021 12:41] domingohowtos:curl_and_sni [09/03/2021 12:45] (current) domingo
Line 1: Line 1:
 +Curl doesn't use SNI default so you need to do some flick-flacks to get it done:
 +
 +
 +<code>
 +curl -vk --resolve sni_value_example.com:port:real_destination_ip https://sni_value_example.com:port
 +</code>
 +
 +"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).
 +
 +<code>
 +curl -kv --resolve dr.dk:443:10.22.33.44 https://dr.dk
 +</code>
 +
 +
 +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