From 0b666a4c741c10de04c3d1678404f785fc197523 Mon Sep 17 00:00:00 2001 From: Hyy2001X <1804430051@qq.com> Date: Mon, 22 Aug 2022 17:19:36 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../00-fix_shadowsocksr_alterId.patch} | 0 .../01-improve_ssr-rule_log.patch | 23 +++++++++++++++++++ Scripts/AutoBuild_DiyScript.sh | 10 +++++--- 3 files changed, 30 insertions(+), 3 deletions(-) rename CustomFiles/Patches/{fix_shadowsocksr_alterId.patch => luci-app-shadowsocksr/00-fix_shadowsocksr_alterId.patch} (100%) create mode 100644 CustomFiles/Patches/luci-app-shadowsocksr/01-improve_ssr-rule_log.patch diff --git a/CustomFiles/Patches/fix_shadowsocksr_alterId.patch b/CustomFiles/Patches/luci-app-shadowsocksr/00-fix_shadowsocksr_alterId.patch similarity index 100% rename from CustomFiles/Patches/fix_shadowsocksr_alterId.patch rename to CustomFiles/Patches/luci-app-shadowsocksr/00-fix_shadowsocksr_alterId.patch diff --git a/CustomFiles/Patches/luci-app-shadowsocksr/01-improve_ssr-rule_log.patch b/CustomFiles/Patches/luci-app-shadowsocksr/01-improve_ssr-rule_log.patch new file mode 100644 index 0000000..e2f160d --- /dev/null +++ b/CustomFiles/Patches/luci-app-shadowsocksr/01-improve_ssr-rule_log.patch @@ -0,0 +1,23 @@ +diff --git a/package/other/helloworld/luci-app-ssr-plus/root/usr/bin/ssr-rules b/luci-app-ssr-plus/root/usr/bin/ssr-rules +index 4a85173..f1ead5e 100755 +--- a/package/other/helloworld/luci-app-ssr-plus/root/usr/bin/ssr-rules ++++ b/package/other/helloworld/luci-app-ssr-plus/root/usr/bin/ssr-rules +@@ -51,7 +51,8 @@ usage() { + + loger() { + # 1.alert 2.crit 3.err 4.warn 5.notice 6.info 7.debug +- logger -st ssr-rules[$$] -p$1 $2 ++ logger -st "ssr-rules[$$]" -p"$1" "$2" ++ echo "$(date "+%Y-%m-%d %H:%M:%S"): ssr-rules[$$] $2" >> /var/log/ssrplus.log + } + + flush_r() { +@@ -161,7 +162,7 @@ fw_rule() { + $IPT -A SS_SPEC_WAN_FW -d 224.0.0.0/4 -j RETURN + $IPT -A SS_SPEC_WAN_FW -d 240.0.0.0/4 -j RETURN + $IPT -A SS_SPEC_WAN_FW -p tcp $PROXY_PORTS -j REDIRECT --to-ports $local_port 2>/dev/null || { +- loger 3 "Can't redirect, please check the iptables." ++ loger 3 "Can't redirect $PROXY_PORTS to $local_port, please check the iptables." + exit 1 + } + return $? diff --git a/Scripts/AutoBuild_DiyScript.sh b/Scripts/AutoBuild_DiyScript.sh index b11e885..e19d9b9 100755 --- a/Scripts/AutoBuild_DiyScript.sh +++ b/Scripts/AutoBuild_DiyScript.sh @@ -80,9 +80,13 @@ EOF AddPackage git other OpenClash vernesong master AddPackage git other luci-app-ikoolproxy iwrt main AddPackage git other helloworld fw876 master - sed -i 's/143/143,8080,8443,6969,1337,6672/' $(PKG_Finder d package luci-app-ssr-plus)/root/etc/init.d/shadowsocksr - - patch < ${CustomFiles}/Patches/fix_shadowsocksr_alterId.patch -p1 -d ${WORK} + sed -i 's/143/143,8080,8443,6969,1337/' $(PKG_Finder d package luci-app-ssr-plus)/root/etc/init.d/shadowsocksr + + for x in $(ls -1 ${CustomFiles}/Patches/luci-app-shadowsocksr) + do + patch < ${CustomFiles}/Patches/luci-app-shadowsocksr/${x} -p1 -d ${WORK} + done + patch < ${CustomFiles}/Patches/fix_ntfs3_conflict_with_antfs.patch -p1 -d ${WORK} patch < ${CustomFiles}/Patches/fix_aria2_auto_create_download_path.patch -p1 -d ${WORK}