Update comments in reality.go

This commit is contained in:
RPRX 2023-06-15 16:37:46 +00:00 committed by yuhan6665
parent 65b467e448
commit 084f4f2e4c

View File

@ -124,10 +124,11 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
uConn.BuildHandshakeState()
hello := uConn.HandshakeState.Hello
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[1] = core.Version_y
hello.SessionId[2] = core.Version_z
hello.SessionId[3] = 0 // reserved
binary.BigEndian.PutUint32(hello.SessionId[4:], uint32(time.Now().Unix()))
copy(hello.SessionId[8:], config.ShortId)
if config.Show {