features request in KHTML for interaction with another KDE project

sebastien raveau sebastien.raveau at epita.fr
Thu Apr 7 12:54:58 BST 2005


Hi everybody,


it's been a few years since I had the idea of making a network monitor with 
visualization capabilities, and two weeks ago I started really working on it.

As explained on the quickly done website ( http://hawkeye.sourceforge.net/ ) I 
chose to do it for KDE because of all the KParts I could use to handle all 
types of content passing by on a network, and because I enjoy using KDE and I 
figure it would be nice to contribute.

Now, I am writing this email to this mailing-list because I intend to use 
KHTML to render captured web content, and I think I will need a few extra 
features (sorry):

First, it seems that the only way to ensure that KHTML will use the content 
(like images in a webpage, etc) captured by hawKeye and not redownload it 
from the website it came from, is to implement my own little http proxy 
inside hawKeye, in order to force all http requests to go through hawKeye. 
Just sed'ing all URLs in captured content from http://... to file://... 
wouldn't work because, whilst it's possible to do it easily on URLs contained 
in HTML files, I doubt it can be safely done on anything (e.g. Flash 
animations with URLs inside, or JavaScripts generating URLs, etc). That proxy 
trick will also somehow allow for visualization of HTTP traffic in realtime, 
by making KHTML wait for unfinished downloads; otherwise (with the file:// 
method) I suppose KHTML would just truncate images on EOF, even though the 
given image hasn't been completely downloaded yet.
But I still haven't found a way to specify proxy settings from inside a 
program. I read the KHTML developer documentation, in vain... Later I was 
told on IRC that proxying was handled by kio_http, so I searched for the 
kio_http documentation, in vain... The closest I got was in KIO 
documentation: KProtocolManager seems to have something to do with proxying, 
but it apparently only returns information on proxy settings, no way to tune 
them...
So, could somebody please tell me how it is done? :-)
There must be some way to tune at least the user's proxy settings...
But then again I wouldn't want to annoy users by making all their KDE 
applications go through the hawKeye proxy during use, so ideally the KHTML 
inside hawKeye should be able to use different proxy settings than Konqueror, 
for example.

Second, I would need to know the dependencies of a webpage (the images it 
includes, etc) in order to be able to distinguish between images that were 
seen separately (as if somebody clicked on a link that pointed to 
http://www.ethereal.com/mm/image/mainwin-19990804.gif ) from images that were 
just loaded inside some webpage, so that I can organize the treeview I intend 
to use to list what content has been captured, in a user-friendly way.
Typically:

[source_host_1]   <- QToolBox tabs
[source_host_2]
[source_host_3]
FTP
	+ ftp.kde.org
HTTP
	+ www.google.com
	- www.ethereal.com
		+ index.html
		- introduction.html
			elogo-64-trans.gif  <- image included in introduction.html
			mainwin-zoom-20040216.png   <- image included in introduction.html
			etc...
		+ download.html
		mainwin-19990804.gif      <- standalone image (not expandable)
		+ development.html
	+ www.slashdot.org
	- cr.yp.to
		daemontools.html    <- webpage without images (not expandable)
[source_host_4]
[source_host_5]

I hope what I wrote is clear enough: english is not my mother tongue ;-)
Don't hesitate to ask me further question, or send any remarks, suggestions...

And even though the text on http://hawkeye.sourceforge.net/ is written using 
first person plural, I am currently the sole project member, so motivated 
developers are welcome :-)


Thanks


PS: I am not (yet?) subscribed to this mailing-list, but I'll check the web 
archive regularly. Feel free to put my address in the Cc field, though. 

-- 
Sébastien Raveau
systems, networks & security student
Paris, France
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050407/55f0de06/attachment.sig>


More information about the kfm-devel mailing list