Operating system
Linux
System version
NixOS 26.11 (unstable)
Installation type
Others
If you are using a graphical client, please provide the version of the client.
No response
Version
sing-box version 1.13.14
Environment: go1.26.4 linux/amd64
Tags: with_gvisor,with_quic,with_dhcp,with_wireguard,with_utls,with_acme,with_clash_api,with_tailscale,with_ccm,with_ocm,badlinkname,tfogo_checklinkname0,with_naive_outbound
CGO: enabled
Description
In protocol/naive/inbound.go, NewHTTP2Wrapper(conn) is initialized but the wrapper is never actually passed to the router:
if !waitForClose {
n.router.RouteConnectionEx(ctx, conn, metadata, nil)
} else {
done := make(chan struct{})
wrapper := v2rayhttp.NewHTTP2Wrapper(conn) // Created here to provide mutex protection
n.router.RouteConnectionEx(ctx, conn, metadata, N.OnceClose(func(it error) { // But raw conn is passed instead of wrapper
close(done)
}))
<-done
wrapper.CloseWrapper()
}
I believe this sometimes causes random data corruption.
Another DNS naive issue that may be related to this problem: #3987
Reproduction
Not sure how to reproduce, but under concurrent workloads, the connection feels more stable with wrapper fix
Logs
Supporter
Integrity requirements
Operating system
Linux
System version
NixOS 26.11 (unstable)
Installation type
Others
If you are using a graphical client, please provide the version of the client.
No response
Version
Description
In
protocol/naive/inbound.go,NewHTTP2Wrapper(conn)is initialized but the wrapper is never actually passed to the router:I believe this sometimes causes random data corruption.
Another DNS naive issue that may be related to this problem: #3987
Reproduction
Not sure how to reproduce, but under concurrent workloads, the connection feels more stable with wrapper fix
Logs
Supporter
Integrity requirements