MCPcopy Create free account
hub / github.com/ClashDotNetFramework/experimental-clash / shouldOnlyQueryFallback

Method shouldOnlyQueryFallback

dns/resolver.go:197–215  ·  view source on GitHub ↗
(m *D.Msg)

Source from the content-addressed store, hash-verified

195}
196
197func (r *Resolver) shouldOnlyQueryFallback(m *D.Msg) bool {
198 if r.fallback == nil || len(r.fallbackDomainFilters) == 0 {
199 return false
200 }
201
202 domain := r.msgToDomain(m)
203
204 if domain == "" {
205 return false
206 }
207
208 for _, df := range r.fallbackDomainFilters {
209 if df.Match(domain) {
210 return true
211 }
212 }
213
214 return false
215}
216
217func (r *Resolver) ipExchange(ctx context.Context, m *D.Msg) (msg *D.Msg, err error) {
218 if matched := r.matchPolicy(m); len(matched) != 0 {

Callers 1

ipExchangeMethod · 0.95

Implementers 1

Resolverdns/resolver.go

Calls 2

msgToDomainMethod · 0.95
MatchMethod · 0.65

Tested by

no test coverage detected