nodes map[string]*node // Keyed by dHTAddr.String().
mu sync.Mutex
closed chan struct{}
- ipBlockList *iplist.IPList
+ ipBlockList iplist.Ranger
badNodes *boom.BloomFilter
numConfirmedAnnounces int
NoSecurity bool
// Initial IP blocklist to use. Applied before serving and bootstrapping
// begins.
- IPBlocklist *iplist.IPList
+ IPBlocklist iplist.Ranger
// Used to secure the server's ID. Defaults to the Conn's LocalAddr().
PublicIP net.IP
}
}
// Packets to and from any address matching a range in the list are dropped.
-func (s *Server) SetIPBlockList(list *iplist.IPList) {
+func (s *Server) SetIPBlockList(list iplist.Ranger) {
s.mu.Lock()
defer s.mu.Unlock()
s.ipBlockList = list
}
-func (s *Server) IPBlocklist() *iplist.IPList {
+func (s *Server) IPBlocklist() iplist.Ranger {
return s.ipBlockList
}