Skip to content

Instantly share code, notes, and snippets.

使用curl, 对于sni形式的ssl配置,host是在ssl协商阶段传送的,所以不能用 -H 'Host: xxxx.com'的形式来指定域名,而要使用--resolve参数

curl -vv --resolve www.yunaq.com.cn:443:1.2.3.4 https://www.yunaq.com.cn

使用openssl, 注意如果服务器是sni方式,需要加-servername参数来指定host

openssl s_client -showcerts -servername www.yunaq.com -connect 1.2.3.4:443