h2csmuggler
h2csmuggler copied to clipboard
Fixed SSL wrap_socket compatibility for Python 3.13
Summary
Python 3.13 removed ssl.wrap_socket, causing AttributeError when running h2csmuggler.
Fix
Replaced:
retSock = ssl.wrap_socket(sock, ssl_version=ssl.PROTOCOL_TLS)
with
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
retSock = context.wrap_socket(sock, server_hostname=proxy_url.hostname)