Scriptable IP filters generator (Multi-Router Looking Glass (MRLG) output (ip bgp) parser).
TasXIP is a simple web-dumping tool that dumps info from tas-ix mrlg, and make ipfilter-file for programs like uTorrent, IP Blocker, etc. Output format depends on the used plugin.
Plugins are written in JavaScript. Each plugin - is a text file that contains the definition of a JavaScript-function plugin
, that exports the plugin-object(s):
function plugin(){
return <plugin_objects>;
}
where <plugin_objects>
- JS object(s), which can have following fields:
-
minimum_required
: minimum loader version [optional field] -
version
: plugin version [optional field] -
name
: plugin name -
description
: short plugin description [optional field] -
invoke(iprange)
: plugins main function
Complete plugin example:
/*
basicplugin.js
*/
function plugin(){
return {
name: "Plugin name",
description: "Plugin description",
version: "Plugin.Version.Number",
invoke: function(iprange){
var result = "";
for(var i = 0; i < iprange.length; i++){
result += iprange[i].from + '-' + iprange[i].to + '\n';
}
return result;
}
}
}
Several plugins, can be combined in a single file:
/*
multiplugin.js
*/
function plugin(){
return [{
name: "Plugin1",
invoke: function(iprange){
return ...;
}
}, {
name: "Plugin2",
invoke: function(iprange){
return ...;
}
}];
}
The search path for TasXIP plugins is:
-
{USER_HOME}/.tasxip/plugins
-
{EXECUTABLE_BIN_PATH}/plugins
-
Clone this repository with --recursive option:
git clone --recursive git://github.com/unixod/tasxip.git
-
Follow the steps described in the BUILD file.
Do the usual github fork and pull request dance.
Released under the GPLv3 license.
___ __ //_/\// _// _//\\
Copyright (C) 2011-2012, Eldar Zakirov unixod@gmail.com