AdguardTeam / AdguardTeam/dnsproxy

When using DoH with HTTP/3, H3_NO_ERROR appears to be treated as an error

オープン
#472 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Go
スター
3.3k
フォーク
343
PR マージ指標
30日以内にマージされた PR はありません

説明

According to the HTTP/3 spec, the server can gracefully close a stream by sending the `H3_NO_ERROR` code:

> The error code [H3_NO_ERROR](https://www.rfc-editor.org/rfc/rfc9114.html#H3_NO_ERROR) SHOULD be used when requesting that the client stop sending on the [request stream](https://www.rfc-editor.org/rfc/rfc9114.html#request-streams). Clients MUST NOT discard complete responses as a result of having their request terminated abruptly, though clients can always discard responses at their discretion for other reasons.

> Once all accepted requests and pushes have been processed, the endpoint can permit the connection to become idle, or it MAY initiate an immediate closure of the connection. An endpoint that completes a graceful shutdown SHOULD use the [H3_NO_ERROR](https://www.rfc-editor.org/rfc/rfc9114.html#H3_NO_ERROR) error code when closing the connection.

It seems Cloudflare's DoH service occasionally closes streams with the `H3_NO_ERROR` code, and dnsproxy (or its QUIC library) seems to interpret this code as an error:
```
2025/10/31 16:27:41.461710 ERROR exchange failed prefix=dnsproxy upstream=https://cloudflare-dns.com:443/dns-query question=";a1834.dscg2.akamai.net.\tIN\t HTTPS" duration=6.240454ms err="requesting https://cloudflare-dns.com:443/dns-query: Get_0rtt \"https://cloudflare-dns.com:443/dns-query?dns=AAABEAABAAAAAAABBWExODM0BWRzY2cyBmFrYW1haQNuZXQAAEEAAQAAKQTQAACAAAAA\": H3_NO_ERROR"
2025/10/31 16:27:41.461801 ERROR exchange failed prefix=dnsproxy upstream=https://cloudflare-dns.com:443/dns-query question=";a1834.dscg2.akamai.net.\tIN\t A" duration=6.611461ms err="requesting https://cloudflare-dns.com:443/dns-query: Get_0rtt \"https://cloudflare-dns.com:443/dns-query?dns=AAABEAABAAAAAAABBWExODM0BWRzY2cyBmFrYW1haQNuZXQAAAEAAQAAKQTQAACAAAAA\": H3_NO_ERROR"
2025/10/31 17:51:54.211101 ERROR exchange failed prefix=dnsproxy upstream=https://cloudflare-dns.com:443/dns-query question=";dradis-prod.rdatasrv.net.\tIN\t A" duration=6.148669ms err="requesting https://cloudflare-dns.com:443/dns-query: Get_0rtt \"https://cloudflare-dns.com:443/dns-query?dns=AAABEAABAAAAAAABC2RyYWRpcy1wcm9kCHJkYXRhc3J2A25ldAAAAQABAAApBNAAAIAAAAA\": H3_NO_ERROR"
```
Running dnsproxy version v0.77.0, `dnsproxy -l 127.0.0.5 -u h3://cloudflare-dns.com/dns-query`

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。