Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Manual
middle_proxy_nat_ipandmiddle_proxy_nat_probeedits disappear when MTProxyMax regeneratesconfig.toml. Add these IPv4 ME NAT settings to the existingtunewhitelist so operators can persist them intunings.confand regenerate primary and additional-instance configs without losing them.Why this change
With destination-based routing (for example, a MikroTik routing Telegram through WireGuard), ordinary public-IP discovery can return the WAN address while Telegram sees the VPN egress address. In the observed deployment, Telemt used the router's WAN address in
client_addr_for_kdf; explicitly supplying the actual VPN egress IP restored RPC handshakes for reachable endpoints. TCP timeouts to other endpoints remained a separate routing issue.The IPv4 egress address belongs to each deployment; it is not a client-facing proxy address and is not hardcoded here. An IP override cannot compensate for source-port translation or an unreachable ME endpoint. A compatible SOCKS egress must return a valid public BND address/port tuple.
Changes
mtproxymax tune set middle_proxy_nat_ip 203.0.113.10andmtproxymax tune set middle_proxy_nat_probe false.tune clearbehavior rather than adding a second settings store or a new restart path.[general], and clearing back to engine defaults.No behavior changes when neither override is set. This PR is independent of the Telemt 3.5.14 update and does not change the engine version or automatically import existing manual TOML edits. Operators migrate those values with the documented tuning commands.
Validation
Automated regression and distro tests are run in the linked fork CI. The underlying engine NAT settings were exercised manually in the deployment described above; the new CLI persistence path is covered by the regression test.
Fork CI: https://github.com/rmtshnik/MTProxyMax/actions/runs/39008911285 (all five distro test jobs and systemd/OpenRC integration passed; lint status is visible in the run).