Add WARP routing flag

This commit is contained in:
Helio Machado 2023-07-02 22:50:34 +00:00 committed by GitHub
parent aca3575b6d
commit 5856bce073
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 0 deletions

View File

@ -764,6 +764,12 @@ func tunnelFlags(shouldHide bool) []cli.Flag {
EnvVars: []string{"TUNNEL_POST_QUANTUM"}, EnvVars: []string{"TUNNEL_POST_QUANTUM"},
Hidden: FipsEnabled, Hidden: FipsEnabled,
}), }),
altsrc.NewBoolFlag(&cli.BoolFlag{
Name: "warp-routing",
Usage: "Enable WARP routing",
EnvVars: []string{"TUNNEL_WARP_ROUTING"},
Hidden: shouldHide,
}),
selectProtocolFlag, selectProtocolFlag,
overwriteDNSFlag, overwriteDNSFlag,
}...) }...)

View File

@ -252,6 +252,9 @@ func prepareTunnelConfig(
WarpRouting: ingress.NewWarpRoutingConfig(&cfg.WarpRouting), WarpRouting: ingress.NewWarpRoutingConfig(&cfg.WarpRouting),
ConfigurationFlags: parseConfigFlags(c), ConfigurationFlags: parseConfigFlags(c),
} }
if c.Bool("warp-routing") {
orchestratorConfig.WarpRouting.Enabled = true
}
return tunnelConfig, orchestratorConfig, nil return tunnelConfig, orchestratorConfig, nil
} }