syncthing: support SOCKS5 proxying for relays
This commit is contained in:
parent
421989fb5a
commit
a4d977e01f
|
@ -33,6 +33,17 @@ in
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
all_proxy = mkOption {
|
||||||
|
type = types.string;
|
||||||
|
default = "";
|
||||||
|
example = "socks5://address.com:1234";
|
||||||
|
description = ''
|
||||||
|
Overwrites all_proxy environment variable for the syncthing process to
|
||||||
|
the given value. This is normaly used to let relay client connect
|
||||||
|
through SOCKS5 proxy server.
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
dataDir = mkOption {
|
dataDir = mkOption {
|
||||||
default = "/var/lib/syncthing";
|
default = "/var/lib/syncthing";
|
||||||
description = ''
|
description = ''
|
||||||
|
@ -51,7 +62,6 @@ in
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
@ -66,8 +76,13 @@ in
|
||||||
description = "Syncthing service";
|
description = "Syncthing service";
|
||||||
after = [ "network.target" ];
|
after = [ "network.target" ];
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
environment.STNORESTART = "yes"; # do not self-restart
|
environment = {
|
||||||
environment.STNOUPGRADE = "yes";
|
STNORESTART = "yes"; # do not self-restart
|
||||||
|
STNOUPGRADE = "yes";
|
||||||
|
} //
|
||||||
|
(config.networking.proxy.envVars) //
|
||||||
|
(if cfg.all_proxy != "" then { all_proxy = cfg.all_proxy; } else {});
|
||||||
|
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
User = "${cfg.user}";
|
User = "${cfg.user}";
|
||||||
PermissionsStartOnly = true;
|
PermissionsStartOnly = true;
|
||||||
|
|
Loading…
Reference in New Issue