core: env-driven config, sqlite schema, xray/node management, subscription links

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Savsis? 2026-09-10 17:45:36 +05:00
commit e4c2012cf8
8 changed files with 1182 additions and 0 deletions

31
.env.example Normal file
View file

@ -0,0 +1,31 @@
# Copy this to .env and fill in real values. Never commit .env.
# From @BotFather
BOT_TOKEN=123456789:AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
BOT_USERNAME=YourBot_robot
# Telegram user IDs allowed into the bot's admin menu and the web panel, comma-separated
ADMIN_IDS=111111111,222222222
# Web panel login password (change it any time with: mbs pass)
ADMIN_PANEL_PASSWORD=change-me
# Domains — point all three A records at this server's IP (see README)
PANEL_DOMAIN=panel.example.com
SUB_DOMAIN=sub.example.com
SITE_DOMAIN=example.com
# Reality identity for the local node (this same box). Generate with:
# /usr/local/bin/xray x25519
# XRAY_PUBLIC_KEY is the "Password (PublicKey)" line; keep the matching
# private key only inside /usr/local/etc/xray/config.json (never here).
XRAY_PUBLIC_KEY=
REALITY_SNI=www.wildberries.ru
# Any 16-hex-char string per transport, e.g.: openssl rand -hex 8
XRAY_SHORT_ID_TCP=
XRAY_SHORT_ID_GRPC=
XRAY_SHORT_ID_XHTTP=
# Public hostname clients connect to for the local node (A record -> this server)
DE1_ADDRESS=de1.example.com