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

Make private ip the same as geoip:private #1061

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

Conversation

hamjin
Copy link

@hamjin hamjin commented Feb 25, 2024

Currently ip.IsPrivate and netip.Addr.IsPrivate only matches a part of private IPs. This pr uses the CIDR list from geoip:private to fix it.

Currently ip.IsPrivate and netip.Addr.IsPrivate only matches a part of private IPs.
@Skyxim
Copy link
Collaborator

Skyxim commented Feb 25, 2024

https://datatracker.ietf.org/doc/html/rfc1918#section-3

These IPs are not clearly defined

@hamjin
Copy link
Author

hamjin commented Feb 25, 2024

https://datatracker.ietf.org/doc/html/rfc1918#section-3

These are private IPs in https://github.com/MetaCubeX/meta-rules-dat/blob/meta/geo/geoip/private.list
Some network (eg in office) resolves websites to 100.64.0.0/16, which won't be matched by ip.IsPrivate

@ForestL18
Copy link

其实geoip:private里面的地址不应该叫做Private IP Addresses,而应该是Reserved IP addresses
个人认为排除所有的Reserved IP addresses相对来说应该更好一些。

@daiaji
Copy link

daiaji commented Mar 1, 2024

其实geoip:private里面的地址不应该叫做Private IP Addresses,而应该是Reserved IP addresses。 个人认为排除所有的Reserved IP addresses相对来说应该更好一些。

确实在理

@hamjin
Copy link
Author

hamjin commented Mar 1, 2024

Reserved IP addresses

这看上去更应该修改geoip-code让它支持多个code,或者增加单独的filter以接受指定IP段的结果

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.

4 participants