QUIC実装月報 2026年11月
Translated by AI (and reviewed by me) from handwritten Japanese text. (日本語が後に続きます)
I spoke at 北陸Ruby会議02
Following up on September (?), I was given another opportunity to speak about QUIC in November. Thank you very much.
北陸Ruby会議02で基調講演をさせていただきました | うなすけとあれこれ
Here, I will provide more detailed descriptions of the QUIC-related progress from my presentation.
I’ve switched this blog to be served by my own QUIC implementation
Originally, after various iterations, this blog was operated as a static website where HTML generated by Middleman was placed on S3 and served via CloudFront. While it remains a static website powered by Middleman, I have replaced the delivery mechanism from CloudFront+S3 to my own implementation of the QUIC protocol.
I implemented two components: raiha, which also implements the QUIC protocol layer in Ruby, and the quic gem (described later), which is a binding for ngtcp2. I have both running on the same server and use pf to randomly route packets, ensuring that a response is returned from one of the implementations.
As I mentioned with pf, this is running on OpenBSD. There are two reasons for this. First, it is to verify whether it works in an environment with a cryptographic backend other than OpenSSL. Second, at RubyKaigi a few years ago, jeremyevans recommended OpenBSD to me, and I’ve always felt a sense of guilt for never having given it a try.
Just as osyoyu, who creates a profiler, implemented his own blog with Rails as a testing ground for that profiler, I felt the need to create a place where I could verify that my own implementation is working correctly, which is why I’m doing this.
Railsでブログ自作(2024) - osyoyu.com/blog
How is it? Seeing this instead of the website you expected? If so, it means HTTP/3 is working thanks to my implementation.
dohyo: The Authoritative DNS Server for blog.unasuke.com
In previous monthly reports, I mentioned that I’ve deployed a custom-implemented full-service resolver at home and am using it as a testbed for DoT and DoQ. While I will continue to operate it, a situation where I’m the only one inconvenienced when it goes down lacks a sense of urgency; moreover, it isn’t particularly well-suited for verifying DoQ. While I’ve been able to verify DoT by incorporating it into my systemd-resolved configuration, for DoQ, there are no clients to send requests to, even if the full-service resolver is listening.
To address this, I have implemented and deployed a new authoritative server called dohyo for blog.unasuke.com.
https://github.com/unasuke/dohyo
Claude suggested the name because names starting with “Do”—such as DoH and DoQ—are similar in meaning to a sumo ring (dohyo) when incorporating the meaning of “Zone.” If this authoritative server goes down, this blog will become inaccessible, which adds a sense of urgency. Incidentally, I am using socketry/protocol-quic for the QUIC layer implementation of dohyo. The reason it is not my own implementation is that my own implementation is tested by the web server for this blog itself; thus, I want to verify that protocol-quic—the other QUIC implementation that (for some reason) has commit access—is working correctly.
While this serves as a practical verification of DoQ, the reality is that even if this authoritative server were listening for requests via DoQ or DoT, widely adopted full-service resolvers would rarely send queries using DoQ, DoT, or DoH. However, an initiative called ADoX is currently underway, and the proportion of name resolution traffic that is encrypted will likely gradually increase.
ADoX Status and Deployment :: dnsprivacy.org
Of course, I also want to set up my own home full-resolver to support ADoX, so that when I access my own blog, the name resolution queries are sent and received in an encrypted state.
By the way, 「基礎と実践が1冊で学べる! DNSマスターブック」 was very helpful for gaining knowledge about DNS. Reading this book helped me understand that operating my own authoritative DNS server (and doing so via a new implementation!) would actually be reckless, but well… yes.
北陸Ruby会議02で話してきました
9月に引き続き(?)11月もQUICについて話す機会をいただきました。ありがとうございます。
北陸Ruby会議02で基調講演をさせていただきました | うなすけとあれこれ
ここでは発表の内容のうち、QUIC関連の進捗に絞ってより詳細に記載していきます。
このブログを自分のQUIC実装によって配信するようにしました
もともとこのブログは様々な変遷を経て、Middlemanが生成したHTMLをS3に配置し、Cloudfront越しに配信する静的Webサイトとして運用していました。Middlemanによる静的Webサイトのままではあるのですが、その配信をCloudfront+S3から自分の実装したQUICプロトコルによるものへと差し替えました。
自分が実装したのは、QUICプロトコルレイヤもRubyで実装されているraihaと、ngtcp2のbindingであるquic gem(後述)の2つあるのですが、その両方を同じサーバー上で動かし、pfによりランダムにパケットを振り分けることで、どちらかの実装からレスポンスを返すようにしています。
pfと書いたように、これはOpenBSD上で動かしています。なぜOpenBSDなのかという理由は2つあります。まず1つが、OpenSSLではない暗号バックエンドの環境において動作するかどうかの検証目的というもの。2つ目が、数年前のRubyKaigiにてjeremyevans氏にOpenBSDをお勧めされたものの、一向に触れられていなかった負い目をずっと感じていたというものです。
プロファイラを作っているosyoyuさんが、そのプロファイラの実験場として自分のブログをRailsで実装したのと同様に、自分も自分の実装がちゃんと動いているか検証できる場を作る必要があると感じたためにこれをやっています。
Railsでブログ自作(2024) - osyoyu.com/blog
どうでしょうか。あなたの予想に反して、 このページが見えているでしょうか?見えていれば僕の実装によってHTTP/3が動いていることになります。
blog.unasuke.com の権威DNSサーバー、dohyo
これまでの月報において、自前実装のフルサービスリゾルバを宅内に配置し、DoTやDoQのテストベッドとして運用しているという話をしました。これについては引き続き運用していくのですが、どうしても落ちたときに自分だけしか困らない状況というのは切迫感が出ませんし、そもそもDoQの検証として使用するのにはあまり適してはいません。DoTこそsystemd-resolvedの設定として投入することで検証できていますが、DoQについてはフルサービスリゾルバが待ち受けたとしてもリクエストを送ってくれるクライアントがいません。
そこで、blog.unasuke.com の権威サーバーとして新規にdohyoというものを実装し、deployしています。
https://github.com/unasuke/dohyo
名前は、DoH、DoQなど “Do” から始まり、Zoneという意味を取り入れると相撲の土俵が意味として似ていることからこうしました、Claudeが。この権威サーバーが落ちたらこのブログが見れなくなってしまうことになり、緊張感も増すというものです。ちなみにdohyoのQUIC層の実装として使用しているのはsocketry/protocol-quicです。自分の実装ではないのは、自分の実装のテストは前述のこのブログ自体のWebサーバーが担っているので、(なぜか)commit bitを持っているもうひとつのQUIC実装であるところのprotocol-quicがうまく動いているかの検証のためです。
DoQの実地検証としての取り組みではあるのですが、実のところ、この権威サーバーがDoQないしDoTでリクエストを待ち受けていたとて、世に普及しているフルサービスリゾルバがDoQやDoT、DoHでクエリを送ってくることは滅多にありません。しかしそこはADoXという試みがまさに今行われており、徐々に世間一般で行われる名前解決の通信内容が暗号化される割合は上がっていくことでしょう。
ADoX Status and Deployment :: dnsprivacy.org
もちろん自分の宅内フルリゾルバもADoXに対応させ、自分が自分のブログを読みにいくときに名前解決のクエリが暗号化された状態で送受信されるようにしたいです。
ところでDNSについての知識を得るのに、「基礎と実践が1冊で学べる! DNSマスターブック」がとても役立ちました。この本を読んでいくことで、むしろ権威DNSサーバーを自分で運用する(それも新規実装で!)ということが無謀であることは理解できていくのですが、そこはまあ……はい。