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