forked from envoyproxy/envoy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
raw_udp_tunneling_http2.yaml
72 lines (70 loc) · 2.68 KB
/
raw_udp_tunneling_http2.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# This configuration takes incoming data on port 10000 and encapsulates it in a CONNECT
# request which is sent upstream port 10001.
# It can be used to test UDP tunneling as described in
# https://envoyproxy.io/docs/envoy/latest/intro/arch_overview/http/upgrades
admin:
address:
socket_address:
protocol: TCP
address: 127.0.0.1
port_value: 9903
static_resources:
listeners:
- name: listener_0
address:
socket_address:
protocol: UDP
address: 127.0.0.1
port_value: 10000
listener_filters:
- name: envoy.filters.udp_listener.udp_proxy
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.udp.udp_proxy.v3.UdpProxyConfig
stat_prefix: foo
matcher:
on_no_match:
action:
name: route
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.udp.udp_proxy.v3.Route
cluster: cluster_0
session_filters:
- name: envoy.filters.udp.session.http_capsule
typed_config:
'@type': type.googleapis.com/envoy.extensions.filters.udp.udp_proxy.session.http_capsule.v3.FilterConfig
tunneling_config:
# note: proxy_host supports string substitution, for example setting "%FILTER_STATE(proxy.host.key:PLAIN)%"
# will take the target host value from the session's filter state.
proxy_host: proxy.host.com
# note: target_host supports string substitution, for example setting "%FILTER_STATE(target.host.key:PLAIN)%"
# will take the target host value from the session's filter state.
target_host: target.host.com
# note: The target port value can be overridden per-session by setting the required port value for
# the filter state key ``udp.connect.target_port``.
default_target_port: 443
retry_options:
max_connect_attempts: 2
buffer_options:
max_buffered_datagrams: 1024
max_buffered_bytes: 16384
headers_to_add:
- header:
key: original_dst_port
value: "%DOWNSTREAM_LOCAL_PORT%"
clusters:
- name: cluster_0
connect_timeout: 5s
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: {}
load_assignment:
cluster_name: cluster_0
endpoints:
- lb_endpoints:
- endpoint:
address:
socket_address:
address: 127.0.0.1
port_value: 10001