Comments (2)
Here's a config for a setup from the http://localhost:9901/config_dump
endpoint (with some irrelevant data removed). I'm mostly confused at why setting the metadata for envoy.network.upstream_server_name
isn't working and/or isn't being passed to the internal listener:
(I'm aware of the Basic
auth string in the JSON as it is simply base64 encoded user1:password1
.)
{
"configs": [
{
"@type": "type.googleapis.com/envoy.admin.v3.ClustersConfigDump",
"version_info": "1717190533136161000",
"static_clusters": [
{
"cluster": {
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
"name": "ext_authz_cluster",
"type": "STATIC",
"load_assignment": {
"cluster_name": "ext_authz_cluster",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "127.0.0.1",
"port_value": 18001
}
}
}
}
]
}
]
},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
}
},
"last_updated": "2024-05-31T21:22:13.280Z"
},
{
"cluster": {
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
"name": "xds_cluster",
"type": "STATIC",
"load_assignment": {
"cluster_name": "xds_cluster",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "127.0.0.1",
"port_value": 18000
}
}
}
}
]
}
]
},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"explicit_http_config": {
"http2_protocol_options": {}
}
}
}
},
"last_updated": "2024-05-31T21:22:13.280Z"
}
],
"dynamic_active_clusters": [
{
"version_info": "1717190533136161000",
"cluster": {
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
"name": "connect_upstream_cluster",
"type": "LOGICAL_DNS",
"connect_timeout": "5s",
"circuit_breakers": {
"thresholds": [
{
"max_connections": 10000,
"max_pending_requests": 10000,
"max_requests": 10000,
"max_retries": 3
}
]
},
"dns_lookup_family": "V4_ONLY",
"load_assignment": {
"cluster_name": "connect_upstream_cluster",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"socket_address": {
"address": "localhost",
"port_value": 10443
}
},
"hostname": "localhost"
}
}
]
}
]
},
"typed_extension_protocol_options": {
"envoy.extensions.upstreams.http.v3.HttpProtocolOptions": {
"@type": "type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions",
"use_downstream_protocol_config": {
"http_protocol_options": {}
}
}
},
"respect_dns_ttl": true
},
"last_updated": "2024-05-31T21:22:13.286Z"
},
{
"version_info": "1717190533136161000",
"cluster": {
"@type": "type.googleapis.com/envoy.config.cluster.v3.Cluster",
"name": "encap_0.0.0.0:16080",
"connect_timeout": "5s",
"circuit_breakers": {
"thresholds": [
{
"max_connections": 10000,
"max_pending_requests": 10000,
"max_requests": 10000,
"max_retries": 3
}
]
},
"transport_socket": {
"name": "envoy.transport_sockets.internal_upstream",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.transport_sockets.internal_upstream.v3.InternalUpstreamTransport",
"passthrough_metadata": [
{
"kind": {
"cluster": {}
},
"name": "envoy.network"
},
{
"kind": {
"host": {}
},
"name": "envoy.network"
}
],
"transport_socket": {
"name": "envoy.transport_sockets.raw_buffer",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.transport_sockets.raw_buffer.v3.RawBuffer"
}
}
}
},
"load_assignment": {
"cluster_name": "encap_0.0.0.0:16080",
"endpoints": [
{
"lb_endpoints": [
{
"endpoint": {
"address": {
"envoy_internal_address": {
"server_listener_name": "encap_0.0.0.0:16080"
}
}
}
}
]
}
]
},
"respect_dns_ttl": true
},
"last_updated": "2024-05-31T21:22:13.287Z"
}
]
},
{
"@type": "type.googleapis.com/envoy.admin.v3.ListenersConfigDump",
"version_info": "1717190533136161000",
"dynamic_listeners": [
{
"name": "tcp_0.0.0.0:16443",
"active_state": {
"version_info": "1717190533136161000",
"listener": {
"@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
"name": "tcp_0.0.0.0:16443",
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 16443
}
},
"filter_chains": [
{
"filters": [
{
"name": "envoy.tcp_proxy",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy",
"stat_prefix": "tcp",
"cluster": "connect_upstream_cluster",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/stdout",
"log_format": {
"json_format": {
"upstreamRemoteAddress": "%UPSTREAM_REMOTE_ADDRESS%",
"bytesReceived": "%BYTES_RECEIVED%",
"bytesSent": "%BYTES_SENT%",
"downstreamRemoteAddress": "%DOWNSTREAM_REMOTE_ADDRESS%",
"duration": "%DURATION%",
"requestedServerName": "%REQUESTED_SERVER_NAME%",
"startTime": "%START_TIME%",
"responseFlags": "%RESPONSE_FLAGS%",
"upstreamCluster": "%UPSTREAM_CLUSTER%"
}
}
}
}
],
"tunneling_config": {
"hostname": "%REQUESTED_SERVER_NAME%:443",
"headers_to_add": [
{
"header": {
"key": "Proxy-Authorization",
"value": "Basic dXNlcjE6cGFzc3dvcmQx"
}
}
]
}
}
}
]
}
],
"listener_filters": [
{
"name": "envoy.filters.listener.tls_inspector",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.listener.tls_inspector.v3.TlsInspector"
}
}
],
"enable_reuse_port": false
},
"last_updated": "2024-05-31T21:22:13.290Z"
}
},
{
"name": "tcp_0.0.0.0:16080",
"active_state": {
"version_info": "1717190533136161000",
"listener": {
"@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
"name": "tcp_0.0.0.0:16080",
"address": {
"socket_address": {
"address": "0.0.0.0",
"port_value": 16080
}
},
"filter_chains": [
{
"filter_chain_match": {
"application_protocols": [
"http/1.1",
"h2c",
"http/1.0",
"h3",
"h2"
]
},
"filters": [
{
"name": "envoy.filters.network.http_connection_manager",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager",
"stat_prefix": "http",
"route_config": {
"name": "http",
"virtual_hosts": [
{
"name": "default",
"domains": [
"*"
],
"routes": [
{
"match": {
"prefix": "/"
},
"route": {
"cluster": "encap_0.0.0.0:16080"
}
}
]
}
]
},
"http_filters": [
{
"name": "envoy.filters.http.set_filter_state",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.set_filter_state.v3.Config",
"on_request_headers": [
{
"object_key": "envoy.network.upstream_server_name",
"format_string": {
"text_format_source": {
"inline_string": "%REQ(:AUTHORITY)%"
}
},
"shared_with_upstream": "TRANSITIVE"
}
]
}
},
{
"name": "envoy.filters.http.router",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
}
}
],
"http2_protocol_options": {
"allow_connect": true
},
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/stdout",
"log_format": {
"json_format": {
"protocol": "%PROTOCOL%",
"responseCodeDetails": "%RESPONSE_CODE_DETAILS%",
"requestedServerName": "%REQUESTED_SERVER_NAME%",
"upstreamCluster": "%UPSTREAM_CLUSTER%",
"path": "%REQ(X-ENVOY-ORIGINAL-PATH?:PATH)%",
"downstreamRemoteAddress": "%DOWNSTREAM_REMOTE_ADDRESS%",
"requestMethod": "%REQ(:METHOD)%",
"responseCode": "%RESPONSE_CODE%",
"bytesReceived": "%BYTES_RECEIVED%",
"duration": "%DURATION%",
"responseFlags": "%RESPONSE_FLAGS%",
"requestId": "%REQ(X-REQUEST-ID)%",
"startTime": "%START_TIME%",
"upstreamRemoteAddress": "%UPSTREAM_REMOTE_ADDRESS%",
"bytesSent": "%BYTES_SENT%",
"upstreamProtocol": "%UPSTREAM_PROTOCOL%",
"requestAuthority": "%REQ(:AUTHORITY)%"
}
}
}
}
],
"use_remote_address": true,
"upgrade_configs": [
{
"upgrade_type": "CONNECT"
},
{
"upgrade_type": "websocket",
"filters": [
{
"name": "envoy.filters.http.set_filter_state",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.set_filter_state.v3.Config",
"on_request_headers": [
{
"object_key": "envoy.network.upstream_server_name",
"format_string": {
"text_format_source": {
"inline_string": "%REQ(:AUTHORITY)%"
}
},
"shared_with_upstream": "TRANSITIVE"
}
]
}
},
{
"name": "envoy.filters.http.router",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.http.router.v3.Router"
}
}
]
}
],
"append_x_forwarded_port": true
}
}
]
}
],
"listener_filters": [
{
"name": "envoy.filters.listener.http_inspector",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.listener.http_inspector.v3.HttpInspector"
}
}
],
"enable_reuse_port": false
},
"last_updated": "2024-05-31T21:22:13.292Z"
}
},
{
"name": "encap_0.0.0.0:16080",
"active_state": {
"version_info": "1717190533136161000",
"listener": {
"@type": "type.googleapis.com/envoy.config.listener.v3.Listener",
"name": "encap_0.0.0.0:16080",
"filter_chains": [
{
"filters": [
{
"name": "envoy.tcp_proxy",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.filters.network.tcp_proxy.v3.TcpProxy",
"stat_prefix": "tcp",
"cluster": "connect_upstream_cluster",
"access_log": [
{
"name": "envoy.access_loggers.file",
"typed_config": {
"@type": "type.googleapis.com/envoy.extensions.access_loggers.file.v3.FileAccessLog",
"path": "/dev/stdout",
"log_format": {
"json_format": {
"upstreamCluster": "%UPSTREAM_CLUSTER%",
"responseFlags": "%RESPONSE_FLAGS%",
"bytesSent": "%BYTES_SENT%",
"downstreamRemoteAddress": "%DOWNSTREAM_REMOTE_ADDRESS%",
"duration": "%DURATION%",
"requestedServerName": "%REQUESTED_SERVER_NAME%",
"startTime": "%START_TIME%",
"upstreamRemoteAddress": "%UPSTREAM_REMOTE_ADDRESS%",
"bytesReceived": "%BYTES_RECEIVED%"
}
}
}
}
],
"tunneling_config": {
"hostname": "%DYNAMIC_METADATA(envoy.network:upstream_server_name)%:80",
"headers_to_add": [
{
"header": {
"key": "Proxy-Authorization",
"value": "Basic dXNlcjE6cGFzc3dvcmQx"
}
}
]
}
}
}
]
}
],
"internal_listener": {}
},
"last_updated": "2024-05-31T21:22:13.292Z"
}
}
]
},
{
"@type": "type.googleapis.com/envoy.admin.v3.ScopedRoutesConfigDump"
},
{
"@type": "type.googleapis.com/envoy.admin.v3.RoutesConfigDump",
"static_route_configs": [
{
"route_config": {
"@type": "type.googleapis.com/envoy.config.route.v3.RouteConfiguration",
"name": "http",
"virtual_hosts": [
{
"name": "default",
"domains": [
"*"
],
"routes": [
{
"match": {
"prefix": "/"
},
"route": {
"cluster": "encap_0.0.0.0:16080"
}
}
]
}
]
},
"last_updated": "2024-05-31T21:22:13.291Z"
}
]
},
{
"@type": "type.googleapis.com/envoy.admin.v3.SecretsConfigDump"
}
]
}
from envoy.
I should also point out that the tunnelling for TLS traffic on 16443
is working properly. The issue is with listener on 16080
as that is the one intended to handle the plaintext HTTP encapsulation in a CONNECT
.
from envoy.
Related Issues (20)
- Bridge filters are only used on unary gRPC. How about highlighting this? HOT 2
- When used as an Envoy Side-car pattern, it is necessary to mention the performance penalty. HOT 2
- May I know about the performance of the gRPC-JSON Transcoder ? HOT 2
- Envoy Filter Only Send one Message per Stream HOT 3
- Newer release available `aspect_bazel_lib`: v2.7.7 (current: v2.7.6)
- Newer release available `com_github_bufbuild_buf`: v1.32.2 (current: v1.32.1)
- Newer release available `com_github_datadog_dd_trace_cpp`: v0.2.1 (current: v0.2.0)
- Lack of Configuration for Minimum Healthy Upstream Nodes in Health Checking HOT 2
- Missing span IDs in access logs HOT 2
- The possibility to extend Envoy metrics to emit custom-metrics in addition to the Envoy existing built-in metrics. HOT 2
- json log with sort_properties prints decimals for all numbers HOT 4
- Enhance envoy Tap to dump all message with high performance HOT 4
- Newer release available `skywalking_data_collect_protocol`: v10.0.1 (current: v8.9.1)
- Can Envoy aggregate counter of sub-clusters to that under parent cluster HOT 2
- Newer release available `com_github_grpc_grpc`: v1.64.1 (current: v1.62.1) HOT 1
- Cluster upstream_bind_config results in bind failures for many requests HOT 2
- Status Details Pass Through for LocalResponsePolicy HOT 4
- What's the single Envoy instance memory cost in your production environment ? HOT 3
- Newer release available `bazel_skylib`: 1.7.0 (current: 1.6.1) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from envoy.