Skip to content

dms3-p2p/go-maddr-filter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-maddr-filter

Coverage Status Travis CI

A library to perform filtering of multiaddrs.

Table of Contents

Install

make install

Examples

// make a new filterset
f := NewFilters()

// filter out addresses on the 192.168 subnet
_, ipnet, _ := net.ParseCIDR("192.168.0.0/16")
f.AddDialFilter(ipnet)


// check if an address is blocked
lanaddr, _ := ma.NewMultiaddr("/ip4/192.168.0.17/tcp/4050")
fmt.Println(f.AddrBlocked(lanaddr))

Contribute

PRs are welcome!

Small note: If editing the Readme, please conform to the standard-readme specification.

License

MIT © Jeromy Johnson

About

A library for filtering multiaddrs

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 92.6%
  • Makefile 7.4%