feat: proxy-tui

This commit is contained in:
fufsob committed 2026-09-14 11:06:16 +00:00
1 parent e6b92ecac7
commit eab3adf893
12 files changed
+1028 -48

No files matched your search

+17
View File
@@ -240,6 +240,13 @@
run add pinned.example > /dev/null
test "$(grep -c -x pinned.example "$state/zapret-hosts-user.txt")" = 1
# unpin and include undo add and exclude.
run unpin pinned.example > /dev/null
! grep -qx pinned.example "$state/zapret-hosts-user.txt"
run include blocked.example > /dev/null
! grep -qx blocked.example "$state/zapret-hosts-user-exclude.txt"
run add pinned.example > /dev/null
# The lists stay readable by unprivileged proxy-ctl after a rewrite.
test "$(stat -c %a "$state/zapret-hosts-user.txt")" = 644
@@ -406,6 +413,16 @@
touch "$out"
'';
# proxy-tui driven headless: keys turn into the right proxy-ctl argv.
proxy-tui-unit =
pkgs.runCommand "proxy-suite-proxy-tui-unit-check"
{ nativeBuildInputs = [ (pkgs.python3.withPackages (ps: [ ps.textual ])) ]; }
''
export PYTHONDONTWRITEBYTECODE=1 PYTHONPATH=${../../pkgs/proxy-ctl}
python ${../../pkgs/proxy-ctl}/test_proxy_tui.py
touch "$out"
'';
# autoProxy slowness routing: sampler and judge.
autoproxy-slowness =
pkgs.runCommand "proxy-suite-autoproxy-slowness-check"
+10
View File
@@ -21,9 +21,19 @@ let
};
}
];
tuiOffFixture = evalProxySuite [
baseModule
{ services.proxy-suite.tui.enable = false; }
];
in
{
assertions = [
(
assert packagePathMatches trayManualFixture.config.environment.systemPackages ".*/[^/]*proxy-tui$";
assert !(packagePathMatches tuiOffFixture.config.environment.systemPackages ".*/[^/]*proxy-tui$");
true
)
(
assert packagePathMatches trayAutostartFixture.config.environment.systemPackages
".*/[^/]*proxy-suite-tray(-[0-9.]+)?$";