fix tun/tproxy not working because of zdy broad ips list
This commit is contained in:
4 files changed
+185
-47
No files matched your search
@@ -66,8 +66,12 @@ services.proxy-suite = {
|
|||||||
|
|
||||||
zapret = {
|
zapret = {
|
||||||
enable = true;
|
enable = true;
|
||||||
# Default: mirror zapret-covered domains/IPs into sing-box direct routing.
|
# Default: mirror zapret domain lists into sing-box direct routing.
|
||||||
syncDirectRouting = true;
|
syncDirectRouting = true;
|
||||||
|
# Upstream zapret IP ranges are much broader, so keep them opt-in.
|
||||||
|
syncDirectRoutingUpstreamIps = false;
|
||||||
|
# User-defined ipsetAll/ipsetExclude still map into sing-box by default.
|
||||||
|
syncDirectRoutingUserIps = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
@@ -170,7 +174,7 @@ By default all proxied traffic goes to whatever the active outbound is (the sele
|
|||||||
Global direct routing also has two built-in behaviors:
|
Global direct routing also has two built-in behaviors:
|
||||||
|
|
||||||
- `singBox.routing.enableRuDirect = true` sends `geosite-category-ru` and `geoip-ru` direct by default.
|
- `singBox.routing.enableRuDirect = true` sends `geosite-category-ru` and `geoip-ru` direct by default.
|
||||||
- If `zapret.enable = true`, then `zapret.syncDirectRouting = true` mirrors zapret's effective domain/IP lists into sing-box direct rules, including upstream `list-general`, `list-google`, `list-instagram`, `list-soundcloud`, `list-twitter`, plus your `listGeneral`/`ipsetAll`, minus zapret excludes.
|
- If `zapret.enable = true`, then `zapret.syncDirectRouting = true` mirrors zapret's upstream domain hostlists into sing-box direct rules. `zapret.syncDirectRoutingUpstreamIps = false` by default, so upstream zapret IP ranges are not mirrored unless you opt in, while `zapret.syncDirectRoutingUserIps = true` keeps user `ipsetAll`/`ipsetExclude` mirrored by default.
|
||||||
|
|
||||||
**Attached to an outbound:**
|
**Attached to an outbound:**
|
||||||
|
|
||||||
@@ -251,20 +255,26 @@ proxy-ctl select <tag> switch to a specific outbound (selector mode)
|
|||||||
|
|
||||||
## Zapret
|
## Zapret
|
||||||
|
|
||||||
zapret handles DPI-based blocking by mangling packets at the netfilter level. It's separate from the proxy, but by default this module also mirrors zapret-covered domains and IPs into sing-box direct routing so the proxy does not fight zapret for the same traffic.
|
zapret handles DPI-based blocking by mangling packets at the netfilter level. It's separate from the proxy, but by default this module also mirrors zapret-covered domains into sing-box direct routing so the proxy does not fight zapret for the same traffic.
|
||||||
|
|
||||||
```nix
|
```nix
|
||||||
zapret = {
|
zapret = {
|
||||||
enable = true;
|
enable = true;
|
||||||
configName = "general(ALT)";
|
configName = "general(ALT)";
|
||||||
syncDirectRouting = true; # default
|
syncDirectRouting = true; # default: sync upstream domain lists
|
||||||
|
syncDirectRoutingUpstreamIps = false; # default: do not sync upstream IP ranges
|
||||||
|
syncDirectRoutingUserIps = true; # default: do sync user ipsetAll/ipsetExclude
|
||||||
|
|
||||||
# Extra domains beyond zapret's built-in list
|
# Extra domains beyond zapret's built-in list
|
||||||
listGeneral = [ "pixiv.net" "pximg.net" ];
|
listGeneral = [ "pixiv.net" "pximg.net" ];
|
||||||
};
|
};
|
||||||
```
|
```
|
||||||
|
|
||||||
When `syncDirectRouting = true`, the module reuses zapret's upstream `hostlists/list-general.txt`, `hostlists/list-google.txt`, `hostlists/list-instagram.txt`, `hostlists/list-soundcloud.txt`, `hostlists/list-twitter.txt`, and `hostlists/ipset-all.txt`, adds your `listGeneral` and `ipsetAll` entries, and subtracts both upstream and user exclusion lists before generating sing-box direct rules.
|
When `syncDirectRouting = true`, the module reuses zapret's upstream `hostlists/list-general.txt`, `list-google.txt`, `list-instagram.txt`, `list-soundcloud.txt`, and `list-twitter.txt`, adds your `listGeneral`, and subtracts both upstream and user domain exclusions before generating sing-box direct rules.
|
||||||
|
|
||||||
|
When `syncDirectRoutingUpstreamIps = true`, the module also mirrors zapret's upstream `ipset-all.txt`. This is disabled by default because the upstream IP set is intentionally broad.
|
||||||
|
|
||||||
|
When `syncDirectRoutingUserIps = true`, the module mirrors your `ipsetAll` and `ipsetExclude` values into sing-box direct routing even if upstream IP sync stays disabled. This is enabled by default.
|
||||||
|
|
||||||
If zapret corrupts traffic for some subnet (e.g. a VM behind a libvirt bridge):
|
If zapret corrupts traffic for some subnet (e.g. a VM behind a libvirt bridge):
|
||||||
|
|
||||||
@@ -359,6 +369,7 @@ services.proxy-suite = {
|
|||||||
```
|
```
|
||||||
|
|
||||||
Features:
|
Features:
|
||||||
|
|
||||||
- **Status icon**: `network-vpn` (active), `network-vpn-acquiring` (partial), `network-vpn-disconnected` (stopped)
|
- **Status icon**: `network-vpn` (active), `network-vpn-acquiring` (partial), `network-vpn-disconnected` (stopped)
|
||||||
- **Toggle TProxy/TUN**: Only shown if the service is enabled in your config
|
- **Toggle TProxy/TUN**: Only shown if the service is enabled in your config
|
||||||
- **Restart services**: Restarts `proxy-suite-socks`, and `proxy-suite-tun` if it is active
|
- **Restart services**: Restarts `proxy-suite-socks`, and `proxy-suite-tun` if it is active
|
||||||
|
|||||||
@@ -338,7 +338,19 @@ in
|
|||||||
syncDirectRouting = mkOption {
|
syncDirectRouting = mkOption {
|
||||||
type = types.bool;
|
type = types.bool;
|
||||||
default = true;
|
default = true;
|
||||||
description = "When zapret is enabled, mirror its effective domain and IP lists into sing-box direct routing.";
|
description = "When zapret is enabled, mirror its upstream domain hostlists into sing-box direct routing.";
|
||||||
|
};
|
||||||
|
|
||||||
|
syncDirectRoutingUpstreamIps = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = false;
|
||||||
|
description = "When zapret is enabled, mirror its upstream ipset ranges into sing-box direct routing.";
|
||||||
|
};
|
||||||
|
|
||||||
|
syncDirectRoutingUserIps = mkOption {
|
||||||
|
type = types.bool;
|
||||||
|
default = true;
|
||||||
|
description = "When zapret is enabled, mirror user-defined ipsetAll/ipsetExclude entries into sing-box direct routing.";
|
||||||
};
|
};
|
||||||
|
|
||||||
configName = mkOption {
|
configName = mkOption {
|
||||||
@@ -382,8 +394,11 @@ in
|
|||||||
|
|
||||||
cidrs = mkOption {
|
cidrs = mkOption {
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
default = [];
|
default = [ ];
|
||||||
example = [ "192.168.123.0/24" "10.0.0.0/8" ];
|
example = [
|
||||||
|
"192.168.123.0/24"
|
||||||
|
"10.0.0.0/8"
|
||||||
|
];
|
||||||
description = ''
|
description = ''
|
||||||
Subnets to exempt from zapret's NFQUEUE mangle rules.
|
Subnets to exempt from zapret's NFQUEUE mangle rules.
|
||||||
Useful when a VM (libvirt, etc.) is behind NAT and zapret
|
Useful when a VM (libvirt, etc.) is behind NAT and zapret
|
||||||
|
|||||||
@@ -1,5 +1,10 @@
|
|||||||
# Routing rules and rule-set definitions for sing-box
|
# Routing rules and rule-set definitions for sing-box
|
||||||
{ lib, pkgs, cfg, zapret }:
|
{
|
||||||
|
lib,
|
||||||
|
pkgs,
|
||||||
|
cfg,
|
||||||
|
zapret,
|
||||||
|
}:
|
||||||
|
|
||||||
let
|
let
|
||||||
r = cfg.singBox.routing;
|
r = cfg.singBox.routing;
|
||||||
@@ -10,8 +15,7 @@ let
|
|||||||
hasPrefix = lib.strings.hasPrefix;
|
hasPrefix = lib.strings.hasPrefix;
|
||||||
splitString = lib.strings.splitString;
|
splitString = lib.strings.splitString;
|
||||||
|
|
||||||
zapretSrc =
|
zapretSrc = if builtins.isAttrs zapret && zapret ? outPath then zapret.outPath else zapret;
|
||||||
if builtins.isAttrs zapret && zapret ? outPath then zapret.outPath else zapret;
|
|
||||||
|
|
||||||
parseListFile =
|
parseListFile =
|
||||||
path:
|
path:
|
||||||
@@ -23,7 +27,10 @@ let
|
|||||||
|
|
||||||
subtractItems = items: exclusions: builtins.filter (item: !(builtins.elem item exclusions)) items;
|
subtractItems = items: exclusions: builtins.filter (item: !(builtins.elem item exclusions)) items;
|
||||||
|
|
||||||
syncZapretDirect = z.enable && z.syncDirectRouting;
|
syncZapretDirectDomains = z.enable && z.syncDirectRouting;
|
||||||
|
syncZapretDirectUpstreamIps = z.enable && z.syncDirectRoutingUpstreamIps;
|
||||||
|
syncZapretDirectUserIps = z.enable && z.syncDirectRoutingUserIps;
|
||||||
|
syncZapretDirectAnyIps = syncZapretDirectUpstreamIps || syncZapretDirectUserIps;
|
||||||
|
|
||||||
zapretDefaultDomainFiles = [
|
zapretDefaultDomainFiles = [
|
||||||
"list-general.txt"
|
"list-general.txt"
|
||||||
@@ -34,25 +41,37 @@ let
|
|||||||
];
|
];
|
||||||
|
|
||||||
zapretDefaultDomains =
|
zapretDefaultDomains =
|
||||||
if syncZapretDirect then
|
if syncZapretDirectDomains then
|
||||||
lib.unique (lib.concatMap (file: parseListFile "${zapretSrc}/hostlists/${file}") zapretDefaultDomainFiles)
|
lib.unique (
|
||||||
|
lib.concatMap (file: parseListFile "${zapretSrc}/hostlists/${file}") zapretDefaultDomainFiles
|
||||||
|
)
|
||||||
else
|
else
|
||||||
[ ];
|
[ ];
|
||||||
zapretDefaultIps =
|
zapretDefaultIps =
|
||||||
if syncZapretDirect then parseListFile "${zapretSrc}/hostlists/ipset-all.txt" else [ ];
|
if syncZapretDirectUpstreamIps then parseListFile "${zapretSrc}/hostlists/ipset-all.txt" else [ ];
|
||||||
|
zapretUserIps = if syncZapretDirectUserIps then z.ipsetAll else [ ];
|
||||||
zapretExcludedDomains =
|
zapretExcludedDomains =
|
||||||
if syncZapretDirect then parseListFile "${zapretSrc}/hostlists/list-exclude.txt" else [ ];
|
if syncZapretDirectDomains then parseListFile "${zapretSrc}/hostlists/list-exclude.txt" else [ ];
|
||||||
zapretExcludedIps =
|
zapretExcludedIps = lib.unique (
|
||||||
if syncZapretDirect then parseListFile "${zapretSrc}/hostlists/ipset-exclude.txt" else [ ];
|
(
|
||||||
|
if syncZapretDirectUpstreamIps then
|
||||||
|
parseListFile "${zapretSrc}/hostlists/ipset-exclude.txt"
|
||||||
|
else
|
||||||
|
[ ]
|
||||||
|
)
|
||||||
|
++ (if syncZapretDirectUserIps then z.ipsetExclude else [ ])
|
||||||
|
);
|
||||||
|
|
||||||
zapretDirectDomains =
|
zapretDirectDomains =
|
||||||
if syncZapretDirect then
|
if syncZapretDirectDomains then
|
||||||
subtractItems (lib.unique (zapretDefaultDomains ++ z.listGeneral)) (lib.unique (zapretExcludedDomains ++ z.listExclude))
|
subtractItems (lib.unique (zapretDefaultDomains ++ z.listGeneral)) (
|
||||||
|
lib.unique (zapretExcludedDomains ++ z.listExclude)
|
||||||
|
)
|
||||||
else
|
else
|
||||||
[ ];
|
[ ];
|
||||||
zapretDirectIps =
|
zapretDirectIps =
|
||||||
if syncZapretDirect then
|
if syncZapretDirectAnyIps then
|
||||||
subtractItems (lib.unique (zapretDefaultIps ++ z.ipsetAll)) (lib.unique (zapretExcludedIps ++ z.ipsetExclude))
|
subtractItems (lib.unique (zapretDefaultIps ++ zapretUserIps)) zapretExcludedIps
|
||||||
else
|
else
|
||||||
[ ];
|
[ ];
|
||||||
|
|
||||||
@@ -87,29 +106,40 @@ let
|
|||||||
# In "first" mode the start script renames the first outbound to "proxy",
|
# In "first" mode the start script renames the first outbound to "proxy",
|
||||||
# so any per-outbound routing tag that isn't direct/block/proxy must map
|
# so any per-outbound routing tag that isn't direct/block/proxy must map
|
||||||
# to "proxy" instead of the original tag (which won't exist in sing-box).
|
# to "proxy" instead of the original tag (which won't exist in sing-box).
|
||||||
builtinTags = [ "proxy" "direct" "block" ];
|
builtinTags = [
|
||||||
|
"proxy"
|
||||||
|
"direct"
|
||||||
|
"block"
|
||||||
|
];
|
||||||
resolveTag =
|
resolveTag =
|
||||||
tag:
|
tag: if sb.selection == "first" && !builtins.elem tag builtinTags then "proxy" else tag;
|
||||||
if sb.selection == "first" && !builtins.elem tag builtinTags then "proxy" else tag;
|
|
||||||
|
|
||||||
# Collect per-outbound routing attached directly to outbound definitions.
|
# Collect per-outbound routing attached directly to outbound definitions.
|
||||||
perOutboundRules = lib.concatMap (ob:
|
perOutboundRules = lib.concatMap (
|
||||||
|
ob:
|
||||||
let
|
let
|
||||||
ro = ob.routing;
|
ro = ob.routing;
|
||||||
hasAny = ro.domains != [ ] || ro.ips != [ ] || ro.geosites != [ ] || ro.geoips != [ ];
|
hasAny = ro.domains != [ ] || ro.ips != [ ] || ro.geosites != [ ] || ro.geoips != [ ];
|
||||||
in
|
in
|
||||||
lib.optional hasAny {
|
lib.optional hasAny {
|
||||||
outbound = resolveTag ob.tag;
|
outbound = resolveTag ob.tag;
|
||||||
inherit (ro) domains ips geosites geoips;
|
inherit (ro)
|
||||||
|
domains
|
||||||
|
ips
|
||||||
|
geosites
|
||||||
|
geoips
|
||||||
|
;
|
||||||
}
|
}
|
||||||
) sb.outbounds;
|
) sb.outbounds;
|
||||||
|
|
||||||
# All custom rules in priority order: per-outbound first, then explicit routing.rules.
|
# All custom rules in priority order: per-outbound first, then explicit routing.rules.
|
||||||
customRules = perOutboundRules ++ map (rule: rule // { outbound = resolveTag rule.outbound; }) r.rules;
|
customRules =
|
||||||
|
perOutboundRules ++ map (rule: rule // { outbound = resolveTag rule.outbound; }) r.rules;
|
||||||
|
|
||||||
# Build sing-box routing rule entries from a custom rule record.
|
# Build sing-box routing rule entries from a custom rule record.
|
||||||
mkCustomRuleEntries =
|
mkCustomRuleEntries =
|
||||||
rule: lib.flatten [
|
rule:
|
||||||
|
lib.flatten [
|
||||||
(mkDomainRule rule.outbound rule.domains)
|
(mkDomainRule rule.outbound rule.domains)
|
||||||
(mkIPRule rule.outbound rule.ips)
|
(mkIPRule rule.outbound rule.ips)
|
||||||
(mkRulesetRule rule.outbound (map (s: "geosite-${s}") rule.geosites))
|
(mkRulesetRule rule.outbound (map (s: "geosite-${s}") rule.geosites))
|
||||||
@@ -126,10 +156,7 @@ let
|
|||||||
|
|
||||||
# All geoip names referenced anywhere.
|
# All geoip names referenced anywhere.
|
||||||
allGeoIPNames = lib.unique (
|
allGeoIPNames = lib.unique (
|
||||||
r.proxy.geoips
|
r.proxy.geoips ++ direct.geoips ++ r.block.geoips ++ lib.concatMap (rule: rule.geoips) customRules
|
||||||
++ direct.geoips
|
|
||||||
++ r.block.geoips
|
|
||||||
++ lib.concatMap (rule: rule.geoips) customRules
|
|
||||||
);
|
);
|
||||||
|
|
||||||
geositeRuleSets = map (name: {
|
geositeRuleSets = map (name: {
|
||||||
@@ -148,7 +175,10 @@ let
|
|||||||
|
|
||||||
routingRules = lib.flatten [
|
routingRules = lib.flatten [
|
||||||
{
|
{
|
||||||
network = [ "tcp" "udp" ];
|
network = [
|
||||||
|
"tcp"
|
||||||
|
"udp"
|
||||||
|
];
|
||||||
port = 53;
|
port = 53;
|
||||||
action = "hijack-dns";
|
action = "hijack-dns";
|
||||||
}
|
}
|
||||||
@@ -167,7 +197,10 @@ let
|
|||||||
(mkRulesetRule "direct" (map (s: "geosite-${s}") direct.geosites))
|
(mkRulesetRule "direct" (map (s: "geosite-${s}") direct.geosites))
|
||||||
(mkRulesetRule "direct" (map (s: "geoip-${s}") direct.geoips))
|
(mkRulesetRule "direct" (map (s: "geoip-${s}") direct.geoips))
|
||||||
|
|
||||||
{ ip_is_private = true; outbound = "direct"; }
|
{
|
||||||
|
ip_is_private = true;
|
||||||
|
outbound = "direct";
|
||||||
|
}
|
||||||
|
|
||||||
# Block (before proxy geosets so block can override them)
|
# Block (before proxy geosets so block can override them)
|
||||||
(mkDomainRule "block" r.block.domains)
|
(mkDomainRule "block" r.block.domains)
|
||||||
|
|||||||
+91
-12
@@ -223,6 +223,29 @@ let
|
|||||||
];
|
];
|
||||||
zapretSyncRules = mkRoutingRules zapretSyncFixture;
|
zapretSyncRules = mkRoutingRules zapretSyncFixture;
|
||||||
|
|
||||||
|
zapretSyncIpsFixture = evalProxySuite [
|
||||||
|
baseModule
|
||||||
|
{
|
||||||
|
services.proxy-suite.zapret = {
|
||||||
|
enable = true;
|
||||||
|
syncDirectRoutingUpstreamIps = true;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zapretSyncIpsRules = mkRoutingRules zapretSyncIpsFixture;
|
||||||
|
|
||||||
|
zapretSyncUserIpsDisabledFixture = evalProxySuite [
|
||||||
|
baseModule
|
||||||
|
{
|
||||||
|
services.proxy-suite.zapret = {
|
||||||
|
enable = true;
|
||||||
|
syncDirectRoutingUserIps = false;
|
||||||
|
ipsetAll = [ "203.0.113.0/24" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zapretSyncUserIpsDisabledRules = mkRoutingRules zapretSyncUserIpsDisabledFixture;
|
||||||
|
|
||||||
zapretSyncDisabledFixture = evalProxySuite [
|
zapretSyncDisabledFixture = evalProxySuite [
|
||||||
baseModule
|
baseModule
|
||||||
{
|
{
|
||||||
@@ -234,30 +257,63 @@ let
|
|||||||
];
|
];
|
||||||
zapretSyncDisabledRules = mkRoutingRules zapretSyncDisabledFixture;
|
zapretSyncDisabledRules = mkRoutingRules zapretSyncDisabledFixture;
|
||||||
|
|
||||||
|
zapretSyncDomainsOnlyFixture = evalProxySuite [
|
||||||
|
baseModule
|
||||||
|
{
|
||||||
|
services.proxy-suite.zapret = {
|
||||||
|
enable = true;
|
||||||
|
syncDirectRouting = true;
|
||||||
|
syncDirectRoutingUpstreamIps = false;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zapretSyncDomainsOnlyRules = mkRoutingRules zapretSyncDomainsOnlyFixture;
|
||||||
|
|
||||||
zapretExtrasFixture = evalProxySuite [
|
zapretExtrasFixture = evalProxySuite [
|
||||||
baseModule
|
baseModule
|
||||||
{
|
{
|
||||||
services.proxy-suite.zapret = {
|
services.proxy-suite.zapret = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listGeneral = [ "pixiv.net" ];
|
listGeneral = [ "pixiv.net" ];
|
||||||
ipsetAll = [ "203.0.113.0/24" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
zapretExtrasRules = mkRoutingRules zapretExtrasFixture;
|
zapretExtrasRules = mkRoutingRules zapretExtrasFixture;
|
||||||
|
|
||||||
|
zapretIpExtrasFixture = evalProxySuite [
|
||||||
|
baseModule
|
||||||
|
{
|
||||||
|
services.proxy-suite.zapret = {
|
||||||
|
enable = true;
|
||||||
|
ipsetAll = [ "203.0.113.0/24" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zapretIpExtrasRules = mkRoutingRules zapretIpExtrasFixture;
|
||||||
|
|
||||||
zapretExcludesFixture = evalProxySuite [
|
zapretExcludesFixture = evalProxySuite [
|
||||||
baseModule
|
baseModule
|
||||||
{
|
{
|
||||||
services.proxy-suite.zapret = {
|
services.proxy-suite.zapret = {
|
||||||
enable = true;
|
enable = true;
|
||||||
listExclude = [ "discord.com" ];
|
listExclude = [ "discord.com" ];
|
||||||
ipsetExclude = [ "1.1.1.0/24" ];
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
zapretExcludesRules = mkRoutingRules zapretExcludesFixture;
|
zapretExcludesRules = mkRoutingRules zapretExcludesFixture;
|
||||||
|
|
||||||
|
zapretIpExcludesFixture = evalProxySuite [
|
||||||
|
baseModule
|
||||||
|
{
|
||||||
|
services.proxy-suite.zapret = {
|
||||||
|
enable = true;
|
||||||
|
ipsetExclude = [ "1.1.1.0/24" ];
|
||||||
|
ipsetAll = [ "1.1.1.0/24" ];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
];
|
||||||
|
zapretIpExcludesRules = mkRoutingRules zapretIpExcludesFixture;
|
||||||
|
|
||||||
proxyDirectFixture = evalProxySuite [
|
proxyDirectFixture = evalProxySuite [
|
||||||
baseModule
|
baseModule
|
||||||
{
|
{
|
||||||
@@ -388,7 +444,27 @@ let
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert hasDirectIP zapretSyncRules "1.1.1.0/24";
|
assert hasDirectDomain zapretSyncRules "cloudflare-ech.com";
|
||||||
|
true
|
||||||
|
)
|
||||||
|
(
|
||||||
|
assert !(hasDirectIP zapretSyncRules "1.1.1.0/24");
|
||||||
|
true
|
||||||
|
)
|
||||||
|
(
|
||||||
|
assert hasDirectDomain zapretSyncDomainsOnlyRules "cloudflare-ech.com";
|
||||||
|
true
|
||||||
|
)
|
||||||
|
(
|
||||||
|
assert !(hasDirectIP zapretSyncDomainsOnlyRules "1.1.1.0/24");
|
||||||
|
true
|
||||||
|
)
|
||||||
|
(
|
||||||
|
assert hasDirectIP zapretSyncIpsRules "1.1.1.0/24";
|
||||||
|
true
|
||||||
|
)
|
||||||
|
(
|
||||||
|
assert !(hasDirectIP zapretSyncUserIpsDisabledRules "203.0.113.0/24");
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
@@ -404,7 +480,7 @@ let
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert hasDirectIP zapretExtrasRules "203.0.113.0/24";
|
assert hasDirectIP zapretIpExtrasRules "203.0.113.0/24";
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
@@ -412,7 +488,7 @@ let
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert !(hasDirectIP zapretExcludesRules "1.1.1.0/24");
|
assert !(hasDirectIP zapretIpExcludesRules "1.1.1.0/24");
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
@@ -432,19 +508,21 @@ let
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert packagePathMatches trayAutostartFixture.config.environment.systemPackages ".*/[^/]*proxy-suite-tray(-[0-9.]+)?$";
|
assert packagePathMatches trayAutostartFixture.config.environment.systemPackages
|
||||||
|
".*/[^/]*proxy-suite-tray(-[0-9.]+)?$";
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert packagePathMatches trayAutostartFixture.config.environment.systemPackages ".*/[^/]*proxy-suite-tray\\.desktop$";
|
assert packagePathMatches trayAutostartFixture.config.environment.systemPackages
|
||||||
|
".*/[^/]*proxy-suite-tray\\.desktop$";
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert
|
assert
|
||||||
builtins.match
|
builtins.match ".*/share/xdg/autostart/proxy-suite-tray\\.desktop$" (
|
||||||
".*/share/xdg/autostart/proxy-suite-tray\\.desktop$"
|
builtins.unsafeDiscardStringContext
|
||||||
(builtins.unsafeDiscardStringContext trayAutostartFixture.config.environment.etc."xdg/autostart/proxy-suite-tray.desktop".source)
|
trayAutostartFixture.config.environment.etc."xdg/autostart/proxy-suite-tray.desktop".source
|
||||||
!= null;
|
) != null;
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
@@ -452,7 +530,8 @@ let
|
|||||||
true
|
true
|
||||||
)
|
)
|
||||||
(
|
(
|
||||||
assert packagePathMatches trayManualFixture.config.environment.systemPackages ".*/[^/]*proxy-suite-tray\\.desktop$";
|
assert packagePathMatches trayManualFixture.config.environment.systemPackages
|
||||||
|
".*/[^/]*proxy-suite-tray\\.desktop$";
|
||||||
true
|
true
|
||||||
)
|
)
|
||||||
];
|
];
|
||||||
|
|||||||
Reference in new issue
Block a user