From 3a3e2c05af124714d3169b75a527ec488b88c3af Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Sat, 18 Jul 2020 19:22:09 +0800 Subject: [PATCH] Chore: add rule payload in log --- tunnel/tunnel.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tunnel/tunnel.go b/tunnel/tunnel.go index a8ed5c88..029e1b0b 100644 --- a/tunnel/tunnel.go +++ b/tunnel/tunnel.go @@ -218,7 +218,7 @@ func handleUDPConn(packet *inbound.PacketAdapter) { switch true { case rule != nil: - log.Infoln("[UDP] %s --> %v match %s using %s", metadata.SourceAddress(), metadata.String(), rule.RuleType().String(), rawPc.Chains().String()) + log.Infoln("[UDP] %s --> %v match %s(%s) using %s", metadata.SourceAddress(), metadata.String(), rule.RuleType().String(), rule.Payload(), rawPc.Chains().String()) case mode == Global: log.Infoln("[UDP] %s --> %v using GLOBAL", metadata.SourceAddress(), metadata.String()) case mode == Direct: @@ -271,7 +271,7 @@ func handleTCPConn(localConn C.ServerAdapter) { switch true { case rule != nil: - log.Infoln("[TCP] %s --> %v match %s using %s", metadata.SourceAddress(), metadata.String(), rule.RuleType().String(), remoteConn.Chains().String()) + log.Infoln("[TCP] %s --> %v match %s(%s) using %s", metadata.SourceAddress(), metadata.String(), rule.RuleType().String(), rule.Payload(), remoteConn.Chains().String()) case mode == Global: log.Infoln("[TCP] %s --> %v using GLOBAL", metadata.SourceAddress(), metadata.String()) case mode == Direct: