Dialer: Set TimeoutOnly for gctx and hctx

https://github.com/XTLS/Xray-core/issues/2232#issuecomment-1694570914

Thank @cty123 for testing

Fixes https://github.com/XTLS/Xray-core/issues/2232

BTW: Use `uConn.HandshakeContext(ctx)` in REALITY
This commit is contained in:
RPRX 2023-08-27 05:55:58 +00:00 committed by GitHub
parent b24a4028f1
commit d92002ad12
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 12 deletions

View file

@ -156,7 +156,7 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
aead.Seal(hello.SessionId[:0], hello.Random[20:], hello.SessionId[:16], hello.Raw)
copy(hello.Raw[39:], hello.SessionId)
}
if err := uConn.Handshake(); err != nil {
if err := uConn.HandshakeContext(ctx); err != nil {
return nil, err
}
if config.Show {