proxygen の QUICのサンプルを試してみた。

facebookのHTTP Library proxygen がQUICとHTTP/3に対応しているらしいので動かしてみました。

github.com

Note that currently this project has been tested on Ubuntu 18.04 and Mac OSX although it likely works on many other platforms.

ubuntu16.04 でやると、ビルドスクリプト内部でapt-get してくるライブラリのバージョンに問題があるのでやめたほうがいいです。

ビルド方法

cd proxygen
./build.sh --with-quic

サーバ側サンプル実行方法

_build/proxygen/httpserver/hq --qlogger_path /tmp/logs/

クライアント側サンプル実行方法

_build/proxygen/httpserver/hq --mode=client --path=/

/tmp/logs を見ると、qlogが出力されてました。

{
  "description": "Converted from file",
  "qlog_version": "draft-00",
  "summary": {
    "max_duration": 8190,
    "max_outgoing_loss_rate": "",
    "total_event_count": 35,
    "trace_count": 1
  },
  "title": "mvfst qlog",
  "traces": [
    {
      "common_fields": {
        "dcid": "0aa4cd34408216f7",
        "protocol_type": "QUIC_HTTP3",
        "reference_time": "0",
        "scid": "4000009602439820"
      },
      "configuration": {
        "time_offset": 0,
        "time_units": "us"
      },
      "description": "Generated qlog from connection",
      "event_fields": [
        "relative_time",
        "CATEGORY",
        "EVENT_TYPE",
        "TRIGGER",
        "DATA"
      ],
      "events": [
        [
          "152",
          "TRANSPORT",
          "PACKET_RECEIVED",
          "DEFAULT",
          {
            "frames": [
              {
                "frame_type": "CRYPTO_FRAME",
                "len": 334,
                "offset": 0
              },
              {
                "frame_type": "PADDING",
                "num_frames": 854
              }
            ],
            "header": {
              "packet_number": 0,
              "packet_size": 1235
            },
            "packet_type": "INITIAL"
          }
        ],
 以下略

wiresharkでパケット見る方法はわからなかったです。