s2n-quicのecho exampleを動かしてみた

s2n-quicAWS が公開したRust のQUIC実装です。サンプルのエコーを動かしてみました。

aws.amazon.com

echoのexampleは https://github.com/aws/s2n-quic/tree/main/examples/echo に用意されています。

リポジトリをクローンして、リリースビルドをします。

$ git clone https://github.com/aws/s2n-quic.git
$ cd s2n-quic/examples/echo/
$ cargo build --release

サーバーとクライアントを別のターミナルで開きます。

サーバーを実行します。

$ ./target/release/quic_echo_server 
Connection accepted from Ok(127.0.0.1:40591)
Stream opened from Ok(127.0.0.1:40591)

クライアントを実行します

$ ./target/release/quic_echo_client 
aaaa←これは自分で入力した
aaaa←返ってきた出力

テスト用の証明書が用意されているので、すぐに使えたのが良かったです。 https://github.com/aws/s2n-quic/tree/main/quic/s2n-quic-core/certs

qlogの出力方法はgithubを眺めただけではわかりませんでした。そういうテストがありそうなのですが。。。

Client::builder() あるいは Server::Builder() 呼び出し時に、with_event を呼ぶとできる仕組みがありそうな気もします。

余談ですが、ちょっと前に読んでいたIt’s Over 9000: Analyzing Early QUIC Deployments with the Standardization on the Horizon という論文で、Amazon もQUICをデプロイしているという情報があったので、自前で作っている可能性は想像できたかもしれないです。。。