This commit is contained in:
Alex Schittko 2024-07-13 07:46:12 +00:00
parent a7e2b29fa2
commit 46fc5d3601
1 changed files with 5 additions and 4 deletions

View File

@ -94,14 +94,15 @@ func CreateListener(address string, port uint16, upstreams []string, bootstraps
// Create a local cache with HTTPS proxy plugin
chain := cache.New()
chain.Next = ProxyPlugin{
proxyPlugin := ProxyPlugin{
Upstreams: upstreamList,
}
chain := cache.New()
chain.Next = proxyPlugin
// Optionally disable http response caching
if os.Getenv("DISABLE_TUNNELDNS_CACHE") == "true" {
chain.Next = ProxyPlugin{}
chain = proxyPlugin
}
// Format an endpoint