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

rework IsLocalIP using standard library functions #364

Open
wants to merge 4 commits into
base: unstable
Choose a base branch
from

Conversation

r41d
Copy link
Contributor

@r41d r41d commented Dec 16, 2024

  • this time against unstable branch
  • don't hardcode IPs but rather use the standard library for checking loopback and private networks
  • one of the old checks with strings.HasPrefix(ip, "172.") was too broad because the private range is 172.16/12 and not 172/8
  • addtional private networks are added

Copy link

cla-bot bot commented Dec 16, 2024

We require contributors to sign our Contributor License Agreement. In order for us to review and merge your code, add yourself to the .clabot file as contributor, as a way of signing the CLA.

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

Successfully merging this pull request may close these issues.

1 participant