fix: root actions in tui/gui & userControl

This commit is contained in:
fufsob committed 2026-09-15 20:02:43 +00:00
1 parent 2ce8da3f43
commit 9cdd6dada7
32 files changed
+665 -317

No files matched your search

+1 -1
View File
@@ -36,7 +36,7 @@ in
};
openFirewall = bool true "Open every non-loopback listener port.";
shareLinks = bool true "Write client share links for `proxy-ctl inbounds link` (root and userControl.group only).";
shareLinks = bool true "Write client share links for `proxy-ctl inbounds link` (root, and userControl.group with the secrets scope).";
subscriptions = {
enable = mkEnableOption "" // {
+3 -2
View File
@@ -66,8 +66,9 @@ in
(rm "tgWsProxy.logBackups" "Use services.proxy-suite.tgWsProxy.log.keep.")
# userControl.
(rm "userControl.global.enable" ''Use services.proxy-suite.userControl.allow, which lists "global" by default.'')
(rm "userControl.perApp.enable" ''Use services.proxy-suite.userControl.allow, which lists "perApp" by default.'')
(rm "userControl.global.enable" ''Use services.proxy-suite.userControl.enable, with "services" in userControl.scopes.'')
(rm "userControl.perApp.enable" ''Use services.proxy-suite.userControl.enable, with "perApp" in userControl.scopes.'')
(rm "userControl.allow" "Use services.proxy-suite.userControl.enable, and userControl.scopes to limit it.")
]
++ lib.mapAttrsToList (
old: new: rm "zapret.${old}" "Use services.proxy-suite.zapret.zapret-discord-youtube.${new}."
+23 -10
View File
@@ -5,30 +5,43 @@ let
in
{
options.services.proxy-suite.userControl = {
enable = lib.mkEnableOption "passwordless `proxy-ctl` control for the members of userControl.group";
group = mkOption {
type = types.strMatching "^[a-z_][a-z0-9_-]*$";
default = "proxy-suite";
description = "Group whose members may run privileged `proxy-ctl` commands without a password.";
};
allow = mkOption {
scopes = mkOption {
type = types.listOf (
types.enum [
"global"
"services"
"perApp"
"routing"
"outbounds"
"secrets"
"autoProxy"
"zapret"
"stats"
]
);
default = [
"global"
"perApp"
];
default = [ ];
description = ''
What userControl.group may control without a password:
- "global": the global units (proxy, tun, tproxy, zapret, restart, subs update).
What userControl.group may do; empty allows every scope.
- "services": turn the proxy-suite units on and off (proxy, tun, tproxy, zapret, ssh, warp, tg, awg, inbounds), and `restart`.
- "perApp": the per-app backend units used by `proxy-ctl apps run`.
Empty grants no passwordless control.
- "routing": `proxy pin`, `proxy unpin` and `proxy mode`.
- "outbounds": add and remove runtime outbounds and subscriptions, and update subscriptions.
- "secrets": read share links, subscription URLs and the running configs.
- "autoProxy": read what autoProxy learned, and `proxy auto learn`.
- "zapret": edit zapret2's learned hosts, and `zapret cutoff probe`.
- "stats": `inbounds stats`.
'';
example = [ "global" ];
example = [
"services"
"routing"
];
};
};
}