secubox-openwrt/package/secubox/luci-app-secubox-netifyd/Makefile
CyberMind-FR 77a78053e2 feat: Add netifyd plugin support to luci-app-secubox-netifyd (v1.1.0)
- Add netifyd-plugin-setup script for Netify repository management
- Add ipset and kmod-nft-compat dependencies
- Add postinst to create plugin directories and ipsets
- Extend UCI config with new plugin sections:
  - flow_actions: Flow Actions processor plugin
  - streaming: Streaming services IP set (Netflix, YouTube, etc.)
  - category_block: Category-based blocking (malware, ads, tracking)
  - flow_rule: Custom flow rules support
- Update RPCD backend with apply_plugin_config for all plugins:
  - Auto-create ipsets (secubox-bittorrent, secubox-banned, secubox-streaming)
  - Auto-create nftables table/chain when enabled
  - Support for Flow Actions processor, IPSet, and nftables plugins
- Update settings UI with new plugin configuration sections
- Add plugin installation instructions in UI

Plugin packages (from netify.ai repository):
- netify-proc-flow-actions: Flow Actions processor
- netify-sink-socket: Socket sink for local export

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-08 19:15:49 +01:00

56 lines
1.9 KiB
Makefile

include $(TOPDIR)/rules.mk
PKG_NAME:=luci-app-secubox-netifyd
PKG_VERSION:=1.1.0
PKG_RELEASE:=1
PKG_LICENSE:=MIT
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_ARCH:=all
LUCI_TITLE:=SecuBox Netifyd Deep Packet Inspection Interface
LUCI_DEPENDS:=+luci-base +rpcd +netifyd +jq +secubox-core +ipset +kmod-nft-compat
LUCI_DESCRIPTION:=Complete LuCI interface for netifyd DPI engine with real-time flow monitoring, application detection, network analytics, and flow action plugins
LUCI_PKGARCH:=all
# Plugin packages from netify.ai repository (optional - require adding netify feed)
# netify-proc-flow-actions - Flow Actions processor plugin
# netify-sink-socket - Socket sink plugin for local export
# This is free software, licensed under the MIT License
define Package/$(PKG_NAME)/install
$(call Package/luci-app-secubox-netifyd/install,$(1))
$(INSTALL_DIR) $(1)/usr/share/doc/$(PKG_NAME)
$(INSTALL_DATA) ./README-FLOW-DATA.md $(1)/usr/share/doc/$(PKG_NAME)/
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./root/usr/sbin/secubox-netifyd-configure $(1)/usr/sbin/
$(INSTALL_DIR) $(1)/usr/bin
$(INSTALL_BIN) ./root/usr/bin/netifyd-collector-setup $(1)/usr/bin/
$(INSTALL_BIN) ./root/usr/bin/netifyd-plugin-setup $(1)/usr/bin/
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./root/etc/init.d/secubox-netifyd-collector $(1)/etc/init.d/
endef
define Package/$(PKG_NAME)/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
# Create plugin directories
mkdir -p /etc/netifyd/plugins.d
mkdir -p /etc/netify.d
# Initialize ipsets for plugins if not exist
ipset list secubox-bittorrent >/dev/null 2>&1 || \
ipset create secubox-bittorrent hash:ip timeout 900 2>/dev/null
ipset list secubox-banned >/dev/null 2>&1 || \
ipset create secubox-banned hash:ip timeout 3600 2>/dev/null
# Restart rpcd
/etc/init.d/rpcd restart 2>/dev/null
}
exit 0
endef
include $(TOPDIR)/feeds/luci/luci.mk
# call BuildPackage - OpenWrt buildroot