Files
sing-box/service/ssmapi
世界 b96ab4fef9 ccm,ocm,ssmapi: fix HTTP/2 over TLS with h2c handler
aTLS.NewListener returns *LazyConn, not *tls.Conn, so Go's
http.Server cannot detect TLS via type assertion and falls back
to HTTP/1.x. When ALPN negotiates h2, the client sends HTTP/2
frames that the server fails to parse, causing HTTP 520 errors
behind Cloudflare.

Wrap HTTP handlers with h2c.NewHandler to intercept the HTTP/2
client preface and dispatch to http2.Server.ServeConn, consistent
with DERP, v2rayhttp, naive, and v2raygrpclite services.
2026-03-15 18:48:40 +08:00
..
2025-08-15 15:05:37 +08:00
2025-11-04 11:00:43 +08:00
2025-08-25 19:49:12 +08:00
2025-07-08 13:14:44 +08:00