extra refactoring

This commit is contained in:
FUFSoB committed 2026-04-19 12:09:21 +05:00
1 parent 078367d919
commit 744a769e73
14 files changed
+943 -1230

No files matched your search

@@ -0,0 +1,52 @@
{ lib, ... }:
let
inherit (lib) mkOption;
t = import ./types.nix { inherit lib; };
in
{
options.services.proxy-suite.singBox.dns = {
local = mkOption {
type = t.dnsUpstreamType;
default = {
type = "udp";
address = "1.1.1.1";
port = 53;
};
description = ''
DNS upstream used for the built-in "local" resolver role.
This resolver is also used as sing-box route.default_domain_resolver.
The module keeps detour policy automatic: in mixed/TProxy mode and
per-app-routing TUN mode, "local" stays on the direct path (without an
explicit detour); in global TUN mode, it is forced through the proxy to avoid
auto_redirect conflicts.
'';
example = {
type = "tcp";
address = "9.9.9.9";
port = 53;
};
};
remote = mkOption {
type = t.dnsUpstreamType;
default = {
type = "udp";
address = "1.1.1.1";
port = 53;
};
description = ''
DNS upstream used for the built-in "remote" resolver role.
This resolver always detours through the proxy and becomes the
generated dns.final target when singBox.proxyByDefault = true.
'';
example = {
type = "tls";
address = "1.1.1.1";
port = 853;
};
};
};
}