feat: whitelists bypass methods

This commit is contained in:
fufsob committed 2026-09-25 02:24:05 +00:00
1 parent 11c44deb61
commit f3e9140f62
22 files changed
+716 -3

No files matched your search

+18
View File
@@ -72,6 +72,24 @@ in
ROUTE_MODE_STATE_FILE = routeModeStateFile;
DEFAULT_ROUTE_MODE = if proxyCfg.routing.default == "proxy" then "blacklist" else "whitelist";
AWG_PROFILES_FILE = toString amneziaWgProfileNamesFile;
WL_FILE = toString (
pkgs.writeText "proxy-suite-control" (
builtins.toJSON (
lib.optionals cfg.whitelistBypass.enable (
lib.mapAttrsToList (name: c: {
inherit name;
inherit (c) platform;
role = "creator";
}) cfg.whitelistBypass.creators
++ lib.mapAttrsToList (name: j: {
inherit name;
inherit (j) platform;
role = "joiner";
}) cfg.whitelistBypass.joiners
)
)
)
);
INBOUNDS_ENABLED = flag proxyInboundsEnabled;
INBOUNDS_LINKS_FILE = proxyInboundsLinksFile;
INBOUNDS_STATS_FILE = constants.inboundStatsFile;
@@ -6,6 +6,7 @@
sshProxyCfg,
warpCfg,
torCfg,
whitelistBypassJoiners,
awgOutbounds,
constants,
pureXrayEnabled,
@@ -588,6 +589,9 @@ let
torBlock = lib.optionalString torOutboundEnabled (
mkTunnelOutboundBlock "proxy-suite-tor" "tor" "tor" torCfg.socksPort
);
whitelistBypassBlocks = lib.concatMapStrings (
j: mkTunnelOutboundBlock "proxy-suite-wb-joiner-${j.tag}" "whitelist-bypass" j.tag j.port
) whitelistBypassJoiners;
awgBlocks = lib.concatMapStrings (mkAwgOutboundBlock routingMark) awgOutbounds;
wrapperBlock =
@@ -666,6 +670,7 @@ let
+ sshProxyBlock
+ warpBlock
+ torBlock
+ whitelistBypassBlocks
+ awgBlocks
+ detourBlock
+ requireOutboundsBlock
+1
View File
@@ -125,6 +125,7 @@ let
sshProxyCfg
warpCfg
torCfg
whitelistBypassJoiners
awgOutbounds
constants
pureXrayEnabled
+3 -1
View File
@@ -20,6 +20,7 @@ let
sshProxyUnitEnabled
torOutboundEnabled
torOnionEnabled
whitelistBypassJoiners
proxyInboundsEnabled
proxyInboundsNeedLocalProxy
scripts
@@ -88,7 +89,8 @@ let
"network-online.target"
]
++ lib.optional (sshProxyOutboundEnabled && sshProxyUnitEnabled) "proxy-suite-ssh-proxy.service"
++ lib.optional torOutboundEnabled "proxy-suite-tor.service";
++ lib.optional torOutboundEnabled "proxy-suite-tor.service"
++ map (j: "proxy-suite-wb-joiner-${j.tag}.service") whitelistBypassJoiners;
wantedBy = [ "multi-user.target" ];
execStart = scripts.startSocks;
runtimeDirectory = serviceNames.socks;