mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-11-20 16:49:12 +00:00
Compare commits
1
Commits
lua
...
tls-hstimeout
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
87bd03816a |
@@ -103,6 +103,13 @@ func (c *UConn) Close() error {
|
|||||||
return c.Conn.Close()
|
return c.Conn.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (c *UConn) HandshakeContext(ctx context.Context) error {
|
||||||
|
// Chrome の default handshake timeout
|
||||||
|
ctx, cancel := context.WithTimeout(ctx, 30*time.Second)
|
||||||
|
defer cancel()
|
||||||
|
return c.UConn.HandshakeContext(ctx)
|
||||||
|
}
|
||||||
|
|
||||||
func (c *UConn) HandshakeContextServerName(ctx context.Context) string {
|
func (c *UConn) HandshakeContextServerName(ctx context.Context) string {
|
||||||
if err := c.HandshakeContext(ctx); err != nil {
|
if err := c.HandshakeContext(ctx); err != nil {
|
||||||
return ""
|
return ""
|
||||||
|
|||||||
Reference in New Issue
Block a user