0
mirror of https://github.com/XTLS/Xray-core.git synced 2025-06-19 06:39:48 +03:00

Add uTLS support for shadowtls

This commit is contained in:
世界
2023-02-21 20:42:44 +08:00
parent 6fb673aee4
commit 0188c2d67d
10 changed files with 55 additions and 31 deletions

View File

@ -25,7 +25,7 @@ func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.Me
tlsConfig := config.GetTLSConfig(tls.WithDestination(dest))
customClient, loaded := tls.CustomClientFromContext(ctx)
if loaded {
conn = customClient(conn, tlsConfig)
conn = customClient(conn, config, tlsConfig)
} else {
if fingerprint := tls.GetFingerprint(config.Fingerprint); fingerprint != nil {
conn = tls.UClient(conn, tlsConfig, fingerprint)