Roland Häder [Wed, 26 Jul 2023 14:22:34 +0000 (16:22 +0200)]
Partly reverted cdcd2b0109e126bca887d0712a7ddf602e5d6e62:
- "Accept" is not being accepted by misskey (gladly only these instances)
- it must be "Content-Type: application/json" or otherwise it is blocked
Roland Häder [Mon, 24 Jul 2023 22:51:40 +0000 (00:51 +0200)]
Continued:
- instances.is_recent() now checks recheck_block if 'last_blocked' is provided
- command fetch_blocks() now supports --force parameter
- blacklisted fnaf.stream as this domain has super-long sub-domains (troll)
Roland Häder [Mon, 24 Jul 2023 21:58:15 +0000 (23:58 +0200)]
Continued:
- added column `obfuscated_blocks` to save count of (still) obfuscated blocks
- also exposed it in infos.html view
- blacklisted gitpod.io as this domain floods `instances` table
Roland Häder [Mon, 24 Jul 2023 14:35:53 +0000 (16:35 +0200)]
Continued:
- added command fetch_relay() for fetching instances from ActivityPub relays
which show their peers in index page (/)
- added grid.tf as this flooded a lot "testing/developing" sub domains
Roland Häder [Mon, 24 Jul 2023 09:48:58 +0000 (11:48 +0200)]
Continued:
- let's not iterate directly (always possible, of course) on the CSV reader
object, but generate a list from its rows
- this also allow us to check if 'reader' is not NoneType
Roland Häder [Mon, 24 Jul 2023 06:16:17 +0000 (08:16 +0200)]
Continued:
- added support for x-nodeinfo2 which can be directly fetched from /.well-known/
"directory"
- also rewrote fetching well-known nodeinfo URLs to more flexible way
Roland Häder [Mon, 24 Jul 2023 05:04:51 +0000 (07:04 +0200)]
Optimized:
- first simple checks then invoke methods
- recheck_obfuscation() is about block lists, not instances, therefore we need
to check 'last_blocked' timestamp
Roland Häder [Fri, 21 Jul 2023 07:05:39 +0000 (09:05 +0200)]
Continued:
- added mitra network supporting fetch_instances (not domain_blocks unfortunate)
- if I fetch domain blocks from chaos.social, it is being reset to zero, so
let's better bypass it here
Roland Häder [Fri, 21 Jul 2023 05:08:57 +0000 (07:08 +0200)]
Continued:
- prepared for reverse-proxy, e.g. Apache/nginx
- configuration keys "scheme" (newly added) and "hostname" are how your FBA
instance is called from outside, I was not able to find any other way as
url_for() was returning a http:// URL and not a https:// ... :-(
Roland Häder [Thu, 20 Jul 2023 15:22:02 +0000 (17:22 +0200)]
Continued:
- only attempt to fetch peers when software was detected
- added API /api/v1/instance/domain_blocks
- for this the blacklist needs to be rewritten for having "block" reasons
included
Roland Häder [Thu, 20 Jul 2023 13:29:39 +0000 (15:29 +0200)]
Continued:
- FBA is now a Fediverse "instance"
- outbound "rss" is supported as feeds are provided
- peer list is available at `/api/v1/instance/peers`, but only instances with
valid nodeinfo
Roland Häder [Wed, 12 Jul 2023 09:05:03 +0000 (11:05 +0200)]
Continued:
- max "crawl" depth and min peerlist size to go deeper is now configurable
- for example for low-memory systems, keep max_crawl_depth small and
min_peers_length big
- the default values may cause python3 to consume ~550 MB RAM
- so you can practially say each depth adds another MB RAM usage
Roland Häder [Wed, 12 Jul 2023 08:30:27 +0000 (10:30 +0200)]
Continued:
- roadhouse is an alias for hubzilla, it is currently unsupported as it doesn't
provide needed APIs for fetching peers and blocklists but just in case they
add it
- same with nextcloud and others
- shumihub is an alias for misskey
Roland Häder [Wed, 12 Jul 2023 05:28:43 +0000 (07:28 +0200)]
Continued:
- a recursive (aka. "crawl") depth of 500 is REALLY far deep, practically the
whole Fediverse
- minimum peer count to deepen the "crawl" to max depth is 100 peers
- flush any pending data of current domain before continuing
Roland Häder [Tue, 11 Jul 2023 05:58:58 +0000 (07:58 +0200)]
Continued:
- alias "quarantined_instances" to "quarantined", you may have to run
`DELETE FROM blocks WHERE block_level='quarantined_instances';`
- ... and: `UPDATE instances SET last_blocked = NULL WHERE software IS NOT NULL AND last_status_code = 200;`
- ... to reset your database, then don't forget to execute ./fba.py fetch_blocks
Roland Häder [Tue, 11 Jul 2023 04:42:34 +0000 (06:42 +0200)]
Continued:
- blacklisted hexbear.net as their JavaScript contains Shell commands + broken
JSON inside that script
- added parsing JSON from JavaScript starting with 'isoData' (encapsulated to
function parse_script())
Roland Häder [Mon, 10 Jul 2023 22:51:49 +0000 (00:51 +0200)]
Continued:
- added command convert_idna to convert UTF-8 encoded international domain
names to punycode domains (IDNA), it caused some to be added in both
encodings
Roland Häder [Mon, 10 Jul 2023 19:12:11 +0000 (21:12 +0200)]
Continued:
- renamed utils.deobfuscate_domain() to deobfuscate()
- oliphant blocklists may contain obfuscated domains, need to deobfuscate them
first to get actual domain names
Roland Häder [Mon, 10 Jul 2023 17:35:39 +0000 (19:35 +0200)]
Continued:
- cannot get len() (number of rows) from reader
- instances.set_total_blocks() accepts as 2nd parameter not direct count, so
let's handle the domain list
Roland Häder [Sun, 9 Jul 2023 17:47:11 +0000 (19:47 +0200)]
Fixed:
- ops, to much renames, named 'domains' back to 'blocklist'
- also need to check combined arrays, or else always 2 will be found
- need to invoke commit() in sources.update() function
Roland Häder [Sat, 8 Jul 2023 21:22:23 +0000 (23:22 +0200)]
Continued:
- some instances or honeypots may return empty (None in Python) link[href]
entries
- you can run a honeypot and pay monthly domain fees for it, not my business,
but at least format your /.well-known/nodeinfo properly!
Roland Häder [Sat, 8 Jul 2023 20:23:54 +0000 (22:23 +0200)]
Continued:
- instances.social is a non-federating website, `origin` should always bear a
federating instance
- please run SQL `DELETE FROM instances WHERE origin='instances.social'` and
afterwards ./fba.py fetch_instances --domain=<some-large-instance>
- then you can run this command (fetch_instances_social) again