diff --git a/homeproxy/root/usr/share/rpcd/ucode/luci.homeproxy b/homeproxy/root/usr/share/rpcd/ucode/luci.homeproxy index bac07d99..59bdbac3 100644 --- a/homeproxy/root/usr/share/rpcd/ucode/luci.homeproxy +++ b/homeproxy/root/usr/share/rpcd/ucode/luci.homeproxy @@ -1036,7 +1036,7 @@ const methods = { const type = req.args?.type; let result = {}; - const fd = popen('/usr/bin/sing-box generate ' + type + ` ${req.args?.params || ''}`); + const fd = popen(`/usr/bin/sing-box generate ${type} ${shellquote(req.args?.params || '')}`); if (fd) { let ech_cfg_set = false; let ech_key_set = false; diff --git a/luci-app-passwall2/luasrc/passwall2/util_xray.lua b/luci-app-passwall2/luasrc/passwall2/util_xray.lua index e148a173..3c0f708b 100644 --- a/luci-app-passwall2/luasrc/passwall2/util_xray.lua +++ b/luci-app-passwall2/luasrc/passwall2/util_xray.lua @@ -1518,11 +1518,6 @@ function gen_config(var) end end) - table.insert(rules, { - outboundTag = "direct", - ip = { "geoip:private" } - }) - if default_outboundTag then local rule = { ruleTag = "default", diff --git a/luci-app-wechatpush/root/usr/share/wechatpush/wechatpush b/luci-app-wechatpush/root/usr/share/wechatpush/wechatpush index 4145b540..1791f944 100755 --- a/luci-app-wechatpush/root/usr/share/wechatpush/wechatpush +++ b/luci-app-wechatpush/root/usr/share/wechatpush/wechatpush @@ -2293,8 +2293,8 @@ monitor_logins() { trap cleanup_child SIGINT SIGTERM ( - # 监听系统日志,-f 表示跟随实时日志,-p 表示日志级别为 notice - run_with_tag logread -f -p notice | while IFS= read -r line; do + # 监听系统日志,-f 表示跟随实时日志 + run_with_tag logread -f | while IFS= read -r line; do [ -n "$web_logged" ] && { web_login_ip=$(echo "$line" | grep -i "accepted login" | awk '{print $NF}') [ -n "$web_login_ip" ] && process_login "$web_login_ip" $(echo "$line" | awk '{print $4}') web_login_counts @@ -2317,7 +2317,7 @@ monitor_logins() { # 如果未能提取到 IP,从日志标识符提取失败用户的 ID,并再次提取 IP if [ -z "$ssh_failed_ip" ]; then ssh_failed_num=$(echo "$line" | sed -n 's/.*authpriv\.warn dropbear\[\([0-9]\+\)\]: Login attempt for nonexistent user/\1/p') - [ -n "$ssh_failed_num" ] && ssh_failed_ip=$(logread notice | grep "authpriv\.info dropbear\[${ssh_failed_num}\].*Child connection from" | awk '{print $NF}' | sed -nr 's#^(.*):[0-9]{1,5}#\1#gp' | sed -e 's/%.*//' | tail -n 1) + [ -n "$ssh_failed_num" ] && ssh_failed_ip=$(logread | grep "authpriv\.info dropbear\[${ssh_failed_num}\].*Child connection from" | awk '{print $NF}' | sed -nr 's#^(.*):[0-9]{1,5}#\1#gp' | sed -e 's/%.*//' | tail -n 1) fi # 如果成功提取到 IP 地址,调用 process_login 处理 @@ -2578,13 +2578,13 @@ login_send() { # 登录方式 if [[ "$log_type" == "web"* ]]; then # Web 登录、非法登录 - local login_mode=$(logread notice | grep -E ".* $login_time.*$login_ip.*" | awk '{print $13}' | tail -n 1) + local login_mode=$(logread | grep -E ".* $login_time.*$login_ip.*" | awk '{print $13}' | tail -n 1) [ "$login_mode" = "/" ] && login_mode="$(translate "/ (Homepage login)")" elif [[ "$log_type" == "ssh_login"* ]]; then # SSH 登录 - local login_mode=$(logread notice | grep -E ".* $login_time.*$login_ip.*" | awk '{print $8}' | tail -n 1) + local login_mode=$(logread | grep -E ".* $login_time.*$login_ip.*" | awk '{print $8}' | tail -n 1) else - local login_mode=$(logread notice | grep -E ".* $login_time.*$login_ip.*" | awk '{for(i=8;i