Skip to content

Home EN

loopy-iri edited this page Jun 25, 2026 · 1 revision

🇬🇧 English · 🇮🇷 فارسی

Node-selling system guide (NodeAgent + NodePanel)

This wiki explains how the system works, what each role does, and the step-by-step install/connect/use flow.

What is this?

A node-reselling system based on a fork of PasarGuard/node:

  • NodeAgent (repo): a multi-tenant node. One shared Xray serves many customers (tenants) with their own users; quota/expiry are enforced locally.
  • NodePanel (repo): the central control panel that manages many nodes, customers, plans and subscriptions and exposes usage to a sales bot.

Architecture at a glance

┌──────────┐   Bearer API     ┌───────────┐  master key (HTTPS :8090)  ┌──────────────┐
│ sales bot │ ───────────────▶ │ NodePanel  │ ─────────────────────────▶ │   NodeAgent   │
│ (wallet)  │ ◀─ webhook(HMAC) │ (fleet mgmt)│                            │ (shared Xray) │
└──────────┘                   └───────────┘                            └──────┬───────┘
                                customer's PasarGuard ── gRPC (:62050) ─────────┘
                                (creates end users)
  • The panel has no money logic. Wallet/pricing/payment live in the external sales bot; the panel only manages bytes/time/status and reports usage/overage.
  • Tenants are separated by their users; credential uniqueness is enforced node-wide.
  • Quota/expiry → that customer's users are removed from the core and its key is rejected (suspend ≠ delete; renewal restores data).

Roles

Role Who What they do
Operator You (service owner) Installs and manages the panel and nodes, creates plans, hands out subscriptions.
Customer Node buyer Connects to the node with their own PasarGuard panel and the customer key, creates end users.
End user The customer's customer Gets a subscription link (vless/...) from the customer.
Sales bot External service Uses the panel API to create subscriptions and webhooks for usage/overage.

Where to start

Clone this wiki locally