add optional user/password for sing-box
This commit is contained in:
9 files changed
+373
-16
No files matched your search
@@ -79,6 +79,10 @@ let
|
||||
subscriptionUpdate = "proxy-suite-subscription-update";
|
||||
};
|
||||
|
||||
localProxyAuthEnabled =
|
||||
singBoxCfg.auth.username != null
|
||||
&& (singBoxCfg.auth.password != null || singBoxCfg.auth.passwordFile != null);
|
||||
|
||||
tproxyUpScript = pkgs.writeShellScript "proxy-suite-tproxy-up" ''
|
||||
${nft} delete table ip singbox 2>/dev/null || true
|
||||
${nft} -f ${nftablesRulesFile}
|
||||
@@ -254,7 +258,7 @@ in
|
||||
globalTproxy.enable || perAppRoutingTun.enable || perAppRoutingTproxy.enable || perAppZapretEnabled
|
||||
) (lib.mkDefault true);
|
||||
|
||||
users.groups = lib.mkIf (cfg.enable && userControlEnabled) {
|
||||
users.groups = lib.mkIf (cfg.enable && (userControlEnabled || localProxyAuthEnabled)) {
|
||||
"${userControlCfg.group}" = { };
|
||||
};
|
||||
|
||||
|
||||
Reference in new issue
Block a user