modulepackage
2.0.5+incompatible
Repository: https://github.com/dms3-p2p/go-addr-util.git
Documentation: pkg.go.dev
# README
go-addr-util
Address utilities for libp2p swarm.
Table of Contents
Install
make install
Contribute
Feel free to join in. All welcome. Open an issue!
Check out our contributing document for more information on how we work, and about contributing in general. Please be aware that all interactions related to libp2p are subject to the IPFS Code of Conduct.
Small note: If editing the Readme, please conform to the standard-readme specification.
License
MIT © Jeromy Johnson
# Functions
AddrInList returns whether or not an address is part of a list.
AddrIsShareableOnWAN returns whether the given address should be shareable on the wide area network (wide internet).
AddrOverNonLocalIP returns whether the addr uses a non-local ip link.
CheckNATWarning checks if our observed addresses differ.
FilterAddrs is a filter that removes certain addresses, according the given filters.
FilterNeg returns a negated version of the passed in filter.
InterfaceAddresses returns a list of addresses associated with local machine Note: we do not return link local addresses.
IsFDCostlyTransport returns true for transports that require a new file descriptor per connection created.
ResolveUnspecifiedAddress expands an unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to use the known local interfaces.
ResolveUnspecifiedAddresses expands unspecified ip addresses (/ip4/0.0.0.0, /ip6/::) to use the known local interfaces.
Subtract filters out all addrs in b from a.
SubtractFilter returns a filter func that filters all of the given addresses.
WANShareableAddrs filters addresses based on whether they're shareable on WAN.