Skip to main content

Async Python MTProto Proxy

Project description


A fully OOP Asynchronous Python 3 MT-Proto proxy


  • Easy to use: you can easily use it
  • Lightweight less resources as possible but not by losing maintainability.
  • Fully-asynchronous: it runs asynchronously
  • High-performance: processes a lot of connections
  • Block-Mode Protection from replay attacks used to detect proxies in some countries


To install last stable release from pypi:

$ pip3 install mtproxy

or with uvloop as extra requirement (recommended):

$ pip3 install mtproxy[fast]

uvloop makes asyncio fast.


To launch with custom config

# config.ini

#proxy settings

# port = 8585
## The Port that Proxy listening to. 8585 by default

# fast_mode = ture
# true by deaultif True, disables telegram to client traffic re-encryption, faster but less secure.

# prefer_ipv6 = ture
# if IPv6 available, use it by default.

# secure_only = false
# Don't allow to connect in not-secure mode. false by default

# listen_addr_ipv4 =
# Listen address for IPv4. '' by default

# listen_addr_ipv6 = ::
# Listen address for IPv6 by default

# client_handshake_timeout = 10
# Drop client after this timeout if the handshake fail, 10 by default

# client_keepalive = 600
# Keep alive period for clients in secs, 600 by default.

# client_ack_timeout = 300
# if client doesn't confirm data for this number of seconds, it is dropped, 300 by default.

# server_connect_timeout = 10
# Telegram servers connect timeout in seconds, 10 by default/.

# to_client_buffer_size = 131072
# Max socket buffer size to the client direction, the more the faster, but more RAM hungry, 131072 by default.

# to_server_buffer_size = 65536
# Max socket buffer size to the telegram servers direction, 65536 by default.

# block_mode = true
# Drop client if first packet is bad, true by default.

# reply_check_length = 
# Length of used handshake randoms for active fingerprinting protection, 32768 by default.

# ipv4 = 
# IPv4 address to show data, if Ignored, will be Obtained.

# ipv6 = 
# IPv6 address to show data, if Ignored, will be Obtained.

# proxy users section.
# name_of_user = proxy_secret_key
HemMm = 7e7ee7be6b40378e593c36433294b03c

launch proxy:

mtproxy config.ini


Special Thanks to alexbers for his grate project



Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

MTProxy-0.1.3.tar.gz (12.4 kB view hashes)

Uploaded source

Built Distribution

MTProxy-0.1.3-py3-none-any.whl (19.4 kB view hashes)

Uploaded py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page