docs: improve the wording, add targeted examples
This commit is contained in:
61 files changed
+3422
-5861
No files matched your search
+64
-223
@@ -1,5 +1,7 @@
|
||||
# services.proxy-suite.tgWsProxy
|
||||
|
||||
A Telegram MTProto proxy over WebSocket.
|
||||
|
||||
Part of the [proxy-suite options reference](./index.md).
|
||||
|
||||
## Options
|
||||
@@ -31,319 +33,158 @@ Part of the [proxy-suite options reference](./index.md).
|
||||
<a id="services-proxy-suite-tgwsproxy-enable"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.enable
|
||||
|
||||
Whether to enable the Telegram MTProto WebSocket proxy\.
|
||||
Whether to enable the Telegram WebSocket proxy (MTProto)\.
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
false
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
true
|
||||
```
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-bufferkib"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.bufferKiB
|
||||
|
||||
Socket buffer size, in KiB\.
|
||||
|
||||
*Type:*
|
||||
integer between 4 and 2147483647 (both inclusive)
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
256
|
||||
```
|
||||
**Type:** integer between 4 and 2147483647 (both inclusive)\
|
||||
**Default:** `256`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-bypasstransparentproxy"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.bypassTransparentProxy
|
||||
|
||||
Keep the relay’s own connections out of TUN/TProxy, which would otherwise loop them\.
|
||||
Keep the relay’s own connections out of TUN and TProxy, so they do not loop\.
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
true
|
||||
```
|
||||
**Type:** boolean\
|
||||
**Default:** `true`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-cloudflare-domains"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.cloudflare\.domains
|
||||
|
||||
Cloudflare-proxied domains for WebSocket fallback\.
|
||||
Domains behind Cloudflare to fall back to\.
|
||||
|
||||
*Type:*
|
||||
list of string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
[ ]
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
[
|
||||
"cdn.example.com"
|
||||
]
|
||||
```
|
||||
**Type:** list of string\
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "cdn.example.com" ]`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-cloudflare-fallback"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.cloudflare\.fallback
|
||||
|
||||
Fall back to Cloudflare when direct WebSocket fails\.
|
||||
Fall back to Cloudflare when a direct WebSocket fails\.
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
true
|
||||
```
|
||||
**Type:** boolean\
|
||||
**Default:** `true`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-cloudflare-workerdomains"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.cloudflare\.workerDomains
|
||||
|
||||
Cloudflare Worker domains, tried first\.
|
||||
|
||||
*Type:*
|
||||
list of string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
[ ]
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
[
|
||||
"worker.example.com"
|
||||
]
|
||||
```
|
||||
**Type:** list of string\
|
||||
**Default:** `[ ]`\
|
||||
**Example:** `[ "worker.example.com" ]`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-dcips"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.dcIps
|
||||
|
||||
Relay IP per Telegram DC ID\.
|
||||
Relay IP for each Telegram DC ID\.
|
||||
|
||||
*Type:*
|
||||
attribute set of string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
{ }
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
{
|
||||
"2" = "149.154.167.220";
|
||||
}
|
||||
```
|
||||
**Type:** attribute set of string\
|
||||
**Default:** `{ }`\
|
||||
**Example:** `{ "2" = "149.154.167.220"; }`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-faketlsdomain"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.fakeTlsDomain
|
||||
|
||||
SNI for Fake TLS masking (ee-secret links)\.
|
||||
Domain to disguise traffic as, with Fake TLS (ee-secret links)\.
|
||||
|
||||
*Type:*
|
||||
null or string matching the pattern \.+
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"www.example.com"
|
||||
```
|
||||
**Type:** null or string matching the pattern \.+\
|
||||
**Default:** `null`\
|
||||
**Example:** `"www.example.com"`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-fwmark"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.fwmark
|
||||
|
||||
Packet mark bypassTransparentProxy uses\.
|
||||
Firewall mark for ` bypassTransparentProxy `\.
|
||||
|
||||
*Type:*
|
||||
signed integer
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
4
|
||||
```
|
||||
**Type:** signed integer\
|
||||
**Default:** `4`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-listener-address"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.listener\.address
|
||||
|
||||
Bind address\.
|
||||
Listening address\.
|
||||
|
||||
*Type:*
|
||||
string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
"127.0.0.1"
|
||||
```
|
||||
**Type:** string\
|
||||
**Default:** `"127.0.0.1"`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-listener-port"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.listener\.port
|
||||
|
||||
Listen port\.
|
||||
Listening port\.
|
||||
|
||||
*Type:*
|
||||
16 bit unsigned integer; between 0 and 65535 (both inclusive)
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
1443
|
||||
```
|
||||
**Type:** 16 bit unsigned integer; between 0 and 65535 (both inclusive)\
|
||||
**Default:** `1443`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-log-file"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.log\.file
|
||||
|
||||
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\.
|
||||
Log file, rotated\. ` null `: log to the journal\.
|
||||
|
||||
*Type:*
|
||||
null or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"/var/log/proxy-suite-tg-ws-proxy/tg-ws-proxy.log"
|
||||
```
|
||||
**Type:** null or string\
|
||||
**Default:** `null`\
|
||||
**Example:** `"/var/log/proxy-suite-tg-ws-proxy/tg-ws-proxy.log"`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-log-keep"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.log\.keep
|
||||
|
||||
Rotated logs kept\.
|
||||
Number of rotated logs to keep\.
|
||||
|
||||
*Type:*
|
||||
positive integer, meaning >0
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
1
|
||||
```
|
||||
**Type:** positive integer, meaning >0\
|
||||
**Default:** `1`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-log-maxsizemib"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.log\.maxSizeMiB
|
||||
|
||||
Log size before rotation, in MiB\.
|
||||
Rotate the log at this size, in MiB\.
|
||||
|
||||
*Type:*
|
||||
positive integer or floating point number, meaning >0
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
5.0
|
||||
```
|
||||
**Type:** positive integer or floating point number, meaning >0\
|
||||
**Default:** `5.0`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-log-verbose"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.log\.verbose
|
||||
|
||||
Debug logging\.
|
||||
Log debug messages\.
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
false
|
||||
```
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-poolsize"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.poolSize
|
||||
|
||||
WebSocket pool size per DC; 0 disables pooling\.
|
||||
Idle WebSockets kept open per DC\. 0 disables\.
|
||||
|
||||
*Type:*
|
||||
unsigned integer, meaning >=0
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
4
|
||||
```
|
||||
**Type:** unsigned integer, meaning >=0\
|
||||
**Default:** `4`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-proxyprotocol"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.proxyProtocol
|
||||
|
||||
Accept a PROXY protocol v1 header from a fronting reverse proxy\.
|
||||
Accept a PROXY protocol v1 header from a reverse proxy in front\.
|
||||
|
||||
*Type:*
|
||||
boolean
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
false
|
||||
```
|
||||
**Type:** boolean\
|
||||
**Default:** `false`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-secret"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.secret
|
||||
|
||||
Inline MTProto secret (` openssl rand -hex 16 `)\. Ends up in the Nix store; prefer secretFile\.
|
||||
MTProto secret (` openssl rand -hex 16 `)\. Ends up in the Nix store; prefer ` secretFile `\.
|
||||
|
||||
*Type:*
|
||||
null or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
|
||||
```
|
||||
**Type:** null or string\
|
||||
**Default:** `null`\
|
||||
**Example:** `"aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"`
|
||||
|
||||
<a id="services-proxy-suite-tgwsproxy-secretfile"></a>
|
||||
## services\.proxy-suite\.tgWsProxy\.secretFile
|
||||
|
||||
Runtime path to the MTProto secret\.
|
||||
File with the MTProto secret\.
|
||||
|
||||
*Type:*
|
||||
null or string
|
||||
|
||||
*Default:*
|
||||
|
||||
```nix
|
||||
null
|
||||
```
|
||||
|
||||
*Example:*
|
||||
|
||||
```nix
|
||||
"/run/secrets/tg-ws-proxy-secret"
|
||||
```
|
||||
**Type:** null or string\
|
||||
**Default:** `null`\
|
||||
**Example:** `"/run/secrets/tg-ws-proxy-secret"`
|
||||
Reference in new issue
Block a user