Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate multiaddr transformations #88

Open
ghost opened this issue Mar 13, 2019 · 1 comment
Open

Consolidate multiaddr transformations #88

ghost opened this issue Mar 13, 2019 · 1 comment

Comments

@ghost
Copy link

ghost commented Mar 13, 2019

We already support a number of map/filter like operations on multiaddrs, which take as input a list of multiaddrs and sometimes certain conditions, and return as output a list of multiaddrs.

  • fmt (a.k.a. mafmt)
    • lets us define protocol schemata and filter addresses that match
    • e.g. the schema /ip6/udp matches /ip6/::1/udp/4002
    • implementations: go-multiaddr-fmt, js-mafmt
  • filter
    • lets us filter addresses based on membership of an IP CIDR block
    • e.g. /ip4/192.168.0.0/ipcidr/16 matches /ip4/192.168.1.42
    • implementations: libp2p/go-maddr-filter
  • addr-util
    • filters certain classes of IP addresses (link-local, transports that can't dial out, etc.)
    • implementations: libp2p/go-addr-util, go-multiaddr-net
  • dns
    • resolves /dnsaddr, /dns4, and /dns6 addresses
    • implementations: go-multiaddr-dns, js-multiaddr

The first three should probably be collapsed into a single package.

A minimal generalized API for these transformations should be part of the multiaddr spec.

@ntninja
Copy link
Contributor

ntninja commented Mar 13, 2019

@lgierth: Can you take a look at #87? Particularily wrt to the filter syntax it seems relevant, I believe.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant