mirror of
https://github.com/XTLS/REALITY.git
synced 2026-09-22 23:08:01 +03:00
do not crash if clientHello is nil
This commit is contained in:
@@ -208,7 +208,7 @@ func Server(ctx context.Context, conn net.Conn, config *Config) (*Conn, error) {
|
||||
}
|
||||
mutex.Unlock()
|
||||
if hs.c.conn != conn {
|
||||
if config.Show {
|
||||
if config.Show && hs.clientHello != nil {
|
||||
fmt.Printf("REALITY remoteAddr: %v\tforwarded SNI: %v\n", remoteAddr, hs.clientHello.serverName)
|
||||
}
|
||||
io.Copy(target, underlying)
|
||||
|
||||
Reference in New Issue
Block a user