- Add media-flow-ndpid-collector script for collecting streaming data from nDPId - Update RPCD backend to detect and use nDPId as primary DPI source - Update frontend dashboard to show DPI source indicator (nDPId/netifyd/none) - Add active streams table displaying real-time streaming activity - Update init.d script to auto-detect and use best available collector - Remove hard dependency on netifyd, make DPI engines optional - Bump version to 0.6.0 nDPId provides local deep packet inspection without requiring cloud subscription, enabling accurate streaming service detection (Netflix, YouTube, Spotify, etc.) with quality estimation. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
66 lines
2.0 KiB
Makefile
66 lines
2.0 KiB
Makefile
# Copyright (C) 2024 CyberMind.fr
|
|
# Licensed under Apache-2.0
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
PKG_NAME:=luci-app-media-flow
|
|
PKG_VERSION:=0.6.0
|
|
PKG_RELEASE:=1
|
|
PKG_ARCH:=all
|
|
PKG_LICENSE:=Apache-2.0
|
|
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
|
|
|
|
LUCI_TITLE:=Media Flow - Streaming Detection & Monitoring
|
|
LUCI_DESCRIPTION:=Real-time detection and monitoring of streaming services (Netflix, YouTube, Spotify, etc.) with quality estimation, history tracking, and alerts. Supports nDPId local DPI and netifyd.
|
|
LUCI_DEPENDS:=+luci-base +rpcd +jq
|
|
LUCI_PKGARCH:=all
|
|
|
|
# Optional dependencies (nDPId for local DPI, netifyd as fallback)
|
|
# +ndpid provides local application detection without cloud subscription
|
|
# +netifyd requires cloud subscription for application detection
|
|
|
|
# File permissions (CRITICAL: RPCD scripts MUST be executable 755)
|
|
PKG_FILE_MODES:=/usr/libexec/rpcd/luci.media-flow:root:root:755 \
|
|
/usr/bin/media-flow-collector:root:root:755 \
|
|
/usr/bin/media-flow-ndpid-collector:root:root:755 \
|
|
/etc/init.d/media-flow:root:root:755
|
|
|
|
define Package/$(PKG_NAME)/install
|
|
$(call Package/luci-app-media-flow/install,$(1))
|
|
$(INSTALL_DIR) $(1)/usr/bin
|
|
$(INSTALL_BIN) ./root/usr/bin/media-flow-collector $(1)/usr/bin/
|
|
$(INSTALL_BIN) ./root/usr/bin/media-flow-ndpid-collector $(1)/usr/bin/
|
|
$(INSTALL_DIR) $(1)/etc/init.d
|
|
$(INSTALL_BIN) ./root/etc/init.d/media-flow $(1)/etc/init.d/
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/postinst
|
|
#!/bin/sh
|
|
[ -n "$${IPKG_INSTROOT}" ] || {
|
|
# Initialize history file
|
|
mkdir -p /tmp/media-flow-stats
|
|
[ ! -f /tmp/media-flow-history.json ] && echo '[]' > /tmp/media-flow-history.json
|
|
|
|
# Enable and start the collector
|
|
/etc/init.d/media-flow enable 2>/dev/null
|
|
/etc/init.d/media-flow start 2>/dev/null
|
|
|
|
# Restart rpcd
|
|
/etc/init.d/rpcd restart 2>/dev/null
|
|
}
|
|
exit 0
|
|
endef
|
|
|
|
define Package/$(PKG_NAME)/prerm
|
|
#!/bin/sh
|
|
[ -n "$${IPKG_INSTROOT}" ] || {
|
|
/etc/init.d/media-flow stop 2>/dev/null
|
|
/etc/init.d/media-flow disable 2>/dev/null
|
|
}
|
|
exit 0
|
|
endef
|
|
|
|
include $(TOPDIR)/feeds/luci/luci.mk
|
|
|
|
# call BuildPackage - OpenWrt buildroot signature
|