Send proxy protocol header before TLS handshake
Co-authored-by: Kevin Pollet <pollet.kevin@gmail.com>
This commit is contained in:
parent
30b0666219
commit
f9fbcfbb42
28 changed files with 566 additions and 416 deletions
|
|
@ -730,7 +730,7 @@ In v3, we renamed the `IPWhiteList` middleware to `IPAllowList` without changing
|
|||
|
||||
### TCP LoadBalancer `terminationDelay` option
|
||||
|
||||
The TCP LoadBalancer `terminationDelay` option has been removed.
|
||||
The TCP LoadBalancer `terminationDelay` option has been deprecated.
|
||||
This option can now be configured directly on the `TCPServersTransport` level, please take a look at this [documentation](../routing/services/index.md#terminationdelay)
|
||||
|
||||
### Kubernetes CRDs API Group `traefik.containo.us`
|
||||
|
|
|
|||
|
|
@ -413,12 +413,12 @@ Reserved characters change the meaning of request paths when decoded. Keeping th
|
|||
|
||||
The following table illustrates how path matching behavior has changed:
|
||||
|
||||
| Request Path | Router Rule | Traefik v3.4.0 | Traefik v3.4.1 | Explanation |
|
||||
|-------------------|------------------------|----------------|----------------|-------------|
|
||||
| `/foo%2Fbar` | ```PathPrefix(`/foo/bar`)``` | Match | No match | `%2F` (/) stays encoded, preventing false matches |
|
||||
| `/foo/../bar` | ```PathPrefix(`/foo`)``` | No match | No match | Path traversal is sanitized away |
|
||||
| `/foo/../bar` | ```PathPrefix(`/bar`)``` | Match | Match | Resolves to `/bar` after sanitization |
|
||||
| `/foo/%2E%2E/bar` | ```PathPrefix(`/foo`)``` | Match | No match | Encoded dots normalized then sanitized |
|
||||
| Request Path | Router Rule | Traefik v3.4.0 | Traefik v3.4.1 | Explanation |
|
||||
|-------------------|------------------------------|----------------|----------------|-------------------------------------------------------|
|
||||
| `/foo%2Fbar` | ```PathPrefix(`/foo/bar`)``` | Match | No match | `%2F` (/) stays encoded, preventing false matches |
|
||||
| `/foo/../bar` | ```PathPrefix(`/foo`)``` | No match | No match | Path traversal is sanitized away |
|
||||
| `/foo/../bar` | ```PathPrefix(`/bar`)``` | Match | Match | Resolves to `/bar` after sanitization |
|
||||
| `/foo/%2E%2E/bar` | ```PathPrefix(`/foo`)``` | Match | No match | Encoded dots normalized then sanitized |
|
||||
| `/foo/%2E%2E/bar` | ```PathPrefix(`/bar`)``` | No match | Match | Resolves to `/bar` after normalization + sanitization |
|
||||
|
||||
## v3.4.5
|
||||
|
|
@ -470,3 +470,22 @@ For that purpose, the following right has to be added to the Traefik Kubernetes
|
|||
- get
|
||||
...
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## v3.5.2
|
||||
|
||||
### Deprecation of ProxyProtocol option
|
||||
|
||||
Starting with `v3.5.2`, the `proxyProtocol` option for TCP LoadBalancer is deprecated.
|
||||
This option can now be configured at the `TCPServersTransport` level, please check out the [documentation](../reference/routing-configuration/tcp/serverstransport.md) for more details.
|
||||
|
||||
#### Kubernetes CRD Provider
|
||||
|
||||
To use the new `proxyprotocol` option in the Kubernetes CRD provider, you need to update your CRDs.
|
||||
|
||||
**Apply Updated CRDs:**
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://raw.githubusercontent.com/traefik/traefik/v3.5/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
|
||||
```
|
||||
|
|
|
|||
|
|
@ -454,16 +454,16 @@
|
|||
[tcp.services.TCPService01.loadBalancer]
|
||||
serversTransport = "foobar"
|
||||
terminationDelay = 42
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
[tcp.services.TCPService01.loadBalancer.proxyProtocol]
|
||||
version = 42
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
[tcp.services.TCPService02]
|
||||
[tcp.services.TCPService02.weighted]
|
||||
|
||||
|
|
@ -489,6 +489,8 @@
|
|||
dialKeepAlive = "42s"
|
||||
dialTimeout = "42s"
|
||||
terminationDelay = "42s"
|
||||
[tcp.serversTransports.TCPServersTransport0.proxyProtocol]
|
||||
version = 42
|
||||
[tcp.serversTransports.TCPServersTransport0.tls]
|
||||
serverName = "foobar"
|
||||
insecureSkipVerify = true
|
||||
|
|
@ -509,6 +511,8 @@
|
|||
dialKeepAlive = "42s"
|
||||
dialTimeout = "42s"
|
||||
terminationDelay = "42s"
|
||||
[tcp.serversTransports.TCPServersTransport1.proxyProtocol]
|
||||
version = 42
|
||||
[tcp.serversTransports.TCPServersTransport1.tls]
|
||||
serverName = "foobar"
|
||||
insecureSkipVerify = true
|
||||
|
|
|
|||
|
|
@ -518,14 +518,14 @@ tcp:
|
|||
services:
|
||||
TCPService01:
|
||||
loadBalancer:
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
servers:
|
||||
- address: foobar
|
||||
tls: true
|
||||
- address: foobar
|
||||
tls: true
|
||||
serversTransport: foobar
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
terminationDelay: 42
|
||||
TCPService02:
|
||||
weighted:
|
||||
|
|
@ -552,6 +552,8 @@ tcp:
|
|||
TCPServersTransport0:
|
||||
dialKeepAlive: 42s
|
||||
dialTimeout: 42s
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
terminationDelay: 42s
|
||||
tls:
|
||||
serverName: foobar
|
||||
|
|
@ -573,6 +575,8 @@ tcp:
|
|||
TCPServersTransport1:
|
||||
dialKeepAlive: 42s
|
||||
dialTimeout: 42s
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
terminationDelay: 42s
|
||||
tls:
|
||||
serverName: foobar
|
||||
|
|
|
|||
|
|
@ -544,6 +544,7 @@ spec:
|
|||
description: |-
|
||||
ProxyProtocol defines the PROXY protocol configuration.
|
||||
More info: https://doc.traefik.io/traefik/v3.5/routing/services/#proxy-protocol
|
||||
Deprecated: ProxyProtocol will not be supported in future APIVersions, please use ServersTransport to configure ProxyProtocol instead.
|
||||
properties:
|
||||
version:
|
||||
description: Version defines the PROXY Protocol version
|
||||
|
|
@ -2400,6 +2401,15 @@ spec:
|
|||
to a backend server can be established.
|
||||
pattern: ^([0-9]+(ns|us|µs|ms|s|m|h)?)+$
|
||||
x-kubernetes-int-or-string: true
|
||||
proxyProtocol:
|
||||
description: ProxyProtocol holds the PROXY Protocol configuration.
|
||||
properties:
|
||||
version:
|
||||
description: Version defines the PROXY Protocol version to use.
|
||||
maximum: 2
|
||||
minimum: 1
|
||||
type: integer
|
||||
type: object
|
||||
terminationDelay:
|
||||
anyOf:
|
||||
- type: integer
|
||||
|
|
|
|||
|
|
@ -365,6 +365,7 @@ THIS FILE MUST NOT BE EDITED BY HAND
|
|||
| `traefik/tcp/routers/TCPRouter1/tls/passthrough` | `true` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport0/dialKeepAlive` | `42s` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport0/dialTimeout` | `42s` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport0/proxyProtocol/version` | `42` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport0/terminationDelay` | `42s` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport0/tls/certificates/0/certFile` | `foobar` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport0/tls/certificates/0/keyFile` | `foobar` |
|
||||
|
|
@ -380,6 +381,7 @@ THIS FILE MUST NOT BE EDITED BY HAND
|
|||
| `traefik/tcp/serversTransports/TCPServersTransport0/tls/spiffe/trustDomain` | `foobar` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport1/dialKeepAlive` | `42s` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport1/dialTimeout` | `42s` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport1/proxyProtocol/version` | `42` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport1/terminationDelay` | `42s` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport1/tls/certificates/0/certFile` | `foobar` |
|
||||
| `traefik/tcp/serversTransports/TCPServersTransport1/tls/certificates/0/keyFile` | `foobar` |
|
||||
|
|
|
|||
|
|
@ -123,6 +123,7 @@ spec:
|
|||
description: |-
|
||||
ProxyProtocol defines the PROXY protocol configuration.
|
||||
More info: https://doc.traefik.io/traefik/v3.5/routing/services/#proxy-protocol
|
||||
Deprecated: ProxyProtocol will not be supported in future APIVersions, please use ServersTransport to configure ProxyProtocol instead.
|
||||
properties:
|
||||
version:
|
||||
description: Version defines the PROXY Protocol version
|
||||
|
|
|
|||
|
|
@ -63,6 +63,15 @@ spec:
|
|||
to a backend server can be established.
|
||||
pattern: ^([0-9]+(ns|us|µs|ms|s|m|h)?)+$
|
||||
x-kubernetes-int-or-string: true
|
||||
proxyProtocol:
|
||||
description: ProxyProtocol holds the PROXY Protocol configuration.
|
||||
properties:
|
||||
version:
|
||||
description: Version defines the PROXY Protocol version to use.
|
||||
maximum: 2
|
||||
minimum: 1
|
||||
type: integer
|
||||
type: object
|
||||
terminationDelay:
|
||||
anyOf:
|
||||
- type: integer
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ This registers the `IngressRouteTCP` kind and other Traefik-specific resources.
|
|||
|
||||
You can declare an `IngressRouteTCP` as detailed below:
|
||||
|
||||
```yaml tab="IngressRoute"
|
||||
```yaml tab="IngressRouteTCP"
|
||||
apiVersion: traefik.io/v1alpha1
|
||||
kind: IngressRouteTCP
|
||||
metadata:
|
||||
|
|
@ -36,8 +36,6 @@ spec:
|
|||
- name: foo
|
||||
port: 8080
|
||||
weight: 10
|
||||
proxyProtocol:
|
||||
version: 1
|
||||
serversTransport: transport
|
||||
nativeLB: true
|
||||
nodePortLB: true
|
||||
|
|
@ -59,33 +57,31 @@ spec:
|
|||
|
||||
## Configuration Options
|
||||
|
||||
| Field | Description | Default | Required |
|
||||
|-------------------------------------|-----------------------------|-------------------------------------------|-----------------------|
|
||||
| `entryPoints` | List of entrypoints names. | | No |
|
||||
| `routes` | List of routes. | | Yes |
|
||||
| `routes[n].match` | Defines the [rule](../../../tcp/router/rules-and-priority.md#rules) of the underlying router. | | Yes |
|
||||
| `routes[n].priority` | Defines the [priority](../../../tcp/router/rules-and-priority.md#priority) to disambiguate rules of the same length, for route matching. | | No |
|
||||
| `routes[n].middlewares[n].name` | Defines the [MiddlewareTCP](./middlewaretcp.md) name. | | Yes |
|
||||
| `routes[n].middlewares[n].namespace` | Defines the [MiddlewareTCP](./middlewaretcp.md) namespace. | ""| No|
|
||||
| `routes[n].services` | List of [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) definitions. | | No |
|
||||
| `routes[n].services[n].name` | Defines the name of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). | | Yes |
|
||||
| `routes[n].services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port.| | Yes |
|
||||
| `routes[n].services[n].weight` | Defines the weight to apply to the server load balancing. | 1 | No |
|
||||
| `routes[n].services[n].proxyProtocol` | Defines the [PROXY protocol](../../../../install-configuration/entrypoints.md#proxyprotocol-and-load-balancers) configuration. | | No |
|
||||
| `routes[n].services[n].proxyProtocol.version` | Defines the [PROXY protocol](../../../../install-configuration/entrypoints.md#proxyprotocol-and-load-balancers) version. | | No |
|
||||
| `routes[n].services[n].serversTransport` | Defines the [ServersTransportTCP](./serverstransporttcp.md).<br />The `ServersTransport` namespace is assumed to be the [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) namespace. | | No |
|
||||
| `routes[n].services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. See [here](#nativelb) for more information. | false | No |
|
||||
| `routes[n].services[n].nodePortLB` | Controls, when creating the load-balancer, whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is `NodePort`. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes. | false | No |
|
||||
| `tls` | Defines [TLS](../../../../install-configuration/tls/certificate-resolvers/overview.md) certificate configuration. | | No |
|
||||
| `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace). | "" | No |
|
||||
| `tls.options` | Defines the reference to a [TLSOption](../http/tlsoption.md). | "" | No |
|
||||
| `tls.options.name` | Defines the [TLSOption](../http/tlsoption.md) name. | "" | No |
|
||||
| `tls.options.namespace` | Defines the [TLSOption](../http/tlsoption.md) namespace. | "" | No |
|
||||
| `tls.certResolver` | Defines the reference to a [CertResolver](../../../../install-configuration/tls/certificate-resolvers/overview.md). | "" | No |
|
||||
| `tls.domains` | List of domains. | "" | No |
|
||||
| `tls.domains[n].main` | Defines the main domain name. | "" | No |
|
||||
| `tls.domains[n].sans` | List of SANs (alternative domains). | "" | No |
|
||||
| `tls.passthrough` | If `true`, delegates the TLS termination to the backend. | false | No |
|
||||
| Field | Description | Default | Required |
|
||||
|-----------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|----------|
|
||||
| `entryPoints` | List of entrypoints names. | | No |
|
||||
| `routes` | List of routes. | | Yes |
|
||||
| `routes[n].match` | Defines the [rule](../../../tcp/router/rules-and-priority.md#rules) of the underlying router. | | Yes |
|
||||
| `routes[n].priority` | Defines the [priority](../../../tcp/router/rules-and-priority.md#priority) to disambiguate rules of the same length, for route matching. | | No |
|
||||
| `routes[n].middlewares[n].name` | Defines the [MiddlewareTCP](./middlewaretcp.md) name. | | Yes |
|
||||
| `routes[n].middlewares[n].namespace` | Defines the [MiddlewareTCP](./middlewaretcp.md) namespace. | "" | No |
|
||||
| `routes[n].services` | List of [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) definitions. | | No |
|
||||
| `routes[n].services[n].name` | Defines the name of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). | | Yes |
|
||||
| `routes[n].services[n].port` | Defines the port of a [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/). This can be a reference to a named port. | | Yes |
|
||||
| `routes[n].services[n].weight` | Defines the weight to apply to the server load balancing. | 1 | No |
|
||||
| `routes[n].services[n].serversTransport` | Defines the [ServersTransportTCP](./serverstransporttcp.md).<br />The `ServersTransport` namespace is assumed to be the [Kubernetes service](https://kubernetes.io/docs/concepts/services-networking/service/) namespace. | | No |
|
||||
| `routes[n].services[n].nativeLB` | Controls, when creating the load-balancer, whether the LB's children are directly the pods IPs or if the only child is the Kubernetes Service clusterIP. See [here](#nativelb) for more information. | false | No |
|
||||
| `routes[n].services[n].nodePortLB` | Controls, when creating the load-balancer, whether the LB's children are directly the nodes internal IPs using the nodePort when the service type is `NodePort`. It allows services to be reachable when Traefik runs externally from the Kubernetes cluster but within the same network of the nodes. | false | No |
|
||||
| `tls` | Defines [TLS](../../../../install-configuration/tls/certificate-resolvers/overview.md) certificate configuration. | | No |
|
||||
| `tls.secretName` | Defines the [secret](https://kubernetes.io/docs/concepts/configuration/secret/) name used to store the certificate (in the `IngressRoute` namespace). | "" | No |
|
||||
| `tls.options` | Defines the reference to a [TLSOption](../http/tlsoption.md). | "" | No |
|
||||
| `tls.options.name` | Defines the [TLSOption](../http/tlsoption.md) name. | "" | No |
|
||||
| `tls.options.namespace` | Defines the [TLSOption](../http/tlsoption.md) namespace. | "" | No |
|
||||
| `tls.certResolver` | Defines the reference to a [CertResolver](../../../../install-configuration/tls/certificate-resolvers/overview.md). | "" | No |
|
||||
| `tls.domains` | List of domains. | "" | No |
|
||||
| `tls.domains[n].main` | Defines the main domain name. | "" | No |
|
||||
| `tls.domains[n].sans` | List of SANs (alternative domains). | "" | No |
|
||||
| `tls.passthrough` | If `true`, delegates the TLS termination to the backend. | false | No |
|
||||
|
||||
### ExternalName Service
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ metadata:
|
|||
namespace: default
|
||||
|
||||
spec:
|
||||
proxyProtocol:
|
||||
version: 2
|
||||
terminationDelay: 100ms
|
||||
tls:
|
||||
serverName: example.org
|
||||
insecureSkipVerify: true
|
||||
|
|
@ -36,16 +39,18 @@ spec:
|
|||
|
||||
## Configuration Options
|
||||
|
||||
| Field | Description | Default | Required |
|
||||
|-------------------------------------|-----------------------------|-------------------------------------------|-----------------------|
|
||||
| `dialTimeout` | The amount of time to wait until a connection to a server can be established. If zero, no timeout exists. | 30s | No |
|
||||
| `dialKeepAlive` | The interval between keep-alive probes for an active network connection.<br />If this option is set to zero, keep-alive probes are sent with a default value (currently 15 seconds),<br />if supported by the protocol and operating system. Network protocols or operating systems that do not support keep-alives ignore this field.<br />If negative, keep-alive probes are turned off.| 15s | No |
|
||||
| `terminationDelay` | Defines the delay to wait before fully terminating the connection, after one connected peer has closed its writing capability.| 100ms | No |
|
||||
| `tls.serverName` | ServerName used to contact the server. | "" | No |
|
||||
| `tls.insecureSkipVerify` | Controls whether the server's certificate chain and host name is verified. | false | No |
|
||||
| `tls.peerCertURI` | Defines the URI used to match against SAN URIs during the server's certificate verification. | "" | No |
|
||||
| `tls.rootCAsSecrets` | Defines the set of root certificate authorities to use when verifying server certificates.<br />The CA secret must contain a base64 encoded certificate under either a `tls.ca` or a `ca.crt` key.| "" | No |
|
||||
| `tls.certificatesSecrets` | Certificates to present to the server for mTLS.| "" | No |
|
||||
| `spiffe` | Configures [SPIFFE](../../../../install-configuration/tls/spiffe.md) options. | "" | No |
|
||||
| `spiffe.ids` | Defines the allowed SPIFFE IDs. This takes precedence over the SPIFFE `trustDomain`. |""| No |
|
||||
| `spiffe.trustDomain` | Defines the allowed SPIFFE trust domain. | "" | No |
|
||||
| Field | Description | Default | Required |
|
||||
|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------|----------|
|
||||
| `dialTimeout` | The amount of time to wait until a connection to a server can be established. If zero, no timeout exists. | 30s | No |
|
||||
| `dialKeepAlive` | The interval between keep-alive probes for an active network connection.<br />If this option is set to zero, keep-alive probes are sent with a default value (currently 15 seconds),<br />if supported by the protocol and operating system. Network protocols or operating systems that do not support keep-alives ignore this field.<br />If negative, keep-alive probes are turned off. | 15s | No |
|
||||
| `proxyProtocol` | Defines the Proxy Protocol configuration. An empty `proxyProtocol` section enables Proxy Protocol version 2. | | No |
|
||||
| `proxyProtocol.version` | Traefik supports PROXY Protocol version 1 and 2 on TCP Services. | | No |
|
||||
| `terminationDelay` | Defines the delay to wait before fully terminating the connection, after one connected peer has closed its writing capability. | 100ms | No |
|
||||
| `tls.serverName` | ServerName used to contact the server. | "" | No |
|
||||
| `tls.insecureSkipVerify` | Controls whether the server's certificate chain and host name is verified. | false | No |
|
||||
| `tls.peerCertURI` | Defines the URI used to match against SAN URIs during the server's certificate verification. | "" | No |
|
||||
| `tls.rootCAsSecrets` | Defines the set of root certificate authorities to use when verifying server certificates.<br />The CA secret must contain a base64 encoded certificate under either a `tls.ca` or a `ca.crt` key. | "" | No |
|
||||
| `tls.certificatesSecrets` | Certificates to present to the server for mTLS. | "" | No |
|
||||
| `spiffe` | Configures [SPIFFE](../../../../install-configuration/tls/spiffe.md) options. | "" | No |
|
||||
| `spiffe.ids` | Defines the allowed SPIFFE IDs. This takes precedence over the SPIFFE `trustDomain`. | "" | No |
|
||||
| `spiffe.trustDomain` | Defines the allowed SPIFFE trust domain. | "" | No |
|
||||
|
|
|
|||
|
|
@ -454,16 +454,16 @@
|
|||
[tcp.services.TCPService01.loadBalancer]
|
||||
serversTransport = "foobar"
|
||||
terminationDelay = 42
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
[tcp.services.TCPService01.loadBalancer.proxyProtocol]
|
||||
version = 42
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
|
||||
[[tcp.services.TCPService01.loadBalancer.servers]]
|
||||
address = "foobar"
|
||||
tls = true
|
||||
[tcp.services.TCPService02]
|
||||
[tcp.services.TCPService02.weighted]
|
||||
|
||||
|
|
@ -489,6 +489,8 @@
|
|||
dialKeepAlive = "42s"
|
||||
dialTimeout = "42s"
|
||||
terminationDelay = "42s"
|
||||
[tcp.serversTransports.TCPServersTransport0.proxyProtocol]
|
||||
version = 42
|
||||
[tcp.serversTransports.TCPServersTransport0.tls]
|
||||
serverName = "foobar"
|
||||
insecureSkipVerify = true
|
||||
|
|
@ -509,6 +511,8 @@
|
|||
dialKeepAlive = "42s"
|
||||
dialTimeout = "42s"
|
||||
terminationDelay = "42s"
|
||||
[tcp.serversTransports.TCPServersTransport1.proxyProtocol]
|
||||
version = 42
|
||||
[tcp.serversTransports.TCPServersTransport1.tls]
|
||||
serverName = "foobar"
|
||||
insecureSkipVerify = true
|
||||
|
|
|
|||
|
|
@ -518,14 +518,14 @@ tcp:
|
|||
services:
|
||||
TCPService01:
|
||||
loadBalancer:
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
servers:
|
||||
- address: foobar
|
||||
tls: true
|
||||
- address: foobar
|
||||
tls: true
|
||||
serversTransport: foobar
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
terminationDelay: 42
|
||||
TCPService02:
|
||||
weighted:
|
||||
|
|
@ -552,6 +552,8 @@ tcp:
|
|||
TCPServersTransport0:
|
||||
dialKeepAlive: 42s
|
||||
dialTimeout: 42s
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
terminationDelay: 42s
|
||||
tls:
|
||||
serverName: foobar
|
||||
|
|
@ -573,6 +575,8 @@ tcp:
|
|||
TCPServersTransport1:
|
||||
dialKeepAlive: 42s
|
||||
dialTimeout: 42s
|
||||
proxyProtocol:
|
||||
version: 42
|
||||
terminationDelay: 42s
|
||||
tls:
|
||||
serverName: foobar
|
||||
|
|
|
|||
|
|
@ -84,19 +84,21 @@ labels:
|
|||
|
||||
## Configuration Options
|
||||
|
||||
| Field | Description | Default | Required |
|
||||
|:------|:----------------------------------------------------------|:---------------------|:---------|
|
||||
| `serverstransport.`<br />`dialTimeout` | Defines the timeout when dialing the backend TCP service. If zero, no timeout exists. | 30s | No |
|
||||
| `serverstransport.`<br />`dialKeepAlive` | Defines the interval between keep-alive probes for an active network connection. | 15s | No |
|
||||
| `serverstransport.`<br />`terminationDelay` | Sets the time limit for the proxy to fully terminate connections on both sides after initiating the termination sequence, with a negative value indicating no deadline. More Information [here](#terminationdelay) | 100ms | No |
|
||||
| `serverstransport.`<br />`tls` | Defines the TLS configuration. An empty `tls` section enables TLS. | | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.serverName` | Configures the server name that will be used for SNI. | | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.certificates` | Defines the list of certificates (as file paths, or data bytes) that will be set as client certificates for mTLS. | | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.insecureSkipVerify` | Controls whether the server's certificate chain and host name is verified. | false | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.rootcas` | Defines the root certificate authorities to use when verifying server certificates. (for mTLS connections). | | No |
|
||||
| `serverstransport.`<br />`tls.`<br />`peerCertURI` | Defines the URI used to match against SAN URIs during the server's certificate verification. | false | No |
|
||||
| `serverstransport.`<br />`spiffe`<br />`.ids` | Allow SPIFFE IDs.<br />This takes precedence over the SPIFFE TrustDomain. | | No |
|
||||
| `serverstransport.`<br />`spiffe`<br />`.trustDomain` | Allow SPIFFE trust domain. | "" | No |
|
||||
| Field | Description | Default | Required |
|
||||
|:----------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------|:---------|
|
||||
| `serverstransport.`<br />`dialTimeout` | Defines the timeout when dialing the backend TCP service. If zero, no timeout exists. | 30s | No |
|
||||
| `serverstransport.`<br />`dialKeepAlive` | Defines the interval between keep-alive probes for an active network connection. | 15s | No |
|
||||
| `serverstransport.`<br />`terminationDelay` | Sets the time limit for the proxy to fully terminate connections on both sides after initiating the termination sequence, with a negative value indicating no deadline. More Information [here](#terminationdelay) | 100ms | No |
|
||||
| `serverstransport.`<br />`proxyProtocol` | Defines the Proxy Protocol configuration. An empty `proxyProtocol` section enables Proxy Protocol version 2. | | No |
|
||||
| `serverstransport.`<br />`proxyProtocol.version` | Traefik supports PROXY Protocol version 1 and 2 on TCP Services. More Information [here](#proxyprotocolversion) | 2 | No |
|
||||
| `serverstransport.`<br />`tls` | Defines the TLS configuration. An empty `tls` section enables TLS. | | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.serverName` | Configures the server name that will be used for SNI. | | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.certificates` | Defines the list of certificates (as file paths, or data bytes) that will be set as client certificates for mTLS. | | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.insecureSkipVerify` | Controls whether the server's certificate chain and host name is verified. | false | No |
|
||||
| `serverstransport.`<br />`tls`<br />`.rootcas` | Defines the root certificate authorities to use when verifying server certificates. (for mTLS connections). | | No |
|
||||
| `serverstransport.`<br />`tls.`<br />`peerCertURI` | Defines the URI used to match against SAN URIs during the server's certificate verification. | false | No |
|
||||
| `serverstransport.`<br />`spiffe`<br />`.ids` | Allow SPIFFE IDs.<br />This takes precedence over the SPIFFE TrustDomain. | | No |
|
||||
| `serverstransport.`<br />`spiffe`<br />`.trustDomain` | Allow SPIFFE trust domain. | "" | No |
|
||||
|
||||
!!! note "SPIFFE"
|
||||
|
||||
|
|
@ -114,3 +116,9 @@ To that end, as soon as the proxy enters this termination sequence, it sets a de
|
|||
|
||||
The termination delay controls that deadline.
|
||||
A negative value means an infinite deadline (i.e. the connection is never fully terminated by the proxy itself).
|
||||
|
||||
### `proxyProtocol.version`
|
||||
|
||||
Traefik supports [PROXY Protocol](https://www.haproxy.org/download/2.0/doc/proxy-protocol.txt) version 1 and 2 on TCP Services.
|
||||
It can be configured by setting `proxyProtocol.version` on the serversTransport.
|
||||
The option specifies the version of the protocol to be used. Either 1 or 2.
|
||||
|
|
|
|||
|
|
@ -42,12 +42,6 @@ tcp:
|
|||
| `servers.address` | The address option (IP:Port) point to a specific instance. | "" |
|
||||
| `servers.tls` | The `tls` option determines whether to use TLS when dialing with the backend. | false |
|
||||
| `servers.serversTransport` | `serversTransport` allows to reference a TCP [ServersTransport](./serverstransport.md configuration for the communication between Traefik and your servers. If no serversTransport is specified, the default@internal will be used. | "" |
|
||||
| `servers.proxyProtocol.version` | Traefik supports PROXY Protocol version 1 and 2 on TCP Services. More Information [here](#serversproxyprotocolversion) | 2 |
|
||||
|
||||
### servers.proxyProtocol.version
|
||||
|
||||
Traefik supports [PROXY Protocol](https://www.haproxy.org/download/2.0/doc/proxy-protocol.txt) version 1 and 2 on TCP Services. It can be enabled by setting `proxyProtocol` on the load balancer.
|
||||
The option specifies the version of the protocol to be used. Either 1 or 2.
|
||||
|
||||
## Weighted Round Robin
|
||||
|
||||
|
|
|
|||
|
|
@ -1648,79 +1648,6 @@ The `tls` determines whether to use TLS when dialing with the backend.
|
|||
If no serversTransport is specified, the `default@internal` will be used.
|
||||
The `default@internal` serversTransport is created from the [static configuration](../overview.md#tcp-servers-transports).
|
||||
|
||||
#### PROXY Protocol
|
||||
|
||||
Traefik supports [PROXY Protocol](https://www.haproxy.org/download/2.0/doc/proxy-protocol.txt) version 1 and 2 on TCP Services.
|
||||
It can be enabled by setting `proxyProtocol` on the load balancer.
|
||||
|
||||
Below are the available options for the PROXY protocol:
|
||||
|
||||
- `version` specifies the version of the protocol to be used. Either `1` or `2`.
|
||||
|
||||
!!! info "Version"
|
||||
|
||||
Specifying a version is optional. By default the version 2 will be used.
|
||||
|
||||
??? example "A Service with Proxy Protocol v1 -- Using the [File Provider](../../providers/file.md)"
|
||||
|
||||
```yaml tab="YAML"
|
||||
## Dynamic configuration
|
||||
tcp:
|
||||
services:
|
||||
my-service:
|
||||
loadBalancer:
|
||||
proxyProtocol:
|
||||
version: 1
|
||||
```
|
||||
|
||||
```toml tab="TOML"
|
||||
## Dynamic configuration
|
||||
[tcp.services]
|
||||
[tcp.services.my-service.loadBalancer]
|
||||
[tcp.services.my-service.loadBalancer.proxyProtocol]
|
||||
version = 1
|
||||
```
|
||||
|
||||
#### Termination Delay
|
||||
|
||||
!!! warning
|
||||
|
||||
Deprecated in favor of [`serversTransport.terminationDelay`](#terminationdelay).
|
||||
Please note that if any `serversTransport` configuration on the servers load balancer is found,
|
||||
it will take precedence over the servers load balancer `terminationDelay` value,
|
||||
even if the `serversTransport.terminationDelay` is undefined.
|
||||
|
||||
As a proxy between a client and a server, it can happen that either side (e.g. client side) decides to terminate its writing capability on the connection (i.e. issuance of a FIN packet).
|
||||
The proxy needs to propagate that intent to the other side, and so when that happens, it also does the same on its connection with the other side (e.g. backend side).
|
||||
|
||||
However, if for some reason (bad implementation, or malicious intent) the other side does not eventually do the same as well,
|
||||
the connection would stay half-open, which would lock resources for however long.
|
||||
|
||||
To that end, as soon as the proxy enters this termination sequence, it sets a deadline on fully terminating the connections on both sides.
|
||||
|
||||
The termination delay controls that deadline.
|
||||
It is a duration in milliseconds, defaulting to 100.
|
||||
A negative value means an infinite deadline (i.e. the connection is never fully terminated by the proxy itself).
|
||||
|
||||
??? example "A Service with a termination delay -- Using the [File Provider](../../providers/file.md)"
|
||||
|
||||
```yaml tab="YAML"
|
||||
## Dynamic configuration
|
||||
tcp:
|
||||
services:
|
||||
my-service:
|
||||
loadBalancer:
|
||||
terminationDelay: 200
|
||||
```
|
||||
|
||||
```toml tab="TOML"
|
||||
## Dynamic configuration
|
||||
[tcp.services]
|
||||
[tcp.services.my-service.loadBalancer]
|
||||
[[tcp.services.my-service.loadBalancer]]
|
||||
terminationDelay = 200
|
||||
```
|
||||
|
||||
### Weighted Round Robin
|
||||
|
||||
The Weighted Round Robin (alias `WRR`) load-balancer of services is in charge of balancing the requests between multiple services based on provided weights.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue