utls
This commit is contained in:
@ -174,8 +174,13 @@ func (d *mwsDialer) initSession(ctx context.Context, host string, conn net.Conn,
|
||||
})
|
||||
}
|
||||
}
|
||||
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