lordarrin/tg-ws-proxy

By lordarrin

Updated 1 day ago

Docker container with tg-ws-proxy from Flowseal - with my little changes (CHECK DESCRIPTION)

Image
Networking
3

5.8K

lordarrin/tg-ws-proxy repository overview

Source code: https://github.com/LordArrin/tg-ws-proxy-docker

Docker image for personal use. All credits to original author https://github.com/Flowseal/tg-ws-proxy

I just little changed syntax:

ArgsDefaultDescription
PROXY_PORT1443Proxy port
PROXY_HOST0.0.0.0Proxy host
PROXY_SECRETrandom32 hex characters secret for client authorization. (Command to generate: openssl rand -hex 16)
PROXY_DC_IPS2:149.154.167.220 4:149.154.167.220Target IP of Telegram's data centers
PROXY_BUF4096Buffer size in KB
PROXY_POOL_SIZE2The number of prepared connections for each DC
NO_CFPROXYfalseDisable Cloudflare proxying attempt. Read more here
CFPROXY_DOMAINSpecify your domain for proxying through Cloudflare. Read more here
CFPROXY_WORKER_DOMAINSpecify your CF worker for proxying through Cloudflare.
KEEPALIVEfalseEnable WS keepalive pings to prevent connections from closing when idle. Experimental option, disabled by default. Requires configuring CF worker for this to work.

Example config:

  tg-ws-proxy:
    image: lordarrin/tg-ws-proxy:latest
    container_name: tg-ws-proxy
    restart: unless-stopped
    network_mode: host
    environment:
      - PROXY_HOST=192.168.1.1
      - PROXY_PORT=1443
      - PROXY_SECRET=
      - CFPROXY_DOMAIN=
      - CFPROXY_WORKER_DOMAIN=rough-unit-****.******.workers.dev
    security_opt:
      - no-new-privileges:true
    read_only: true
    tmpfs:
      - /tmp:noexec,nosuid,size=64m
      - /home/app/.cache:noexec,nosuid,size=32m
    deploy:
      resources:
        limits:
          memory: 384M
          cpus: '1'

To generate a secret you can use:

openssl rand -hex 16  

Telegram Desktop Settings

  1. Telegram → SettingsAdvanced SettingsConnection TypeProxy
  2. Add a proxy:
  • Type: MTProto
  • Server: 192.168.1.1 (or your own)
  • Port: 1443 (or your own)
  • Secret: from settings or logs

Tag summary

Content type

Image

Digest

sha256:a338c7ac5

Size

54 MB

Last updated

1 day ago

docker pull lordarrin/tg-ws-proxy