Compare commits

...
1 Commits
Author SHA1 Message Date
Fangliding a8d14de333 Delete ALPS for utls H1 2026-12-01 00:53:01 +08:00
+8
View File
@@ -130,6 +130,14 @@ func (c *UConn) WebsocketHandshakeContext(ctx context.Context) error {
config.NextProtos = []string{"http/1.1"}
return c.HandshakeContext(ctx)
}
// Chrome won't send ApplicationSettingsExtension for h1 request
if slices.Equal(ALPN, []string{"http/1.1"}) {
newExt := slices.DeleteFunc(c.Extensions, func(extension utls.TLSExtension) bool {
_, ok := extension.(*utls.ApplicationSettingsExtensionNew)
return ok
})
c.Extensions = newExt
}
// Iterate over extensions and check for utls.ALPNExtension
hasALPNExtension := false
for _, extension := range c.Extensions {