Add HTTP3Config
This commit is contained in:
parent
ba3967aa16
commit
60ff50a675
10 changed files with 207 additions and 23 deletions
|
@ -415,3 +415,12 @@ For more advanced use cases, you can use either the [RedirectScheme middleware](
|
|||
Following up on the deprecation started [previously](#x509-commonname-deprecation),
|
||||
as the `x509ignoreCN=0` value for the `GODEBUG` is [deprecated in Go 1.17](https://tip.golang.org/doc/go1.17#crypto/x509),
|
||||
the legacy behavior related to the CommonName field can not be enabled at all anymore.
|
||||
|
||||
## v2.5 to v2.6
|
||||
|
||||
### HTTP3
|
||||
|
||||
Traefik v2.6 introduces the `AdvertisedPort` option,
|
||||
which allows advertising, in the `Alt-Svc` header, a UDP port different from the one on which Traefik is actually listening (the EntryPoint's port).
|
||||
By doing so, it introduces a new configuration structure `http3`, which replaces the `enableHTTP3` option (which therefore doesn't exist anymore).
|
||||
To enable HTTP3 on an EntryPoint, please check out the [HTTP3 configuration](../routing/entrypoints.md#http3) documentation.
|
||||
|
|
|
@ -102,9 +102,6 @@ Entry points definition. (Default: ```false```)
|
|||
`--entrypoints.<name>.address`:
|
||||
Entry point address.
|
||||
|
||||
`--entrypoints.<name>.enablehttp3`:
|
||||
Enable HTTP3. (Default: ```false```)
|
||||
|
||||
`--entrypoints.<name>.forwardedheaders.insecure`:
|
||||
Trust all forwarded headers. (Default: ```false```)
|
||||
|
||||
|
@ -147,6 +144,12 @@ Subject alternative names.
|
|||
`--entrypoints.<name>.http.tls.options`:
|
||||
Default TLS options for the routers linked to the entry point.
|
||||
|
||||
`--entrypoints.<name>.http3`:
|
||||
HTTP3 configuration. (Default: ```false```)
|
||||
|
||||
`--entrypoints.<name>.http3.advertisedport`:
|
||||
UDP port to advertise, on which HTTP/3 is available. (Default: ```0```)
|
||||
|
||||
`--entrypoints.<name>.proxyprotocol`:
|
||||
Proxy-Protocol configuration. (Default: ```false```)
|
||||
|
||||
|
|
|
@ -102,9 +102,6 @@ Entry points definition. (Default: ```false```)
|
|||
`TRAEFIK_ENTRYPOINTS_<NAME>_ADDRESS`:
|
||||
Entry point address.
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_ENABLEHTTP3`:
|
||||
Enable HTTP3. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_FORWARDEDHEADERS_INSECURE`:
|
||||
Trust all forwarded headers. (Default: ```false```)
|
||||
|
||||
|
@ -114,6 +111,12 @@ Trust only forwarded headers from selected IPs.
|
|||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP`:
|
||||
HTTP configuration.
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP3`:
|
||||
HTTP3 configuration. (Default: ```false```)
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP3_ADVERTISEDPORT`:
|
||||
UDP port to advertise, on which HTTP/3 is available. (Default: ```0```)
|
||||
|
||||
`TRAEFIK_ENTRYPOINTS_<NAME>_HTTP_MIDDLEWARES`:
|
||||
Default middlewares for the routers linked to the entry point.
|
||||
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
[entryPoints]
|
||||
[entryPoints.EntryPoint0]
|
||||
address = "foobar"
|
||||
enableHTTP3 = true
|
||||
[entryPoints.EntryPoint0.transport]
|
||||
[entryPoints.EntryPoint0.transport.lifeCycle]
|
||||
requestAcceptGraceTimeout = 42
|
||||
|
@ -31,6 +30,8 @@
|
|||
trustedIPs = ["foobar", "foobar"]
|
||||
[entryPoints.EntryPoint0.udp]
|
||||
timeout = 42
|
||||
[entryPoints.EntryPoint0.http3]
|
||||
advertisedPort = 42
|
||||
[entryPoints.EntryPoint0.http]
|
||||
middlewares = ["foobar", "foobar"]
|
||||
[entryPoints.EntryPoint0.http.redirections]
|
||||
|
|
|
@ -32,7 +32,8 @@ entryPoints:
|
|||
trustedIPs:
|
||||
- foobar
|
||||
- foobar
|
||||
enableHTTP3: true
|
||||
http3:
|
||||
advertisedPort: 42
|
||||
udp:
|
||||
timeout: 42
|
||||
http:
|
||||
|
|
|
@ -100,7 +100,8 @@ They can be defined by using a file (YAML or TOML) or CLI arguments.
|
|||
entryPoints:
|
||||
name:
|
||||
address: ":8888" # same as ":8888/tcp"
|
||||
enableHTTP3: true
|
||||
http3:
|
||||
advertisedPort: 8888
|
||||
transport:
|
||||
lifeCycle:
|
||||
requestAcceptGraceTimeout: 42
|
||||
|
@ -126,7 +127,8 @@ They can be defined by using a file (YAML or TOML) or CLI arguments.
|
|||
[entryPoints]
|
||||
[entryPoints.name]
|
||||
address = ":8888" # same as ":8888/tcp"
|
||||
enableHTTP3 = true
|
||||
[entryPoints.name.http3]
|
||||
advertisedPort = 8888
|
||||
[entryPoints.name.transport]
|
||||
[entryPoints.name.transport.lifeCycle]
|
||||
requestAcceptGraceTimeout = 42
|
||||
|
@ -146,7 +148,7 @@ They can be defined by using a file (YAML or TOML) or CLI arguments.
|
|||
```bash tab="CLI"
|
||||
## Static configuration
|
||||
--entryPoints.name.address=:8888 # same as :8888/tcp
|
||||
--entryPoints.name.http3=true
|
||||
--entryPoints.name.http3.advertisedport=8888
|
||||
--entryPoints.name.transport.lifeCycle.requestAcceptGraceTimeout=42
|
||||
--entryPoints.name.transport.lifeCycle.graceTimeOut=42
|
||||
--entryPoints.name.transport.respondingTimeouts.readTimeout=42
|
||||
|
@ -221,9 +223,11 @@ If both TCP and UDP are wanted for the same port, two entryPoints definitions ar
|
|||
|
||||
Full details for how to specify `address` can be found in [net.Listen](https://golang.org/pkg/net/#Listen) (and [net.Dial](https://golang.org/pkg/net/#Dial)) of the doc for go.
|
||||
|
||||
### EnableHTTP3
|
||||
### HTTP3
|
||||
|
||||
`enableHTTP3` defines that you want to enable HTTP3 on this `address`.
|
||||
#### `http3`
|
||||
|
||||
`http3` enables HTTP3 protocol on the entryPoint.
|
||||
You can only enable HTTP3 on a TCP entrypoint.
|
||||
Enabling HTTP3 will automatically add the correct headers for the connection upgrade to HTTP3.
|
||||
|
||||
|
@ -240,22 +244,51 @@ Enabling HTTP3 will automatically add the correct headers for the connection upg
|
|||
```yaml tab="File (YAML)"
|
||||
experimental:
|
||||
http3: true
|
||||
|
||||
|
||||
entryPoints:
|
||||
name:
|
||||
enableHTTP3: true
|
||||
http3: {}
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[experimental]
|
||||
http3 = true
|
||||
|
||||
[entryPoints.name]
|
||||
enableHTTP3 = true
|
||||
[entryPoints.name.http3]
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--experimental.http3=true --entrypoints.name.enablehttp3=true
|
||||
--experimental.http3=true --entrypoints.name.http3
|
||||
```
|
||||
|
||||
#### `advertisedPort`
|
||||
|
||||
`http3.advertisedPort` defines which UDP port to advertise as the HTTP3 authority.
|
||||
It defaults to the entrypoint's address port.
|
||||
It can be used to override the authority in the `alt-svc` header, for example if the public facing port is different from where Traefik is listening.
|
||||
|
||||
!!! info "http3.advertisedPort"
|
||||
|
||||
```yaml tab="File (YAML)"
|
||||
experimental:
|
||||
http3: true
|
||||
|
||||
entryPoints:
|
||||
name:
|
||||
http3:
|
||||
advertisedPort: 443
|
||||
```
|
||||
|
||||
```toml tab="File (TOML)"
|
||||
[experimental]
|
||||
http3 = true
|
||||
|
||||
[entryPoints.name.http3]
|
||||
advertisedPort = 443
|
||||
```
|
||||
|
||||
```bash tab="CLI"
|
||||
--experimental.http3=true --entrypoints.name.http3.advertisedport=443
|
||||
```
|
||||
|
||||
### Forwarded Headers
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue