secubox-deb/daemon
CyberMind-FR 2f85e01095 Add mDNS peer discovery, mock topology visualization, and navbar to C3BOX
mDNS Discovery:
- Implement zeroconf mDNS service registration (_secubox._udp)
- Implement peer discovery via mDNS browsing
- TXT records contain DID, role, version
- Auto-discovery of other SecuBox nodes on LAN

Topology Visualization:
- Add 7 mock nodes for demo (2 relays, 4 edges, 1 air-gapped)
- Generate edges connecting edge nodes to relays
- Force-directed layout with role-based positioning
- Node coordinates calculated based on role

C3BOX Dashboard:
- Add shared sidebar navigation (consistent with other modules)
- Responsive layout with main-content wrapper
- Air-gapped node role styling

Control Server:
- Enhanced topology endpoint with node IPs and calculated positions
- Edge generation logic for relay-link and edge-link types

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-03-25 08:35:09 +01:00
..
c3box Add mDNS peer discovery, mock topology visualization, and navbar to C3BOX 2026-03-25 08:35:09 +01:00
cmd Add mDNS peer discovery, mock topology visualization, and navbar to C3BOX 2026-03-25 08:35:09 +01:00
internal Add mDNS peer discovery, mock topology visualization, and navbar to C3BOX 2026-03-25 08:35:09 +01:00
pkg Implement Go daemon telemetry functions 2026-03-25 08:02:28 +01:00
systemd Fix systemd services for VM deployment 2026-03-25 08:09:20 +01:00
testdata Fix systemd services for VM deployment 2026-03-25 08:09:20 +01:00
go.mod Add mDNS peer discovery, mock topology visualization, and navbar to C3BOX 2026-03-25 08:35:09 +01:00
go.sum Add mDNS peer discovery, mock topology visualization, and navbar to C3BOX 2026-03-25 08:35:09 +01:00
Makefile Reorganize Go daemon and fix module compliance 2026-03-25 07:51:17 +01:00
README.md Reorganize Go daemon and fix module compliance 2026-03-25 07:51:17 +01:00

SecuBox Mesh Daemon

Go-based mesh networking daemon for SecuBox with Zero-Knowledge Proof authentication.

Components

  • secuboxd — Mesh daemon with mDNS discovery, WireGuard topology, and ZKP (GK-HAM-2025)
  • secuboxctl — CLI tool for managing mesh network
  • c3box — Situational awareness dashboard backend

Architecture

┌─────────────────────────────────────────────────────────────┐
│                    SecuBox Mesh Network                     │
├─────────────────────────────────────────────────────────────┤
│  ┌──────────────┐    ┌──────────────┐    ┌──────────────┐  │
│  │    Node A    │────│    Node B    │────│    Node C    │  │
│  │   (edge)     │    │   (relay)    │    │ (air-gapped) │  │
│  └──────────────┘    └──────────────┘    └──────────────┘  │
│         │                   │                   │          │
│         └─────────────WireGuard─────────────────┘          │
│                            │                               │
│                      Mesh Gate                             │
│                   (elected relay)                          │
└─────────────────────────────────────────────────────────────┘

Modules

internal/identity

  • DID (Decentralized Identifier) generation and management
  • Ed25519 keypair management
  • ZKP Hamiltonian proof generation and rotation (24h PFS)

internal/discovery

  • mDNS service advertisement and peer discovery
  • WireGuard beacon heartbeats
  • Peer lifecycle management

internal/topology

  • Mesh network graph management
  • Mesh gate election (relay > edge > air-gapped)
  • Route convergence via netlink

internal/telemetry

  • System metrics collection (CPU, memory, disk)
  • Security metrics (nftables rules, CrowdSec bans)
  • SQLite persistence with 24h retention

pkg/hamiltonian

  • GK-HAM-2025 Zero-Knowledge Proof implementation
  • Hamiltonian cycle based authentication
  • Proof generation and verification

pkg/config

  • YAML configuration loading
  • Node, mesh, telemetry, and ZKP settings

Build

# Build all binaries
make build

# Cross-compile for ARM64
make build-arm64

# Run tests
make test

# Install to system
sudo make install

Configuration

# /etc/secubox/secuboxd.yaml
node:
  role: edge              # edge | relay | air-gapped
  did: ""                 # auto-generated if empty
  keypair: /etc/secubox/node.key

mesh:
  transport: wireguard
  subnet: 10.42.0.0/16
  mdns_service: _secubox._udp
  beacon_interval: 30     # seconds
  peer_timeout: 120       # seconds

telemetry:
  interval: 60            # seconds
  db: /var/lib/secuboxd/telemetry.db

zkp:
  enabled: true
  rotation_hours: 24
  hamiltonian_graph: /etc/secubox/hamgraph.json

Usage

# Start daemon
secuboxd --config /etc/secubox/secuboxd.yaml

# CLI commands
secuboxctl mesh status    # Show mesh status
secuboxctl mesh peers     # List mesh peers
secuboxctl node info      # Show node info
secuboxctl node rotate    # Rotate ZKP keys

C3BOX Dashboard

The C3BOX backend serves the situational awareness dashboard:

# Start C3BOX
c3box --listen :8080 --static /usr/share/c3box/www

Access: http://localhost:8080

Author

Gerald KERMA devel@cybermind.fr https://cybermind.fr | https://secubox.in