[erlang-questions] web proxy

Tony Rogvall tony@REDACTED
Tue Sep 1 16:00:31 CEST 2015


Hi Joe!

You can have a look here: https://github.com/tonyrog/eth <https://github.com/tonyrog/eth>

I wrote a cookie state tracker by just inspecting the HTTP/TCP packet traffic.
This is an example program using ’eth’ in src/eth_http_track.erl

Maybe you can find something useful there.

I guess you can estimate the data up/down loaded by calculate sum over packets data length,
(ignoring retransmission etc) and/or check the Content-Length where possible.

I think you may use enet/src/enet_tcp_fsm.erl  to collect the stream, not sure what happens if you
miss a packet or two?

/Tony

> On 1 sep 2015, at 09:54, 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
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150901/e523464c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150901/e523464c/attachment.bin>


More information about the erlang-questions mailing list