diff --git a/web/src/flows.json b/web/src/flows.json new file mode 100644 index 000000000..bdbfd5cc1 --- /dev/null +++ b/web/src/flows.json @@ -0,0 +1,2012 @@ +[{ + "request": { + "timestamp_end": 1410651311.107, + "timestamp_start": 1410651311.106, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651311.055, + "state": [], + "timestamp_ssl_setup": 1410651311.096, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651311.04, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63383 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651310.36, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63380 + ] + }, + "timestamp_ssl_setup": 1410651311.105, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "text/html; charset=utf-8" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Cache-Control", + "private" + ], + [ + "X-Frame-Options", + "DENY" + ], + [ + "Cache-Control", + "max-age=0" + ], + [ + "Strict-Transport-Security", + "max-age=31556900; includeSubDomains" + ], + [ + "CF-RAY", + "169828d0108e088d-FRA" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651311.6, + "msg": "OK", + "timestamp_end": 1410651311.603, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651311.657, + "timestamp_start": 1410651311.653, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/css,*/*;q=0.1" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/news.css?IZYAdhDe5bN6BGyHv1jq", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651311.055, + "state": [], + "timestamp_ssl_setup": 1410651311.096, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651311.04, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63383 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651310.36, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63380 + ] + }, + "timestamp_ssl_setup": 1410651311.105, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "text/css" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Fri, 01 Aug 2014 04:27:14 GMT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Expires", + "Mon, 29 Jul 2024 04:27:14 GMT" + ], + [ + "Cache-Control", + "max-age=311575926" + ], + [ + "Cache-Control", + "public" + ], + [ + "CF-RAY", + "169828d38096088d-FRA" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651312.167, + "msg": "OK", + "timestamp_end": 1410651312.17, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651312.362, + "timestamp_start": 1410651312.359, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/s.gif", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651312.303, + "state": [], + "timestamp_ssl_setup": 1410651312.349, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651312.287, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63391 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651312.193, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63386 + ] + }, + "timestamp_ssl_setup": 1410651312.358, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Content-Length", + "43" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Tue, 12 Mar 2013 09:06:31 GMT" + ], + [ + "ETag", + "\"513ef017-2b\"" + ], + [ + "Expires", + "Fri, 31 Mar 2023 21:06:02 GMT" + ], + [ + "Cache-Control", + "public, max-age=269645454" + ], + [ + "CF-Cache-Status", + "HIT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Accept-Ranges", + "bytes" + ], + [ + "CF-RAY", + "169828d7e771088d-FRA" + ] + ], + "timestamp_start": 1410651312.383, + "msg": "OK", + "timestamp_end": 1410651312.393, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651312.389, + "timestamp_start": 1410651312.368, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/news.css?IZYAdhDe5bN6BGyHv1jq" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/grayarrow.gif", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651312.307, + "state": [], + "timestamp_ssl_setup": 1410651312.355, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651312.291, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63393 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651312.2, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63387 + ] + }, + "timestamp_ssl_setup": 1410651312.368, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Content-Length", + "111" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Tue, 12 Mar 2013 09:06:31 GMT" + ], + [ + "ETag", + "\"513ef017-6f\"" + ], + [ + "Expires", + "Sat, 01 Apr 2023 05:56:11 GMT" + ], + [ + "Cache-Control", + "public, max-age=269677263" + ], + [ + "CF-Cache-Status", + "HIT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Accept-Ranges", + "bytes" + ], + [ + "CF-RAY", + "169828d81430088d-FRA" + ] + ], + "timestamp_start": 1410651312.409, + "msg": "OK", + "timestamp_end": 1410651312.412, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651312.386, + "timestamp_start": 1410651312.368, + "form_in": "relative", + "headers": [ + [ + "Host", + "news.ycombinator.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "https://news.ycombinator.com/" + ], + [ + "Cookie", + "__cfduid=d0486ff404fe3beb320f15e958861aaea1410651010546" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Pragma", + "no-cache" + ], + [ + "Cache-Control", + "no-cache" + ] + ], + "host": "news.ycombinator.com", + "form_out": "relative", + "path": "/y18.gif", + "method": "GET", + "scheme": "https", + "port": 443, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651312.303, + "state": [], + "timestamp_ssl_setup": 1410651312.355, + "sni": "news.ycombinator.com", + "timestamp_start": 1410651312.287, + "address": { + "use_ipv6": false, + "address": [ + "news.ycombinator.com", + 443 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63392 + ] + }, + "ssl_established": true + }, + "client_conn": { + "timestamp_start": 1410651312.192, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63385 + ] + }, + "timestamp_ssl_setup": 1410651312.368, + "timestamp_end": null, + "clientcert": null, + "ssl_established": true + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "cloudflare-nginx" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:35:08 GMT" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Content-Length", + "100" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Last-Modified", + "Tue, 12 Mar 2013 09:06:31 GMT" + ], + [ + "ETag", + "\"513ef017-64\"" + ], + [ + "Expires", + "Sat, 01 Apr 2023 04:28:54 GMT" + ], + [ + "Cache-Control", + "public, max-age=269672026" + ], + [ + "CF-Cache-Status", + "HIT" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Accept-Ranges", + "bytes" + ], + [ + "CF-RAY", + "169828d8109a088d-FRA" + ] + ], + "timestamp_start": 1410651312.413, + "msg": "OK", + "timestamp_end": 1410651312.416, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651373.965, + "timestamp_start": 1410651373.963, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:10 GMT" + ], + [ + "Content-Type", + "text/html" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651374.365, + "msg": "OK", + "timestamp_end": 1410651374.366, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.391, + "timestamp_start": 1410651374.387, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/css,*/*;q=0.1" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/01-bootstrap.min.css", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:10 GMT" + ], + [ + "Content-Type", + "text/css" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Transfer-Encoding", + "chunked" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Content-Encoding", + "gzip" + ] + ], + "timestamp_start": 1410651374.579, + "msg": "OK", + "timestamp_end": 1410651374.58, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.396, + "timestamp_start": 1410651374.394, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/css,*/*;q=0.1" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/03-sitestyle.css", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.567, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.401, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63407 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.389, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63405 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:11 GMT" + ], + [ + "Content-Type", + "text/css" + ], + [ + "Content-Length", + "124" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Accept-Ranges", + "bytes" + ] + ], + "timestamp_start": 1410651374.746, + "msg": "OK", + "timestamp_end": 1410651374.747, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.795, + "timestamp_start": 1410651374.793, + "form_in": "absolute", + "headers": [ + [ + "Host", + "www.google-analytics.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "*/*" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "www.google-analytics.com", + "form_out": "relative", + "path": "/ga.js", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.99, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.974, + "address": { + "use_ipv6": false, + "address": [ + "www.google-analytics.com", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63409 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.389, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63405 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Date", + "Sat, 13 Sep 2014 22:02:27 GMT" + ], + [ + "Expires", + "Sun, 14 Sep 2014 00:02:27 GMT" + ], + [ + "Last-Modified", + "Mon, 08 Sep 2014 18:50:13 GMT" + ], + [ + "X-Content-Type-Options", + "nosniff" + ], + [ + "Content-Type", + "text/javascript" + ], + [ + "Vary", + "Accept-Encoding" + ], + [ + "Content-Encoding", + "gzip" + ], + [ + "Server", + "Golfe2" + ], + [ + "Content-Length", + "16062" + ], + [ + "Age", + "5624" + ], + [ + "Cache-Control", + "public, max-age=7200" + ], + [ + "Alternate-Protocol", + "80:quic,p=0.002" + ] + ], + "timestamp_start": 1410651375.013, + "msg": "OK", + "timestamp_end": 1410651375.015, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651375.084, + "timestamp_start": 1410651375.078, + "form_in": "absolute", + "headers": [ + [ + "Host", + "www.google-analytics.com" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "www.google-analytics.com", + "form_out": "relative", + "path": "/__utm.gif?utmwv=5.5.7&utms=1&utmn=1242429522&utmhn=mitmproxy.org&utmcs=UTF-8&utmsr=1536x864&utmvp=1091x742&utmsc=24-bit&utmul=de&utmje=1&utmfl=15.0%20r0&utmdt=mitmproxy%20-%20home&utmhid=812953117&utmr=-&utmp=%2F&utmht=1410651375077&utmac=UA-4150636-13&utmcc=__utma%3D30234659.1711188806.1410651375.1410651375.1410651375.1%3B%2B__utmz%3D30234659.1410651375.1.1.utmcsr%3D(direct)%7Cutmccn%3D(direct)%7Cutmcmd%3D(none)%3B&utmu=q~", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.99, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.974, + "address": { + "use_ipv6": false, + "address": [ + "www.google-analytics.com", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63409 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.389, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63405 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Pragma", + "no-cache" + ], + [ + "Expires", + "Wed, 19 Apr 2000 11:43:00 GMT" + ], + [ + "Last-Modified", + "Wed, 21 Jan 2004 19:51:30 GMT" + ], + [ + "X-Content-Type-Options", + "nosniff" + ], + [ + "Content-Type", + "image/gif" + ], + [ + "Date", + "Thu, 04 Sep 2014 18:39:58 GMT" + ], + [ + "Server", + "Golfe2" + ], + [ + "Content-Length", + "35" + ], + [ + "Age", + "795373" + ], + [ + "Cache-Control", + "private, no-cache, no-cache=Set-Cookie, proxy-revalidate" + ], + [ + "Alternate-Protocol", + "80:quic,p=0.002" + ] + ], + "timestamp_start": 1410651375.104, + "msg": "OK", + "timestamp_end": 1410651375.107, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.778, + "timestamp_start": 1410651374.766, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/images/apple.png", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.952, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651374.782, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63408 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651374.39, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63406 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:11 GMT" + ], + [ + "Content-Type", + "image/png" + ], + [ + "Content-Length", + "20532" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Accept-Ranges", + "bytes" + ] + ], + "timestamp_start": 1410651375.125, + "msg": "OK", + "timestamp_end": 1410651375.126, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651374.778, + "timestamp_start": 1410651374.766, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "image/png,image/*;q=0.8,*/*;q=0.5" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Referer", + "http://mitmproxy.org/" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/images/mitmproxy-small.png", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 200, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:11 GMT" + ], + [ + "Content-Type", + "image/png" + ], + [ + "Content-Length", + "170108" + ], + [ + "Last-Modified", + "Wed, 26 Feb 2014 19:58:20 GMT" + ], + [ + "Connection", + "keep-alive" + ], + [ + "Accept-Ranges", + "bytes" + ] + ], + "timestamp_start": 1410651374.953, + "msg": "OK", + "timestamp_end": 1410651374.954, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651376.078, + "timestamp_start": 1410651376.075, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Cookie", + "__utma=30234659.1711188806.1410651375.1410651375.1410651375.1; __utmb=30234659.1.10.1410651375; __utmc=30234659; __utmz=30234659.1410651375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/favicon.ico", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 404, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:12 GMT" + ], + [ + "Content-Type", + "text/html" + ], + [ + "Content-Length", + "169" + ], + [ + "Connection", + "keep-alive" + ] + ], + "timestamp_start": 1410651376.254, + "msg": "Not Found", + "timestamp_end": 1410651376.255, + "httpversion": [ + 1, + 1 + ] + } +}, +{ + "request": { + "timestamp_end": 1410651376.282, + "timestamp_start": 1410651376.279, + "form_in": "absolute", + "headers": [ + [ + "Host", + "mitmproxy.org" + ], + [ + "User-Agent", + "Mozilla/5.0 (Windows NT 6.3; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0" + ], + [ + "Accept", + "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8" + ], + [ + "Accept-Language", + "de,en-US;q=0.7,en;q=0.3" + ], + [ + "Accept-Encoding", + "gzip, deflate" + ], + [ + "Cookie", + "__utma=30234659.1711188806.1410651375.1410651375.1410651375.1; __utmb=30234659.1.10.1410651375; __utmc=30234659; __utmz=30234659.1410651375.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none)" + ], + [ + "Connection", + "keep-alive" + ] + ], + "host": "mitmproxy.org", + "form_out": "relative", + "path": "/favicon.ico", + "method": "GET", + "scheme": "http", + "port": 80, + "httpversion": [ + 1, + 1 + ] + }, + "server_conn": { + "timestamp_tcp_setup": 1410651374.189, + "state": [], + "timestamp_ssl_setup": null, + "sni": null, + "timestamp_start": 1410651373.985, + "address": { + "use_ipv6": false, + "address": [ + "mitmproxy.org", + 80 + ] + }, + "timestamp_end": null, + "source_address": { + "use_ipv6": false, + "address": [ + "192.168.1.117", + 63404 + ] + }, + "ssl_established": false + }, + "client_conn": { + "timestamp_start": 1410651373.958, + "address": { + "use_ipv6": false, + "address": [ + "127.0.0.1", + 63403 + ] + }, + "timestamp_ssl_setup": null, + "timestamp_end": null, + "clientcert": null, + "ssl_established": false + }, + "conntype": "http", + "version": [ + 0, + 11 + ], + "error": null, + "response": { + "code": 404, + "headers": [ + [ + "Server", + "nginx/1.1.19" + ], + [ + "Date", + "Sat, 13 Sep 2014 23:36:12 GMT" + ], + [ + "Content-Type", + "text/html" + ], + [ + "Content-Length", + "169" + ], + [ + "Connection", + "keep-alive" + ] + ], + "timestamp_start": 1410651376.461, + "msg": "Not Found", + "timestamp_end": 1410651376.462, + "httpversion": [ + 1, + 1 + ] + } +}] \ No newline at end of file diff --git a/web/src/js/datastructures.es6.js b/web/src/js/datastructures.es6.js index 4bc781b22..e9e2ee778 100644 --- a/web/src/js/datastructures.es6.js +++ b/web/src/js/datastructures.es6.js @@ -1,26 +1,26 @@ class EventEmitter { constructor(){ - this._listeners = {}; + this.listeners = {}; } emit(event){ - if(!(event in this._listeners)){ + if(!(event in this.listeners)){ return; } - this._listeners[event].forEach(function (listener) { + this.listeners[event].forEach(function (listener) { listener(event, this); }.bind(this)); } addListener(event, f){ - this._listeners[event] = this._listeners[event] || []; - this._listeners[event].push(f); + this.listeners[event] = this.listeners[event] || []; + this.listeners[event].push(f); } removeListener(event, f){ - if(!(event in this._listeners)){ + if(!(event in this.listeners)){ return false; } - var index = this._listeners.indexOf(f); + var index = this.listeners.indexOf(f); if (index >= 0) { - this._listeners.splice(this._listeners.indexOf(f), 1); + this.listeners.splice(this.listeners.indexOf(f), 1); } } } @@ -31,13 +31,17 @@ class FlowStore extends EventEmitter{ constructor() { super(); this.flows = []; - this._listeners = []; } getAll() { return this.flows; } + close(){ + console.log("FlowStore.close()"); + this.listeners = []; + } + emitChange() { return this.emit(FLOW_CHANGED); } @@ -57,14 +61,14 @@ class DummyFlowStore extends FlowStore { this.flows = flows; } - addFlow(f) { - this.flows.push(f); + addFlow(flow) { + this.flows.push(flow); this.emitChange(); } } -var SETTINGS_CHANGED = "settings.change"; +var SETTINGS_CHANGED = "settings.changed"; class Settings extends EventEmitter { constructor(){ diff --git a/web/src/js/mitmproxy.react.js b/web/src/js/mitmproxy.react.js index 2a2ee910f..cdb6221d0 100644 --- a/web/src/js/mitmproxy.react.js +++ b/web/src/js/mitmproxy.react.js @@ -9,16 +9,13 @@ var App = React.createClass({ }, componentDidMount: function () { //TODO: Replace DummyStore with real settings over WS (https://facebook.github.io/react/tips/initial-ajax.html) - //TODO: Is there a sensible place where we can store this? - var settings = new DummySettings({ + var settingsStore = new DummySettings({ version: "0.12" }); - settings.addChangeListener(this._onSettingsChange); - - //This would be async in some way or another. - this._onSettingsChange(null, settings); + this.setState({settingsStore: settingsStore}); + settingsStore.addChangeListener(this.onSettingsChange); }, - _onSettingsChange: function(event, settings){ + onSettingsChange: function(event, settings){ this.setState({settings: settings.getAll()}); }, render: function () { @@ -34,12 +31,39 @@ var App = React.createClass({ } }); -var Traffic = React.createClass({ - render: function(){ - var json = JSON.stringify(this.props, null, 4); - var i = 5; - while(i--) json += json; - return (
{json}); +var TrafficTable = React.createClass({ + getInitialState: function(){ + return { + flows: [] + }; + }, + componentDidMount: function () { + var flowStore = new DummyFlowStore([]); + this.setState({flowStore: flowStore}); + + flowStore.addChangeListener(this.onFlowsChange); + + $.getJSON("/flows.json").success(function (flows) { + + flows.forEach(function (flow, i) { + window.setTimeout(function () { + flowStore.addFlow(flow); + }, _.random(i*400,i*400+1000)); + }); + + }.bind(this)); + }, + componentWillUnmount: function(){ + this.state.flowStore.close(); + }, + onFlowsChange: function(event, flows){ + this.setState({flows: flows.getAll()}); + }, + render: function () { + var flows = this.state.flows.map(function(flow){ + return
{flows}; } }); @@ -52,7 +76,7 @@ var Reports = React.createClass({ var routes = (