Feature: flush fakeip pool

This commit is contained in:
yaling888
2022-03-23 01:05:43 +08:00
parent f4312cfa5a
commit ef915c94dc
12 changed files with 137 additions and 2 deletions

View File

@ -84,6 +84,13 @@ func (h *ResolverEnhancer) PatchFrom(o *ResolverEnhancer) {
}
}
func (h *ResolverEnhancer) FlushFakeIP() error {
if h.fakePool != nil {
return h.fakePool.FlushFakeIP()
}
return nil
}
func NewEnhancer(cfg Config) *ResolverEnhancer {
var fakePool *fakeip.Pool
var mapping *cache.LruCache