Fix missing config.Show check before printing len(postHandshakeRecord) (#18)

This commit is contained in:
wyx2685
2025-06-27 11:39:29 +00:00
committed by GitHub
parent 50752aec6b
commit dc28cce21c
+3 -1
View File
@@ -385,7 +385,9 @@ func Server(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) {
postHandshakeRecord := hs.c.out.cipher.(aead).Seal(plainText[:5], hs.c.out.seq[:], plainText[5:], plainText[:5])
hs.c.out.incSeq()
hs.c.write(postHandshakeRecord)
fmt.Printf("REALITY remoteAddr: %v\tlen(postHandshakeRecord): %v\n", remoteAddr, len(postHandshakeRecord))
if config.Show {
fmt.Printf("REALITY remoteAddr: %v\tlen(postHandshakeRecord): %v\n", remoteAddr, len(postHandshakeRecord))
}
}
hs.c.isHandshakeComplete.Store(true)
break