feat: proxy-tui
This commit is contained in:
12 files changed
+1028
-48
No files matched your search
@@ -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"
|
||||
|
||||
@@ -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.]+)?$";
|
||||
|
||||
Reference in new issue
Block a user