feat(xray): add connIdle and bufferSize policy controls

Expose level-0 connection policies in the panel's Basics tab: idle timeout (connIdle) and per-connection buffer size (bufferSize). Empty fields delete the key so Xray falls back to its own defaults. Adds en-US/fa-IR strings and types policy.levels in the Zod schema.
This commit is contained in:
MHSanaei
2026-06-03 21:52:37 +02:00
parent 1a64d7e9de
commit ceef413dc4
4 changed files with 78 additions and 1 deletions
+8
View File
@@ -1201,6 +1201,14 @@
"statsOutboundUplinkDesc": "Enables the statistics collection for upstream traffic of all outbound proxies.",
"statsOutboundDownlink": "Outbound Download Statistics",
"statsOutboundDownlinkDesc": "Enables the statistics collection for downstream traffic of all outbound proxies.",
"connectionLimits": "Connection Limits",
"connectionLimitsDesc": "Connection-level policies for user level 0. Leave a field empty to use Xray's default.",
"connIdle": "Idle Timeout",
"connIdleDesc": "Closes a connection after it stays idle for this many seconds. Lowering it frees memory and file descriptors faster on busy servers (Xray default: 300).",
"bufferSize": "Buffer Size",
"bufferSizeDesc": "Per-connection internal buffer size in KB. Set to 0 to minimize memory usage on low-RAM servers (Xray default depends on the platform).",
"bufferSizePlaceholder": "auto",
"seconds": "seconds",
"rules": {
"first": "First",
"last": "Last",
+8
View File
@@ -1201,6 +1201,14 @@
"statsOutboundUplinkDesc": "جمع‌آوری آمار برای ترافیک بالارو (آپلود) تمام پروکسی‌های خروجی را فعال می‌کند.",
"statsOutboundDownlink": "آمار دانلود خروجی",
"statsOutboundDownlinkDesc": "جمع‌آوری آمار برای ترافیک پایین‌رو (دانلود) تمام پروکسی‌های خروجی را فعال می‌کند.",
"connectionLimits": "محدودیت اتصال",
"connectionLimitsDesc": "سیاست‌های سطح اتصال برای کاربرانِ سطح ۰. هر فیلد را خالی بگذارید تا مقدار پیش‌فرض Xray استفاده شود.",
"connIdle": "مهلت بی‌کاری",
"connIdleDesc": "اتصال را پس از این تعداد ثانیه بی‌کار ماندن می‌بندد. کم‌کردن آن، روی سرورهای شلوغ حافظه و file descriptor را زودتر آزاد می‌کند (پیش‌فرض Xray: ۳۰۰).",
"bufferSize": "اندازهٔ بافر",
"bufferSizeDesc": "اندازهٔ بافر داخلی هر اتصال بر حسب کیلوبایت. برای کم‌کردن مصرف حافظه روی سرورهای کم‌رم روی ۰ بگذارید (پیش‌فرض Xray به پلتفرم بستگی دارد).",
"bufferSizePlaceholder": "خودکار",
"seconds": "ثانیه",
"rules": {
"first": "اولین",
"last": "آخرین",