binance-connector-python icon indicating copy to clipboard operation
binance-connector-python copied to clipboard

websocket

Open Mr-Yuanhe opened this issue 4 years ago • 10 comments

websocket可以挂代理吗,现在不挂代理访问不了

Mr-Yuanhe avatar Aug 19 '21 10:08 Mr-Yuanhe

暂时还不支持。

2pd avatar Aug 20 '21 02:08 2pd

可以通过其他手段,让他走代理吗?或者使用其它语言,难道只能部署在国外服务器吗

Mr-Yuanhe avatar Aug 20 '21 02:08 Mr-Yuanhe

可以在options = ssl.optionsForClientTLS(hostname=urlparse(url).hostname)前面加上factory.proxy={'host':'127.0.0.1','port':10808}这句话吗

Mr-Yuanhe avatar Aug 20 '21 03:08 Mr-Yuanhe

可以在options = ssl.optionsForClientTLS(hostname=urlparse(url).hostname)前面加上factory.proxy={'host':'127.0.0.1','port':10808}这句话吗

image

ZeroDY avatar Nov 03 '21 08:11 ZeroDY

可以在options = ssl.optionsForClientTLS(hostname=urlparse(url).hostname)前面加上factory.proxy={'host':'127.0.0.1','port':10808}这句话吗

image

It doesn't work for me. It returns

Can't connect to server. Reason: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectError'>: An error occurred while connecting: [Failure instance: Traceback (failure with no frames): <class 'twisted.internet.error.ConnectionLost'>: Connection to the other side was lost in a non-clean fashion: Connection lost.
].
]. Retrying: 1

JDYG avatar Dec 28 '21 09:12 JDYG

image 全局设置的也不行 在VPN情况下 google可以访问

但直接使用websocket-client可以用代理访问 emmm

Kiuyam avatar Jul 26 '22 08:07 Kiuyam

已解决 1是可以配置全局代理 socks.set_default_proxy(socks.PROXY_TYPE_HTTP, "127.0.0.1", 10811) socket.socket = socks.socksocket 2使用官方的连接 会报证书问题 windows客户端可用以下解决 linux没有试 指定就可以了 os.environ['SSL_CERT_FILE'] = certifi.where()

Kiuyam avatar Jul 27 '22 09:07 Kiuyam

@Mr-Yuanhe @ZeroDY @JDYG Can you try the method suggested by @Kiuyam above please? Unfortunately we don't know when we'll be able to tackle this part of the code.

aisling-2 avatar Sep 10 '22 13:09 aisling-2