Always disable cache for fake-ip servers

This commit is contained in:
dyhkwong
2024-04-28 18:43:27 +08:00
committed by 世界
parent 2ae192305c
commit d918863ac5
2 changed files with 1 additions and 3 deletions

View File

@@ -65,7 +65,7 @@ func (r *Router) matchDNS(ctx context.Context, allowFakeIP bool, index int) (con
displayRuleIndex += index + 1
}
r.dnsLogger.DebugContext(ctx, "match[", displayRuleIndex, "] ", rule.String(), " => ", detour)
if (isFakeIP && !r.dnsIndependentCache) || rule.DisableCache() {
if isFakeIP || rule.DisableCache() {
ctx = dns.ContextWithDisableCache(ctx, true)
}
if rewriteTTL := rule.RewriteTTL(); rewriteTTL != nil {