Skip to content
Projects

Mekotofeuka/MTPROTO_FIX_By_MEKO

View on GitHub

About

Universal VPN and MTProto/WEB proxy installer and fixer with one-click setup for Telemt, MTG, MTProtoZig, and other MTProxy implementations. Resolves connection issues on iOS, Android, and desktop, and includes an SNI checker, a panels installer, and a configuration editor. Configure an MTProto/WEB proxy in 1 minute.

Systems & Infrastructure

How these counts are measured

Measured star growth

in 24h
+2
in 7 days
+18
in 15 days
+36
in 1 month
+63

Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.

README.en.md

Original

MEKO | VPN and MTProto proxy manager - Installer, Launcher and fixer

logo

Latest Release License: MIT Stars Forks PRs Welcome Telegram

· Install in 1️⃣ click · How it works🔧 · Back to main page · Русский · 中文 · Русский словарь · 中文词典 ·

· FAQ❓

Full‑fledged Manager for VPN and proxies:

Fixes Telegram MTProto proxies and allows convenient work with TELEMT, MTG and MTPROTO.ZIG, supporting most necessary commands: Install, update, rollback, configure, edit configs, view logs, install and work with panels, get connection link – without typing any commands. Also performs all needed functions for VPN panels/nodes.

⭐️ One of our fixes old V2 version has already been adopted by TELEMT and Mtproto zig ⭐️

MEKO currently uses the more accurate V3 version


👇 Having trouble? Chat with us – we'll help 👇

☝️P.s. there's also a series based on the fix ☝️

The script solves in 1 click the problem that appeared since June 4, when Telegram client cannot connect to MTProto proxy server. The fix is applied server‑side – clients don't need to install or change anything on their devices.

Symptoms of this issue:

  • Connection may hang, take a long time to establish, or fail the initial TCP handshake, followed by a 2‑minute client access block after first connection.
  • "Infinite update" on iOS,
  • Media not loading – videos/photos/GIFs/voice messages/stickers.

Tested on: Telemt 3.5.16, MTProto.zig 1.13.0, MTG 2.2.8 and 1.0.12, Erlang mtproto proxy, MTProtoProxy, JSMTProxy

This script is for servers with MTProto proxies; it fixes slow initial TCP client connections or complete failure (cannot connect to proxy). Advantages:

  • Fast connection even with many clients and devices on one IP (Wi‑Fi)
  • Single port for all devices: iOS/Android/macOS/Desktop, etc.
  • Media loads at full speed
  • Correctly detects and applies rules for different devices with 100% accuracy
  • Installs in one click with 2 modes: "standard installation" with configurable settings, and "automatic" installation that tells you what it will do and after confirmation does everything for you.
image image image image image image image image

Quick start:

Attention, this script is paid; price: 1 ⭐ on the repository

  1. Install/update our script:
curl -fsSL https://raw.githubusercontent.com/Mekotofeuka/MTPROTO_FIX_By_MEKO/main/install.sh | sudo bash
  1. Install standard Telemt, or "MTPROTO.zig" or MTG

    (all proxies can be installed via our script menu; you don't need to install them beforehand on the server, and order doesn't matter – proxy first or fix first)

  2. Apply the fix to your proxy by pressing [1] Install SYN FIX in the main menu
  3. Disable built‑in MSS and SYN from Telemt config by pressing [8] (if it was previously added to the config)
  4. Check SNI via button [7] in menu, or via bot @Sni_checker_bot – you must select a domain that shows: 🟢 Marker: NO. Otherwise, iOS users will experience problems.
  5. If you use SelfSteal, ensure your server has OpenSSL 3.5 or higher – otherwise, similar iOS issues will occur. If you can't install OpenSSL 3.5+, then use any popular domain that shows "🟢 Marker: NO" instead of SelfSteal. Alternative solutions are described in the documentation.
  6. Done.
  • Additional: Button 3 performs basic server optimisation for proxies – in tests it showed better performance: faster, more stable, less resource‑intensive.

Open menu:

mekopr

Automatic installation

install.sh supports fully automatic installation of an MTProto proxy, a WEB proxy and the fix — all parameters are passed straight from the command line.

Install only the v3 fix on port 443:

curl -fsSL https://raw.githubusercontent.com/Mekotofeuka/MTPROTO_FIX_By_MEKO/main/install.sh | sudo bash -s -- -fix -fix-port 443 -fix-type v3

Install Telemt with the v3 fix on port 443, domain ozon.ru, ad_tag 4c4140a4c40c5e2b080578a7e4e38c95 and user Vasya with secret 68…dedb:

curl -fsSL https://raw.githubusercontent.com/Mekotofeuka/MTPROTO_FIX_By_MEKO/main/install.sh | sudo bash -s -- -telemt -domain ozon.ru -port 443 -fix -fix-type v3 -version 3.5.16 -ad_tag 4c4140a4c40c5e2b080578a7e4e38c95 -user Vasya 68ae8284982465dfcb198342d01cdedb

Automatic installation parameters

Flag Default Description
-telemt — Install Telemt
-zig — Install MTProto.zig
-mtg — Install MTG 2.x (1.0.x can be chosen in the proxy menu)
-mtdd — Install mtdd (FakeTLS, MTProto proxy)
-fix — Install MTProto FIX
-no-fix — Do not install the fix
-fix-type {v2|v3|v4|nft} v3 Fix type: v2/v3 — iptables, nft — v3 via nftables, v4 — zapret2 (nfqws2)
-fix-profile {v1|v2|v3} v3 Zapret2 profile: v1 (fixed window), v2 (window from wscale), v3 (ios+all: handshake, service stream, response fragment). Only with -fix-type v4
-fix-port <port> -port or 443 Fix port; a list is allowed: 443,9443 (first is primary)
-port <port> 443 Proxy port
-domain <domain> ozon.ru Domain used for TLS masking
-version <version> latest Telemt version
-ad_tag <tag> — Add ad_tag to the [general] section of the Telemt config
-user <name> [secret] — Add a user to [access.users]; if the secret is omitted it is asked for or generated
-public_host <domain> — Add or update public_host in [server.links]
-web — Install Telemt in WEB mode (requires -web-host)
-web-user <name> webuser WEB profile user ([web.vhosts.profiles])
-web-secret <secret> generated WEB user secret (16 bytes hex)
-web-host <domain> — Required WEB host domain (FQDN clients connect to)
-nginx — Install and configure Nginx + Certbot for WEB mode
-h, --help — Show available arguments

If the Telemt version and fix type are not specified, they are requested during installation. Without command-line parameters the installer opens the standard menu.

How the fix works:

Applies a set of rules to the server that splits devices into two types – ios and non‑ios – and applies different limits to each.

  • Layer 1 – Checks if the device is iOS or not.
    • If yes – keeps the device on layer 1 and applies rules specific to iOS.
    • If no – moves to layer 2 and applies layer‑2 rules for all non‑iOS devices, limiting SYN to 1 packet per 1.1 sec.

More detailed description

  • Fixes dead connection issues on iOS/Android

    • Problem: mobile client goes to background, socket doesn't close cleanly, so the server holds a dead connection; when the client returns, it hangs on that dead socket.
    • The script makes dead connections break within minutes instead of hours. The client immediately sees "socket dead" on return and reconnects without hanging.
  • Fixes TCP handshake being cut

    • The script limits incoming SYN frequency to 1 packet per 1.1 sec per IP, because the technical means limit TCP connections only if they exceed 1 per second.
  • iOS separately

    • iOS has different connection patterns compared to Android and Desktop. Mixing them under one limit interferes with each other. Splitting by port is a workaround but clumsy. Our fix separates these clients based on iOS fingerprint, so clients of any device can sit on the same port without extra hassle.
  • 54/minute (not 1 packet per sec)

    • The iptables module hashlimit does not support milliseconds. 54/minute = 0.9 packets per second per connection (i.e., 1 packet per 1.1 sec). The extra 100 ms reserve eliminates errors caused by instant Reject, which otherwise leads to a 2‑minute block of your device connecting to the MTProto server.
  • REJECT instead of DROP

    • DROP simply terminates the client connection without notification, causing timeouts (3‑5 sec) → retries with longer pauses → higher latency. REJECT with RST, on the other hand, immediately gives the client a reset response, so the client retries without waiting, resulting in much faster Telegram connection.
  • MSS is simply unnecessary for this build, so the script includes a function to disable it. If you keep any MSS rule or config setting limiting SYN, media and download speed will be poor – so it's recommended to comment/remove such settings before applying the fix.

If nothing is clear – go read Dictionary for dummies, where all terms are explained in plain language along with complete documentation.

Possible issues ("why might it not work?")

  • The port/IP/subnet may have been blocked earlier and need to be changed (e.g., a proxy not working on 443 may work fine on 9443). In that case, no fix will help.
  • When using v2 fix, which identifies device by TTL + Length, connecting from iOS – the connection may pass through load balancers, increasing TTL above the limit, so the script misidentifies the device as desktop/Android instead of iPhone, resulting in a block – in that case you must use v3 fix.
  • When using the fix without MSS, you must ensure that the domain used for Fake TLS supports X25519 MLKEM768 – you can check this via the built‑in domain checker or via bot: @Sni_checker_bot. If the chosen domain does not support it – after an iOS connection attempt you'll get a block and the connection will fail.
  • If you use SelfSteal instead of a foreign domain, ensure that your nginx was compiled with OpenSSL 3.5 – otherwise periodic iOS connection issues will occur. For proper SelfSteal operation, install nginx built with 3.5 or upgrade OpenSSL on your server to 3.5 and rebuild nginx.
    • Alternative 1: use caddy — the "Extras" menu ([8] of the main menu) has a ready item [3] Caddy as a PQ stub (SelfSteal) (installs Caddy 2.10+ and sets up the stub automatically, system OpenSSL is untouched).
    • Alternative 2: enable MSS, but then media will load very slowly.
  • If you enabled MSS because your domain doesn't support X25519MLKEM768 and you can't use another one, and media load slowly – that's expected. MSS reduces packet size, directly affecting download speed.

⭐ Support the project

MEKO Launcher – created in free time for the community.

You can support the project by giving a ⭐ to this repository (top‑right corner of this page).

If you find this project useful and wish to support development, you can send donations to the following crypto wallets:

image

USDT TRC20 TGmBaRYmQwSyC6sRaumaMf9CbEuVAk4Eff

USDT BEP20 0x2AF1581aA7b696Ca28C70B5D29756Da3ca577D65

TON(GRAM) UQDdT8vtR5DmbwzNvMUiNQnwxlbkFq4ypE2_UzIm6bQ88DbU

BTC bc1qqfkknfrhhufq6dm7cczmdtjkgv56ma3gnz0utk

SOL SPL Gn7w3EBkZqPjPDcbkTaxspip42TuhoGqaaEqHAxhG9V1

You can also support me by using my service:

projectmeko_bot

dalink.to/mekome

Special thanks for contributions:

Original repositories

This is an independent informational review.

This post is not an advertisement for VPN, proxy, etc. All material is provided for informational purposes only, and only for citizens of countries where such information is legal – at least for scientific purposes. If you are not allowed to read this – close this page immediately!

The author has no intention, does not urge, encourage or justify the use of VPN, proxy or any other software under any circumstances.

Responsibility for any reading, usage and operation lies with the user.

Disclaimer: the author is not responsible for the actions of third parties and does not encourage illegal use of VPN/proxy or other software.

The author is not responsible for the accuracy, completeness or reliability of the published data. All coincidences are accidental. All information is provided "as is" and may not correspond to reality.

Use in accordance with local laws.

Use VPN and proxy only for lawful purposes: in particular – to ensure your online security and secure remote access, and in no case use this technology to circumvent blocks.

The project is non‑commercial, free; all presented "payment" information was found randomly somewhere on the Internet, copied "as is" for demonstration of a possible example and does not belong to the author.

Following the advice of the popular repository from Igareck – close this page, delete all VPN, proxy from your computer, install MAX and Yandex on all devices so that it "catches" even in the parking lot, and use only those Internet resources allowed by your ISP, you get the idea.

Explore related projects

Loading…