mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
envoy: enable extended connect (#5387)
* envoy: enable extended connect * add explicit connect * update config
This commit is contained in:
parent
699679bc57
commit
f426403bcb
4 changed files with 16 additions and 2 deletions
|
@ -212,9 +212,14 @@ func (b *Builder) buildMainHTTPConnectionManagerFilter(
|
|||
|
||||
if useQUIC {
|
||||
mgr.CodecType = envoy_extensions_filters_network_http_connection_manager.HttpConnectionManager_HTTP3
|
||||
mgr.Http3ProtocolOptions = &envoy_config_core_v3.Http3ProtocolOptions{}
|
||||
mgr.Http3ProtocolOptions = http3ProtocolOptions
|
||||
} else if cfg.Options.GetCodecType() == config.CodecTypeHTTP3 {
|
||||
mgr.CodecType = envoy_extensions_filters_network_http_connection_manager.HttpConnectionManager_AUTO
|
||||
} else if cfg.Options.GetCodecType() == config.CodecTypeAuto || cfg.Options.GetCodecType() == config.CodecTypeHTTP2 {
|
||||
mgr.CodecType = cfg.Options.GetCodecType().ToEnvoy()
|
||||
mgr.Http2ProtocolOptions = &envoy_config_core_v3.Http2ProtocolOptions{
|
||||
AllowConnect: true,
|
||||
}
|
||||
} else {
|
||||
mgr.CodecType = cfg.Options.GetCodecType().ToEnvoy()
|
||||
}
|
||||
|
|
|
@ -109,7 +109,9 @@ func TestBuildListeners(t *testing.T) {
|
|||
hasQUIC = true
|
||||
httpConfig := gjson.Get(protojson.Format(li), "filterChains.0.filters.0.typedConfig")
|
||||
assert.Equal(t, "HTTP3", httpConfig.Get("codecType").String())
|
||||
assert.Equal(t, `{}`, httpConfig.Get("http3ProtocolOptions").String())
|
||||
assert.JSONEq(t, `{
|
||||
"allowExtendedConnect": true
|
||||
}`, httpConfig.Get("http3ProtocolOptions").String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -67,6 +67,10 @@ func WithKeepalive(src *envoy_config_core_v3.Http2ProtocolOptions) *envoy_config
|
|||
return dst
|
||||
}
|
||||
|
||||
var http3ProtocolOptions = &envoy_config_core_v3.Http3ProtocolOptions{
|
||||
AllowExtendedConnect: true,
|
||||
}
|
||||
|
||||
func buildTypedExtensionProtocolOptions(
|
||||
endpoints []Endpoint,
|
||||
upstreamProtocol upstreamProtocolConfig,
|
||||
|
|
|
@ -103,6 +103,9 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"http2ProtocolOptions": {
|
||||
"allowConnect": true
|
||||
},
|
||||
"localReplyConfig": {
|
||||
"mappers": [
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue