mirror of
https://github.com/go-gost/gost.git
synced 2026-10-08 20:15:46 +00:00
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.
20 lines
595 B
YAML
20 lines
595 B
YAML
# 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
|