显示部分REQUEST:HTTP/2 VS HTTP/1.1 ![]() HTTP/2 Header部分新增冒号开头 RESPONSE:HTTP/2 VS HTTP/1.1
流量部分调试工具:
Chrome net-internal: 以 Chrome (版本:53.0.2785.143) 为例,通过其内置的 net-internals 工具(地址栏输入
Wireshark主流浏览器目前只支持 HTTP/2 Over TLS ,HTTP/2 网站也都使用了 HTTPS,关于 HTTP/2 是否需要使用 TLS,曾经也有很大的争论,但是出于安全性和用户隐私的考虑,最后决定所有 HTTP/2 的数据传输都需要进行加密。 参见: A lot of focus of http2 has been to make it behave properly over TLS.SPDY is only done over TLS and there’s been a strong push for making TLS mandatory for http2 but it didn’t get consensus and http2 will ship with TLS as optional. However, two prominent implementers have stated clearly that they will only implement http2 over TLS: the Mozilla Firefox lead and the Google Chrome lead. Two of the leading web browsers of today. Reasons for choosing TLS-only include respect for user’s privacy and early measurements showing that new protocols have a higher success rate when done with TLS. This because of the widespread assumption that anything that goes over port 80 is HTTP 1.1 makes some middle-boxes interfere and destroy traffic when instead other protocols are communicated there. The subject about mandatory TLS has caused much hand- waving and agitated voices in mailing lists and meetings – is it good or is it evil? It is an infected subject – be aware of this when you throw this question in the face of a HTTPbis participant! Similarly, there’s been a fierce and long-going debate on whether http2 should dictate a list of ciphers that should be mandatory when using TLS, or if it perhaps should blacklist a set or if it shouldn’t require anything at all from the TLS “layer” but leave that to the TLS WG. 最简单的方式是使用 NSS keylogging 配合 Wireshark (需版本支持)进行调试。 NSS (Mozilla Network Security Services) 是一组库目的是支持跨平台开发启用了安全性的多维客户机和服务器应用程序。用NSS构建的应用程序可以支持 SSL v2 和 v3, TLS, PKCS #5, PKCS #7, PKCS #11, PKCS #12, S/MIME, X.509 v3 证书,以及其他安全标准。 NSS 可以将密钥用特定格式写入日志(Key Log),这让外部程序得以借此解密 TLS 链接。Wireshark 1.6 版本以上可以用 Key Log 解密数据包。 Firefox 和 Chrome 只会在系统环境变量中存在 SSLKEYLOGFILE 路径时才会生成它,先来加上这个环境变量(以 Linux 为例): export SSLKEYLOGFILE=~/保存地址/sslkeylog.log 这里保存至当前用户的 tls 目录下: mkdir ~/tls export SSLKEYLOGFILE=~/tls/sslkeylog.log 你也可以将其写入当前用户的 .profile 文件里,这样每次登录时该环境变量都会 自动生效 :
更新 profile: source .profile 打开 Chrome: google-chrome启动 Wireshark: sudo wireshark 接下来,选择监听网卡,打开 Wireshark 的首选项(
通过 ![]() |
|
声明:文章版权归原作者所有 部分文章转自互联网 如有侵权请联系
[邮箱地址] 删除
|