Skip to content

开发指南

状态:Current

最后核对:2026-05-13

依赖

  • nexus-agent 需要 Rust 1.88 或更新。
  • nexus-frontend 需要 Node.js 20 或更新。
  • Docker 和 Docker Compose。
  • PostgreSQL client tools 便于调试。

仓库布局

text
NexusNet/
  nexus-backend/
  nexus-agent/
  nexus-frontend/
  nexus-docs/

Backend

bash
cd /home/coder/NexusNet/nexus-backend
docker compose up --build

compose 启动 nexus-backendpostgrespostgres-timescaleredis 和可选 cloudflared

当前端口:

  • PostgreSQL: localhost:5432
  • TimescaleDB: localhost:5433
  • Redis: localhost:6379
  • Agent control:来自 NEXUS_REALITY_LISTEN_ADDR 的 REALITY listener

后端进程配置了 REST_LISTEN_ADDR=0.0.0.0:8081,但当前 compose 没有发布 8081

Agent

bash
cd /home/coder/NexusNet/nexus-agent
docker compose up --build

本地检查:

bash
cargo check -p nexus-agent
cargo test -p nexus-agent quic::tests --lib
cargo test -p quinn-reality

QUIC REALITY iperf smoke tests 默认 ignored,需要性能验证时显式运行。

Frontend

bash
cd /home/coder/NexusNet/nexus-frontend
npm install
npm run dev

当前控制台关键路由包括 /dashboard/nodes/gateway/l3-networks/gateway/l4-chains/gateway/l4-upstreams/gateway/credentials/audit/settings/settings/users

Docs

bash
cd /home/coder/NexusNet/nexus-docs
npm install
npm run dev
npm run build

.vitepress/config.mts 管理站点导航和语言选择器。

NexusNet documentation