AdguardTeam / AdguardTeam/dnsproxy
When using DoH with HTTP/3, H3_NO_ERROR appears to be treated as an error
- Lenguaje dominante
- Go
- Estrellas
- 3.3k
- Forks
- 343
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
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`
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.