Skip to content

Commit e8539af

Browse files
committed
fix: guard debug log in DialTLSContext with config.Show
1 parent 74df63a commit e8539af

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

transport/internet/reality/reality.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,9 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
184184
client := &http.Client{
185185
Transport: &http2.Transport{
186186
DialTLSContext: func(ctx context.Context, network, addr string, cfg *gotls.Config) (net.Conn, error) {
187-
fmt.Printf("REALITY localAddr: %v\tDialTLSContext\n", localAddr)
187+
if config.Show {
188+
fmt.Printf("REALITY localAddr: %v\tDialTLSContext\n", localAddr)
189+
}
188190
return uConn, nil
189191
},
190192
},

0 commit comments

Comments
 (0)