secubox-openwrt/package/secubox/secubox-app-netifyd/patches/001-fix-inline-static-maps.patch
CyberMind-FR 675b2d164e feat: Portal service detection, nDPId compat layer, CrowdSec/Netifyd packages
Portal (luci-app-secubox-portal):
- Fix service status showing 0/9 by checking if init scripts exist
- Only count installed services in status display
- Use pgrep fallback when init script status fails

nDPId Dashboard (luci-app-ndpid):
- Add default /etc/config/ndpid configuration
- Add /etc/init.d/ndpid-compat init script
- Enable compat service in postinst for app detection
- Fix Makefile to install init script and config

CrowdSec Dashboard:
- Add CLAUDE.md with OpenWrt-specific guidelines (pgrep without -x)
- CSS fixes for hiding LuCI left menu in all views
- LAPI repair improvements with retry logic

New Packages:
- secubox-app-crowdsec: OpenWrt-native CrowdSec package
- secubox-app-netifyd: Netifyd DPI integration
- luci-app-secubox: Core SecuBox hub
- luci-theme-secubox: Custom theme

Removed:
- luci-app-secubox-crowdsec (replaced by crowdsec-dashboard)
- secubox-crowdsec-setup (functionality moved to dashboard)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-10 13:51:40 +01:00

50 lines
1.8 KiB
Diff

--- a/include/nd-risks.hpp
+++ b/include/nd-risks.hpp
@@ -97,7 +97,7 @@ enum class Id : uint32_t {
TODO = 0xffffffff
};
-const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
+inline const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
{ Id::NONE, "None" },
{ Id::ANONYMOUS_SUBSCRIBER, "Anonymous Subscriber" },
@@ -174,7 +174,7 @@ inline Id GetId(const std::string &name
namespace nDPI {
-const std::unordered_map<uint16_t, Id> Risks = {
+inline const std::unordered_map<uint16_t, Id> Risks = {
{ NDPI_ANONYMOUS_SUBSCRIBER, Id::ANONYMOUS_SUBSCRIBER },
{ NDPI_BINARY_APPLICATION_TRANSFER, Id::BINARY_APPLICATION_TRANSFER },
{ NDPI_BINARY_DATA_TRANSFER, Id::BINARY_DATA_TRANSFER },
--- a/include/nd-protos.hpp
+++ b/include/nd-protos.hpp
@@ -469,7 +469,7 @@ enum class Id : uint16_t {
CUSTOM_1024 = 1024,
};
-const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
+inline const std::unordered_map<Id, const char *, ndEnumHasher> Tags = {
{ Id::AFP, "AFP" },
{ Id::AJP, "AJP" },
{ Id::ALICLOUD, "Alibaba/Cloud" },
@@ -773,7 +773,7 @@ const std::unordered_map<Id, const char
{ Id::ZOOM, "Zoom" },
};
-const std::unordered_map<Id, const char *, ndEnumHasher> Twins = {
+inline const std::unordered_map<Id, const char *, ndEnumHasher> Twins = {
{ Id::APPLE_PUSH, "netify.apple-push" },
{ Id::AVAST, "netify.avast" },
{ Id::BITCOIN, "netify.bitcoin" },
@@ -819,7 +819,7 @@ const std::unordered_map<Id, const char
{ Id::ZOOM, "netify.zoom" },
}
-const std::unordered_map<Id, std::vector<std::pair<uint16_t, Id>>, ndEnumHasher> PortMap = {
+inline const std::unordered_map<Id, std::vector<std::pair<uint16_t, Id>>, ndEnumHasher> PortMap = {
{ Id::TLS,
{
{ 53, Id::DOT },