mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 03:55:45 +00:00
test(e2e): add resolver module e2e test suite
Verifies that a configured resolver drives the proxy's outbound DNS resolution. A gost HTTP proxy uses a resolver whose only nameserver is a test responder answering echo.test with the real echo server IP and NXDOMAIN for everything else. A request to echo.test is resolved by the custom resolver and reaches the echo server; an unmapped host fails to resolve. Adds a parametrized DNS responder script and container helper.
This commit is contained in:
+19
@@ -0,0 +1,19 @@
|
||||
# HTTP proxy whose outbound dialing uses a custom resolver. The resolver's
|
||||
# only nameserver is the test DNS responder, which answers echo.test with the
|
||||
# real echo server IP and NXDOMAIN for everything else. A request to
|
||||
# echo.test:5678 is therefore resolved by the custom resolver and reaches the
|
||||
# echo server; a request to an unmapped host fails to resolve.
|
||||
services:
|
||||
- name: proxy
|
||||
addr: ":8080"
|
||||
resolver: resolver-0
|
||||
handler:
|
||||
type: http
|
||||
listener:
|
||||
type: tcp
|
||||
|
||||
resolvers:
|
||||
- name: resolver-0
|
||||
nameservers:
|
||||
- addr: dns-responder:5353
|
||||
timeout: 3s
|
||||
Reference in New Issue
Block a user