docs: improve the wording, add targeted examples
This commit is contained in:
61 files changed
+3422
-5861
No files matched your search
@@ -6,40 +6,40 @@ let
|
||||
in
|
||||
{
|
||||
options.services.proxy-suite.tgWsProxy = {
|
||||
enable = mkEnableOption "the Telegram MTProto WebSocket proxy";
|
||||
enable = mkEnableOption "the Telegram WebSocket proxy (MTProto)";
|
||||
|
||||
listener = {
|
||||
address = mkOption {
|
||||
type = types.str;
|
||||
default = "127.0.0.1";
|
||||
description = "Bind address.";
|
||||
description = "Listening address.";
|
||||
};
|
||||
|
||||
port = mkOption {
|
||||
type = types.port;
|
||||
default = 1443;
|
||||
description = "Listen port.";
|
||||
description = "Listening port.";
|
||||
};
|
||||
};
|
||||
|
||||
secret = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Inline MTProto secret (`openssl rand -hex 16`). Ends up in the Nix store; prefer secretFile.";
|
||||
description = "MTProto secret (`openssl rand -hex 16`). Ends up in the Nix store; prefer `secretFile`.";
|
||||
example = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
|
||||
};
|
||||
|
||||
secretFile = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Runtime path to the MTProto secret.";
|
||||
description = "File with the MTProto secret.";
|
||||
example = "/run/secrets/tg-ws-proxy-secret";
|
||||
};
|
||||
|
||||
dcIps = mkOption {
|
||||
type = types.attrsOf types.str;
|
||||
default = { };
|
||||
description = "Relay IP per Telegram DC ID.";
|
||||
description = "Relay IP for each Telegram DC ID.";
|
||||
example = {
|
||||
"2" = "149.154.167.220";
|
||||
};
|
||||
@@ -48,25 +48,25 @@ in
|
||||
fakeTlsDomain = mkOption {
|
||||
type = types.nullOr (types.strMatching ".+");
|
||||
default = null;
|
||||
description = "SNI for Fake TLS masking (ee-secret links).";
|
||||
description = "Domain to disguise traffic as, with Fake TLS (ee-secret links).";
|
||||
example = "www.example.com";
|
||||
};
|
||||
|
||||
cloudflare = {
|
||||
domains = domains "Cloudflare-proxied domains for WebSocket fallback." [ "cdn.example.com" ];
|
||||
domains = domains "Domains behind Cloudflare to fall back to." [ "cdn.example.com" ];
|
||||
workerDomains = domains "Cloudflare Worker domains, tried first." [ "worker.example.com" ];
|
||||
|
||||
fallback = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Fall back to Cloudflare when direct WebSocket fails.";
|
||||
description = "Fall back to Cloudflare when a direct WebSocket fails.";
|
||||
};
|
||||
};
|
||||
|
||||
poolSize = mkOption {
|
||||
type = types.ints.unsigned;
|
||||
default = 4;
|
||||
description = "WebSocket pool size per DC; 0 disables pooling.";
|
||||
description = "Idle WebSockets kept open per DC. 0 disables.";
|
||||
};
|
||||
|
||||
bufferKiB = mkOption {
|
||||
@@ -78,45 +78,45 @@ in
|
||||
proxyProtocol = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Accept a PROXY protocol v1 header from a fronting reverse proxy.";
|
||||
description = "Accept a PROXY protocol v1 header from a reverse proxy in front.";
|
||||
};
|
||||
|
||||
bypassTransparentProxy = mkOption {
|
||||
type = types.bool;
|
||||
default = true;
|
||||
description = "Keep the relay's own connections out of TUN/TProxy, which would otherwise loop them.";
|
||||
description = "Keep the relay's own connections out of TUN and TProxy, so they do not loop.";
|
||||
};
|
||||
|
||||
fwmark = mkOption {
|
||||
type = types.int;
|
||||
default = 4;
|
||||
description = "Packet mark bypassTransparentProxy uses.";
|
||||
description = "Firewall mark for `bypassTransparentProxy`.";
|
||||
};
|
||||
|
||||
log = {
|
||||
verbose = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = "Debug logging.";
|
||||
description = "Log debug messages.";
|
||||
};
|
||||
|
||||
file = mkOption {
|
||||
type = types.nullOr types.str;
|
||||
default = null;
|
||||
description = "Rotating log file, written as the proxy-suite-daemon user; /var/log/proxy-suite-tg-ws-proxy is created for it. Null logs to stderr.";
|
||||
description = "Log file, rotated. `null`: log to the journal.";
|
||||
example = "/var/log/proxy-suite-tg-ws-proxy/tg-ws-proxy.log";
|
||||
};
|
||||
|
||||
maxSizeMiB = mkOption {
|
||||
type = types.numbers.positive;
|
||||
default = 5.0;
|
||||
description = "Log size before rotation, in MiB.";
|
||||
description = "Rotate the log at this size, in MiB.";
|
||||
};
|
||||
|
||||
keep = mkOption {
|
||||
type = types.ints.positive;
|
||||
default = 1;
|
||||
description = "Rotated logs kept.";
|
||||
description = "Number of rotated logs to keep.";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user