Skip to content
Nexora-VPNPublic

About

Nexora notifier: tells a panel's users about their accounts — expiry, traffic, renewals and the admin's own messages — over Telegram, Bale, SMS, email and any HTTP API. An official open Nexora addon.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Nexora Notif

An official, open Nexora addon that tells a panel's users about their accounts: the expiry date drawing near and the traffic running out, renewals and other changes, and messages of the admin's own to one user or a group — over Telegram, Bale, SMS, email or any HTTP API. Each notice is written once and goes through the first of the user's channels that reaches them, in the order the admin sets, so a paid SMS is sent only when the free channels could not deliver.

The documentation: English · فارسی · Русский · 中文.

A user links a bot by sending it their subscription link (or the link code the admin hands out); the chat id is written into the account's contact card on the panel — telegram_id, bale_id, soroush_id or rubika_id — where every addon reads it, and /stop takes it away — a chat Notif linked, that is; one another addon wrote stays on the card, and Notif's bot stops writing to it. Give Notif bots of its own: a bot's updates can be read by one program only.

Notif is separate software, as every Nexora addon is: its own container or service and its own database, talking to the panel over the network only, with a scoped token and the panel's signed events. It keeps no copy of the panel's data beyond what it needs to send.

Install

From the panel: Services → Addons → Browse → Nexora Notif → Install. The panel asks the manifest's questions (port, database, the first admin) and installs Notif on its own host or another one over SSH, or prints the command to run by hand:

sh install.sh --method docker --opt port=8097 --opt admin_password=… \
  --panel-url https://panel.example --claim-code …

Everything is served under the install's admin path (base_path, drawn at random when none is given); public_url and https (panel, the default in the panel's form: a certificate from the panel, renewed by it, on any port — by hand with no https answer it is off; acme, on port 443, or acme-http, on any port with the CA asking on port 80; self-signed for an address by IP, which the panel trusts once you approve its fingerprint; or off, plain HTTP for a proxy of yours) give it its own HTTPS — on the install's port alone, which the public address names (443 when it names none). The admin password takes 10 characters to 72 bytes. The Set-up page lists what is left of Notif's own work.

--method script installs the binary under systemd instead of Docker, as its own user with only its data directory writable, after checking the archive against the release's SHA256SUMS (and, installed by the panel over SSH, install.sh and the archive against that file as signed in SHA256SUMS.sig). Run the same command again to update; --uninstall [--purge] removes it.

Back up

On SQLite, a copy of the database is kept daily in <data>/backups (seven kept); notif backup -o file takes one by hand, and notif restore -i file puts one back with Notif stopped. On PostgreSQL, use pg_dump.

Develop

cp .env.example .env
(cd frontend && npm ci && npm run build)
NEXORA_OPT_ADMIN_PASSWORD=change-me-please go run .
# admin web on http://localhost:8097

A panel registers only a manifest signed by a key it trusts. For a local try, sign with the development key and run a panel built with -tags addondev:

scripts/sign.sh -dev
NEXORA_MANIFEST_FILE=signed.json go run .

Tests run on SQLite, and on PostgreSQL with NEXORA_TEST_POSTGRES_DSN.

Built on addon-kit. Licensed under the GNU Affero General Public License v3.0: a changed Notif offered to others over a network must offer them its source.

About

Nexora notifier: tells a panel's users about their accounts — expiry, traffic, renewals and the admin's own messages — over Telegram, Bale, SMS, email and any HTTP API. An official open Nexora addon.

Resources

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages