New: Configurable upstream DNS resolver
When iron-proxy owns the system DNS - for example, running in a GitHub Action where all OS DNS is redirected to the proxy - upstream HTTP connections would loop back through the proxy's own resolver. The new dns.upstream_resolver setting gives the proxy a dedicated resolver for both passthrough DNS queries and upstream HTTP dials, breaking the loop.
If upstream_resolver is not set, behavior is unchanged: the OS default resolver is used.
Configuration
dns:
listen: ":53"
proxy_ip: "10.16.0.1"
upstream_resolver: "8.8.8.8:53"The resolver is used in two places:
- DNS passthrough queries: domains matching
passthroughpatterns are forwarded to the upstream resolver instead of the OS default. - Upstream HTTP connections: when the proxy dials upstream servers, it resolves their hostnames via the upstream resolver, avoiding a loop through its own DNS.