feat: introduce DNS intercept mode infrastructure

This commit is contained in:
Codescribe
2026-03-05 04:50:08 -05:00
committed by Cuong Manh Le
parent c56d4771de
commit 395335162f
16 changed files with 1476 additions and 18 deletions
+1
View File
@@ -51,6 +51,7 @@ func InitRunCmd(rootCmd *cobra.Command) *cobra.Command {
_ = runCmd.Flags().MarkHidden("iface")
runCmd.Flags().StringVarP(&cdUpstreamProto, "proto", "", ctrld.ResolverTypeDOH, `Control D upstream type, either "doh" or "doh3"`)
runCmd.Flags().BoolVarP(&rfc1918, "rfc1918", "", false, "Listen on RFC1918 addresses when 127.0.0.1 is the only listener")
runCmd.Flags().StringVarP(&interceptMode, "intercept-mode", "", "", "OS-level DNS interception mode: 'dns' (with VPN split routing) or 'hard' (all DNS through ctrld, no VPN split routing)")
runCmd.FParseErrWhitelist = cobra.FParseErrWhitelist{UnknownFlags: true}
rootCmd.AddCommand(runCmd)