If you discover security issues, please do not use public bug trackers. Send reports directly to: @ingeniare
This implementation is based on the following principles and technical measures:
The MTProxy service runs under a dedicated system account mtproxy with no login shell and no home directory. This minimizes risk in case of service compromise.
Operational secrets are stored per-user in /etc/mtproxy/secrets.d/*.secret with 0600 permissions and owner root:root. A wrapper /etc/mtproxy/run.sh injects secrets at runtime, so they are not exposed in the systemd unit or via systemctl cat. Command-line arguments can still be visible through procfs on multi-user systems; use hidepid=2 for /proc where appropriate. Legacy /etc/mtproxy/secret is kept for compatibility. For --engine telemt, generated /etc/telemt/telemt.toml is root:telemt 0640 because the engine must be able to reload user configuration after dropping privileges.
To counter Deep Packet Inspection (DPI), Fake TLS transport is used. The default upstream engine supports baseline anti-replay and fallback to the real --domain target. Version 1.4.0 additionally supports a multi-domain pool and an opt-in telemt engine with TLS fronting/TCP splitting, TLS emulation, shape hardening, and real backend masking. The strongest deployment mode is --mode own-domain: a real HTTPS website, valid certificate, and DNS/IP/SNI consistency.
The installer configures IPv4 and, when enabled, IPv6 hashlimit rules. The default normal profile is 30/min with burst 30; strict remains available through --rate-profile strict or runtime mtproxy-lockdown.sh on. An optional updating FireHOL abuse-list scanner shield can be enabled with --scanner-shield.
The automatic Telegram config update process includes a validation step. Downloaded resources are checked for minimum size and structural correctness before being applied. On update failure, the system preserves the last stable configuration.
External IP detection uses a cascade of 8 independent sources. Firewall rule persistence across reboots is ensured via netfilter-persistent integration.
- Authentication: Use SSH key-based access and disable password login.
- Monitoring: Regularly check service logs via
journalctl -u MTProxyfor anomalous connection patterns. - Host Protection: Install
fail2banto protect the SSH management interface from brute-force attacks. - Updates: Apply security patches for the base OS in a timely manner.
- Domain Selection: In production, consider using custom or specific domains for Fake TLS emulation.
- Stats Access: The statistics web interface is accessible only via loopback (
localhost). Do not expose this port to external networks.