Vladislav Grishenko 121a8974de add unix socket support (#127)
Config option LISTEN_UNIX_SOCK = "/path/to/socket.file" allows to listen
on specified unix socket in additional to (or instead of) configured ip
addresses. Listening on a socket can be useful for connection from local
reverse proxy w/o wasting tcp ports and network subsystem resources just
for inter-process communication.
Default value is empty - socket not used.
2019-08-17 15:11:49 +05:00
2018-05-27 15:12:17 +05:00
2018-06-12 16:28:15 +05:00
2019-08-17 15:11:49 +05:00

Async MTProto Proxy

Fast and simple to setup mtproto proxy.

Starting Up

  1. git clone -b stable https://github.com/alexbers/mtprotoproxy.git; cd mtprotoproxy
  2. (optional, recommended) edit config.py, set PORT, USERS and AD_TAG
  3. docker-compose up --build -d (or just python3 mtprotoproxy.py if you don't like docker)
  4. (optional, shows telegram link to set the proxy) docker-compose logs

Channel Advertising

To advertise a channel get a tag from @MTProxybot and write it to config.py.

Performance

The proxy performance should be enough to comfortably serve about 4 000 simultaneous users on the VDS instance with 1 CPU core and 1024MB RAM.

Advanced Usage

The proxy can be launched:

  • with a custom config: python3 mtprotoproxy.py [configfile]
  • several times, clients will be automaticaly balanced between instances
  • using PyPy interprteter
  • with runtime statistics exported for Prometheus: using prometheus branch
Languages
Python 99.7%
Dockerfile 0.3%