use chrome TLS fingerprint as default

This commit is contained in:
wenyifan
2022-10-15 00:30:34 +08:00
parent 6f48753890
commit ef230d49a0
5 changed files with 94 additions and 1 deletions

4
tls.go
View File

@ -3,6 +3,7 @@ package gost
import (
"crypto/tls"
"errors"
utls "github.com/refraction-networking/utls"
"net"
"sync"
"time"
@ -277,7 +278,8 @@ func wrapTLSClient(conn net.Conn, tlsConfig *tls.Config, timeout time.Duration)
conn.SetDeadline(time.Now().Add(timeout))
defer conn.SetDeadline(time.Time{})
tlsConn := tls.Client(conn, tlsConfig)
//tlsConn := tls.Client(conn, tlsConfig)
tlsConn := utls.UClient(conn, &utls.Config{InsecureSkipVerify: tlsConfig.InsecureSkipVerify, ServerName: tlsConfig.ServerName}, utls.HelloChrome_Auto)
// Otherwise perform handshake, but don't verify the domain
//