Files
proxy-suite-flake/docs/options/tgWsProxy.md
T
FUFSoB fdb2b08790 refactor: overhaul of options and features
Includes, but not limited to:
- zapret2 support
- declarative inbounds
- proxy-ctl revamp
- automatic proxy learning
2026-09-13 22:37:45 +05:00

5.7 KiB
Raw Permalink Blame History

services.proxy-suite.tgWsProxy

Part of the proxy-suite options reference.

Options

services.proxy-suite.tgWsProxy.enable

Whether to enable the Telegram MTProto WebSocket proxy.

Type: boolean

Default:

false

Example:

true

services.proxy-suite.tgWsProxy.bufferKiB

Socket buffer size, in KiB.

Type: integer between 4 and 2147483647 (both inclusive)

Default:

256

services.proxy-suite.tgWsProxy.bypassTransparentProxy

Keep the relay’s own connections out of TUN/TProxy, which would otherwise loop them.

Type: boolean

Default:

true

services.proxy-suite.tgWsProxy.cloudflare.domains

Cloudflare-proxied domains for WebSocket fallback.

Type: list of string

Default:

[ ]

Example:

[
  "cdn.example.com"
]

services.proxy-suite.tgWsProxy.cloudflare.fallback

Fall back to Cloudflare when direct WebSocket fails.

Type: boolean

Default:

true

services.proxy-suite.tgWsProxy.cloudflare.workerDomains

Cloudflare Worker domains, tried first.

Type: list of string

Default:

[ ]

Example:

[
  "worker.example.com"
]

services.proxy-suite.tgWsProxy.dcIps

Relay IP per Telegram DC ID.

Type: attribute set of string

Default:

{ }

Example:

{
  "2" = "149.154.167.220";
}

services.proxy-suite.tgWsProxy.fakeTlsDomain

SNI for Fake TLS masking (ee-secret links).

Type: null or string matching the pattern .+

Default:

null

Example:

"www.example.com"

services.proxy-suite.tgWsProxy.fwmark

Packet mark bypassTransparentProxy uses.

Type: signed integer

Default:

4

services.proxy-suite.tgWsProxy.listener.address

Bind address.

Type: string

Default:

"127.0.0.1"

services.proxy-suite.tgWsProxy.listener.port

Listen port.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default:

1443

services.proxy-suite.tgWsProxy.log.file

Rotating log file. Null logs to stderr.

Type: null or string

Default:

null

Example:

"/var/log/tg-ws-proxy.log"

services.proxy-suite.tgWsProxy.log.keep

Rotated logs kept.

Type: positive integer, meaning >0

Default:

1

services.proxy-suite.tgWsProxy.log.maxSizeMiB

Log size before rotation, in MiB.

Type: positive integer or floating point number, meaning >0

Default:

5.0

services.proxy-suite.tgWsProxy.log.verbose

Debug logging.

Type: boolean

Default:

false

services.proxy-suite.tgWsProxy.poolSize

WebSocket pool size per DC; 0 disables pooling.

Type: unsigned integer, meaning >=0

Default:

4

services.proxy-suite.tgWsProxy.proxyProtocol

Accept a PROXY protocol v1 header from a fronting reverse proxy.

Type: boolean

Default:

false

services.proxy-suite.tgWsProxy.secret

Inline MTProto secret (openssl rand -hex 16). Ends up in the Nix store; prefer secretFile.

Type: null or string

Default:

null

Example:

"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

services.proxy-suite.tgWsProxy.secretFile

Runtime path to the MTProto secret.

Type: null or string

Default:

null

Example:

"/run/secrets/tg-ws-proxy-secret"