Chore: split enhanced mode instance (#936)

Co-authored-by: Dreamacro <305009791@qq.com>
This commit is contained in:
Kr328
2020-09-17 10:48:42 +08:00
committed by GitHub
parent e773f95f21
commit 558ac6b965
8 changed files with 228 additions and 113 deletions

View File

@ -89,6 +89,11 @@ func (p *Pool) Gateway() net.IP {
return uintToIP(p.gateway)
}
// PatchFrom clone cache from old pool
func (p *Pool) PatchFrom(o *Pool) {
o.cache.CloneTo(p.cache)
}
func (p *Pool) get(host string) net.IP {
current := p.offset
for {