Any docs about writing plugins for bitflu?
Hi Adrian,
A while back I wrote an IP address filter for bitflu which uses ipfilter.dat files like eMule/utorrent. I basically just hacked it into bitflu.pl. It seemed to work fine, though it used quite a bit of RAM for large filter sets like the 300k entries in the paranoid filter (pipfilter.dat).
I just got around to rewriting the filter as a standalone CPAN module, and released it as https://metacpan.org/module/Net::IPAddress::Filter::IPFilterDat This version uses an XS datastructure optimised for range lookups, and is really small and really fast.
I'd like to provide a bitflu plugin wrapped around this as I think many bitflu users would find it useful. Are there any docs or pointers about writing bitflu plugins?
Cheers,
Dave
There is some documentation about the interna on
https://github.com/adrian-bl/bitflu/wiki/Bitflu-internals
The 'cron' plugin would probably be a good start but i'm not sure if there is an easy/clean way to implement an ipfilter using the Plugin infrastructure: The networking code doesn't provide any plugin hooks - a plugin would therefore be required to override some internal functions and this would be rather messy.
It would probably be simpler to implement this directly into the Bitflu::Networking class.