refactor(mtproto): manage ad-tags per client only

The inbound-level ad-tag duplicated the per-client override for no
gain: the fork's global tag applied to every secret anyway, so one
value had two homes and they could drift. The inbound form field, the
settings key, and the global ad-tag in the generated config and in the
PUT /secrets body are gone; the tag is set on each client instead.
Existing inbound-level values are intentionally not migrated; a
leftover settings key is stripped on the next save.
This commit is contained in:
MHSanaei
2026-07-07 12:19:26 +02:00
parent 406ce54fb2
commit ad7a0f8164
21 changed files with 83 additions and 97 deletions
@@ -2,8 +2,6 @@ import { useTranslation } from 'react-i18next';
import { Form, Input, InputNumber, Select, Switch } from 'antd';
import { useOutboundTags } from '@/api/queries/useOutboundTags';
import { MtprotoInboundSettingsSchema } from '@/schemas/protocols/inbound/mtproto';
import { antdRule } from '@/utils/zodForm';
export default function MtprotoFields() {
const { t } = useTranslation();
@@ -87,14 +85,6 @@ export default function MtprotoFields() {
/>
</Form.Item>
)}
<Form.Item
name={['settings', 'adTag']}
label={t('pages.inbounds.form.mtgAdTag')}
tooltip={t('pages.inbounds.form.mtgAdTagHint')}
rules={[antdRule(MtprotoInboundSettingsSchema.shape.adTag, t)]}
>
<Input allowClear placeholder="0123456789abcdef0123456789abcdef" />
</Form.Item>
<Form.Item
name={['settings', 'publicIpv4']}
label={t('pages.inbounds.form.mtgPublicIpv4')}