Skip to content

How to capture HTTP2 packages using Wireshark

Bing Han edited this page Mar 29, 2018 · 2 revisions

gRPC is based on HTTP/2. So we have to analyze packages to solve some difficult problems related to the protocol. This wiki introduces how to do this using Wireshark because capturing packages of HTTP/2 is a little different with HTTP/TCP.

HTTP/2 via TLS is not covered in this wiki

  1. Download Wireshark of recent versions.
  2. Add your port to HTTP protocols:
    1. Open Preferences
    2. Select Protocols>HTTP. HTTP2 works too, but HTTP is enough
    3. Add your HTTP/2 port like(50051) to TCP ports
    4. Click OK to save the config
  3. Select(Double click) your network interfaces like Loopback: lo0(local)
  4. Input http2 in the filter
  5. Run your gRPC applications
  6. Stop(Capture>Stop). Then you can analyze the packages or save to a file for using later.
Clone this wiki locally