Skip to content

Commit

Permalink
add IPv4 link-local address to private ranges detector
Browse files Browse the repository at this point in the history
https://datatracker.ietf.org/doc/html/rfc3927#section-2.1, this new range is the same as fe80::/10 for IPv6.
  • Loading branch information
paskal committed Aug 4, 2024
1 parent a087e36 commit 0101d3f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions realip/real.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type ipRange struct {
var privateRanges = []ipRange{
{start: net.ParseIP("10.0.0.0"), end: net.ParseIP("10.255.255.255")},
{start: net.ParseIP("100.64.0.0"), end: net.ParseIP("100.127.255.255")},
{start: net.ParseIP("169.254.0.0"), end: net.ParseIP("169.254.255.255")},
{start: net.ParseIP("172.16.0.0"), end: net.ParseIP("172.31.255.255")},
{start: net.ParseIP("192.0.0.0"), end: net.ParseIP("192.0.0.255")},
{start: net.ParseIP("192.168.0.0"), end: net.ParseIP("192.168.255.255")},
Expand Down

0 comments on commit 0101d3f

Please sign in to comment.