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

@ -13,6 +13,7 @@ type Enhancer interface {
IsFakeBroadcastIP(net.IP) bool
IsExistFakeIP(net.IP) bool
FindHostByIP(net.IP) (string, bool)
FlushFakeIP() error
}
func FakeIPEnabled() bool {
@ -62,3 +63,10 @@ func FindHostByIP(ip net.IP) (string, bool) {
return "", false
}
func FlushFakeIP() error {
if mapper := DefaultHostMapper; mapper != nil {
return mapper.FlushFakeIP()
}
return nil
}