mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
REALITY protocol: Set the fourth byte as reserved
This commit is contained in:
parent
a4d1509c23
commit
2c0a89f7dc
3 changed files with 4 additions and 4 deletions
|
@ -121,10 +121,10 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
|||
hello := uConn.HandshakeState.Hello
|
||||
hello.SessionId = make([]byte, 32)
|
||||
copy(hello.Raw[39:], hello.SessionId) // the location of session ID
|
||||
binary.BigEndian.PutUint64(hello.SessionId, uint64(time.Now().Unix()))
|
||||
hello.SessionId[0] = core.Version_x
|
||||
hello.SessionId[1] = core.Version_y
|
||||
hello.SessionId[2] = core.Version_z
|
||||
binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix()))
|
||||
copy(hello.SessionId[8:], config.ShortId)
|
||||
if config.Show {
|
||||
fmt.Printf("REALITY localAddr: %v\thello.SessionId[:16]: %v\n", localAddr, hello.SessionId[:16])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue