Versions in this module Expand all Collapse all v1 v1.2.0 Jun 21, 2024 v1.0.0 Mar 29, 2024 Changes in this version + const GetAddressesMax + var ErrAddressNotFound = errors.New("address not found") + func AddAddressByIP(am *AddressManager, addressIP string, ...) error + func IsIPv4(na *appmessage.NetAddress) bool + func IsLocal(na *appmessage.NetAddress) bool + func IsRFC1918(na *appmessage.NetAddress) bool + func IsRFC2544(na *appmessage.NetAddress) bool + func IsRFC3849(na *appmessage.NetAddress) bool + func IsRFC3927(na *appmessage.NetAddress) bool + func IsRFC3964(na *appmessage.NetAddress) bool + func IsRFC4193(na *appmessage.NetAddress) bool + func IsRFC4380(na *appmessage.NetAddress) bool + func IsRFC4843(na *appmessage.NetAddress) bool + func IsRFC4862(na *appmessage.NetAddress) bool + func IsRFC5737(na *appmessage.NetAddress) bool + func IsRFC6052(na *appmessage.NetAddress) bool + func IsRFC6145(na *appmessage.NetAddress) bool + func IsRFC6598(na *appmessage.NetAddress) bool + func IsRoutable(na *appmessage.NetAddress, acceptUnroutable bool) bool + func IsValid(na *appmessage.NetAddress) bool + type AddressManager struct + func New(cfg *Config, database database.Database) (*AddressManager, error) + func (am *AddressManager) AddAddress(address *appmessage.NetAddress) error + func (am *AddressManager) AddAddresses(addresses ...*appmessage.NetAddress) error + func (am *AddressManager) Addresses() []*appmessage.NetAddress + func (am *AddressManager) Ban(addressToBan *appmessage.NetAddress) error + func (am *AddressManager) BannedAddresses() []*appmessage.NetAddress + func (am *AddressManager) BestLocalAddress(remoteAddress *appmessage.NetAddress) *appmessage.NetAddress + func (am *AddressManager) GroupKey(na *appmessage.NetAddress) string + func (am *AddressManager) IsBanned(address *appmessage.NetAddress) (bool, error) + func (am *AddressManager) MarkConnectionFailure(address *appmessage.NetAddress) error + func (am *AddressManager) MarkConnectionSuccess(address *appmessage.NetAddress) error + func (am *AddressManager) RandomAddresses(count int, exceptions []*appmessage.NetAddress) []*appmessage.NetAddress + func (am *AddressManager) RemoveAddress(address *appmessage.NetAddress) error + func (am *AddressManager) Unban(address *appmessage.NetAddress) error + type AddressPriority int + const BoundPrio + const HTTPPrio + const InterfacePrio + const ManualPrio + const UpnpPrio + type AddressRandomize struct + func NewAddressRandomize(maxFailedCount uint64) *AddressRandomize + func (amc *AddressRandomize) RandomAddresses(addresses []*address, count int) []*appmessage.NetAddress + type Config struct + AcceptUnroutable bool + DefaultPort string + ExternalIPs []string + Listeners []string + Lookup func(string) ([]net.IP, error) + func NewConfig(cfg *config.Config) *Config