风扇滑翔翼
2025-09-10 19:41:44 +08:00
committed by GitHub
parent cced1477a0
commit 30e10be95d
+2 -2
View File
@@ -77,6 +77,8 @@ func (w *tcpWorker) callback(conn stat.Connection) {
case internet.SocketConfig_TProxy: case internet.SocketConfig_TProxy:
dest = net.DestinationFromAddr(conn.LocalAddr()) dest = net.DestinationFromAddr(conn.LocalAddr())
} }
if dest.IsValid() {
// Check if try to connect to this inbound itself (can cause loopback) // Check if try to connect to this inbound itself (can cause loopback)
var isLoopBack bool var isLoopBack bool
if w.address == net.AnyIP || w.address == net.AnyIPv6 { if w.address == net.AnyIP || w.address == net.AnyIPv6 {
@@ -94,8 +96,6 @@ func (w *tcpWorker) callback(conn stat.Connection) {
errors.LogError(ctx, errors.New("loopback connection detected")) errors.LogError(ctx, errors.New("loopback connection detected"))
return return
} }
if dest.IsValid() {
outbounds[0].Target = dest outbounds[0].Target = dest
} }
} }