chore: better source address
This commit is contained in:
parent
9c99f60a57
commit
96800e65ee
1 changed files with 7 additions and 7 deletions
|
@ -304,12 +304,12 @@ func handleUDPConn(packet C.PacketAdapter) {
|
|||
log.Warnln(
|
||||
"[UDP] dial %s %s --> %s error: %s",
|
||||
proxy.Name(),
|
||||
metadata.SourceAddress(),
|
||||
metadata.SourceDetail(),
|
||||
metadata.RemoteAddress(),
|
||||
err.Error(),
|
||||
)
|
||||
} else {
|
||||
log.Warnln("[UDP] dial %s (match %s/%s) %s --> %s error: %s", proxy.Name(), rule.RuleType().String(), rule.Payload(), metadata.SourceAddress(), metadata.RemoteAddress(), err.Error())
|
||||
log.Warnln("[UDP] dial %s (match %s/%s) %s --> %s error: %s", proxy.Name(), rule.RuleType().String(), rule.Payload(), metadata.SourceDetail(), metadata.RemoteAddress(), err.Error())
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -321,7 +321,7 @@ func handleUDPConn(packet C.PacketAdapter) {
|
|||
|
||||
switch true {
|
||||
case metadata.SpecialProxy != "":
|
||||
log.Infoln("[UDP] %s --> %s using %s", metadata.SourceAddress(), metadata.RemoteAddress(), metadata.SpecialProxy)
|
||||
log.Infoln("[UDP] %s --> %s using %s", metadata.SourceDetail(), metadata.RemoteAddress(), metadata.SpecialProxy)
|
||||
case rule != nil:
|
||||
if rule.Payload() != "" {
|
||||
log.Infoln("[UDP] %s --> %s match %s using %s", metadata.SourceDetail(), metadata.RemoteAddress(), fmt.Sprintf("%s(%s)", rule.RuleType().String(), rule.Payload()), rawPc.Chains().String())
|
||||
|
@ -390,12 +390,12 @@ func handleTCPConn(connCtx C.ConnContext) {
|
|||
log.Warnln(
|
||||
"[TCP] dial %s %s --> %s error: %s",
|
||||
proxy.Name(),
|
||||
metadata.SourceAddress(),
|
||||
metadata.SourceDetail(),
|
||||
metadata.RemoteAddress(),
|
||||
err.Error(),
|
||||
)
|
||||
} else {
|
||||
log.Warnln("[TCP] dial %s (match %s/%s) %s --> %s error: %s", proxy.Name(), rule.RuleType().String(), rule.Payload(), metadata.SourceAddress(), metadata.RemoteAddress(), err.Error())
|
||||
log.Warnln("[TCP] dial %s (match %s/%s) %s --> %s error: %s", proxy.Name(), rule.RuleType().String(), rule.Payload(), metadata.SourceDetail(), metadata.RemoteAddress(), err.Error())
|
||||
}
|
||||
})
|
||||
if err != nil {
|
||||
|
@ -409,7 +409,7 @@ func handleTCPConn(connCtx C.ConnContext) {
|
|||
|
||||
switch true {
|
||||
case metadata.SpecialProxy != "":
|
||||
log.Infoln("[TCP] %s --> %s using %s", metadata.SourceAddress(), metadata.RemoteAddress(), metadata.SpecialProxy)
|
||||
log.Infoln("[TCP] %s --> %s using %s", metadata.SourceDetail(), metadata.RemoteAddress(), metadata.SpecialProxy)
|
||||
case rule != nil:
|
||||
if rule.Payload() != "" {
|
||||
log.Infoln("[TCP] %s --> %s match %s using %s", metadata.SourceDetail(), metadata.RemoteAddress(), fmt.Sprintf("%s(%s)", rule.RuleType().String(), rule.Payload()), remoteConn.Chains().String())
|
||||
|
@ -423,7 +423,7 @@ func handleTCPConn(connCtx C.ConnContext) {
|
|||
default:
|
||||
log.Infoln(
|
||||
"[TCP] %s --> %s doesn't match any rule using DIRECT",
|
||||
metadata.SourceAddress(),
|
||||
metadata.SourceDetail(),
|
||||
metadata.RemoteAddress(),
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue