Skip to content

Commit

Permalink
go-ipfs-config: Closes: ipfs#6284 Add appropriate IPv6 ranges to defa…
Browse files Browse the repository at this point in the history
…ultServerFilters
  • Loading branch information
Teran McKinney committed May 1, 2019
1 parent c5b79a9 commit 1d87b55
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions config/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ type Profile struct {
Transform Transformer
}

// defaultServerFilters has a list of non-routable IPv4 prefixes
// according to http://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
// defaultServerFilters has is a list of IPv4 and IPv6 prefixes that are private, local only, or unrouteable.
// according to https://www.iana.org/assignments/iana-ipv4-special-registry/iana-ipv4-special-registry.xhtml
// and https://www.iana.org/assignments/iana-ipv6-special-registry/iana-ipv6-special-registry.xhtml
var defaultServerFilters = []string{
"/ip4/10.0.0.0/ipcidr/8",
"/ip4/100.64.0.0/ipcidr/10",
Expand All @@ -36,6 +37,11 @@ var defaultServerFilters = []string{
"/ip4/198.51.100.0/ipcidr/24",
"/ip4/203.0.113.0/ipcidr/24",
"/ip4/240.0.0.0/ipcidr/4",
"/ip6/100::/ipcidr/64",
"/ip6/2001:2::/ipcidr/48",
"/ip6/2001:db8::/ipcidr/32",
"/ip6/fc00::/ipcidr/7",
"/ip6/fe80::/ipcidr/10",
}

// Profiles is a map holding configuration transformers. Docs are in docs/config.md
Expand Down

0 comments on commit 1d87b55

Please sign in to comment.