小编saf*_*azi的帖子

Python websocket-client WebSocketApp 代理未连接?

我正在尝试将代理与 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)

请帮助?

python proxy websocket

2
推荐指数
1
解决办法
5790
查看次数

标签 统计

proxy ×1

python ×1

websocket ×1