fix(master-link): Suppress p2p-mesh.sh stdout noise from sourced libraries

Use >/dev/null 2>&1 instead of just 2>/dev/null when sourcing
master-link.sh and calling chain_add_block, mesh_init, peer_add,
factory_trust_peer, and gossip_sync to prevent p2p-mesh.sh usage
text and block hashes from corrupting CGI JSON responses.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
CyberMind-FR 2026-02-03 06:38:11 +01:00
parent 62c0850829
commit c4c829a593
93 changed files with 225 additions and 457 deletions

View File

@ -230,7 +230,9 @@
"Bash(git -C /home/reepost/CyberMindStudio/secubox-openwrt tag -a v0.18.2 -m \"Release v0.18.2: CVE-2025-15467 detection and security dashboard integration\")",
"WebFetch(domain:simplex.chat)",
"Bash(# Find usign keys find ~/CyberMindStudio/secubox-openwrt -name \"\"*.key\"\")",
"Bash(cd ~/CyberMindStudio/secubox-openwrt/package/secubox/secubox-app-bonus/root/www/secubox-feed ls -la Packages* luci-app-secubox-security-threats*.ipk echo \"\" grep -A3 \"Package: luci-app-secubox-security-threats\" Packages)"
"Bash(cd ~/CyberMindStudio/secubox-openwrt/package/secubox/secubox-app-bonus/root/www/secubox-feed ls -la Packages* luci-app-secubox-security-threats*.ipk echo \"\" grep -A3 \"Package: luci-app-secubox-security-threats\" Packages)",
"Bash(docker pull:*)",
"Bash(do echo \"=== $f ===\")"
]
}
}

View File

@ -1,12 +1,12 @@
{
"feed_url": "/secubox-feed",
"generated": "2026-02-02T16:32:06+01:00",
"generated": "2026-02-03T06:19:17+01:00",
"packages": [
{
"name": "luci-app-auth-guardian",
"version": "0.4.0-r3",
"filename": "luci-app-auth-guardian_0.4.0-r3_all.ipk",
"size": 11736,
"size": 11737,
"category": "security",
"icon": "key",
"description": "Authentication management",
@ -30,7 +30,7 @@
"name": "luci-app-cdn-cache",
"version": "0.5.0-r3",
"filename": "luci-app-cdn-cache_0.5.0-r3_all.ipk",
"size": 23184,
"size": 23186,
"category": "network",
"icon": "globe",
"description": "CDN caching",
@ -42,7 +42,7 @@
"name": "luci-app-client-guardian",
"version": "0.4.0-r7",
"filename": "luci-app-client-guardian_0.4.0-r7_all.ipk",
"size": 54536,
"size": 54535,
"category": "network",
"icon": "users",
"description": "Client management and monitoring",
@ -66,7 +66,7 @@
"name": "luci-app-cyberfeed",
"version": "0.1.1-r1",
"filename": "luci-app-cyberfeed_0.1.1-r1_all.ipk",
"size": 12836,
"size": 12840,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -78,7 +78,7 @@
"name": "luci-app-dnsguard",
"version": "1.0.0-r1",
"filename": "luci-app-dnsguard_1.0.0-r1_all.ipk",
"size": 7545,
"size": 7550,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -102,7 +102,7 @@
"name": "luci-app-gitea",
"version": "1.0.0-r2",
"filename": "luci-app-gitea_1.0.0-r2_all.ipk",
"size": 15297,
"size": 15299,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -114,7 +114,7 @@
"name": "luci-app-glances",
"version": "1.0.0-r2",
"filename": "luci-app-glances_1.0.0-r2_all.ipk",
"size": 6965,
"size": 6969,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -126,7 +126,7 @@
"name": "luci-app-haproxy",
"version": "1.0.0-r8",
"filename": "luci-app-haproxy_1.0.0-r8_all.ipk",
"size": 34557,
"size": 34560,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -138,7 +138,7 @@
"name": "luci-app-hexojs",
"version": "1.0.0-r3",
"filename": "luci-app-hexojs_1.0.0-r3_all.ipk",
"size": 30306,
"size": 30307,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -150,7 +150,7 @@
"name": "luci-app-jitsi",
"version": "1.0.0-r1",
"filename": "luci-app-jitsi_1.0.0-r1_all.ipk",
"size": 5132,
"size": 5137,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -162,7 +162,7 @@
"name": "luci-app-ksm-manager",
"version": "0.4.0-r2",
"filename": "luci-app-ksm-manager_0.4.0-r2_all.ipk",
"size": 18720,
"size": 18721,
"category": "system",
"icon": "cpu",
"description": "Kernel memory management",
@ -174,7 +174,7 @@
"name": "luci-app-localai",
"version": "0.1.0-r15",
"filename": "luci-app-localai_0.1.0-r15_all.ipk",
"size": 13180,
"size": 13183,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -186,7 +186,7 @@
"name": "luci-app-lyrion",
"version": "1.0.0-r1",
"filename": "luci-app-lyrion_1.0.0-r1_all.ipk",
"size": 6727,
"size": 6729,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -198,7 +198,7 @@
"name": "luci-app-magicmirror2",
"version": "0.4.0-r6",
"filename": "luci-app-magicmirror2_0.4.0-r6_all.ipk",
"size": 12274,
"size": 12277,
"category": "iot",
"icon": "monitor",
"description": "Smart mirror display",
@ -210,7 +210,19 @@
"name": "luci-app-mailinabox",
"version": "1.0.0-r1",
"filename": "luci-app-mailinabox_1.0.0-r1_all.ipk",
"size": 5485,
"size": 5483,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
"installed": false,
"luci_app": null
}
,
{
"name": "luci-app-master-link",
"version": "1.0.0-r1",
"filename": "luci-app-master-link_1.0.0-r1_all.ipk",
"size": 6247,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -234,7 +246,7 @@
"name": "luci-app-metablogizer",
"version": "1.0.0-r5",
"filename": "luci-app-metablogizer_1.0.0-r5_all.ipk",
"size": 23346,
"size": 23347,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -246,7 +258,7 @@
"name": "luci-app-metabolizer",
"version": "1.0.0-r2",
"filename": "luci-app-metabolizer_1.0.0-r2_all.ipk",
"size": 4755,
"size": 4760,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -258,7 +270,7 @@
"name": "luci-app-mitmproxy",
"version": "0.5.0-r2",
"filename": "luci-app-mitmproxy_0.5.0-r2_all.ipk",
"size": 11151,
"size": 11149,
"category": "security",
"icon": "lock",
"description": "HTTPS proxy and traffic inspection",
@ -294,7 +306,7 @@
"name": "luci-app-ndpid",
"version": "1.1.2-r2",
"filename": "luci-app-ndpid_1.1.2-r2_all.ipk",
"size": 22653,
"size": 22656,
"category": "security",
"icon": "eye",
"description": "Deep packet inspection",
@ -306,7 +318,7 @@
"name": "luci-app-netdata-dashboard",
"version": "0.5.0-r2",
"filename": "luci-app-netdata-dashboard_0.5.0-r2_all.ipk",
"size": 20485,
"size": 20486,
"category": "monitoring",
"icon": "bar-chart-2",
"description": "System monitoring dashboard",
@ -318,7 +330,7 @@
"name": "luci-app-network-modes",
"version": "0.5.0-r3",
"filename": "luci-app-network-modes_0.5.0-r3_all.ipk",
"size": 54146,
"size": 54147,
"category": "network",
"icon": "wifi",
"description": "Network configuration",
@ -330,7 +342,7 @@
"name": "luci-app-network-tweaks",
"version": "1.0.0-r7",
"filename": "luci-app-network-tweaks_1.0.0-r7_all.ipk",
"size": 14960,
"size": 14957,
"category": "network",
"icon": "wifi",
"description": "Network configuration",
@ -342,7 +354,7 @@
"name": "luci-app-nextcloud",
"version": "1.0.0-r1",
"filename": "luci-app-nextcloud_1.0.0-r1_all.ipk",
"size": 6488,
"size": 6486,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -354,7 +366,7 @@
"name": "luci-app-ollama",
"version": "0.1.0-r1",
"filename": "luci-app-ollama_0.1.0-r1_all.ipk",
"size": 12352,
"size": 12353,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -366,7 +378,7 @@
"name": "luci-app-picobrew",
"version": "1.0.0-r1",
"filename": "luci-app-picobrew_1.0.0-r1_all.ipk",
"size": 9458,
"size": 9457,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -390,7 +402,7 @@
"name": "luci-app-secubox-admin",
"version": "1.0.0-r19",
"filename": "luci-app-secubox-admin_1.0.0-r19_all.ipk",
"size": 57247,
"size": 57250,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -402,7 +414,7 @@
"name": "luci-app-secubox-crowdsec",
"version": "1.0.0-r3",
"filename": "luci-app-secubox-crowdsec_1.0.0-r3_all.ipk",
"size": 13915,
"size": 13923,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -414,7 +426,7 @@
"name": "luci-app-secubox-netdiag",
"version": "1.0.0-r1",
"filename": "luci-app-secubox-netdiag_1.0.0-r1_all.ipk",
"size": 15306,
"size": 15307,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -426,7 +438,7 @@
"name": "luci-app-secubox-netifyd",
"version": "1.2.1-r1",
"filename": "luci-app-secubox-netifyd_1.2.1-r1_all.ipk",
"size": 36543,
"size": 36547,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -438,7 +450,7 @@
"name": "luci-app-secubox-p2p",
"version": "0.1.0-r1",
"filename": "luci-app-secubox-p2p_0.1.0-r1_all.ipk",
"size": 39234,
"size": 39237,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -450,7 +462,7 @@
"name": "luci-app-secubox-portal",
"version": "0.7.0-r2",
"filename": "luci-app-secubox-portal_0.7.0-r2_all.ipk",
"size": 24642,
"size": 24646,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -462,7 +474,7 @@
"name": "luci-app-secubox-security-threats",
"version": "1.0.0-r4",
"filename": "luci-app-secubox-security-threats_1.0.0-r4_all.ipk",
"size": 21895,
"size": 21897,
"category": "system",
"icon": "box",
"description": "SecuBox system component",
@ -474,7 +486,7 @@
"name": "luci-app-service-registry",
"version": "1.0.0-r1",
"filename": "luci-app-service-registry_1.0.0-r1_all.ipk",
"size": 39824,
"size": 39827,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -486,7 +498,7 @@
"name": "luci-app-simplex",
"version": "1.0.0-r1",
"filename": "luci-app-simplex_1.0.0-r1_all.ipk",
"size": 7000,
"size": 7001,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -498,7 +510,7 @@
"name": "luci-app-streamlit",
"version": "1.0.0-r11",
"filename": "luci-app-streamlit_1.0.0-r11_all.ipk",
"size": 14749,
"size": 14751,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -510,7 +522,7 @@
"name": "luci-app-system-hub",
"version": "0.5.1-r4",
"filename": "luci-app-system-hub_0.5.1-r4_all.ipk",
"size": 61101,
"size": 61105,
"category": "system",
"icon": "settings",
"description": "System management",
@ -522,7 +534,7 @@
"name": "luci-app-tor-shield",
"version": "1.0.0-r10",
"filename": "luci-app-tor-shield_1.0.0-r10_all.ipk",
"size": 22362,
"size": 22364,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -534,7 +546,7 @@
"name": "luci-app-traffic-shaper",
"version": "0.4.0-r2",
"filename": "luci-app-traffic-shaper_0.4.0-r2_all.ipk",
"size": 14531,
"size": 14533,
"category": "network",
"icon": "filter",
"description": "Traffic shaping and QoS",
@ -546,7 +558,7 @@
"name": "luci-app-vhost-manager",
"version": "0.5.0-r5",
"filename": "luci-app-vhost-manager_0.5.0-r5_all.ipk",
"size": 26186,
"size": 26185,
"category": "network",
"icon": "server",
"description": "Virtual host management",
@ -570,7 +582,7 @@
"name": "luci-app-zigbee2mqtt",
"version": "1.0.0-r2",
"filename": "luci-app-zigbee2mqtt_1.0.0-r2_all.ipk",
"size": 6817,
"size": 6813,
"category": "iot",
"icon": "radio",
"description": "Zigbee device management",
@ -582,7 +594,7 @@
"name": "luci-theme-secubox",
"version": "0.4.7-r1",
"filename": "luci-theme-secubox_0.4.7-r1_all.ipk",
"size": 110241,
"size": 110242,
"category": "theme",
"icon": "palette",
"description": "LuCI theme",
@ -594,7 +606,7 @@
"name": "secubox-app",
"version": "1.0.0-r2",
"filename": "secubox-app_1.0.0-r2_all.ipk",
"size": 11181,
"size": 11182,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
@ -606,7 +618,7 @@
"name": "secubox-app-adguardhome",
"version": "1.0.0-r2",
"filename": "secubox-app-adguardhome_1.0.0-r2_all.ipk",
"size": 2880,
"size": 2883,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -618,7 +630,7 @@
"name": "secubox-app-auth-logger",
"version": "1.2.2-r1",
"filename": "secubox-app-auth-logger_1.2.2-r1_all.ipk",
"size": 9377,
"size": 9379,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -630,7 +642,7 @@
"name": "secubox-app-crowdsec-custom",
"version": "1.1.0-r1",
"filename": "secubox-app-crowdsec-custom_1.1.0-r1_all.ipk",
"size": 5762,
"size": 5763,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -642,7 +654,7 @@
"name": "secubox-app-cs-firewall-bouncer",
"version": "0.0.31-r4_aarch64",
"filename": "secubox-app-cs-firewall-bouncer_0.0.31-r4_aarch64_cortex-a72.ipk",
"size": 5049322,
"size": 5049328,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -654,7 +666,7 @@
"name": "secubox-app-cyberfeed",
"version": "0.2.1-r1",
"filename": "secubox-app-cyberfeed_0.2.1-r1_all.ipk",
"size": 12453,
"size": 12452,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -666,7 +678,7 @@
"name": "secubox-app-domoticz",
"version": "1.0.0-r2",
"filename": "secubox-app-domoticz_1.0.0-r2_all.ipk",
"size": 2547,
"size": 2550,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -678,7 +690,7 @@
"name": "secubox-app-exposure",
"version": "1.0.0-r1",
"filename": "secubox-app-exposure_1.0.0-r1_all.ipk",
"size": 6934,
"size": 6938,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -690,7 +702,7 @@
"name": "secubox-app-gitea",
"version": "1.0.0-r5",
"filename": "secubox-app-gitea_1.0.0-r5_all.ipk",
"size": 9402,
"size": 9409,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -702,7 +714,7 @@
"name": "secubox-app-glances",
"version": "1.0.0-r1",
"filename": "secubox-app-glances_1.0.0-r1_all.ipk",
"size": 5534,
"size": 5542,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -714,7 +726,7 @@
"name": "secubox-app-haproxy",
"version": "1.0.0-r23",
"filename": "secubox-app-haproxy_1.0.0-r23_all.ipk",
"size": 15683,
"size": 15687,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -726,7 +738,7 @@
"name": "secubox-app-hexojs",
"version": "1.0.0-r8",
"filename": "secubox-app-hexojs_1.0.0-r8_all.ipk",
"size": 94933,
"size": 94937,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -738,7 +750,7 @@
"name": "secubox-app-jitsi",
"version": "1.0.0-r1",
"filename": "secubox-app-jitsi_1.0.0-r1_all.ipk",
"size": 8909,
"size": 8916,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -750,7 +762,7 @@
"name": "secubox-app-localai",
"version": "2.25.0-r1",
"filename": "secubox-app-localai_2.25.0-r1_all.ipk",
"size": 5714,
"size": 5718,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -762,7 +774,7 @@
"name": "secubox-app-localai-wb",
"version": "2.25.0-r1",
"filename": "secubox-app-localai-wb_2.25.0-r1_all.ipk",
"size": 7953,
"size": 7954,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -774,7 +786,7 @@
"name": "secubox-app-lyrion",
"version": "2.0.2-r1",
"filename": "secubox-app-lyrion_2.0.2-r1_all.ipk",
"size": 7283,
"size": 7288,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -786,7 +798,7 @@
"name": "secubox-app-magicmirror2",
"version": "0.4.0-r8",
"filename": "secubox-app-magicmirror2_0.4.0-r8_all.ipk",
"size": 9249,
"size": 9254,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -798,7 +810,7 @@
"name": "secubox-app-mailinabox",
"version": "2.0.0-r1",
"filename": "secubox-app-mailinabox_2.0.0-r1_all.ipk",
"size": 7572,
"size": 7573,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -810,7 +822,7 @@
"name": "secubox-app-metabolizer",
"version": "1.0.0-r3",
"filename": "secubox-app-metabolizer_1.0.0-r3_all.ipk",
"size": 13973,
"size": 13979,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -822,7 +834,7 @@
"name": "secubox-app-mitmproxy",
"version": "0.5.0-r19",
"filename": "secubox-app-mitmproxy_0.5.0-r19_all.ipk",
"size": 22955,
"size": 22958,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -834,7 +846,7 @@
"name": "secubox-app-mmpm",
"version": "0.2.0-r5",
"filename": "secubox-app-mmpm_0.2.0-r5_all.ipk",
"size": 3976,
"size": 3982,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -846,7 +858,7 @@
"name": "secubox-app-nextcloud",
"version": "1.0.0-r2",
"filename": "secubox-app-nextcloud_1.0.0-r2_all.ipk",
"size": 2957,
"size": 2961,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -858,7 +870,7 @@
"name": "secubox-app-ollama",
"version": "0.1.0-r1",
"filename": "secubox-app-ollama_0.1.0-r1_all.ipk",
"size": 5734,
"size": 5737,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -870,7 +882,7 @@
"name": "secubox-app-picobrew",
"version": "1.0.0-r7",
"filename": "secubox-app-picobrew_1.0.0-r7_all.ipk",
"size": 5539,
"size": 5538,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -894,7 +906,7 @@
"name": "secubox-app-streamlit",
"version": "1.0.0-r5",
"filename": "secubox-app-streamlit_1.0.0-r5_all.ipk",
"size": 11717,
"size": 11718,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -906,7 +918,7 @@
"name": "secubox-app-tor",
"version": "1.0.0-r1",
"filename": "secubox-app-tor_1.0.0-r1_all.ipk",
"size": 7371,
"size": 7370,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -918,7 +930,7 @@
"name": "secubox-app-webapp",
"version": "1.5.0-r7",
"filename": "secubox-app-webapp_1.5.0-r7_all.ipk",
"size": 39173,
"size": 39174,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -930,7 +942,7 @@
"name": "secubox-app-zigbee2mqtt",
"version": "1.0.0-r3",
"filename": "secubox-app-zigbee2mqtt_1.0.0-r3_all.ipk",
"size": 3541,
"size": 3544,
"category": "secubox",
"icon": "package",
"description": "SecuBox backend service",
@ -949,12 +961,24 @@
"installed": false,
"luci_app": null
}
,
{
"name": "secubox-master-link",
"version": "1.0.0-r1",
"filename": "secubox-master-link_1.0.0-r1_all.ipk",
"size": 12455,
"category": "utility",
"icon": "package",
"description": "SecuBox package",
"installed": false,
"luci_app": null
}
,
{
"name": "secubox-p2p",
"version": "0.6.0-r3",
"filename": "secubox-p2p_0.6.0-r3_all.ipk",
"size": 42014,
"size": 42015,
"category": "utility",
"icon": "package",
"description": "SecuBox package",

View File

@ -12,9 +12,9 @@ start_service() {
local enabled=$(uci -q get master-link.main.enabled)
[ "$enabled" != "1" ] && return 0
# Initialize master-link directories
. /usr/lib/secubox/master-link.sh
ml_init 2>/dev/null
# Initialize master-link directories (suppress sourced library output)
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
ml_init >/dev/null 2>&1
# Add cron job for token cleanup every 5 minutes
local cron_line="*/5 * * * * /usr/lib/secubox/master-link.sh token-cleanup >/dev/null 2>&1"

View File

@ -17,8 +17,8 @@ MESH_PORT="${MESH_PORT:-7331}"
ml_init() {
mkdir -p "$ML_DIR" "$ML_TOKENS_DIR" "$ML_REQUESTS_DIR"
factory_init_keys 2>/dev/null
mesh_init 2>/dev/null
factory_init_keys >/dev/null 2>&1
mesh_init >/dev/null 2>&1
}
# ============================================================================
@ -61,7 +61,7 @@ ml_token_generate() {
local fp=$(factory_fingerprint 2>/dev/null)
chain_add_block "token_generated" \
"{\"token_hash\":\"$token_hash\",\"expires\":$expires,\"created_by\":\"$fp\"}" \
"$(echo "token_generated:${token_hash}:${now}" | sha256sum | cut -d' ' -f1)" 2>/dev/null
"$(echo "token_generated:${token_hash}:${now}" | sha256sum | cut -d' ' -f1)" >/dev/null 2>&1
# Build join URL
local my_addr=$(uci -q get network.lan.ipaddr)
@ -232,7 +232,7 @@ ml_join_request() {
# Add join_request block to chain
chain_add_block "join_request" \
"{\"fp\":\"$peer_fp\",\"addr\":\"$peer_addr\",\"hostname\":\"$peer_hostname\",\"token_hash\":\"$token_hash\"}" \
"$(echo "join_request:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" 2>/dev/null
"$(echo "join_request:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" >/dev/null 2>&1
logger -t master-link "Join request from $peer_hostname ($peer_fp) at $peer_addr"
@ -271,10 +271,10 @@ ml_join_approve() {
local peer_depth=$((my_depth + 1))
# Trust peer via factory TOFU
factory_trust_peer "$peer_fp" "$peer_addr" 2>/dev/null
factory_trust_peer "$peer_fp" "$peer_addr" >/dev/null 2>&1
# Add peer to mesh
peer_add "$peer_addr" "$MESH_PORT" "$peer_fp" 2>/dev/null
peer_add "$peer_addr" "$MESH_PORT" "$peer_fp" >/dev/null 2>&1
# Update request status
cat > "$request_file" <<-EOF
@ -306,10 +306,10 @@ ml_join_approve() {
# Add peer_approved block to chain
chain_add_block "peer_approved" \
"{\"fp\":\"$peer_fp\",\"addr\":\"$peer_addr\",\"depth\":$peer_depth,\"approved_by\":\"$my_fp\"}" \
"$(echo "peer_approved:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" 2>/dev/null
"$(echo "peer_approved:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" >/dev/null 2>&1
# Sync chain with new peer
gossip_sync 2>/dev/null &
gossip_sync >/dev/null 2>&1 &
logger -t master-link "Peer approved: $peer_hostname ($peer_fp) at depth $peer_depth"
@ -364,7 +364,7 @@ ml_join_reject() {
# Add peer_rejected block to chain
chain_add_block "peer_rejected" \
"{\"fp\":\"$peer_fp\",\"reason\":\"$reason\",\"rejected_by\":\"$my_fp\"}" \
"$(echo "peer_rejected:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" 2>/dev/null
"$(echo "peer_rejected:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" >/dev/null 2>&1
logger -t master-link "Peer rejected: $peer_fp - $reason"
@ -510,7 +510,7 @@ ml_promote_to_submaster() {
# Add peer_promoted block to chain
chain_add_block "peer_promoted" \
"{\"fp\":\"$peer_fp\",\"new_role\":\"sub-master\",\"new_depth\":$new_depth}" \
"$(echo "peer_promoted:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" 2>/dev/null
"$(echo "peer_promoted:${peer_fp}:${now}" | sha256sum | cut -d' ' -f1)" >/dev/null 2>&1
# Notify the peer to update its role (via mesh API)
curl -s --connect-timeout 5 -X POST \

View File

@ -20,7 +20,7 @@ if [ "$REQUEST_METHOD" != "POST" ]; then
fi
# Load library
. /usr/lib/secubox/master-link.sh 2>/dev/null
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
# Auth check - local only
if ! ml_check_local_auth; then

View File

@ -21,7 +21,7 @@ if [ "$REQUEST_METHOD" = "GET" ]; then
echo ""
# Load library
. /usr/lib/secubox/master-link.sh 2>/dev/null
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
# Parse token from query string
token=""
@ -47,7 +47,7 @@ if [ "$REQUEST_METHOD" != "POST" ]; then
fi
# Load library
. /usr/lib/secubox/master-link.sh 2>/dev/null
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
# Read POST body
read -r input

View File

@ -20,7 +20,7 @@ if [ "$REQUEST_METHOD" != "POST" ]; then
fi
# Load library
. /usr/lib/secubox/master-link.sh 2>/dev/null
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
# Read POST body
read -r input

View File

@ -15,7 +15,7 @@ if [ "$REQUEST_METHOD" = "OPTIONS" ]; then
fi
# Load library
. /usr/lib/secubox/master-link.sh 2>/dev/null
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
# Handle POST for role promotion notifications from upstream
if [ "$REQUEST_METHOD" = "POST" ]; then

View File

@ -15,7 +15,7 @@ if [ "$REQUEST_METHOD" = "OPTIONS" ]; then
fi
# Load library
. /usr/lib/secubox/master-link.sh 2>/dev/null
. /usr/lib/secubox/master-link.sh >/dev/null 2>&1
# Auth check - local only
if ! ml_check_local_auth; then