docs(readme): refresh all seven READMEs for the current feature set

The READMEs had not moved since 2026-07-07, 341 commits ago, and had
drifted far enough to misdescribe the panel: AmneziaWG and MTProto
inbounds were missing from the protocol list entirely, the outbound
list predated PIA, and the API section still advertised Swagger rather
than scoped, optionally expiring tokens.

Add the two missing protocols plus a bullet each for what makes them
notable — AmneziaWG runs on the embedded userspace netstack, so unlike
the DKMS/awg-quick shape it originally shipped with there is nothing to
install, and MTProto client edits hot-apply through the mtg-multi
management API instead of bouncing the process. Fold the smaller
additions into the bullets they belong to (HWID device limits, IP-limit
exemptions, renewal cycles, inbound cloning, balancer-to-balancer
fallback, geosite/geoip browsing, named subscription formats) and add
one for PWA installability.

Point documentation at docs.sanaei.dev, which the panel sidebar already
links to and which supersedes the wiki, using each README's own locale
where the docs site has one (fa/ru/zh). Bump the pinned install example
to the current stable tag, note the .sha256 verification install.sh and
update.sh now perform, and document XUI_NODE_TOKEN_KEY_FILE /
XUI_NODE_TOKEN_KEY, which no markdown in the repo covered.

All seven files move together so the language picker keeps pointing at
equivalent documents.
This commit is contained in:
Sanaei
2026-09-04 09:49:25 +02:00
parent 2e81865a02
commit 3ef06b7000
11 changed files with 261 additions and 67 deletions
+31 -1
View File
@@ -1,6 +1,6 @@
---
title: متغیرهای محیطی
description: مرجع کامل متغیرهای محیطی ‎`XUI_*`‎ در 3x-ui — پایگاه‌داده، پنل، لاگ‌گیری، حافظه و پایشگر سلامت تونل.
description: مرجع کامل متغیرهای محیطی ‎`XUI_*`‎ در 3x-ui — پایگاه‌داده، پنل، لاگ‌گیری، حافظه، رمزگذاری توکن نود و پایشگر سلامت تونل.
icon: Variable
---
@@ -33,6 +33,36 @@ icon: Variable
| `XUI_ENABLE_FAIL2BAN` | `true` | فعال‌سازی اعمالِ محدودیت IP مبتنی بر Fail2ban. |
| `XUI_SKIP_HSTS` | `false` | رد کردن هدر HSTS — وقتی TLS توسط یک پروکسی معکوس خاتمه می‌یابد، `true` تنظیم کنید. |
## رمزگذاری توکن نود
توکن‌های حامل (bearer) API نود — و توکن ذخیره‌شده‌ی PIA — به‌صورت پیش‌فرض به شکل
متن ساده نگهداری می‌شوند. رمزگذاری در حالت سکون اختیاری است و به‌صورت ایمن شکست
می‌خورد: با هر حالتی به‌جز `off`، اگر پنل نتواند کلیدی را بارگذاری کند، اجرا نمی‌شود.
| Variable | Default | Description |
| ------------------------- | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `NODE_TOKEN_ENCRYPTION` | `off` | ‏`off`، `migration` (خواندن هم متن ساده و هم متن رمزشده را می‌پذیرد، نوشتن همیشه رمز می‌کند) یا `required` (نوشتن یکسان، اما بدون کلید اجرا شکست می‌خورد). به نبودِ پیشوند `XUI_` توجه کنید. |
| `XUI_NODE_TOKEN_KEY_FILE` | `/etc/x-ui/node_token_key.json` | حلقه‌کلید JSON با دسترسی `0600` یا محدودتر. نخست همین بارگذاری می‌شود. |
| `XUI_NODE_TOKEN_KEY` | — | یک کلید ۳۲ بایتی base64 که فقط هنگام شکست بارگذاری فایل کلید خوانده می‌شود. شناسه‌ی کلید آن ثابت و برابر `env` است، پس امکان چرخش ندارد. |
فایل کلید، کلید فعال به‌همراه هر کلید قدیمی‌ای را که هنوز برای رمزگشایی لازم است نام می‌برد:
```json
{ "active": "k1", "keys": { "k1": "<base64 32-byte key>" } }
```
کلید را با `openssl rand -base64 32` بسازید؛ کلیدها هرگز به‌عنوان آرگومان خط فرمان
پذیرفته نمی‌شوند. پس از فعال‌کردن یک حالت، ردیف‌هایی را که از پیش در پایگاه‌داده
هستند با کلید فعال دوباره رمز کنید:
```bash
x-ui encrypt-tokens
```
این دستور ردیف‌های نود را پوشش می‌دهد؛ توکن PIA در نوبت بعدیِ خواندن دوباره رمز
می‌شود. برای چرخش کلید، کلید جدید را به `keys` اضافه کنید، `active` را به آن اشاره
دهید، کلید قدیمی را برای رمزگشایی نگه دارید و دوباره `x-ui encrypt-tokens` را اجرا کنید.
## لاگ‌گیری و باینری‌ها
| Variable | Default | Description |