Refactor
This commit is contained in:
parent
a7e2b29fa2
commit
46fc5d3601
|
@ -94,14 +94,15 @@ func CreateListener(address string, port uint16, upstreams []string, bootstraps
|
||||||
|
|
||||||
|
|
||||||
// Create a local cache with HTTPS proxy plugin
|
// Create a local cache with HTTPS proxy plugin
|
||||||
chain := cache.New()
|
proxyPlugin := ProxyPlugin{
|
||||||
chain.Next = ProxyPlugin{
|
|
||||||
Upstreams: upstreamList,
|
Upstreams: upstreamList,
|
||||||
}
|
}
|
||||||
|
chain := cache.New()
|
||||||
|
chain.Next = proxyPlugin
|
||||||
|
|
||||||
// Optionally disable http response caching
|
// Optionally disable http response caching
|
||||||
if os.Getenv("DISABLE_TUNNELDNS_CACHE") == "true" {
|
if os.Getenv("DISABLE_TUNNELDNS_CACHE") == "true" {
|
||||||
chain.Next = ProxyPlugin{}
|
chain = proxyPlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
// Format an endpoint
|
// Format an endpoint
|
||||||
|
|
Loading…
Reference in New Issue