Colin's Blog
  • Home
  • Github
Subscribe
Tagged

https

A collection of 1 post

curl

在 curl 中使用指定 ip 来进行请求 https

一般地,在 curl 中,如果想以指定的 ip 来请求一个域名地,可以使用 curl http://127.0.0.1/example -H 'Host: www.example.org' 这种指定 Host 头的做法,但这在 https 中可能会失败,显示 no alternative certificate subject name matches target host name '127.0.0.1。 显然这是由于 curl 将 https://127.0.0.1 里的 127.

Colin Cheng Jul 15, 2016 • 1 min read
Colin's Blog © 2023
Powered by Ghost