Jeff Anderson wrote:
> Hello!
> 
> Being a Python fan, I'd say that this needs to be done in Python. 

Precisely.  Python is a good fit.  And even though X-Wrt is a CGI system
based on Bash and Awk, it's trivial (I have already demonstrated this)
to simply have a bash cgi script call a python-based CGI script.  Hence
integration with X-wrt is trivial

> I'd 
> make an abstraction layer in pure Python that represents the way each 
> component should be configured. It'd also ideally be able to write out 
> the respective configuration files and restart or reload them. You might 
> be able to do something like:

Rather than abstract dansguardian itself, probably it is easiest to
write python code to interact with the configuration files.  There's
really no point in an object-oriented interface on the top level.
There's only one dansguardian instance anyway, so a singleton is the way
to go.  I already began an interface to read and write the various lists.

> 
>     >>> d = TorrieUI.DansGuardian()
>     >>> d.greylist.extend("http://some.ok.site.com/";)
>     >>> d.save()
> 
> Each individual GUI implementation could be written in whatever is most 
> convenient, given there is a decent enough API for the GUI to 
> communicate with this Python abstraction layer. Once there is the lower 
> level abstraction, Django, Turbogears, Zope, PyGui, PyQT, PyObjC, 
> WxPython, etc. could be used to make the part the user sees.

Definitely this is basically what I intended.

> 
> If a non-Python gui is needed, it's easy enough to expose the API to 
> other languages, but likely not necessary for getting this to a 
> beta-quality.
> 
> The Python abstraction layer would live on the router, and when it is 
> set up you'd tell it where dans is, and give it an SSH key or something 
> to make the updates if dans isn't local.

At this point, I'm not really asking how it should be done.  That much I
have an idea about already.  Or it can be worked out later.  What I'm
really intending is to get volunteers to give this potential project a
life of its own.  In my opinion this is a project that many people could
take real ownership in.  Besides one aspect of it is building your own
router.  As I said before I'm willing to provide the hardware for a
couple of these routers as a development platform (Alix x86 board with
atheros wifi, all in a nice 6"x6"x1" box) if anyone is interested in
this project.  My current router test platform is about 400 MHz, 256 MB
of ram, 256 MB CF storage, runs OpenWRT Kamakaze with X-wrt,
Dansguardian, a full python distro (even installed Django for the heck
of it), etc.




--------------------
BYU Unix Users Group 
http://uug.byu.edu/ 

The opinions expressed in this message are the responsibility of their
author.  They are not endorsed by BYU, the BYU CS Department or BYU-UUG. 
___________________________________________________________________
List Info (unsubscribe here): http://uug.byu.edu/mailman/listinfo/uug-list

Reply via email to