mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-07-02 17:58:46 +00:00
REALITY client: Clearer log when receiving real certificate (#5427)
Co-authored-by: RPRX <63339210+RPRX@users.noreply.github.com>
This commit is contained in:
@@ -180,11 +180,14 @@ func UClient(c net.Conn, config *Config, ctx context.Context, dest net.Destinati
|
|||||||
fmt.Printf("REALITY localAddr: %v\tuConn.Verified: %v\n", localAddr, uConn.Verified)
|
fmt.Printf("REALITY localAddr: %v\tuConn.Verified: %v\n", localAddr, uConn.Verified)
|
||||||
}
|
}
|
||||||
if !uConn.Verified {
|
if !uConn.Verified {
|
||||||
|
errors.LogError(ctx, "REALITY: received real certificate (potential MITM or redirection)")
|
||||||
go func() {
|
go func() {
|
||||||
client := &http.Client{
|
client := &http.Client{
|
||||||
Transport: &http2.Transport{
|
Transport: &http2.Transport{
|
||||||
DialTLSContext: func(ctx context.Context, network, addr string, cfg *gotls.Config) (net.Conn, error) {
|
DialTLSContext: func(ctx context.Context, network, addr string, cfg *gotls.Config) (net.Conn, error) {
|
||||||
fmt.Printf("REALITY localAddr: %v\tDialTLSContext\n", localAddr)
|
if config.Show {
|
||||||
|
fmt.Printf("REALITY localAddr: %v\tDialTLSContext\n", localAddr)
|
||||||
|
}
|
||||||
return uConn, nil
|
return uConn, nil
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user