Add uTLS support for shadowtls

This commit is contained in:
世界 2023-02-21 20:42:44 +08:00
parent 6fb673aee4
commit 0188c2d67d
No known key found for this signature in database
GPG key ID: CD109927C34A63C4
10 changed files with 55 additions and 31 deletions

View file

@ -9,7 +9,7 @@ import (
type customClientKey struct{}
type CustomClientFunc func(conn net.Conn, config *tls.Config) net.Conn
type CustomClientFunc func(conn net.Conn, xrayConfig *Config, config *tls.Config) net.Conn
func CustomClientFromContext(ctx context.Context) (CustomClientFunc, bool) {
client, loaded := ctx.Value(customClientKey{}).(CustomClientFunc)

View file

@ -7,7 +7,7 @@ import (
"net/url"
"strconv"
utls "github.com/refraction-networking/utls"
utls "github.com/sagernet/utls"
"google.golang.org/grpc/credentials"
)

View file

@ -5,7 +5,7 @@ import (
"crypto/tls"
"math/big"
utls "github.com/refraction-networking/utls"
utls "github.com/sagernet/utls"
"github.com/xtls/xray-core/common/buf"
"github.com/xtls/xray-core/common/net"
)