From 8cc5a89cd8c272b941520f64d88f6b3dbcf49e1f Mon Sep 17 00:00:00 2001 From: jqtmviyu Date: Wed, 31 Jul 2024 06:08:08 +0800 Subject: [PATCH] fix: :bug: update log style --- allow_whitelist.sh | 2 +- block_blacklist.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/allow_whitelist.sh b/allow_whitelist.sh index a3a9ea1..fadaaf8 100755 --- a/allow_whitelist.sh +++ b/allow_whitelist.sh @@ -243,7 +243,7 @@ echo "$ips" | while IFS= read -r line; do echo_pass "$ip 是私有地址, 忽略." else # 添加规则 - [ "$DEBUG" -eq 0 ] && echo -e "$(date '+%Y-%m-%d %H:%M:%S')\t$client\t$ip\n" >>$log_path + [ "$DEBUG" -eq 0 ] && echo -e "$(date '+%Y-%m-%d %H:%M:%S')\t$client\t$ip" >>$log_path if echo "$ip" | grep -q ":"; then echo_err "添加IPv6地址 $ip 到自定义链 $custom_chain_ipv6" [ "$DEBUG" -eq 0 ] && ip6tables -I $custom_chain_ipv6 -d $ip -j DROP diff --git a/block_blacklist.sh b/block_blacklist.sh index a03b9f8..bee85f1 100755 --- a/block_blacklist.sh +++ b/block_blacklist.sh @@ -201,7 +201,7 @@ echo "$block_clients" | while IFS= read -r client; do debug_echo "$ip 是私有地址, 忽略." else # 添加规则 - [ "$DEBUG" -eq 0 ] && echo -e "$client\t\t$ip\t\t$(date '+%Y-%m-%d %H:%M:%S')\n" >>$log_path + [ "$DEBUG" -eq 0 ] && echo -e "$(date '+%Y-%m-%d %H:%M:%S')\t$client\t$ip" >>$log_path if echo "$ip" | grep -q ":"; then debug_echo "添加IPv6地址 $ip 到自定义链 $custom_chain_ipv6" [ "$DEBUG" -eq 0 ] && ip6tables -I $custom_chain_ipv6 -d $ip -j DROP