mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-08-20 18:11:00 +00:00
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:
@@ -57,15 +57,8 @@ export const MtprotoInboundSettingsSchema = z.object({
|
||||
routeThroughXray: z.boolean().optional(),
|
||||
outboundTag: z.string().optional(),
|
||||
routeXrayPort: z.number().int().min(0).max(65535).optional(),
|
||||
// A 32-hex Telegram advertising tag: when set, mtg routes clients through
|
||||
// Telegram middle proxies so a sponsored channel appears in their chat list.
|
||||
// publicIpv4/publicIpv6 pin this server's reachable address the middle proxy
|
||||
// needs; leave them blank to let mtg auto-detect it.
|
||||
adTag: z
|
||||
.string()
|
||||
.regex(/^[0-9a-fA-F]{32}$/, 'pages.inbounds.form.mtgAdTagInvalid')
|
||||
.or(z.literal(''))
|
||||
.optional(),
|
||||
// publicIpv4/publicIpv6 pin this server's reachable address the Telegram
|
||||
// middle proxy needs when clients carry ad-tags; blank = mtg auto-detects.
|
||||
publicIpv4: z.string().optional(),
|
||||
publicIpv6: z.string().optional(),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user