Cloudfish

Cloudfish (aims to be) a selfhosted Cloudflare replacement.

Right now, it only features an IP abuse MMDB database builder. You give it an IP and it will expose 4 optional values: is_proxy, is_hosting, is_residential and is_tor.

To use the database, you can use this PHP code:

<?php
require "geoip2.phar";
use MaxMind\Db\Reader as MmdbReader;

$cf = new MmdbReader("cloudfish.mmdb");
$cf_lookup = $reader_abuse->get("45.80.201.66");

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

php mmdb.php

Data sources

Proxy detection (firehol)

Currently begging droneBL staff for access

VPN providers (inserted in db as "is_proxy")

Hosting detection

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

Recommendation

I recommend these additional MMDB databases to complement Cloudfish.

Country/city detection

Try it

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 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.

Description
Cloudfish aims to be a Cloudflare replacement
Readme 4.4 MiB
Languages
PHP 87.2%
Go 12.8%