[erlang-questions] web proxy

Benoit Chesneau bchesneau@REDACTED
Tue Sep 1 16:06:53 CEST 2015


On Tue, Sep 1, 2015 at 11:51 AM Joe Armstrong <erlang@REDACTED> wrote:

> Hello,
>
> I want to record all traffic between my browser and the Internet.
>
> What I want is a record of
>
>     1) the request
>     2) the number of bytes in the response
>     3) some timing data
>
> When I fetch a web page.
>
> I'd like this data (if possible) in the form of event messages being sent
> to an Erlang program.
>
> Why do I want this?
>
> I was horrified by reading
> http://blog.lmorchard.com/2015/07/22/the-verge-web-sucks/
> and wanted to accurately record exactly how much data is involved when
> I request a web page. The I want see how much is content and how much
> is crap.
>
> Any ideas
>
> /Joe
> _______________________________________________
>


Old, but sometimes ago I wrote sieve:
https://github.com/benoitc/sieve

wich could be the base for such tool. It basically allows you to catch the
request and do anything you need with it. Like proxymachine from github.
There is an older version but unmaintained for cowboy:
https://github.com/benoitc/cowboy_revproxy

It actually miss the posibility to pass the request and pass to a connected
socket, but it could be added easily.

- benoit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150901/22dee261/attachment.htm>


More information about the erlang-questions mailing list