Skip to content

Overview

MoeNet DN42 is an automated BGP peering platform on the DN42 network. It consists of two main components:

System Components

ComponentRepositoryTechnologyRole
MoeNet Coremoenet-coreBun, TypeScript, Hono, grammYControl Plane — API, Telegram Bot, policy storage
MoeNet Agentmoenet-agentGo 1.26, BIRD 3.xNode agent — WireGuard/BIRD config, metrics, mesh

How It Works

Architecture Philosophy

Infrastructure initializes, Control Plane stores intent, Agent executes reality.

LayerResponsibility
Intent (Core)API, Bot, policy storage, config distribution
Execution (Agent)Template rendering, WireGuard/BIRD management, metrics reporting
InfrastructureSystem setup (BIRD/WG install, sysctl, firewall) — emergency recovery only

Technology Stack

Control Plane (moenet-core)

TechnologyVersionPurpose
BunLatestRuntime and package manager
TypeScript5.9.3Type-safe JavaScript
Hono4.6.0Web framework
grammY1.21.0Telegram Bot framework
Sequelize6.37.0PostgreSQL ORM
Zod4.3.6Schema validation
PostgreSQL16Persistent storage
Redisioredis 5.4.xSession/cache storage

Agent (moenet-agent)

TechnologyVersionPurpose
Go1.26.4Runtime
BIRD3.xBGP routing daemon
WireGuardKernelVPN tunnel

Key Features

  • Automated BGP Session Management — Full lifecycle from creation to teardown
  • Multi-auth — GPG, SSH, or Email verification against DN42 registry
  • P2P Mesh IGP — WireGuard underlay with Babel for internal routing
  • Cold Potato Routing — Keep traffic inside backbone via Large Communities
  • Node Bootstrap — One-command agent deployment
  • Bilingual — English and Chinese interface
  • Real-time Metrics — RTT, route statistics, traffic monitoring

Deep Dive into Code

For detailed code-level documentation (module structure, call chains, internal implementation), see the auto-generated docs on DeepWiki:

MoeNet DN42 Network — AS4242420998