mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2026-11-29 14:04:46 +03:00
3e1fc3c24f
An MTProto inbound must not relay a stranger's connection to a public host
picked by an SNI the panel never configured, and every byte it moves must
show up in the inbound's traffic.
mtg relays whatever it cannot serve as a proxy to the fronting target, byte
for byte, and the target answers by the SNI of that connection. With the
default FakeTLS domain on a CDN, anybody could reach any site of that CDN
through the inbound ("clean IP"). mtg dials the target itself, past the
Xray bridge and outside every secret, so neither the clients nor the
inbound showed that traffic.
- The generated config sets [domain-fronting] require-sni-match (mtg-multi
1.17.0) unless the fronting IP is a loopback, private or link-local
address, i.e. the operator's own web server. mtg then relays only a
ClientHello naming the FakeTLS domain and closes the rest. An older mtg
ignores the key.
- The /stats "fronting" counters are scraped per process and added to the
inbound's total, for routed inbounds too.
TestRenderConfig pinned the old rule (a bare config has no
[domain-fronting] section) and now expects the section without a host.