Re: [lazarus] A counting proxy in lazarus ?

2007-07-07 Thread Marco van de Voort
On Fri, Jul 06, 2007 at 12:55:01PM +0200, A.J. Venter wrote:
>  Put an http proxy inside the outkafe counter window, send the browser
>  through it. This proxy need not cache ANYTHING. It ONLY needs to relay
>  the http traffic back and forth - and count the bytes coming in (Each
>  instance can run on it's own port - no problems there)

(Afaik Indy 10 has a HTTP proxy component, check it out)
 

_
 To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
   archives at http://www.lazarus.freepascal.org/mailarchives


[lazarus] A counting proxy in lazarus ?

2007-07-06 Thread A.J. Venter

Hi all,
I have an interesting challenge before me. A user has requested the
ability to keep track of http traffic used by OutKafe users. These
should count against the user's available usage units the same way
time does now (so a big downloader will run out of access quicker
basically)
After some thought and discussion, I came to the conclusion that in
their environment the approach should be this (keep in mind we're only
concerned about http):

Put an http proxy inside the outkafe counter window, send the browser
through it. This proxy need not cache ANYTHING. It ONLY needs to relay
the http traffic back and forth - and count the bytes coming in (Each
instance can run on it's own port - no problems there)

So my question is - can I do this with the INet components ? If I hook
up INet's http server and http client components into my app - can I
then let the browser connect to the httpserver component as a proxy
client, and have the httpclient component relay the same connection ?
How hard would this be ? Does the INet components have the tools I
would need to count the bytes ?

If none of this is an option - is there another (easy) way I can do
this ? Perhaps a plugin for squid that can report on bandwith used by
each user ? Or perhaps just a proxy interface that can report this to
stdout ?

Or would you guys suggest some entirely different approach ? (I am
open to possibility here)
Of course, a way to just track 'traffic per user' and respond each
time one meg is transferred could be ideal - again I'm open to
suggestion.

TIA
A.J.
--
A.J. Venter
CEO - OutKast Solutions C.C.
http://www.outkastsolutions.co.za
Cell: +27 83 455 9978
Fax: +27 21 413 2800
Office: +27 21 591 6766

_
To unsubscribe: mail [EMAIL PROTECTED] with
   "unsubscribe" as the Subject
  archives at http://www.lazarus.freepascal.org/mailarchives