Files

100 lines
5.3 KiB
YAML

{{- /*
Config Format Version
Whenever a breaking change is made to the semantics of this configuration file, the configuration version
expected by the router will be incremented. When the controller tries to load a configuration file with
an incompatible version, it will abort with a message prompting the operator to seek out the breaking changes
documentation.*/ -}}
v: 3
identity:
cert: "{{ .Router.IdentityCert }}"
server_cert: "{{ .Router.IdentityServerCert }}"
key: "{{ .Router.IdentityKey }}"
ca: "{{ .Router.IdentityCA }}"
{{ if not .Router.AltCertsEnabled }}#{{ end }}alt_server_certs:
{{ if not .Router.AltCertsEnabled }}#{{ end }} - server_cert: "{{ .Router.AltServerCert }}"
{{ if not .Router.AltCertsEnabled }}#{{ end }} server_key: "{{ .Router.AltServerKey }}"
ctrl:
endpoint: tls:{{ .Controller.Ctrl.AdvertisedAddress }}:{{ .Controller.Ctrl.AdvertisedPort }}
link:
dialers:
- binding: transport
{{ if .Router.IsPrivate }}#{{ end }} listeners:
{{ if .Router.IsPrivate }}#{{ end }} - binding: transport
{{ if .Router.IsPrivate }}#{{ end }} bind: tls:0.0.0.0:{{ .Router.Edge.ListenerBindPort }}
{{ if .Router.IsPrivate }}#{{ end }} advertise: tls:{{ .Router.Edge.AdvertisedHost }}:{{ .Router.Edge.ListenerBindPort }}
{{ if .Router.IsPrivate }}#{{ end }} options:
{{ if .Router.IsPrivate }}#{{ end }} outQueueSize: {{ .Router.Listener.OutQueueSize }}
{{ if .Router.IsFabric }}#{{ end }}listeners:
# bindings of edge and tunnel requires an "edge" section below
{{ if .Router.IsFabric }}#{{ end }} - binding: edge
{{ if .Router.IsFabric }}#{{ end }} address: {{ if .Router.IsWss }}wss{{ else }}tls{{end}}:0.0.0.0:{{ .Router.Edge.Port }}
{{ if .Router.IsFabric }}#{{ end }} options:
{{ if .Router.IsFabric }}#{{ end }} advertise: {{ .Router.Edge.AdvertisedHost }}:{{ .Router.Edge.Port }}
{{ if .Router.IsFabric }}#{{ end }} connectTimeoutMs: {{ .Router.Listener.ConnectTimeout.Milliseconds }}
{{ if .Router.IsFabric }}#{{ end }} getSessionTimeout: {{ .Router.Listener.GetSessionTimeout.Seconds }}
{{ if or .Router.IsFabric (eq .Router.TunnelerMode "none") }}#{{ end }} - binding: tunnel
{{ if or .Router.IsFabric (eq .Router.TunnelerMode "none") }}#{{ end }} options:
{{ if or .Router.IsFabric (eq .Router.TunnelerMode "none") }}# mode: host #tproxy|host{{ else }} mode: {{ .Router.TunnelerMode }} #tproxy|host{{ end }}
{{ if and (not .Router.IsFabric) (eq .Router.TunnelerMode "tproxy") }} resolver: udp://{{ .Router.Edge.AdvertisedHost }}:53{{ end }}
{{ if and (not .Router.IsFabric) (eq .Router.TunnelerMode "tproxy") }} lanIf: {{ .Router.Edge.LanInterface }}{{ end }}
{{ if .Router.IsFabric -}}
csr:
country: US
province: NC
locality: Charlotte
organization: NetFoundry
organizationalUnit: Ziti
sans:
dns:
- localhost
{{ if .Router.Edge.CsrSans }} - {{ .Router.Edge.CsrSans }}{{ end }}
{{ if ne .Router.Edge.CsrSans .Hostname }} - {{ .Hostname }}{{ end }}
ip:
- "127.0.0.1"
{{ if .Router.Edge.IPOverride }} - "{{ .Router.Edge.IPOverride }}"{{ end }}
{{ else }}
edge:
csr:
country: {{ .Router.Edge.CsrC }}
province: {{ .Router.Edge.CsrST }}
locality: {{ .Router.Edge.CsrL }}
organization: {{ .Router.Edge.CsrO }}
organizationalUnit: {{ .Router.Edge.CsrOU }}
sans:
dns:
- localhost
{{ if .Router.Edge.CsrSans }} - {{ .Router.Edge.CsrSans }}{{ end }}
{{ if ne .Router.Edge.CsrSans .Hostname }} - {{ .Hostname }}{{ end }}
ip:
- "127.0.0.1"
{{ if .Router.Edge.IPOverride }} - "{{ .Router.Edge.IPOverride }}"{{ end }}
{{ end }}
{{ if not .Router.IsWss }}#{{ end }}transport:
{{ if not .Router.IsWss }}#{{ end }} ws:
{{ if not .Router.IsWss }}#{{ end }} writeTimeout: {{ .Router.Wss.WriteTimeout.Seconds }}
{{ if not .Router.IsWss }}#{{ end }} readTimeout: {{ .Router.Wss.ReadTimeout.Seconds }}
{{ if not .Router.IsWss }}#{{ end }} idleTimeout: {{ .Router.Wss.IdleTimeout.Seconds }}
{{ if not .Router.IsWss }}#{{ end }} pongTimeout: {{ .Router.Wss.PongTimeout.Seconds }}
{{ if not .Router.IsWss }}#{{ end }} pingInterval: {{ .Router.Wss.PingInterval.Seconds }}
{{ if not .Router.IsWss }}#{{ end }} handshakeTimeout: {{ .Router.Wss.HandshakeTimeout.Seconds }}
{{ if not .Router.IsWss }}#{{ end }} readBufferSize: {{ .Router.Wss.ReadBufferSize }}
{{ if not .Router.IsWss }}#{{ end }} writeBufferSize: {{ .Router.Wss.WriteBufferSize }}
{{ if not .Router.IsWss }}#{{ end }} enableCompression: {{ .Router.Wss.EnableCompression }}
{{ if not .Router.IsWss }}#{{ end }} server_cert: {{ .Router.IdentityServerCert }}
{{ if not .Router.IsWss }}#{{ end }} key: {{ .Router.IdentityKey }}
{{ if not .Router.AltCertsEnabled }}#{{ end }}alt_server_certs:
{{ if not .Router.AltCertsEnabled }}#{{ end }} - server_cert: "{{ .Router.AltServerCert }}"
{{ if not .Router.AltCertsEnabled }}#{{ end }} server_key: "{{ .Router.AltServerKey }}"
forwarder:
latencyProbeInterval: {{ .Router.Forwarder.LatencyProbeInterval.Seconds }}
xgressDialQueueLength: {{ .Router.Forwarder.XgressDialQueueLength }}
xgressDialWorkerCount: {{ .Router.Forwarder.XgressDialWorkerCount }}
linkDialQueueLength: {{ .Router.Forwarder.LinkDialQueueLength }}
linkDialWorkerCount: {{ .Router.Forwarder.LinkDialWorkerCount }}