我正在尝试将代理与 websocket 模块中包含的 python WebSocketApp 一起使用。然而,每当我使用这段代码时,
ws=websocket.WebSocketApp('ws://echo.websocket.org:443')
ws.run_forever(http_proxy_host='my proxy here',http_proxy_port=80, # 80 is the proxy port
on_close=on_close)
Run Code Online (Sandbox Code Playgroud)
我在控制台中得到这个,然后套接字关闭
Connecting proxy...
--- request header ---
CONNECT echo.websocket.org:443 HTTP/1.0
-----------------------
--- response header ---
## SOCKET CLOSED ##
Run Code Online (Sandbox Code Playgroud)
请帮助?