curl查看请求是走http还https
下面是http请求过程
curl -v http://www.boyblue.xyz * About to connect() to www.boyblue.xyz port 80 (#0) * Trying 192.168.1.28... * Connected to www.boyblue.xyz (192.168.1.28) port 80 (#0) > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: www.boyblue.xyz > Accept: */* > < HTTP/1.1 200 OK < Server: nginx/1.20.0 < Date: Thu, 30 Jun 2022 09:30:29 GMT < Content-Type: text/html < Content-Length: 15 < Last-Modified: Wed, 29 Jun 2022 08:01:13 GMT < Connection: keep-alive < ETag: "62bc06c9-f" < Accept-Ranges: bytes < Hello,World... * Connection #0 to host www.boyblue.xyz left intact
下面是https请求过程
curl -v https://www.boyblue.xyz * About to connect() to www.boyblue.xyz port 443 (#0) * Trying 192.168.1.28... * Connected to www.boyblue.xyz (192.168.1.28) port 443 (#0) * Initializing NSS with certpath: sql:/etc/pki/nssdb * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * SSL connection using TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 * Server certificate: * subject: CN=www.boyblue.xyz * start date: May 11 00:00:00 2022 GMT * expire date: May 11 23:59:59 2023 GMT * common name: www.boyblue.xyz * issuer: CN=TrustAsia RSA DV TLS CA G2,O="TrustAsia Technologies, Inc.",C=CN > GET / HTTP/1.1 > User-Agent: curl/7.29.0 > Host: www.boyblue.xyz > Accept: */* > < HTTP/1.1 200 OK < Server: nginx/1.20.0 < Date: Thu, 30 Jun 2022 09:30:09 GMT < Content-Type: text/html < Content-Length: 15 < Last-Modified: Wed, 29 Jun 2022 08:01:13 GMT < Connection: keep-alive < ETag: "62bc06c9-f" < Accept-Ranges: bytes < Hello,World... * Connection #0 to host www.boyblue.xyz left intact 可以看到HTTPS多了SSL这部分内容