mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 15:51:21 +00:00
add disableTunneler flag
This commit is contained in:
@@ -33,9 +33,9 @@ link:
|
||||
{{ if .Router.IsFabric }}#{{ end }} advertise: {{ .Router.Edge.Hostname }}:{{ if .Router.IsWss }}3023{{ else }}{{ .Router.Edge.Port }}{{ end }}
|
||||
{{ if .Router.IsFabric }}#{{ end }} connectTimeoutMs: {{ .Router.Listener.ConnectTimeout.Milliseconds }}
|
||||
{{ if .Router.IsFabric }}#{{ end }} getSessionTimeout: {{ .Router.Listener.GetSessionTimeout.Seconds }}s
|
||||
{{ if .Router.IsFabric }}#{{ end }} - binding: tunnel
|
||||
{{ if .Router.IsFabric }}#{{ end }} options:
|
||||
{{ if .Router.IsFabric }}#{{ end }} mode: host #tproxy|host
|
||||
{{ if .Router.IsFabric }}#{{ end }}{{ if .Router.TunnelerDisabled }}#{{ end }} - binding: tunnel
|
||||
{{ if .Router.IsFabric }}#{{ end }}{{ if .Router.TunnelerDisabled }}#{{ end }} options:
|
||||
{{ if .Router.IsFabric }}#{{ end }}{{ if .Router.TunnelerDisabled }}#{{ end }} mode: host #tproxy|host
|
||||
|
||||
{{ if or .Router.IsFabric }}
|
||||
csr:
|
||||
|
||||
@@ -119,6 +119,7 @@ type RouterTemplateValues struct {
|
||||
IsPrivate bool
|
||||
IsFabric bool
|
||||
IsWss bool
|
||||
TunnelerDisabled bool
|
||||
IdentityCert string
|
||||
IdentityServerCert string
|
||||
IdentityKey string
|
||||
|
||||
@@ -33,9 +33,10 @@ const (
|
||||
type CreateConfigRouterOptions struct {
|
||||
CreateConfigOptions
|
||||
|
||||
RouterName string
|
||||
WssEnabled bool
|
||||
IsPrivate bool
|
||||
RouterName string
|
||||
WssEnabled bool
|
||||
IsPrivate bool
|
||||
TunnelerDisabled bool
|
||||
}
|
||||
|
||||
var routerOptions = CreateConfigRouterOptions{}
|
||||
|
||||
@@ -64,6 +64,7 @@ func NewCmdCreateConfigRouterEdge() *cobra.Command {
|
||||
PreRun: func(cmd *cobra.Command, args []string) {
|
||||
data.Router.IsWss = routerOptions.WssEnabled
|
||||
data.Router.IsPrivate = routerOptions.IsPrivate
|
||||
data.Router.TunnelerDisabled = routerOptions.TunnelerDisabled
|
||||
},
|
||||
Run: func(cmd *cobra.Command, args []string) {
|
||||
routerOptions.Cmd = cmd
|
||||
@@ -82,6 +83,7 @@ func NewCmdCreateConfigRouterEdge() *cobra.Command {
|
||||
func (options *CreateConfigRouterOptions) addEdgeFlags(cmd *cobra.Command) {
|
||||
cmd.Flags().BoolVar(&options.WssEnabled, optionWSS, defaultWSS, wssDescription)
|
||||
cmd.Flags().BoolVar(&options.IsPrivate, optionPrivate, defaultPrivate, privateDescription)
|
||||
cmd.PersistentFlags().BoolVarP(&options.TunnelerDisabled, "disableTunneler", "t", false, "whether the router has tunneling disabled")
|
||||
cmd.PersistentFlags().StringVarP(&options.RouterName, optionRouterName, "n", "", "name of the router")
|
||||
err := cmd.MarkPersistentFlagRequired(optionRouterName)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user