68 lines
2.4 KiB
Markdown
68 lines
2.4 KiB
Markdown
# Super N2N
|
|
|
|
Super N2N is a Tauri 2 desktop control plane. Its pinned n2n dependency is
|
|
stored as the `third_party/n2n` Git submodule.
|
|
|
|
## Reproducible Windows build
|
|
|
|
Clone the project together with its fixed n2n source revision:
|
|
|
|
git clone --recurse-submodules https://git.code.cq.cn/chun_qiu/supern2n.git
|
|
cd supern2n
|
|
|
|
The only supported portable-package build entry point is:
|
|
|
|
npm run build:portable
|
|
|
|
Or call the same script directly when a clean output is required:
|
|
|
|
powershell -NoProfile -ExecutionPolicy Bypass -File scripts/build.ps1 -Clean
|
|
|
|
The script initializes submodules, compiles n2n, installs frontend dependencies
|
|
with `npm ci`, runs Rust tests, creates the Tauri portable package, and writes a
|
|
SHA-256 checksum beside it. Outputs are placed in `release/`.
|
|
|
|
The Windows build host needs Node.js, Rust with the MSVC toolchain, Git for
|
|
Windows (Bash), and MinGW-w64 tools providing `gcc`, `windres`, and
|
|
`mingw32-make`.
|
|
|
|
## Frontend development
|
|
|
|
Install dependencies:
|
|
|
|
npm install
|
|
|
|
Start the Vite preview:
|
|
|
|
npm run dev
|
|
|
|
The current preview URL is http://127.0.0.1:1420/.
|
|
|
|
## Native desktop development
|
|
|
|
Install dependencies, then start the Tauri development window:
|
|
|
|
npm install
|
|
npm run tauri dev
|
|
|
|
The portable build creates `release/super-n2n-portable.zip`. It contains
|
|
`n2n/edge.exe` and `n2n/supernode.exe`; on Windows Super N2N starts them with
|
|
the relative paths `./n2n/edge.exe` and `./n2n/supernode.exe`.
|
|
|
|
## Gitea Actions
|
|
|
|
`.gitea/workflows/build-windows.yml` runs on every push and uploads the portable
|
|
zip plus its checksum as workflow artifacts. Configure a dedicated Gitea runner
|
|
with the `windows-host` label and the Windows build prerequisites above.
|
|
|
|
The native command layer can start and stop edge/supernode processes, query the n2n UDP management API, run ping and TCPing checks, and inspect the local firewall state. Browser preview does not fabricate native process, management, or network-check results.
|
|
|
|
## Included UI
|
|
|
|
- Overview of managed services, management API client records, P2P/relay counts, and management request latency
|
|
- Visual Edge and Supernode option editors mapped to n2n command flags
|
|
- Auto-IP/DHCP client table populated from the n2n management API
|
|
- Topology view populated from the currently configured services and returned client records
|
|
- Ping, TCPing, and local firewall checks
|
|
- Process, management API, and tool event log
|