{{ define "admin-tunnel-edit-http-rule" }} {{ template "nav-sidebar" . }}
{{ template "navbar-user" . }}

HTTP/S Traffic

{{ if .UpdateTraffic }}

Update or reset the HTTP traffic, security and routing rules.

{{ else }}

Create a new HTTP traffic rule. Setup upstream server values, encryption options and any additional security mechanisms.

{{ end }}
{{ if len (.Error "client") }}
{{ .Error "client" }}
{{ end }}
{{ if len (.Error "domain") }}
{{ .Error "domain" }}
{{ end }}


{{ if len (.Error "upstreamURL") }}
{{ .Error "upstreamURL" }}
{{ end }}

{{ if len (.Error "insecureUpstream") }}
{{ .Error "insecureUpstream" }}
{{ end }}
{{ if len (.Error "destination") }}
{{ .Error "destination" }}
{{ end }}


{{ if not .DisableInspect }} {{ if len (.Error "inspect") }}
{{ .Error "inspect" }}
{{ end }}
{{ end }} {{ if len (.Error "redirect") }}
{{ .Error "redirect" }}
{{ end }}

TLS

The default TLS encryption method will utilize the Spokes server to terminate TLS. Note this is typically implemented by installing a wildcard certificate in the certs-extra directory.

Using Let's Encrypt or custom certificates will implement end-to-end encrypted traffic with the tunnel.

{{ if len (.Error "serverTLS") }}
{{ .Error "serverTLS" }}
{{ end }} {{ if .UpdateTraffic }}

Note, if you used custom certificates earlier and want to continue using them you must upload them again with the inputs below. The client will not carry past ones forward.

{{ end }}

Authentication

Users will be required to input a passphrase into a captive portal login and authenticate, restricting traffic otherwise. Resetting the password removes an existing password login. It will also remove 2FA as well.

{{ if len (.Error "password") }}
{{ .Error "password" }}
{{ end }}
{{ if len .Http.Password }}
An authentication password is already set. Leave the input fields below empty to maintain it.
{{ end }} {{ if len (.Error "oidclientid") }}
{{ .Error "oidclientid" }}
{{ end }} {{ if len (.Error "oidclientsecret") }}
{{ .Error "oidclientsecret" }}
{{ end }} {{ if len (.Error "oidproviderURL") }}
{{ .Error "oidproviderURL" }}
{{ end }} {{ if len (.Error "oidredirectURL") }}
{{ .Error "oidredirectURL" }}
{{ end }}

Optionally customize the authentication page with a title, logo and link to another website. Check the URLs you input are correct.

{{ if len (.Error "siteTitle") }}
{{ .Error "siteTitle" }}
{{ end }}

Basic-Digest

Restrict requests to tunnels using HTTP Basic-Digest that authenticates each request.

{{ if len (.Error "digestUser") }}
{{ .Error "digestUser" }}
{{ end }}

{{ if len (.Error "digestPassword") }}
{{ .Error "digestPassword" }}
{{ end }}

{{ template "custom-headers-edit" . }} {{ template "url-path-routes-edit" . }}
{{ template "firewall-traffic-edit" . }}
{{ template "menu-toggle" . }}
{{ template "loading-dialog" . }} {{ end }} {{ define "admin-tunnel-edit-tcp-rule" }} {{ template "nav-sidebar" . }}
{{ template "navbar-user" . }}

Port Traffic

Reset an existing traffic rule or update the destination for traffic.

{{ if len (.Error "client") }}
{{ .Error "client" }}
{{ end }}

{{ if len (.Error "destination") }}
{{ .Error "destination" }}
{{ end }}

{{ if len (.Error "destPort") }}
{{ .Error "destPort" }}
{{ end }}


{{ template "firewall-traffic-edit" . }}
{{ template "menu-toggle" . }}
{{ template "loading-dialog" . }} {{ end }} {{ define "firewall-traffic-edit" }} {{ $firewall := .Firewall }}
{{ if len (.Error "firewall") }}
{{ .Error "firewall" }}
{{ end }}

Firewall

Allow or restrict traffic to this TCP application using CIDR notation to identify the IPv4 or IPv6 networks. Some example networks can be the following: 1.2.3.4/16 for IP4 or 2345:0425:2CA1:0000::0000/64 for IPv6.

Note, rules must use proper sequence numbers that begin with 1, e.g. 1, 2, 3.

{{ if eq (len $firewall) 0 }} {{ end }} {{ range $i, $rule := $firewall }} {{ end }}
Sequence Action Network

No firewall rules for this traffic rule.

{{ end }} {{ define "custom-headers-edit" }}

Custom Headers

Optionally inject additional HTTP headers into proxied traffic. Request headers are added to every request before it is forwarded to the upstream (useful for API keys or tracing). Response headers are added to the response returned to the client (useful for CORS such as Access-Control-Allow-Origin, caching directives, or security headers).

{{ if len (.Error "reqHeaderName") }}
{{ .Error "reqHeaderName" }}
{{ end }}

Requests

{{ if eq (len .Http.RequestHeaders) 0 }} {{ end }} {{ range $i, $h := .Http.RequestHeaders }} {{ end }}
Header NameValue

No custom request headers.


{{ if len (.Error "respHeaderName") }}
{{ .Error "respHeaderName" }}
{{ end }}

Responses

{{ if eq (len .Http.ResponseHeaders) 0 }} {{ end }} {{ range $i, $h := .Http.ResponseHeaders }} {{ end }}
Header NameValue

No custom response headers.

{{ end }} {{ define "url-path-routes-edit" }}

URL Path Routes

Optionally route requests to different upstreams or local file systems by URL path prefix. Routes are matched longest-prefix first (so /api/v1 wins over /api). A request that matches no route falls back to the base upstream configured above. Each route targets either an Upstream URL (http(s)://host:port) or a local WebRoot, not both. The catch-all prefix / matches everything that no more specific route already matched.

{{ if len (.Error "routePrefix") }}
{{ .Error "routePrefix" }}
{{ end }} {{ if len (.Error "routeUpstream") }}
{{ .Error "routeUpstream" }}
{{ end }}
{{ if eq (len .Http.Routes) 0 }} {{ end }} {{ range $i, $route := .Http.Routes }} {{ end }}
Prefix Upstream URL WebRoot Strip Prefix Insecure TLS

No URL path routes.

{{ end }}