Operating system
Linux
System version
ubuntu24.04
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
1.13.0-rc4
Description
客户端 naive outbound,通过 SFA 测试延迟以后,服务端 naive inbound 在 QUIC 模式下,客户端取消 CONNECT 请求时,出现了预期之外的 ERROR 日志:
ERROR connection: connection upload closed: H3_REQUEST_CANCELLED
可能是 sing/common/baderror/baderror.go 的 WrapH2() 函数缺少对 HTTP/3 特有取消错误的匹配。现有模式 "; CANCEL" 匹配的是 HTTP/2 的 stream error: stream ID x; CANCEL 格式,而 quic-go/http3 返回的错误字符串是 H3_REQUEST_CANCELLED(HTTP/3 错误码 0x0108),不包含 "; CANCEL" 子串。
错误未被转换为 net.ErrClosed,导致 route/conn.go 中 IsClosedOrCanceled() 无法识别,走了 ERROR 分支而非 TRACE。
这个报错,只有在naive outbound启用quic时,才会出现。使用默认的HTTP/2,不会出现这个问题
Reproduction
服务端和客户端均使用sing-box,分别配置naive入站和出站,naive出站启用quic,点击SFA延迟测试按钮,可以100%复现。
Logs
Supporter
Integrity requirements
Operating system
Linux
System version
ubuntu24.04
Installation type
Original sing-box Command Line
If you are using a graphical client, please provide the version of the client.
1.13.0-rc4
Description
客户端 naive outbound,通过 SFA 测试延迟以后,服务端 naive inbound 在 QUIC 模式下,客户端取消 CONNECT 请求时,出现了预期之外的 ERROR 日志:
可能是
sing/common/baderror/baderror.go的WrapH2()函数缺少对 HTTP/3 特有取消错误的匹配。现有模式"; CANCEL"匹配的是 HTTP/2 的stream error: stream ID x; CANCEL格式,而 quic-go/http3 返回的错误字符串是H3_REQUEST_CANCELLED(HTTP/3 错误码 0x0108),不包含"; CANCEL"子串。错误未被转换为
net.ErrClosed,导致route/conn.go中IsClosedOrCanceled()无法识别,走了 ERROR 分支而非 TRACE。这个报错,只有在naive outbound启用quic时,才会出现。使用默认的HTTP/2,不会出现这个问题
Reproduction
服务端和客户端均使用sing-box,分别配置naive入站和出站,naive出站启用quic,点击SFA延迟测试按钮,可以100%复现。
Logs
Supporter
Integrity requirements