mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 03:55:45 +00:00
chore: bump x to v0.15.1, add e2e tests for chainGroup and sniffing
- Bump github.com/go-gost/x v0.15.0 → v0.15.1 - ChainGroupSuite: matcher routing by host, probe dead-chain pre-marking - SniffingSuite: SOCKS5+HTTPS w/o SNI, debug-only log on empty SNI - Add RunHTTPSEchoContainer and https_echo.py test helper
This commit is contained in:
+48
@@ -0,0 +1,48 @@
|
||||
services:
|
||||
- name: proxy
|
||||
addr: :8080
|
||||
handler:
|
||||
type: http
|
||||
chainGroup:
|
||||
chains:
|
||||
- chain: chain-target
|
||||
matcher:
|
||||
rule: Host(`tcp-echo`)
|
||||
- chain: chain-other
|
||||
matcher:
|
||||
rule: Host(`no-match`)
|
||||
selector:
|
||||
strategy: round
|
||||
maxFails: 1
|
||||
failTimeout: 10s
|
||||
listener:
|
||||
type: tcp
|
||||
|
||||
# Live relay: forwards to echo server.
|
||||
- name: relay
|
||||
addr: 127.0.0.1:18081
|
||||
handler:
|
||||
type: http
|
||||
listener:
|
||||
type: tcp
|
||||
|
||||
chains:
|
||||
- name: chain-target
|
||||
hops:
|
||||
- name: hop-target
|
||||
nodes:
|
||||
- name: n-live
|
||||
addr: 127.0.0.1:18081
|
||||
connector:
|
||||
type: http
|
||||
|
||||
# This chain has a dead relay — but the matcher Host("no-match") ensures it is
|
||||
# never selected for requests targeting tcp-echo.
|
||||
- name: chain-other
|
||||
hops:
|
||||
- name: hop-other
|
||||
nodes:
|
||||
- name: n-dead
|
||||
addr: 127.0.0.1:18082
|
||||
connector:
|
||||
type: http
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
services:
|
||||
- name: proxy
|
||||
addr: :8080
|
||||
handler:
|
||||
type: http
|
||||
chainGroup:
|
||||
chains:
|
||||
- chain: chain-live
|
||||
probe:
|
||||
type: tcp
|
||||
addr: 127.0.0.1:18081
|
||||
interval: 3s
|
||||
- chain: chain-dead
|
||||
probe:
|
||||
type: tcp
|
||||
addr: 127.0.0.1:18082
|
||||
interval: 3s
|
||||
selector:
|
||||
strategy: round
|
||||
maxFails: 1
|
||||
failTimeout: 10s
|
||||
listener:
|
||||
type: tcp
|
||||
|
||||
# Live relay: forwards to echo server.
|
||||
- name: relay
|
||||
addr: 127.0.0.1:18081
|
||||
handler:
|
||||
type: http
|
||||
listener:
|
||||
type: tcp
|
||||
|
||||
chains:
|
||||
- name: chain-live
|
||||
hops:
|
||||
- name: hop-live
|
||||
nodes:
|
||||
- name: n-live
|
||||
addr: 127.0.0.1:18081
|
||||
connector:
|
||||
type: http
|
||||
|
||||
# Dead chain: relay never listens here. TCP probe marks the chain entry so
|
||||
# FailFilter excludes it before real traffic reaches it.
|
||||
- name: chain-dead
|
||||
hops:
|
||||
- name: hop-dead
|
||||
nodes:
|
||||
- name: n-dead
|
||||
addr: 127.0.0.1:18082
|
||||
connector:
|
||||
type: http
|
||||
Reference in New Issue
Block a user