# 默认 cipher 在这里定义:https://github.com/encode/httpx/blob/master/httpx/_config.py
import ssl
import httpx
# create an ssl context
ssl_context = ssl.SSLContext(protocol=ssl.PROTOCOL_TLS)
CIPHERS = 'ECDH+AESGCM:ECDH+CHACHA20H+AESGCM
H+CHACHA20:ECDH+AES256
H+AES256:ECDH+AES128
H+AES:ECDH+HIGH
H+HIGH:RSA+AESGCM:RSA+AES:RSA+HIGH'
ssl_context.set_ciphers(CIPHERS)
r = httpx.get('https://tls.browserleaks.com/json', verify=ssl_context)
print(r.json())
# {'ja3_hash': 'cc8fc04d55d8c9c318409384eee468b6'
欢迎光临 苏飞论坛 (http://www.sufeinet.com/) | Powered by Discuz! X3.4 |