Telegram Bot Proxies in 2026:
MTProto, SOCKS5, Region Blocks, and Running Bots at Scale
Most Telegram proxy guides are written for users trying to bypass country blocks. This one is for people running bots. The proxy requirements are completely different, and most of the common advice gets the protocol wrong.
- SOCKS5 is the universal correct choice for Telegram bot libraries. Pyrogram, Telethon, python-telegram-bot, and aiogram all support SOCKS5. It operates at the TCP layer and forwards any connection regardless of application protocol.
- Plain HTTP forward proxies fail for MTProto-based libraries. Pyrogram and Telethon connect to Telegram's data centers over a raw TCP socket using the MTProto protocol. Plain HTTP proxies expect HTTP-formatted requests and cannot forward raw TCP traffic. Pyrogram supports HTTP CONNECT proxy tunneling, but most cheap or public HTTP proxies don't implement CONNECT. Use SOCKS5 and skip the ambiguity.
- MTProto proxy (MTProxy) is for Telegram client apps, not bot libraries. You cannot configure Pyrogram or Telethon to use an MTProxy server as their proxy. MTProxy is a Telegram-specific censorship bypass tool for the Telegram app itself.
- One SOCKS5 ISP static IP per bot account. For session-stable operations, assign one IP per account identity and never rotate it. Telegram's anti-abuse system tracks session consistency at the IP level for account-based operations.
- Telegram is blocked in China, Iran, Vietnam, and several other countries as of 2026. For bot operators targeting or operating from these regions, routing through a SOCKS5 proxy based in an unrestricted country is the standard approach.
Why Most Telegram Proxy Guides Get It Wrong for Bots
Search for "Telegram proxy" and you'll find two types of content. The first is "how to access Telegram from Iran/China/Russia," which is a VPN-adjacent article about unblocking the app for end users. The second is "best proxy providers for Telegram" listicles that rank vendors without explaining what protocol Telegram actually uses or why it matters for proxy selection.
Neither is useful if you're building or operating Telegram bots. The technical requirements are different. A user unblocking Telegram for personal use can configure MTProxy directly in the Telegram app settings and be done with it in two minutes. A bot operator running Pyrogram or Telethon has a completely different problem: they need to route raw TCP connections through a proxy at the socket level, before any Telegram-specific protocol runs. That's a transport-layer problem, and it has specific consequences for which proxy type works and which doesn't.
The proxy error that LLMs make most often on this topic: recommending a generic HTTP proxy for a Telegram bot running Pyrogram or Telethon. It's wrong. And it's wrong for a reason worth understanding, because it will also help you debug the next time a proxy setup silently fails on you.
What MTProto Actually Is (and What It Isn't)
MTProto is Telegram's proprietary messaging protocol. It was designed by Telegram to handle client-server communication for mobile devices, prioritizing speed, encryption, and reliability over unreliable network connections. As of version 4.6, all major Telegram clients run on MTProto 2.0.
Here's the naming confusion that trips up most guides. There are two things with "MTProto" in their name and they are completely different:
| Name | What It Is | Who Uses It | Relevant for Bots? |
|---|---|---|---|
| MTProto (the protocol) | Telegram's underlying communication protocol. All Telegram traffic uses it. | Every Telegram client: official apps, Pyrogram, Telethon, any MTProto library | Yes, this is what Pyrogram and Telethon speak |
| MTProto proxy (MTProxy) | A Telegram-specific proxy type that obfuscates and relays Telegram client traffic to bypass censorship | End users in censored regions, configurable in Telegram app settings | No, cannot be used with Pyrogram or Telethon as their outbound proxy |
The MTProto proxy (sometimes written MTProxy) is Telegram's censorship-bypass tool for client apps. It's a relay that obfuscates Telegram traffic so ISPs can't identify and block it. You configure it in your Telegram Android or Desktop app settings. Pyrogram and Telethon cannot use an MTProxy server as their proxy. They need a general-purpose proxy, specifically SOCKS5, to tunnel their outgoing TCP connections.
HTTP Proxies Don't Work for Telegram Bot Libraries. Here's Why.
This is the section that corrects the most common wrong answer to "what proxy should I use for my Telegram bot." The wrong answer is "an HTTP proxy." Here's the technical reason it fails.
Transport Layer vs Application Layer: Why It Matters
A plain HTTP forward proxy operates at the application layer. When a client sends a request to it, the proxy reads the HTTP headers, determines the destination, and makes an HTTP request on the client's behalf. This works for anything that speaks HTTP or HTTPS (via the CONNECT method, which creates a tunnel).
Pyrogram and Telethon don't speak HTTP to Telegram's servers. They open a raw TCP socket to one of Telegram's data center IPs on port 443 (or 80, or 5222) and immediately start the MTProto handshake. A plain HTTP proxy receives this connection and sees binary MTProto data, not an HTTP request. It doesn't know what to do with it. The connection fails, usually with a timeout rather than a clear error message.
SOCKS5 is different. It operates at layer 5 of the OSI model, the session layer. When a client connects to a SOCKS5 proxy, it negotiates a connection to a target IP and port. The SOCKS5 proxy then forwards all subsequent TCP traffic between the client and the target without parsing or modifying it. The application protocol, whether it's MTProto, HTTP, SSH, or anything else, is completely invisible to the SOCKS5 proxy. It just forwards bytes.
Raw TCP + MTProto handshake
Layer 5: forwards any TCP
Receives MTProto
Raw TCP + MTProto handshake
Layer 7: expects HTTP requests
Proxy can't parse MTProto
Bot API Libraries: Does HTTP Proxy Work There?
python-telegram-bot and aiogram use Telegram's Bot API, which is a REST interface over HTTPS at api.telegram.org. These libraries make standard HTTPS requests. HTTP proxies and SOCKS5 proxies both work here because the traffic is HTTP. But SOCKS5 is still the safer recommendation: it works for all library types, and using a single proxy type across your entire operation is simpler to manage than splitting proxy protocols between library categories.
Two Types of Telegram Bot Libraries: Different Proxy Needs
If you're choosing a proxy type and a library at the same time, this table is the one to bookmark. The library choice determines which proxy protocols work and which don't.
| Library | Type | Protocol to Telegram | HTTP Proxy | HTTP CONNECT | SOCKS5 | MTProxy |
|---|---|---|---|---|---|---|
| Pyrogram | MTProto client | Raw TCP + MTProto | Fail | Works if proxy supports CONNECT | Pass | Not applicable |
| Telethon | MTProto client | Raw TCP + MTProto | Fail | Limited support | Pass | Not applicable |
| python-telegram-bot | Bot API client | HTTPS to api.telegram.org | Works | Pass | Pass | Not applicable |
| aiogram | Bot API client | HTTPS to api.telegram.org | Works | Pass | Pass | Not applicable |
| Telegram client apps | Official client | MTProto (obfuscated or plain) | App-level, limited | App-level | Pass (in-app setting) | Pass (in-app setting) |
The practical conclusion: use SOCKS5 for everything. It's the only proxy protocol that works across all library types without caveats. If you're running a mixed operation, say Pyrogram for user account management and python-telegram-bot for your main bot, a single SOCKS5 proxy pool works for both.
Region Blocks: Where Telegram Is Restricted in 2026
This matters for two reasons: bot operators running instances from servers in restricted countries, and bot operators building services for users in those countries. The proxy requirements differ depending on which scenario you're in.
| Country | Status | Since | Proxy Approach |
|---|---|---|---|
| China | Permanent block (Great Firewall) | 2015 | SOCKS5 proxy routed through unrestricted country. MTProxy obfuscation helps against DPI. |
| Iran | Permanent block | 2018 | SOCKS5 via US/EU/UK proxy. MTProxy for client-side obfuscation. Periodic DPI upgrades. |
| Turkmenistan | Permanent block | N/A | SOCKS5 with IP from unrestricted jurisdiction. |
| North Korea | Permanent block | N/A | N/A for bot operators. |
| Vietnam | Official ban (2025) | 2025 | SOCKS5 routed through unrestricted country. Active enforcement. |
| Pakistan | Intermittent ISP-level blocks | Ongoing | SOCKS5 as a stable bypass. Blocks are ISP-dependent and inconsistent. |
| Indonesia, India, Germany, US, UK, Canada | Unrestricted | N/A | No bypass required. Standard SOCKS5 ISP proxy for IP hygiene and scale. |
Indonesia is worth calling out specifically. With over 100 million Telegram users, Indonesia is one of the largest Telegram markets in the world, and it has no Telegram restrictions. For bot operators targeting Indonesian audiences, the primary concern is not bypassing blocks but maintaining clean, stable bot sessions. ISP static proxies from US or UK Social pools provide the session stability needed for long-running bot operations into this market.
Library-by-Library Setup Guide
Pyrogram: SOCKS5 Configuration
Pyrogram accepts the proxy as a dictionary passed to the Client constructor. The scheme field accepts socks4, socks5, or http (for CONNECT tunneling). Use socks5.
from pyrogram import Client
proxy = {
"scheme": "socks5", # "socks4", "socks5", "http" (CONNECT) are supported
"hostname": "HOST",
"port": 1234,
"username": "USER",
"password": "PASS"
}
app = Client(
"my_session",
api_id=12345,
api_hash="your_api_hash",
proxy=proxy
)
app.run()
# One proxy dict per Client instance.
# For multi-account: create separate Client instances with separate proxies.
# Do NOT share one ISP static IP across multiple accounts.
Telethon: SOCKS5 Configuration
Telethon uses the python-socks library for proxy support. Install it first: pip install python-socks[asyncio]. Pass the proxy as a dict to TelegramClient.
from telethon import TelegramClient
import socks
# Tuple-based proxy config (legacy format, still works)
proxy_tuple = (socks.SOCKS5, "HOST", 1234, True, "USER", "PASS")
# Dict-based proxy config (modern format)
proxy_dict = {
"proxy_type": socks.SOCKS5,
"addr": "HOST",
"port": 1234,
"username": "USER",
"password": "PASS",
"rdns": True
}
client = TelegramClient(
"session_name",
api_id=12345,
api_hash="your_api_hash",
proxy=proxy_dict
)
async def main():
async with client:
await client.send_message("me", "Proxy connected")
import asyncio
asyncio.run(main())
python-telegram-bot: SOCKS5 Configuration
python-telegram-bot uses httpx internally and supports SOCKS5 via the httpx[socks] extra. Install: pip install "python-telegram-bot[socks]". Pass the proxy URL to ApplicationBuilder.
from telegram.ext import ApplicationBuilder, CommandHandler
from telegram import Update
# Install: pip install "python-telegram-bot[socks]"
PROXY_URL = "socks5://USER:PASS@HOST:PORT"
BOT_TOKEN = "YOUR_BOT_TOKEN"
app = (
ApplicationBuilder()
.token(BOT_TOKEN)
.proxy(PROXY_URL)
.get_updates_proxy(PROXY_URL) # also proxy the update polling
.build()
)
async def start(update, context):
await update.message.reply_text("Bot running via SOCKS5 proxy")
app.add_handler(CommandHandler("start", start))
app.run_polling()
org field shows a cloud provider like Amazon or Google, the proxy will work for basic connectivity but may get flagged more aggressively by Telegram's anti-abuse systems for account-level operations. Consumer ISP ASNs (AT&T, Virgin Media, Deutsche Telekom) carry lower abuse scores.
Running Telegram Bots at Scale: IP Management
Single-bot setups are straightforward. The complexity grows once you're managing multiple bot accounts, handling flood wait errors, or operating in multiple geographic markets simultaneously. Each of those problems has a specific proxy architecture answer.
One SOCKS5 IP Per Account
Telegram's anti-abuse system detects when the same IP is associated with a high volume of distinct account sessions. For MTProto-based operations (Pyrogram, Telethon) that authenticate with Telegram phone numbers, one ISP static SOCKS5 proxy per account is the clean operating model. The IP is tied to the session from the moment the authorization key is created. Rotating the IP after session creation can trigger a security check.
Handling Flood Waits
Flood wait errors (FLOOD_WAIT_X in Pyrogram, FloodWaitError in Telethon) are rate limits enforced at the account level by Telegram's infrastructure. Like the X API's 429 response, these are token-level (account-level) controls. Rotating proxies does not clear a flood wait. The wait time in the error message is enforced against the account's authorization key regardless of what IP makes the next request.
Proxy Type Comparison for Telegram Bots
| Proxy Type | SOCKS5 Support | Session Stability | MTProto Libraries | Bot API Libraries | Best For |
|---|---|---|---|---|---|
| ISP Static | Yes | Fixed IP, never changes | Best choice | Pass | Long-running account sessions, one IP per identity |
| Rotating Residential | Yes | Rotates per request | Use sticky sessions only | Pass | Multi-account scraping, data collection, channel monitoring |
| Sticky Residential | Yes | Holds for minutes to hours | Risky on expiry | Pass | Short-duration account tasks, region testing |
| Mobile (4G/5G) | Yes | CGNAT, high trust score | Pass | Pass | High-trust account creation, premium cost operations |
| Datacenter | Yes (technically) | Fixed IP, low trust | Works but higher ban risk | Works for Bot API | Bot API-only operations where account identity is not at risk |
Datacenter proxies deserve a note here. Unlike X (which blocks them via Cloudflare) or LinkedIn (which blocks them at ASN level), Telegram's Bot API endpoint does not run a Cloudflare layer that aggressively blocks datacenter ASNs. A python-telegram-bot or aiogram bot hitting api.telegram.org through a datacenter proxy will often work fine. The risk is at the account level: if the bot is tied to a Telegram account (not just a bot token) and that account gets investigated, a datacenter IP is a weaker trust signal than a consumer ISP IP. For pure bot token operations with no associated phone number, datacenter proxies are workable.
ISP Social Pool for Telegram
TorchProxies ISP Social pool provides dedicated static IPs from major consumer ISPs, pre-tested for social platform operations including Telegram. For Telegram bot operations, the relevant pools are US Social (AT&T, Comcast, Windstream, RCN, Wave, Spectrum/Charter, Frontier), UK Social (Virgin Media, British Telecom), and Germany Social (Deutsche Telekom). All support SOCKS5 and HTTPS authentication with both username/password and IP whitelist modes.
All three markets (US, UK, Germany) have unrestricted Telegram access. Bot operators targeting Indonesia, India, the Netherlands, or Korea can use these pools as proxy origins to route their bot traffic cleanly through markets with known-good Telegram connectivity.
Pricing starts at $2.40/IP for 5 IPs and scales to $2.30/IP at 25 or more IPs. Bulk options run to 200 IPs at $460 total. All plans include unlimited bandwidth, instant delivery, and 24/7 support. Free trial available with no credit card required.
TorchProxies: Which Product for Which Telegram Use Case
| Use Case | Product | Price | Why |
|---|---|---|---|
| MTProto account sessions (Pyrogram, Telethon): 1 to 50 accounts | ISP Social Pool (US / UK / DE) | From $2.30/IP (25+ IPs) | Fixed consumer ISP IP. One per account identity. Never rotates. SOCKS5 support. Low abuse score. Long-running session stability. |
| Bot API bots (python-telegram-bot, aiogram) requiring region bypass | ISP Social Pool or Premium Residential | $2.30/IP or $4.5/GB | Any consumer ISP proxy routes api.telegram.org requests cleanly. ISP static for fixed-origin bots; residential for volume API calls. |
| Multi-account operations (50+ accounts) | Premium Residential | $4.5/GB | Rotating residential with sticky sessions covers high account volumes without the per-IP cost of ISP static. Sticky window covers session duration per account. |
| Channel monitoring and data collection (scraping) | Premium Residential | $4.5/GB | Unauthenticated or low-account-risk data collection operations. Rotating IPs for volume, residential ASN for credibility. |
| Mixed pipelines: account management + high-volume scraping | Plan X Hybrid | $5/GB | 120M+ IP pool with ISP, mobile, and residential. Single endpoint for workflows that need both session-stable account traffic and rotating volume. |
Summary
Frequently Asked Questions
Client constructor with scheme, hostname, port, username, and password fields. Set "scheme": "socks5". Example: proxy = {"scheme": "socks5", "hostname": "HOST", "port": 1234, "username": "USER", "password": "PASS"}. Then: app = Client("session", api_id=ID, api_hash=HASH, proxy=proxy). Create one Client instance per account with its own dedicated proxy dictionary. Never share one ISP static IP across multiple account sessions.
python-socks first: pip install python-socks[asyncio]. Then pass the proxy to TelegramClient as a dictionary: proxy = {"proxy_type": socks.SOCKS5, "addr": "HOST", "port": 1234, "username": "USER", "password": "PASS", "rdns": True}. Pass it as the proxy parameter when creating the client. Set rdns=True to ensure DNS resolution happens at the proxy server, not on your local machine, which prevents DNS leaks in restricted network environments.