mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-13 00:25:04 +03:00
fix(xray): show the Google Drive defaults in the XDRIVE tuning fields
xray-core 26.11.9 (#7340, #7352) gives the Google Drive backend its own defaults for the knobs a config leaves empty: flushIntervalMs 10, maxPollIntervalMs 200 and concurrency 64. The other services keep 20, 500 and 8. The tuning placeholders stand for "what the core uses when this is empty", so they now follow the selected service, and the transports page in all four doc languages names the Google Drive values.
This commit is contained in:
@@ -137,7 +137,7 @@ enabled. The panel offers XDRIVE only for VLESS, refuses to save an inbound with
|
||||
| `secrets` | — | Google Drive: ClientID, ClientSecret, RefreshToken — exactly three, in that order. Template: values read as `{secret0}`, `{secret1}`, …. S3: AccessKeyID, SecretAccessKey and an optional SessionToken. |
|
||||
| `template` | — | Template service only: the storage API's `auth`, `put`, `get`, `list` and `delete` operations. |
|
||||
| `s3` | — | S3 service only: `endpoint` (an http(s) URL), `region`, `bucket` and `pathStyle` (default `true`; `false` puts the bucket in the host name). `remoteFolder` is the object prefix. |
|
||||
| tuning | core defaults | `segmentBytes` (512 KiB), `flushIntervalMs` (20), `pollIntervalMs`/`maxPollIntervalMs` (50/500), `eagerWindowMs` (2000), `holeTimeoutMs` (30000), `sessionTtlSeconds` (300), `concurrency` (8). |
|
||||
| tuning | core defaults | `segmentBytes` (512 KiB), `flushIntervalMs` (20), `pollIntervalMs`/`maxPollIntervalMs` (50/500), `eagerWindowMs` (2000), `holeTimeoutMs` (30000), `sessionTtlSeconds` (300), `concurrency` (8). Google Drive defaults to `flushIntervalMs` 10, `maxPollIntervalMs` 200 and `concurrency` 64 (xray-core 26.11.9). |
|
||||
|
||||
The optional **Front address/port** (the stream-level `address`/`port`) is a domain
|
||||
front the storage API is dialed through; TLS still names the API host. XDRIVE has
|
||||
|
||||
@@ -138,7 +138,7 @@ inbound به مقدار `decryption` نیاز دارد و outbound به `encrypt
|
||||
| `secrets` | — | Google Drive: دقیقاً سه مقدار ClientID، ClientSecret و RefreshToken به همین ترتیب. Template: مقادیری که با `{secret0}`، `{secret1}`، … خوانده میشوند. S3: AccessKeyID، SecretAccessKey و در صورت نیاز SessionToken. |
|
||||
| `template` | — | فقط برای سرویس template: عملیات `auth`، `put`، `get`، `list` و `delete` در API ذخیرهساز. |
|
||||
| `s3` | — | فقط برای سرویس s3: `endpoint` (یک URL از نوع http(s))، `region`، `bucket` و `pathStyle` (پیشفرض `true`؛ با `false` نام باکت در نام میزبان میآید). `remoteFolder` پیشوند اشیاء است. |
|
||||
| تنظیمات دقیق | پیشفرض هسته | `segmentBytes` (512 KiB)، `flushIntervalMs` (20)، `pollIntervalMs`/`maxPollIntervalMs` (50/500)، `eagerWindowMs` (2000)، `holeTimeoutMs` (30000)، `sessionTtlSeconds` (300)، `concurrency` (8). |
|
||||
| تنظیمات دقیق | پیشفرض هسته | `segmentBytes` (512 KiB)، `flushIntervalMs` (20)، `pollIntervalMs`/`maxPollIntervalMs` (50/500)، `eagerWindowMs` (2000)، `holeTimeoutMs` (30000)، `sessionTtlSeconds` (300)، `concurrency` (8). پیشفرض Google Drive: `flushIntervalMs` برابر 10، `maxPollIntervalMs` برابر 200 و `concurrency` برابر 64 (xray-core 26.11.9). |
|
||||
|
||||
**آدرس/پورت Front** اختیاری (کلیدهای `address`/`port` در سطح stream) یک domain front
|
||||
است که API ذخیرهساز از طریق آن وصل میشود؛ نام TLS همچنان میزبان API است. XDRIVE لایهٔ
|
||||
|
||||
@@ -140,7 +140,7 @@ Mux. Панель предлагает XDRIVE только для VLESS, не с
|
||||
| `secrets` | — | Google Drive: ровно три значения — ClientID, ClientSecret, RefreshToken, в этом порядке. Template: значения, доступные как `{secret0}`, `{secret1}`, …. S3: AccessKeyID, SecretAccessKey и при необходимости SessionToken. |
|
||||
| `template` | — | Только для template: операции `auth`, `put`, `get`, `list` и `delete` API хранилища. |
|
||||
| `s3` | — | Только для s3: `endpoint` (URL http(s)), `region`, `bucket` и `pathStyle` (по умолчанию `true`; `false` переносит бакет в имя хоста). `remoteFolder` — префикс объектов. |
|
||||
| тонкая настройка | значения ядра | `segmentBytes` (512 KiB), `flushIntervalMs` (20), `pollIntervalMs`/`maxPollIntervalMs` (50/500), `eagerWindowMs` (2000), `holeTimeoutMs` (30000), `sessionTtlSeconds` (300), `concurrency` (8). |
|
||||
| тонкая настройка | значения ядра | `segmentBytes` (512 KiB), `flushIntervalMs` (20), `pollIntervalMs`/`maxPollIntervalMs` (50/500), `eagerWindowMs` (2000), `holeTimeoutMs` (30000), `sessionTtlSeconds` (300), `concurrency` (8). Для Google Drive по умолчанию `flushIntervalMs` 10, `maxPollIntervalMs` 200 и `concurrency` 64 (xray-core 26.11.9). |
|
||||
|
||||
Необязательные **адрес/порт фронтинга** (`address`/`port` на уровне stream) — домен-фронт,
|
||||
через который идёт подключение к API хранилища; в TLS по-прежнему указывается хост API.
|
||||
|
||||
@@ -129,7 +129,7 @@ XDRIVE 把数据流作为文件存放在双方都能访问的文件夹中:服
|
||||
| `secrets` | — | Google Drive:恰好三项,依次为 ClientID、ClientSecret、RefreshToken。Template:以 `{secret0}`、`{secret1}`… 引用的值。S3:AccessKeyID、SecretAccessKey,以及可选的 SessionToken。 |
|
||||
| `template` | — | 仅用于 template 服务:存储 API 的 `auth`、`put`、`get`、`list` 和 `delete` 操作。 |
|
||||
| `s3` | — | 仅用于 s3 服务:`endpoint`(http(s) URL)、`region`、`bucket` 和 `pathStyle`(默认 `true`;为 `false` 时存储桶名放在主机名中)。`remoteFolder` 为对象前缀。 |
|
||||
| 调优参数 | 内核默认值 | `segmentBytes`(512 KiB)、`flushIntervalMs`(20)、`pollIntervalMs`/`maxPollIntervalMs`(50/500)、`eagerWindowMs`(2000)、`holeTimeoutMs`(30000)、`sessionTtlSeconds`(300)、`concurrency`(8)。 |
|
||||
| 调优参数 | 内核默认值 | `segmentBytes`(512 KiB)、`flushIntervalMs`(20)、`pollIntervalMs`/`maxPollIntervalMs`(50/500)、`eagerWindowMs`(2000)、`holeTimeoutMs`(30000)、`sessionTtlSeconds`(300)、`concurrency`(8)。Google Drive 的默认值为 `flushIntervalMs` 10、`maxPollIntervalMs` 200、`concurrency` 64(xray-core 26.11.9)。 |
|
||||
|
||||
可选的**前置地址/端口**(stream 级的 `address`/`port`)是连接存储 API 时使用的域前置;TLS 中仍使用 API 主机名。
|
||||
XDRIVE 没有自己的 TLS/REALITY 层——其流量就是存储 API 自身的 HTTPS。在出站上,**TLS**
|
||||
|
||||
@@ -30,6 +30,13 @@ const TUNING_FIELDS = [
|
||||
['concurrency', 'concurrency', 8],
|
||||
] as const;
|
||||
|
||||
// xray-core 26.11.9 (#7340, #7352) gives the Google Drive backend its own defaults.
|
||||
const GOOGLE_DRIVE_TUNING_DEFAULTS: Partial<Record<string, number>> = {
|
||||
flushIntervalMs: 10,
|
||||
maxPollIntervalMs: 200,
|
||||
concurrency: 64,
|
||||
};
|
||||
|
||||
const GOOGLE_DRIVE_SECRETS = ['clientId', 'clientSecret', 'refreshToken'] as const;
|
||||
const S3_SECRETS = [
|
||||
['accessKeyId', true],
|
||||
@@ -192,9 +199,15 @@ export default function XDriveForm() {
|
||||
</FormField>
|
||||
</>
|
||||
)}
|
||||
{TUNING_FIELDS.map(([key, label, placeholder]) => (
|
||||
{TUNING_FIELDS.map(([key, label, coreDefault]) => (
|
||||
<FormField key={key} label={t(`pages.inbounds.form.xdrive.${label}`)} name={[...BASE, key]}>
|
||||
<InputNumber min={0} placeholder={String(placeholder)} style={{ width: '100%' }} />
|
||||
<InputNumber
|
||||
min={0}
|
||||
placeholder={String(
|
||||
(service === 'google-drive' && GOOGLE_DRIVE_TUNING_DEFAULTS[key]) || coreDefault,
|
||||
)}
|
||||
style={{ width: '100%' }}
|
||||
/>
|
||||
</FormField>
|
||||
))}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user