1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter-feeds.git synced 2025-03-09 15:40:03 +00:00

Merge pull request #312 from Ysurac/develop

sync
This commit is contained in:
suyuan 2023-04-22 17:32:03 +08:00 committed by GitHub
commit 9388a02e55
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 16 additions and 7 deletions

View file

@ -8,7 +8,7 @@ jobs:
build:
strategy:
matrix:
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx, r5s]
OMR_TARGET: [bpi-r1, bpi-r2, bpi-r64, rpi2, rpi4, wrt32x, espressobin, r2s, rpi3, wrt3200acm, x86, x86_64, ubnt-erx, r4s, r7800, rutx, r5s, qnap-301w]
OMR_KERNEL: [5.4, 5.15, 6.1]
runs-on: ubuntu-latest
continue-on-error: true

View file

@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk
LUCI_TITLE:=LuCI Interface to bypass domains
LUCI_DEPENDS:=+dnsmasq-full +shadowsocks-libev-ss-rules +iptables-mod-ndpi +iptables-mod-extra +kmod-ipt-ndpi +iptables
LUCI_DEPENDS:=+dnsmasq-full +shadowsocks-libev-ss-rules +(LINUX_5_4||LINUX_5_15||TARGET_x86_64):iptables-mod-ndpi +iptables-mod-extra +(LINUX_5_4||LINUX_5_15||TARGET_x86_64):kmod-ipt-ndpi +iptables
PKG_LICENSE:=GPLv3

View file

@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=ndpi-netfilter2
PKG_RELEASE:=4
PKG_REV:=845399a0acb423e940c67a881a10f30f4c6a5fb7
PKG_REV:=2fc0c86e58d56c8f9c5da3883a09732fc902e5e7
PKG_VERSION:=4-$(PKG_REV)
PKG_SOURCE_PROTO:=git
@ -31,7 +31,7 @@ define Package/iptables-mod-ndpi
TITLE:=ndpi successor of OpenDPI
URL:=http://www.ntop.org/products/ndpi/
# DEPENDS:=+iptables +iptables-mod-conntrack-extra +kmod-ipt-ndpi +libpcap
DEPENDS:=+iptables +kmod-ipt-ndpi +libpcap
DEPENDS:=+iptables +kmod-ipt-ndpi +libpcap @(LINUX_5_4||LINUX_5_15||TARGET_x86_64)
MAINTAINER:=Ycarus (Yannick Chabanois) <ycarus@zugaina.org>
endef
@ -51,13 +51,15 @@ MAKE_FLAGS += \
KERNEL_RELEASE="$(KERNEL_PATCHVER)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
CC="$(TARGET_CC)" \
NDPI_PATH=$(PKG_BUILD_DIR)/ndpi-netfilter
#MAKE_FLAGS += \
# NDPI_PATH=$(PKG_BUILD_DIR)/ndpi-netfilter
define Build/Compile
(cd $(PKG_BUILD_DIR)/src/lib &&\
gcc -g -O2 -fPIC -DPIC -DNDPI_LIB_COMPILATION -I../../src/include/ -I../../src/lib/third_party/include/ ndpi_network_list_compile.c -o ndpi_network_list_compile &&\
./ndpi_network_list_compile -o ndpi_network_list.c.inc ndpi_network_list_*.yaml)
$(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/ndpi-netfilter
# $(MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/ndpi-netfilter
+$(KERNEL_MAKE) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR)/ndpi-netfilter
endef
define Package/iptables-mod-ndpi/install
@ -68,11 +70,16 @@ endef
define KernelPackage/ipt-ndpi
SUBMENU:=Netfilter Extensions
TITLE:= nDPI net netfilter module
DEPENDS:=+kmod-nf-conntrack +kmod-nf-conntrack-netlink +kmod-ipt-compat-xtables +libpcap
DEPENDS:=+kmod-nf-conntrack +kmod-nf-conntrack-netlink +kmod-ipt-compat-xtables +libpcap @(LINUX_5_4||LINUX_5_15||TARGET_x86_64)
KCONFIG:=CONFIG_NF_CONNTRACK_LABELS=y \
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=y
FILES:= $(PKG_BUILD_DIR)/ndpi-netfilter/src/xt_ndpi.ko
AUTOLOAD:=$(call AutoProbe,xt_ndpi)
KCONFIG:=\
CONFIG_LIVEPATCH=y \
CONFIG_NF_CONNTRACK=y \
CONFIG_NF_CONNTRACK_LABELS=y \
CONFIG_NETFILTER_XT_MATCH_CONNLABEL=y
endef
$(eval $(call BuildPackage,iptables-mod-ndpi))

View file

@ -5,6 +5,8 @@ uci -q batch <<-EOF >/dev/null
set firewall.@defaults[0].input='REJECT'
set firewall.@defaults[0].output='REJECT'
set firewall.@defaults[0].forward='REJECT'
set firewall.@defaults[0].flow_offloading='0'
set firewall.@defaults[0].flow_offloading_hw='0'
EOF