mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-20 16:21:46 +00:00
Cache default action too
This commit is contained in:
@@ -67,6 +67,7 @@ func (e *Engine) Lookup(domain string, ip net.IP) (Action, string) {
|
|||||||
return entry.Action, entry.ActionArg
|
return entry.Action, entry.ActionArg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
e.Cache.Add(domain, cacheEntry{e.DefaultAction, ""})
|
||||||
return e.DefaultAction, ""
|
return e.DefaultAction, ""
|
||||||
} else if ip != nil {
|
} else if ip != nil {
|
||||||
// IP
|
// IP
|
||||||
@@ -81,6 +82,7 @@ func (e *Engine) Lookup(domain string, ip net.IP) (Action, string) {
|
|||||||
return entry.Action, entry.ActionArg
|
return entry.Action, entry.ActionArg
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
e.Cache.Add(ip.String(), cacheEntry{e.DefaultAction, ""})
|
||||||
return e.DefaultAction, ""
|
return e.DefaultAction, ""
|
||||||
} else {
|
} else {
|
||||||
return e.DefaultAction, ""
|
return e.DefaultAction, ""
|
||||||
|
Reference in New Issue
Block a user