utls
This commit is contained in:
@ -111,8 +111,13 @@ func (d *wsDialer) Handshake(ctx context.Context, conn net.Conn, options ...dial
|
||||
})
|
||||
}
|
||||
}
|
||||
client := tls.UClient(conn, utlsConf, tls.HelloCustom)
|
||||
client.ApplyPreset(util.NewWsSpec())
|
||||
var client *tls.UConn
|
||||
if d.md.useH2 {
|
||||
client = tls.UClient(conn, utlsConf, tls.HelloChrome_Auto)
|
||||
} else {
|
||||
client = tls.UClient(conn, utlsConf, tls.HelloCustom)
|
||||
client.ApplyPreset(util.NewWsSpec())
|
||||
}
|
||||
err := client.Handshake()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Reference in New Issue
Block a user