1.設置環境變量
mkdir ~/tls && touch ~/tls/sslkeylog.log #zsh echo "\nexport SSLKEYLOGFILE=~/tls/sslkeylog.log" >> ~/.zshrc && source ~/.zshrc #bash echo "\nexport SSLKEYLOGFILE=~/tls/sslkeylog.log" >> ~/.bash_profile && . ~/.bash_profile
2.設置wireshark的解密密鑰文件地址

3.通過命令行啟動chrome
/Applications/Google\ Chrome.app/Contents/MacOS/Google\ Chrome --user-data-dir=/tmp/chrome --ssl-key-log-file=~/tls/sslkeylog.log
4.抓包

參考:https://imququ.com/post/http2-traffic-in-wireshark.html
浙公網安備 33010602011771號