make default tg-ws-proxy host local-only

This commit is contained in:
FUFSoB committed 2026-04-13 17:03:51 +05:00
1 parent b8496a5737
commit 2ba1167d69
3 files changed
+22 -27

No files matched your search

+8 -16
View File
@@ -65,12 +65,9 @@ services.proxy-suite = {
}; };
}; };
tgWsProxy = { tgWsProxy = {
dcIps = { dcIps = { };
"2" = "149.154.167.220";
"4" = "149.154.167.220";
};
enable = false; enable = false;
host = "0.0.0.0"; host = "127.0.0.1";
port = 1076; port = 1076;
secret = null; secret = null;
secretFile = null; secretFile = null;
@@ -2119,10 +2116,7 @@ attribute set of string
*Default:* *Default:*
```nix ```nix
{ { }
"2" = "149.154.167.220";
"4" = "149.154.167.220";
}
``` ```
@@ -2131,11 +2125,9 @@ attribute set of string
```nix ```nix
{ {
"1" = "149.154.175.50"; "2" = "149.154.167.220";
"2" = "149.154.167.51"; "203" = "149.154.167.220";
"3" = "149.154.175.100"; "4" = "149.154.167.220";
"4" = "149.154.167.91";
"5" = "91.108.56.130";
} }
``` ```
@@ -2161,7 +2153,7 @@ string
*Default:* *Default:*
```nix ```nix
"0.0.0.0" "127.0.0.1"
``` ```
@@ -2169,7 +2161,7 @@ string
*Example:* *Example:*
```nix ```nix
"0.0.0.0" "127.0.0.1"
``` ```
*Declared by:* *Declared by:*
+6 -11
View File
@@ -902,12 +902,12 @@ in
host = mkOption { host = mkOption {
type = types.str; type = types.str;
default = "0.0.0.0"; default = "127.0.0.1";
description = '' description = ''
Address to bind tg-ws-proxy to. Address to bind tg-ws-proxy to.
Only relevant when tgWsProxy.enable = true. Only relevant when tgWsProxy.enable = true.
''; '';
example = "0.0.0.0"; example = "127.0.0.1";
}; };
secret = mkOption { secret = mkOption {
@@ -937,20 +937,15 @@ in
dcIps = mkOption { dcIps = mkOption {
type = types.attrsOf types.str; type = types.attrsOf types.str;
default = { default = { };
"2" = "149.154.167.220";
"4" = "149.154.167.220";
};
description = '' description = ''
Map of Telegram DC ID to IP address for relay. Map of Telegram DC ID to IP address for relay.
Only relevant when tgWsProxy.enable = true. Only relevant when tgWsProxy.enable = true.
''; '';
example = { example = {
"1" = "149.154.175.50"; "2" = "149.154.167.220";
"2" = "149.154.167.51"; "4" = "149.154.167.220";
"3" = "149.154.175.100"; "203" = "149.154.167.220";
"4" = "149.154.167.91";
"5" = "91.108.56.130";
}; };
}; };
}; };
+8
View File
@@ -698,6 +698,14 @@ let
assert tgSecretFile.config.services.proxy-suite.tgWsProxy.host == "127.0.0.1"; assert tgSecretFile.config.services.proxy-suite.tgWsProxy.host == "127.0.0.1";
true true
) )
(
assert minimal.config.services.proxy-suite.tgWsProxy.host == "127.0.0.1";
true
)
(
assert minimal.config.services.proxy-suite.tgWsProxy.dcIps == { };
true
)
( (
assert assert
tgSecretFile.config.systemd.services."proxy-suite-tg-ws-proxy".serviceConfig.LoadCredential tgSecretFile.config.systemd.services."proxy-suite-tg-ws-proxy".serviceConfig.LoadCredential