chore: collapse packages
This commit is contained in:
29 files changed
+151
-111
No files matched your search
@@ -106,7 +106,7 @@ pkgs.testers.runNixOSTest {
|
||||
server.succeed(f"jq -e '.inbounds[] | select(.tag == \"ss-in\" and .port == 8388)' {cfg}")
|
||||
# Credentials live only in the runtime config, never in the store.
|
||||
server.succeed(f"test $(stat -c %a {cfg}) = 600")
|
||||
server.fail("grep -r '${uuid}' /nix/store/*proxy-suite-inbounds-*.json")
|
||||
server.fail("grep -r '${uuid}' /nix/store/*-proxy-suite-inbounds")
|
||||
|
||||
with subtest("safety rules are present and ordered first"):
|
||||
cfg = "/run/proxy-suite-inbounds/config.json"
|
||||
|
||||
@@ -18,9 +18,9 @@ let
|
||||
# writeText paths are content-addressed: finding one in the start script pins the
|
||||
# JSON. The context is dropped so the check may mention it.
|
||||
expectedOutboundFile =
|
||||
backend: value:
|
||||
value:
|
||||
builtins.unsafeDiscardStringContext "${
|
||||
pkgs.writeText "proxy-suite-ob-ssh-proxy-${backend}.json" (builtins.toJSON value)
|
||||
pkgs.writeText "proxy-suite-core" (builtins.toJSON value)
|
||||
}";
|
||||
|
||||
# SingBox dials SSH natively: no unit, no local SOCKS listener.
|
||||
@@ -47,7 +47,7 @@ let
|
||||
sshNativeSingBoxStart = generated.readDerivation (
|
||||
sshNativeSingBox.config.systemd.services."proxy-suite-socks".serviceConfig.ExecStart
|
||||
);
|
||||
expectedNativeSingBoxOutbound = expectedOutboundFile "sing-box" {
|
||||
expectedNativeSingBoxOutbound = expectedOutboundFile {
|
||||
type = "ssh";
|
||||
tag = "ssh-proxy";
|
||||
server = "ssh.example.com";
|
||||
@@ -151,7 +151,7 @@ let
|
||||
);
|
||||
xrayService = sshXray.config.systemd.services."proxy-suite-ssh-proxy";
|
||||
xrayStartScript = generated.readDerivation xrayService.serviceConfig.ExecStart;
|
||||
expectedXrayOutbound = expectedOutboundFile "xray" {
|
||||
expectedXrayOutbound = expectedOutboundFile {
|
||||
protocol = "socks";
|
||||
tag = "ssh-proxy";
|
||||
settings = {
|
||||
@@ -186,7 +186,7 @@ let
|
||||
sshHybridStart = generated.readDerivation (
|
||||
sshHybrid.config.systemd.services."proxy-suite-socks".serviceConfig.ExecStart
|
||||
);
|
||||
expectedHybridOutbound = expectedOutboundFile "hybrid" {
|
||||
expectedHybridOutbound = expectedOutboundFile {
|
||||
type = "ssh";
|
||||
tag = "ssh-proxy";
|
||||
server = "ssh.example.com";
|
||||
@@ -512,7 +512,7 @@ let
|
||||
true
|
||||
)
|
||||
(
|
||||
assert pkgs.lib.hasInfix "proxy-suite-ob-ssh-proxy-xray.json" sshUrltestStart;
|
||||
assert pkgs.lib.hasInfix "# outbound: ssh-proxy (OpenSSH SOCKS5 listener)" sshUrltestStart;
|
||||
true
|
||||
)
|
||||
(
|
||||
|
||||
@@ -162,7 +162,7 @@ in
|
||||
test "$(grep -c 'ct mark and 0x2000000 != 0 return' "${globalRuntime}/init.d/sysv/custom.d/50-proxy-suite-custom.sh")" = 4
|
||||
|
||||
# Cut-off networks without a name become the proxy's rule-set; named ones stay with zapret2.
|
||||
rules=$(grep -o '/nix/store/[^ ]*-proxy-suite-zapret2-cutoff-rules' ${cutoffProbe} | head -n1)
|
||||
rules=$(grep -oE '/nix/store/[^ ]+-proxy-suite-zapret2 asn.txt' ${cutoffProbe} | cut -d' ' -f1)
|
||||
printf '# networks\n24940\n14061\n' >asn.txt
|
||||
printf '24940\t300.ya.ru\n' >sni.txt
|
||||
printf '# map\n24940\t5.9.0.0/16\n14061\t104.131.0.0/16\n14061\t2604:a880::/32\n7777\t1.2.0.0/16\n' >nets.txt
|
||||
|
||||
Reference in new issue
Block a user