Add Telegram relay proxy: WebSocket→TCP circumvention system - #1
Open
miclawene wants to merge 1 commit into
Open
Add Telegram relay proxy: WebSocket→TCP circumvention system#1miclawene wants to merge 1 commit into
miclawene wants to merge 1 commit into
Conversation
Implements a complete relay infrastructure that routes Telegram traffic
through WebSocket/HTTPS connections to bypass DPI-based blocking:
relay-server/
- server.js: Node.js WebSocket→TCP relay; pipes WS binary frames to
Telegram DC TCP sockets; DC selected via /dc/<1-5> path; optional
auth token; metrics endpoint; graceful shutdown; no payload logging
- decoy-site/index.html: convincing analytics landing page served for
plain HTTP requests to avoid fingerprinting
- nginx.conf: TLS termination, WSS proxy, rate limiting, security headers
- Dockerfile + docker-compose.yml: production-ready Docker stack with
certbot auto-renewal; non-root container; resource limits
- .env.example, README.md
web-client/
- src/transport/relay-config.ts: relay server list with DNS TXT polling
for live updates and automatic deduplication
- src/transport/relay-transport.ts: drop-in WebSocket shim with
per-server retry, exponential backoff, and multi-server failover;
queues sends during reconnect
- src/patch-instructions.md: step-by-step WebK integration guide
- build.sh: clones WebK, copies transport files, patches WS constructor,
runs production build
infrastructure/
- setup.sh: full VPS bootstrap (Docker, UFW, certbot, nginx, stack start)
- monitoring.sh: health checks for relay HTTP, WS, Telegram DC TCP
reachability, TLS expiry, Docker containers, and metrics
- rotate-domain.sh: zero-downtime domain rotation with DNS validation,
cert issuance, and nginx reload
- cloudflare-setup.md: domain fronting guide (proxy, WebSocket, origin
cert, IP allowlist, WAF rules)
https://claude.ai/code/session_014WSDo9fRv8firccXSrvDjp
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements a complete relay infrastructure that routes Telegram traffic
through WebSocket/HTTPS connections to bypass DPI-based blocking:
relay-server/
Telegram DC TCP sockets; DC selected via /dc/<1-5> path; optional
auth token; metrics endpoint; graceful shutdown; no payload logging
plain HTTP requests to avoid fingerprinting
certbot auto-renewal; non-root container; resource limits
web-client/
for live updates and automatic deduplication
per-server retry, exponential backoff, and multi-server failover;
queues sends during reconnect
runs production build
infrastructure/
reachability, TLS expiry, Docker containers, and metrics
cert issuance, and nginx reload
cert, IP allowlist, WAF rules)
https://claude.ai/code/session_014WSDo9fRv8firccXSrvDjp