Files
gost/tests/e2e/testdata/routing/server.yaml
T
ginuerzh 1c6fadcb1e test(e2e): add routing matcher module e2e test suite
Verify node-level routing matchers via a two-proxy relay: a forward
proxy whose only chain node carries matcher Host(`tcp-echo`) is only
eligible for a matching Host, so the request is relayed upstream to the
echo server; a non-matching Host is excluded (no eligible node) and never
reaches the echo server. Mirrors the resolver/ingress e2e pattern.
2026-07-16 20:53:30 +08:00

28 lines
794 B
YAML

# Forward proxy gated by a node-level routing matcher. The only chain node is a
# relay to an upstream proxy, but it is only eligible when the request Host
# matches Host(`tcp-echo`). A request to tcp-echo:5678 matches, is relayed
# upstream, and reaches the echo server ("hello-gost"); a request to any other
# host is excluded (no eligible node) and never reaches the echo server.
services:
- name: proxy
addr: ":8080"
handler:
type: http
chain: chain-0
listener:
type: tcp
chains:
- name: chain-0
hops:
- name: hop-0
nodes:
- name: node-0
addr: gost-upstream:8081
matcher:
rule: 'Host(`tcp-echo`)'
connector:
type: http
dialer:
type: tcp