mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 12:05:46 +00:00
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:
+27
@@ -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
|
||||
Reference in New Issue
Block a user