mirror of
https://github.com/cmz0228/hysteria-dev.git
synced 2025-08-19 07:41: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
|
||||
}
|
||||
}
|
||||
e.Cache.Add(domain, cacheEntry{e.DefaultAction, ""})
|
||||
return e.DefaultAction, ""
|
||||
} else if ip != nil {
|
||||
// IP
|
||||
@@ -81,6 +82,7 @@ func (e *Engine) Lookup(domain string, ip net.IP) (Action, string) {
|
||||
return entry.Action, entry.ActionArg
|
||||
}
|
||||
}
|
||||
e.Cache.Add(ip.String(), cacheEntry{e.DefaultAction, ""})
|
||||
return e.DefaultAction, ""
|
||||
} else {
|
||||
return e.DefaultAction, ""
|
||||
|
Reference in New Issue
Block a user