feat: add firewall mode DNS-resolved IP allowlist

This commit is contained in:
Codescribe
2026-07-08 15:31:54 +07:00
committed by Cuong Manh Le
parent 9eb7067fbe
commit 8330049b66
25 changed files with 2618 additions and 335 deletions
+9
View File
@@ -268,6 +268,15 @@ func validInterceptMode(mode string) bool {
return false
}
// validFirewallMode reports whether the given value is a recognized --firewall-mode.
func validFirewallMode(mode string) bool {
switch mode {
case "off", "on":
return true
}
return false
}
// onlyInterceptFlags reports whether args contain only intercept mode
// flags (--intercept-mode <value>) and flags that are auto-added by the
// start command alias (--iface). This is used to detect "ctrld start --intercept-mode dns"