正文

Apifox?Echo学习curl?httpie?命令使用详解(apid忘了密码被锁了)难以置信

文章摘要

这篇文章记录了使用curl命令连接到`shanyue.tech`的详细过程。文章显示curl成功建立了SSL连接,使用了TLSv1.3协议进行加密 handshake,并最终升级到HTTP/2协议。服务器返回了200状态码,包含内容长度、Accept-Encoding等信息。文章详细描述了连接建立过程中的SSL证书验证、服务器支持的协议以及响应头信息。

$ curl -vvv –head https://shanyue.tech * Rebuilt URL to: https://shanyue.tech/ * Trying 218.91.183.88… * TCP_NODELAY set * Connected to shanyue.tech (218.91.183.88) port 443 (#0) * ALPN, offering h3 * ALPN, offering http/1.1 * successfully set certificate verify locations: * CAfile: /etc/pki/tls/certs/ca-bundle.crt CApath: none * TLSv1.3 (OUT), TLS handshake, Client hello (1): * TLSv1.3 (IN), TLS handshake, Server hello (2): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Encrypted Extensions (8): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Certificate (11): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, CERT verify (15): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Finished (20): * TLSv1.3 (OUT), TLS change cipher, Change cipher spec (1): * TLSv1.3 (OUT), TLS handshake, [no content] (0): * TLSv1.3 (OUT), TLS handshake, Finished (20): * SSL connection using TLSv1.3 / TLS_AES_256_GCM_SHA384 * ALPN, server accepted to use h3 * Server certificate: * subject: CN=shanyue.tech * start date: Feb 5 00:00:00 2022 GMT * expire date: Feb 6 23:59:59 2023 GMT * subjectAltName: host “shanyue.tech” matched cert’s “shanyue.tech” * issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=Encryption Everywhere DV TLS CA – G1 * SSL certificate verify ok. * Using HTTP2, server supports multi-use * Connection state changed (HTTP/2 confirmed) * Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0 * TLSv1.3 (OUT), TLS app data, [no content] (0): * TLSv1.3 (OUT), TLS app data, [no content] (0): * TLSv1.3 (OUT), TLS app data, [no content] (0): * Using Stream ID: 1 (easy handle 0x55c5a8e24690) * TLSv1.3 (OUT), TLS app data, [no content] (0): > HEAD / HTTP/2 > Host: shanyue.tech > User-Agent: curl/7.61.1 > Accept: */* > * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS handshake, [no content] (0): * TLSv1.3 (IN), TLS handshake, Newsession Ticket (4): * TLSv1.3 (IN), TLS app data, [no content] (0): * Connection state changed (MAX_CONCURRENT_STREAMS==128)! * TLSv1.3 (OUT), TLS app data, [no content] (0): * TLSv1.3 (IN), TLS app data, [no content] (0): < HTTP/2 200 HTTP/2 200 < server: Tengine server: Tengine < content-type: text/html; charset=utf-8 content-type: text/html; charset=utf-8 < content-length: 33229 content-length: 33229 < vary: Accept-Encoding vary: Accept-Encoding < date: Tue, 21 Jun 2022 06:02:59 GMT date: Tue, 21 Jun 2022 06:02:59 GMT < vary: Accept-Encoding vary: Accept-Encoding < x-oss-request-id: 62B15F13F15BB231391FB3A8 x-oss-request-id: 62B15F13F15BB231391FB3A8 < x-oss-cdn-auth: success x-oss-cdn-auth: success < accept-ranges: bytes accept-ranges: bytes < etag: “F540C0D57CDB57215AF11970EF4AAEF6” etag: “F540C0D57CDB57215AF11970EF4AAEF6” < last-modified: Wed, 23 Mar 2022 14:57:44 GMT last-modified: Wed, 23 Mar 2022 14:57:44 GMT < x-oss-object-type: Normal x-oss-object-type: Normal < x-oss-hash-crc64ecma: 8545542358272103335 x-oss-hash-crc64ecma: 8545542358272103335 < x-oss-storage-class: Standard x-oss-storage-class: Standard < x-oss-meta-mtime: 1648047444.796073379 x-oss-meta-mtime: 1648047444.796073379 < cache-control: no-cache cache-control: no-cache < content-md5: 9UDA1XzbVyFa8Rlw70qu9g==content-md5: 9UDA1XzbVyFa8Rlw70qu9g==< x-oss-server-time: 3 x-oss-server-time: 3 < ali-swift-global-savetime: 1655791379 ali-swift-global-savetime: 1655791379 < via: cache24.l2et15-1[66,66,200-0,M], cache44.l2et15-1[67,0], cache27.cn4056[128,128,200-0,M], cache64.cn4056[130,0] via: cache24.l2et15-1[66,66,200-0,M], cache44.l2et15-1[67,0], cache27.cn4056[128,128,200-0,M], cache64.cn4056[130,0] < x-cache: MISS TCP_MISS dirn:-2:-2 x-cache: MISS TCP_MISS dirn:-2:-2 < x-swift-savetime: Tue, 21 Jun 2022 06:02:59 GMT x-swift-savetime: Tue, 21 Jun 2022 06:02:59 GMT < x-swift-cachetime: 0 x-swift-cachetime: 0 < timing-allow-origin: * timing-allow-origin: * < eagleid: 088432cc16557913793393217e eagleid: 088432cc16557913793393217e < * Connection #0 to host shanyue.tech left intact