feat(outbound): sync DNS outbound config with Xray core changes

Rename the DNS rule wire key qtype to qType (reading the legacy qtype on parse for back-compat), add the new rCode response-code field for the return action (omitted when zero), and rename the reject action to return. Align the DNS rule action set across the form dropdown, schema, and adapter to the core's valid values (direct/drop/return/hijack), dropping the never-valid rejectIPv4/rejectIPv6 entries.
This commit is contained in:
MHSanaei
2026-06-01 10:24:35 +02:00
parent 32f96298f8
commit 2bb9ed1cda
6 changed files with 42 additions and 25 deletions
@@ -35,7 +35,7 @@ export default function DnsFields() {
size="small"
type="primary"
icon={<PlusOutlined />}
onClick={() => add({ action: 'direct', qtype: '', domain: '' })}
onClick={() => add({ action: 'direct', qType: '', domain: '', rCode: 0 })}
/>
</Form.Item>
{fields.map((field, index) => (
@@ -54,12 +54,15 @@ export default function DnsFields() {
options={DNSRuleActions.map((a) => ({ value: a, label: a }))}
/>
</Form.Item>
<Form.Item label="QType" name={[field.name, 'qtype']}>
<Form.Item label="QType" name={[field.name, 'qType']}>
<Input placeholder="1,3,23-24" />
</Form.Item>
<Form.Item label={t('domainName')} name={[field.name, 'domain']}>
<Input placeholder="domain:example.com" />
</Form.Item>
<Form.Item label="RCode" name={[field.name, 'rCode']}>
<InputNumber min={0} max={65535} style={{ width: '100%' }} />
</Form.Item>
</div>
))}
</>