bitflu icon indicating copy to clipboard operation
bitflu copied to clipboard

Any docs about writing plugins for bitflu?

Open d5ve opened this issue 13 years ago • 1 comments

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

d5ve avatar Nov 19 '12 13:11 d5ve

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.

adrian-bl avatar Nov 23 '12 08:11 adrian-bl