chore: log shows dialMode

This commit is contained in:
mzz2017
2023-02-26 20:33:50 +08:00
parent ecb51e2136
commit 7542884451
3 changed files with 11 additions and 8 deletions

View File

@ -193,7 +193,7 @@ func (c *ControlPlane) handlePkt(lConn *net.UDPConn, data []byte, src, pktDst, r
// TODO: Rewritten domain should not use full-cone (such as VMess Packet Addr).
// Maybe we should set up a mapping for UDP: Dialer + Target Domain => Remote Resolved IP.
// However, games may not use QUIC for communication, thus we cannot use domain to dial, which is fine.
dialTarget := c.ChooseDialTarget(outboundIndex, realDst, domain)
dialTarget, dialMode := c.ChooseDialTarget(outboundIndex, realDst, domain)
// Get udp endpoint.
var ue *UdpEndpoint
@ -266,6 +266,7 @@ getNew:
"pid": routingResult.Pid,
"pname": ProcessName2String(routingResult.Pname[:]),
"mac": Mac2String(routingResult.Mac[:]),
"dialMode": dialMode,
}
c.log.WithFields(fields).Infof("%v <-> %v", RefineSourceToShow(realSrc, realDst.Addr(), lanWanFlag), RefineAddrPortToShow(realDst))
}