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.
This commit is contained in:
ginuerzh
2026-07-16 20:53:30 +08:00
parent 20f1e4a0b9
commit 1c6fadcb1e
3 changed files with 117 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
# 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
+9
View File
@@ -0,0 +1,9 @@
# Upstream relay target for the routing matcher test: a plain forward proxy
# that reaches the echo server directly.
services:
- name: proxy
addr: ":8081"
handler:
type: http
listener:
type: tcp