W3C home > Mailing lists > Public > www-lib@w3.org > April to June 2003

libwww & personal firewall

From: Sasha <anedvedicky@kerio.com>
Date: Tue, 6 May 2003 19:03:32 +0200
To: www-lib@w3.org
Message-ID: <20030506170332.GA1013@kerio.com>

hello,

i've got following situation, i'm going to write 
'personal http transparent proxy' into kerio personal
firewall.

we would like to use libwww, which seems to be very flexible.
i've studied documentation and source of Libwww (5.4) for nearly
one week.

we can't use event manager supplied with distribution package of
libwww. we can't use any event manager, which is build at the top
of socket/select like API...

in Kerio personal firewall we are hook, on TDI level, and we
see just data stream before it is passed through socket into
user space application.

the KPF stream API is very thin and light, when firewall wants
to insepect any stream, which is going to be delivered to application,
sets its own callbeck. TDI layer of personal firewall then notifies
firewall inspection engine about any event related to streams.
the type of event is determined by one of callbacks parameter.
there are following events recognized:
	CONNECT		- application performs TCP connection
	DATA_IN		- inbound data are passed to callback
	DATA_OUT	- outbound data are passed to callback
	CLOSE		- connection is about to close.

event notification is made directly from kernel via previously
supplied callback.

current status of my design:
on connect i've receive this information from kernel:
	application,
	destination address & port
	source address & port

if port is HTTP i'm will create a HTTP serve request
instance and pass it to libwww with specal transport class, which
will be able to deal with request (currently i've got very inacurate
ideas how transport streams should look).

libwww will be forced to _serve_ request by querying remote (real destination)
server instead of local file system (as default behaviour).
data will be passed back to TDI layer. library should behave like a server
from application point of view.

when data will be comming back from remote server library should handle
them similarly as a client would handle them (client side of library, 
should be used here).

well folks and here are my questions:
	is it possible to use libwww in such a way?
		i've rather hope so, instead of know how to implement it.
	are there similar projects, which i'm going to do?
		could not google anything...
	are there any better papers about libwww, than attached documentation?
		i mean paper with more pictures, where library design is more
		obvious.

thanks for comments

kind regads

sasha nedvedicky
Received on Tuesday, 6 May 2003 13:03:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 23 April 2007 18:18:43 GMT