feat(tls): add ocspStapling to certificate config

Expose the OCSP Stapling refresh interval (seconds) on the TLS
certificate object in the inbound security form, defaulting to 3600s
to match xray-core. Covers both file-backed and inline cert shapes.
This commit is contained in:
MHSanaei
2026-06-03 17:49:36 +02:00
parent 55d6729955
commit 1a64d7e9de
5 changed files with 17 additions and 1 deletions
@@ -1,5 +1,5 @@
import { useTranslation } from 'react-i18next';
import { Button, Form, Input, Radio, Select, Space, Switch } from 'antd';
import { Button, Form, Input, InputNumber, Radio, Select, Space, Switch } from 'antd';
import { MinusOutlined, PlusOutlined, ReloadOutlined } from '@ant-design/icons';
import {
@@ -113,6 +113,7 @@ export default function TlsForm({
keyFile: '',
certificate: [],
key: [],
ocspStapling: 3600,
oneTimeLoading: false,
usage: 'encipherment',
buildChain: false,
@@ -218,6 +219,12 @@ export default function TlsForm({
);
}}
</Form.Item>
<Form.Item
name={[certField.name, 'ocspStapling']}
label="OCSP Stapling"
>
<InputNumber min={0} addonAfter="s" style={{ width: '50%' }} />
</Form.Item>
<Form.Item
name={[certField.name, 'oneTimeLoading']}
label={t('pages.inbounds.form.oneTimeLoading')}
@@ -167,6 +167,7 @@ export function useSecurityActions({ form, setSaving, messageApi, nodeId }: UseS
keyFile: '',
certificate: [],
key: [],
ocspStapling: 3600,
oneTimeLoading: false,
usage: 'encipherment',
buildChain: false,