From 87ed5fbc352fc6cffe9e836d9484ae19b6f0fb87 Mon Sep 17 00:00:00 2001 From: MapleCool <37971849+pmkol@users.noreply.github.com> Date: Tue, 10 Sep 2024 12:03:56 +0800 Subject: [PATCH] customize: add natflow by default --- openwrt/scripts/10-customize-config.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/openwrt/scripts/10-customize-config.sh b/openwrt/scripts/10-customize-config.sh index 0cbb0d358..d1829585c 100644 --- a/openwrt/scripts/10-customize-config.sh +++ b/openwrt/scripts/10-customize-config.sh @@ -21,6 +21,9 @@ sed -i 's#Loyalsoldier/geoip/releases/latest/download/geoip-only-cn-private.dat# sed -i '/geoip_api/s#Loyalsoldier/v2ray-rules-dat#pmkol/geodata-lite#' package/new/helloworld/luci-app-passwall/root/usr/share/passwall/rule_update.lua sed -i '/geosite_api/s#Loyalsoldier/v2ray-rules-dat#MetaCubeX/meta-rules-dat#' package/new/helloworld/luci-app-passwall/root/usr/share/passwall/rule_update.lua +# add natflow by default +sed -i 's|\[\ \$(grep\ -c\ shortcut_fe\ /etc/config/firewall)\ -eq\ '\''0'\''\ \]\ \&\&\ uci\ set\ firewall.@defaults\[0\].flow_offloading='\''1'\''|\[\ \$(grep\ -c\ shortcut_fe\ /etc/config/firewall)\ -eq\ '\''0'\''\ \]\ \&\&\ \[\ \$(grep\ -c\ natflow_delay_pkts\ /etc/config/firewall)\ -eq\ '\''0'\''\ \]\ \&\&\ uci\ set\ firewall.@defaults\[0\].flow_offloading='\''1'\''|g' package/new/default-settings/default/zzz-default-settings + # configure default-settings sed -i 's/openwrt\/luci/pmkol\/openwrt-plus/g' package/new/luci-theme-argon/luci-theme-argon/luasrc/view/themes/argon/footer.htm sed -i 's/openwrt\/luci/pmkol\/openwrt-plus/g' package/new/luci-theme-argon/luci-theme-argon/luasrc/view/themes/argon/footer_login.htm