mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-09 06:35:03 +03:00
feat(tls,reality): port xray TLS/REALITY fields, cert-hash helpers, fallback UX
TLS: add verifyPeerCertByName (vcn) to inbound settings + emit in both share-link generators (frontend + Go sub) and outbound parser; the allowInsecure replacement xray removed after 2026-06-01. Add server-side curvePreferences, masterKeyLog, echSockopt (passthrough + form) at tlsSettings top-level so they survive the panel-only settings strip. REALITY: add limitFallbackUpload/Download (afterBytes/bytesPerSec/burstBytesPerSec) with per-field tooltips, plus masterKeyLog. Verified field names/semantics against pinned xray v1.260327.1 (bytesPerSec=0 disables). Hosts: fix verify_peer_cert_by_name column bool->string (xray expects comma-separated names) with an idempotent, history-gate-free migration (SQLite typeof blank; Postgres ALTER once); emit vcn for hosts/external proxies. Server: add getCertHash (local cert DER SHA-256) and getRemoteCertHash (xray tls ping) endpoints + api-docs; wire pinned-cert field buttons. Drop the meaningless random-hash button. Xray UI: metrics endpoint (listen/tag) config in Basics; import/export for routing rules and outbounds. Fallbacks card: compact empty state, header-aligned actions, responsive labeled grid rows. i18n: add all new keys to every locale; drop unused generateRandomPin.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { useTranslation } from 'react-i18next';
|
||||
import { Button, Form, Input, InputNumber, Select, Space, Switch } from 'antd';
|
||||
import { Button, Collapse, Divider, Form, Input, InputNumber, Select, Space, Switch } from 'antd';
|
||||
import { ReloadOutlined } from '@ant-design/icons';
|
||||
|
||||
import { UTLS_FINGERPRINT } from '@/schemas/primitives';
|
||||
@@ -153,6 +153,54 @@ export default function RealityForm({
|
||||
<Button danger onClick={clearMldsa65}>{t('clear')}</Button>
|
||||
</Space>
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={['streamSettings', 'realitySettings', 'masterKeyLog']}
|
||||
label={t('pages.inbounds.form.masterKeyLog')}
|
||||
tooltip={t('pages.inbounds.form.masterKeyLogTip')}
|
||||
>
|
||||
<Input placeholder="/path/to/sslkeylog.txt" />
|
||||
</Form.Item>
|
||||
<Collapse
|
||||
style={{ marginBottom: 14 }}
|
||||
items={[
|
||||
{
|
||||
key: 'limitFallback',
|
||||
label: t('pages.inbounds.form.limitFallback'),
|
||||
children: (
|
||||
<>
|
||||
{(['limitFallbackUpload', 'limitFallbackDownload'] as const).map((dir) => (
|
||||
<div key={dir}>
|
||||
<Divider style={{ margin: '0 0 14px 0' }}>
|
||||
{t(`pages.inbounds.form.${dir}`)}
|
||||
</Divider>
|
||||
<Form.Item
|
||||
name={['streamSettings', 'realitySettings', dir, 'afterBytes']}
|
||||
label={t('pages.inbounds.form.afterBytes')}
|
||||
tooltip={t('pages.inbounds.form.afterBytesTip')}
|
||||
>
|
||||
<InputNumber min={0} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={['streamSettings', 'realitySettings', dir, 'bytesPerSec']}
|
||||
label={t('pages.inbounds.form.bytesPerSec')}
|
||||
tooltip={t('pages.inbounds.form.bytesPerSecTip')}
|
||||
>
|
||||
<InputNumber min={0} />
|
||||
</Form.Item>
|
||||
<Form.Item
|
||||
name={['streamSettings', 'realitySettings', dir, 'burstBytesPerSec']}
|
||||
label={t('pages.inbounds.form.burstBytesPerSec')}
|
||||
tooltip={t('pages.inbounds.form.burstBytesPerSecTip')}
|
||||
>
|
||||
<InputNumber min={0} />
|
||||
</Form.Item>
|
||||
</div>
|
||||
))}
|
||||
</>
|
||||
),
|
||||
},
|
||||
]}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user