wireshark抓包curl发送http2请求

环境介绍#

  • 抓包所在电脑:wsl2,ip 是 172.19.184.81
    • wls2 安装的是 ubuntu,需安装 curl 命令
  • 抓包目标机器:http://nghttp2.org,ip 是 139.162.123.134
  • 虽然是 http2,但是不带 tls,所以协议还是 http

抓包过程#

用 curl 发起不带 tls 的 http2 请求,请求类型是 HEAD

# curl --http2-prior-knowledge -I "http://nghttp2.org"
HTTP/2 200 
date: Mon, 27 Dec 2021 01:57:56 GMT
content-type: text/html
last-modified: Tue, 19 Oct 2021 10:18:15 GMT
etag: "616e9b67-19d8"
accept-ranges: bytes
content-length: 6616
x-backend-header-rtt: 0.002868
server: nghttpx
alt-svc: h3=":443"; ma=3600, h3-29=":443"; ma=3600
via: 2 nghttpx
x-frame-options: SAMEORIGIN
x-xss-protection: 1; mode=block
x-content-type-options: nosniff

可以看到抓包如下:

本作品采用《CC 协议》,转载必须注明作者和本文链接