mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-25 22:29:20 +02:00
Update comments in reality.go
This commit is contained in:
parent
65b467e448
commit
084f4f2e4c
|
@ -124,10 +124,11 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
||||||
uConn.BuildHandshakeState()
|
uConn.BuildHandshakeState()
|
||||||
hello := uConn.HandshakeState.Hello
|
hello := uConn.HandshakeState.Hello
|
||||||
hello.SessionId = make([]byte, 32)
|
hello.SessionId = make([]byte, 32)
|
||||||
copy(hello.Raw[39:], hello.SessionId) // the location of session ID
|
copy(hello.Raw[39:], hello.SessionId) // the fixed location of `Session ID`
|
||||||
hello.SessionId[0] = core.Version_x
|
hello.SessionId[0] = core.Version_x
|
||||||
hello.SessionId[1] = core.Version_y
|
hello.SessionId[1] = core.Version_y
|
||||||
hello.SessionId[2] = core.Version_z
|
hello.SessionId[2] = core.Version_z
|
||||||
|
hello.SessionId[3] = 0 // reserved
|
||||||
binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix()))
|
binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix()))
|
||||||
copy(hello.SessionId[8:], config.ShortId)
|
copy(hello.SessionId[8:], config.ShortId)
|
||||||
if config.Show {
|
if config.Show {
|
||||||
|
|
Loading…
Reference in New Issue