UTLS兼容

This commit is contained in:
wenyifan
2026-06-28 12:08:30 +08:00
parent f63f36805b
commit 3993c95700
9 changed files with 305 additions and 17 deletions
+2 -2
View File
@@ -2,7 +2,6 @@ package mtls
import (
"context"
"crypto/tls"
"errors"
"net"
"sync"
@@ -16,6 +15,7 @@ import (
"github.com/go-gost/x/internal/net/proxyproto"
"github.com/go-gost/x/internal/util/mux"
"github.com/go-gost/x/registry"
"github.com/go-gost/x/util"
)
func init() {
@@ -141,7 +141,7 @@ func (d *mtlsDialer) Handshake(ctx context.Context, conn net.Conn, options ...di
}
func (d *mtlsDialer) initSession(ctx context.Context, conn net.Conn) (*muxSession, error) {
tlsConn := tls.Client(conn, d.options.TLSConfig)
tlsConn := util.NewUTLSChromeClient(conn, d.options.TLSConfig)
if err := tlsConn.HandshakeContext(ctx); err != nil {
return nil, err
}