Detect residential+datacenter IPs
This commit is contained in:
29
README.md
29
README.md
@@ -17,6 +17,13 @@ print_r($cf_lookup); // ["is_hosting" => true]
|
||||
|
||||
**Warning**: Any field may be missing. Fields that are set are always set to `true`.
|
||||
|
||||
# Generate database
|
||||
Just run that shit and hope it works
|
||||
|
||||
```sh
|
||||
php mmdb.php
|
||||
```
|
||||
|
||||
# Data sources
|
||||
|
||||
## Proxy detection ([firehol](https://iplists.firehol.org/))
|
||||
@@ -45,8 +52,21 @@ print_r($cf_lookup); // ["is_hosting" => true]
|
||||
- pia/proton/apple/mullvad [ipv4](https://raw.githubusercontent.com/X4BNet/lists_vpn/refs/heads/main/output/vpn/ipv4.txt), [ipv6](https://raw.githubusercontent.com/X4BNet/lists_vpn/refs/heads/main/output/vpn/ipv6.txt) ([source](https://github.com/X4BNet/lists_vpn/))
|
||||
|
||||
## Hosting detection
|
||||
- [datacenter-ipv4](https://raw.githubusercontent.com/X4BNet/lists_vpn/refs/heads/main/output/datacenter/ipv4.txt), [datacenter-ipv6](https://raw.githubusercontent.com/X4BNet/lists_vpn/refs/heads/main/output/datacenter/ipv6.txt) ([source](https://github.com/X4BNet/lists_vpn/))
|
||||
- [CDN list](https://raw.githubusercontent.com/mansourjabin/cdn-ip-database/refs/heads/main/data/cdn.lst) ([source](https://github.com/mansourjabin/cdn-ip-database))
|
||||
- [GeoLite2-ASN](https://git.io/GeoLite2-ASN.mmdb) ([source](https://github.com/P3TERX/GeoLite.mmdb))
|
||||
- ASN purpose index ([source](https://bgp.tools)):
|
||||
- Residential signals
|
||||
- [Home ISP](https://bgp.tools/tags/dsl)
|
||||
- [Mobile Data/Carrier](https://bgp.tools/tags/mobile)
|
||||
- Hosting signals
|
||||
- [Content Delivery Network](https://bgp.tools/tags/cdn)
|
||||
- [Server Hosting](https://bgp.tools/tags/vpsh)
|
||||
- [VPN Host](https://bgp.tools/tags/vpn)
|
||||
|
||||
### Important!
|
||||
- An ASN's IP range(s) are assigned `is_hosting` if they report *ANY* hosting signal, but it *MUST NOT* have a residential signal.
|
||||
- An ASN's IP range(s) are assigned `is_residential` if they report a residential signal, but it *MUST NOT* have a hosting signal.
|
||||
|
||||
This method cover everything, some IPs will not receive a category. But it shouldn't falseflag.
|
||||
|
||||
## Tor detection
|
||||
- [tor exit node list](https://openinternet.io/tor/tor-exit-list.txt) ([source](https://openinternet.io))
|
||||
@@ -55,9 +75,6 @@ print_r($cf_lookup); // ["is_hosting" => true]
|
||||
# Recommendation
|
||||
I recommend these additional MMDB databases to complement Cloudfish.
|
||||
|
||||
## ASN detection
|
||||
- [GeoLite2-ASN](https://git.io/GeoLite2-ASN.mmdb) ([source](https://github.com/P3TERX/GeoLite.mmdb))
|
||||
|
||||
## Country/city detection
|
||||
- [GeoLite2-City](https://git.io/GeoLite2-City.mmdb) ([source](https://github.com/P3TERX/GeoLite.mmdb))
|
||||
|
||||
@@ -65,7 +82,7 @@ I recommend these additional MMDB databases to complement Cloudfish.
|
||||
I wrote a simple IP lookup script. It's available at `ip.lolcat.ca`, `ip4.lolcat.ca` and `ip6.lolcat.ca`.
|
||||
|
||||
### Disclaimer
|
||||
I transpiled MMDBWriter.php from it's original Go implementation using Claude. I'll make my own when I have more time, no idea if the filesize could be reduced.
|
||||
I transpiled MMDBWriter.php from it's original Go implementation using Claude. I'll make my own when I have more time, no idea if the filesize could be reduced. I also asked it to create a MMDB ASN extractor. Lol.
|
||||
|
||||
# License
|
||||
AGPLv3, make sure to credit all blocklists used, they all have their own fuckass licenses.
|
||||
|
||||
Reference in New Issue
Block a user