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:
@@ -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