From 10bfad1223e3f6ac712ba5247a3b919e7cf5def5 Mon Sep 17 00:00:00 2001 From: remittor Date: Mon, 11 Nov 2024 14:30:06 +0300 Subject: [PATCH] Add xwrt packages (natflow + url_logger) --- _addons.config | 4 ++++ _base.config | 8 ++++++++ xmake.sh | 11 +++++++++++ 3 files changed, 23 insertions(+) diff --git a/_addons.config b/_addons.config index 61ef709..5674dc1 100644 --- a/_addons.config +++ b/_addons.config @@ -55,3 +55,7 @@ CONFIG_FEED__amneziawg=m #GIT_FEED _ruantiblock=https://github.com/gSpotx2f/ruantiblock_openwrt.git CONFIG_FEED__ruantiblock=m +### xwrt-packages +#GIT_FEED _xwrt_packages=https://github.com/openwrt-xiaomi/xwrt-packages.git +CONFIG_FEED__xwrt_packages=m + diff --git a/_base.config b/_base.config index 9457c13..534bd2b 100644 --- a/_base.config +++ b/_base.config @@ -228,6 +228,14 @@ CONFIG_PACKAGE_luci-i18n-banip-ru=y CONFIG_PACKAGE_luci-app-nlbwmon=y CONFIG_PACKAGE_luci-i18n-nlbwmon-ru=y +### X-WRT Packages +CONFIG_PACKAGE_kmod-natflow=y +CONFIG_PACKAGE_natflow-auth=y +CONFIG_PACKAGE_natflow-hostacl=y +CONFIG_PACKAGE_urllogger=y +CONFIG_PACKAGE_luci-app-natflow-users=y + + ### Disabled services #DISABLED_SVC=batmand #DISABLED_SVC=watchcat diff --git a/xmake.sh b/xmake.sh index 1309578..26a5535 100755 --- a/xmake.sh +++ b/xmake.sh @@ -177,6 +177,17 @@ function build_target { sed -i "/config statistics 'collectd_thermal'/{n; s/option enable '0'/option enable '1'/}" $LUCISTATCONF fi + XWRTDIR=$XDIR/package/feeds/_xwrt_packages + if [ -d $XWRTDIR ]; then + [ -f $XWRTDIR/natflow/files/hostacl.config ] && sed -i 's/192.168.15./192.168.1./g' $XWRTDIR/natflow/files/hostacl.config + [ -f $XWRTDIR/natflow/files/natflow.config ] && sed -i 's/192.168.15./192.168.1./g' $XWRTDIR/natflow/files/natflow.config + [ -f $XWRTDIR/lua-ipops/src/ipops.lua ] && sed -i 's/192.168.15./192.168.1./g' $XWRTDIR/lua-ipops/src/ipops.lua + XWRTJSDIR=$XWRTDIR/luci-app-natflow-users/htdocs/luci-static/resources/view + [ -f $XWRTJSDIR/network/hostacl.js ] && sed -i 's/192.168.15./192.168.1./g' $XWRTJSDIR/network/hostacl.js + [ -f $XWRTJSDIR/network/natflow-qos.js ] && sed -i 's/192.168.15./192.168.1./g' $XWRTJSDIR/network/natflow-qos.js + [ -f $XWRTJSDIR/system/natflow-users.js ] && sed -i 's/192.168.15./192.168.1./g' $XWRTJSDIR/system/natflow-users.js + fi + OPKG_DIR=$XDIR/files/etc/opkg if [ -d $OPKG_DIR ]; then rm -rf $OPKG_DIR