feat(mtproto): add domain-fronting and essential mtg options

Expose mtg's [domain-fronting] section (ip/port/proxy-protocol) plus
proxy-protocol-listener, prefer-ip, and debug on MTProto inbounds. Each
key is written to the generated mtg-<id>.toml only when set, so mtg's own
defaults apply otherwise. The instance fingerprint now covers these
fields, so editing an option restarts the sidecar.

Since MTProto is mtg-served (not Xray), sniffing does not apply: hide the
Sniffing tab and the Advanced sniffing sub-editor, drop it from the
Advanced "All" JSON view, and emit empty sniffing in the wire payload,
all gated by a new canEnableSniffing predicate.
This commit is contained in:
MHSanaei
2026-06-09 12:44:04 +02:00
parent f8e89cc848
commit 6c1594693d
27 changed files with 592 additions and 55 deletions
@@ -640,6 +640,47 @@ export default function InboundInfoModal({
</Tooltip>
</dd>
</div>
{(() => {
const s = inbound.settings;
const df = s.domainFronting as { ip?: string; port?: number; proxyProtocol?: boolean } | undefined;
const frontingTarget = df && (df.ip || df.port)
? `${df.ip ?? ''}${df.port ? `:${df.port}` : ''}`
: '';
return (
<>
{frontingTarget && (
<div className="info-row">
<dt>{t('pages.inbounds.form.mtgDomainFrontingIp')}</dt>
<dd><Tag color="blue" className="value-tag">{frontingTarget}</Tag></dd>
</div>
)}
{df?.proxyProtocol && (
<div className="info-row">
<dt>{t('pages.inbounds.form.mtgDomainFrontingProxyProtocol')}</dt>
<dd><Tag color="green" className="value-tag">{t('enabled')}</Tag></dd>
</div>
)}
{Boolean(s.proxyProtocolListener) && (
<div className="info-row">
<dt>{t('pages.inbounds.form.mtgProxyProtocolListener')}</dt>
<dd><Tag color="green" className="value-tag">{t('enabled')}</Tag></dd>
</div>
)}
{Boolean(s.preferIp) && (
<div className="info-row">
<dt>{t('pages.inbounds.form.mtgPreferIp')}</dt>
<dd><Tag color="blue" className="value-tag">{s.preferIp as string}</Tag></dd>
</div>
)}
{Boolean(s.debug) && (
<div className="info-row">
<dt>{t('pages.inbounds.form.mtgDebug')}</dt>
<dd><Tag color="green" className="value-tag">{t('enabled')}</Tag></dd>
</div>
)}
</>
);
})()}
{links.length > 0 && (
<div className="info-row">
<dt>{t('pages.inbounds.copyLink')}</dt>