feat/wip/fix: add inbounds support, fix ssh-proxy

This commit is contained in:
fufsob committed 2026-09-09 16:38:52 +00:00
1 parent ea7916dffb
commit 2a319d1f88
39 files changed
+5093 -48

No files matched your search

+43
View File
@@ -24,6 +24,41 @@ let
;
};
inboundRules = import ./rules/proxy-inbounds.nix {
inherit lib;
inherit (derived) proxyInboundsCfg proxyInbounds;
inherit (rules) zapretDirectRules;
};
proxyInboundsTemplate = import ./config-templates/proxy-inbounds.nix {
inherit lib derived inboundRules;
inherit (xrayTemplates) mkDnsServer;
};
# Listener specification handed to build-inbound.py at service start. Secrets
# appear here only as paths; the script reads them at runtime.
proxyInboundsSpec = {
serverAddress = derived.proxyInboundsCfg.serverAddress;
shareLinks = derived.proxyInboundsCfg.shareLinks;
listeners = map (ib: {
inherit (ib) tag;
inherit (ib.listener)
type
port
sharePort
users
flow
method
transport
tls
reality
xrayJson
jsonFile
;
listen = ib.listener.listenAddress;
}) derived.proxyInbounds;
};
selectedTemplates = if derived.pureXrayEnabled then xrayTemplates else singBoxTemplates;
routeModeRules =
if derived.pureXrayEnabled then rules.xrayRouteModeRules else rules.singBoxRouteModeRules;
@@ -40,6 +75,12 @@ let
routeModeRulesFile = pkgs.writeText "proxy-suite-route-mode-rules.json" (
builtins.toJSON routeModeRules
);
proxyInboundsFile = pkgs.writeText "proxy-suite-inbounds-template.json" (
builtins.toJSON proxyInboundsTemplate
);
proxyInboundsSpecFile = pkgs.writeText "proxy-suite-inbounds-spec.json" (
builtins.toJSON proxyInboundsSpec
);
in
{
inherit
@@ -47,5 +88,7 @@ in
tunFile
perAppTunFile
routeModeRulesFile
proxyInboundsFile
proxyInboundsSpecFile
;
}