diy tls
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem -days 365 -nodes
server {
listen 80;
server_name 0.0.0.0;
rewrite ^(.*)$ https://$host$1 permanent;
}
server {
listen 443 ssl http2;
ssl_certificate /python_project/tls/cert.pem;
ssl_certificate_key /python_project/tls/key.pem;
server_name 0.0.0.0;
location / {
proxy_pass http://127.0.0.1:10001;
proxy_set_header Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Http-Fingerprint $http2_fingerprint;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
}
安装wireshark
安装
pyshark
查看有哪些网卡
tshark -D
启动监听
tshark -i eth0 -Y "ssl.handshake.type==1" -T fields -e ip.src -e tcp.port -e tls.handshake.version -e tls.handshake.ciphersuite -e tls.handshake.extensions_length -e tls.handshake.extensions_length -e tls.handshake.extensions_supported_group -e tls.handshake.extensions_ec_point_format -e tls.handshake.ja3_full