Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

websocket #95

Open
Mr-Yuanhe opened this issue Aug 19, 2021 · 10 comments
Open

websocket #95

Mr-Yuanhe opened this issue Aug 19, 2021 · 10 comments
Labels
enhancement New feature or request

Comments

@Mr-Yuanhe
Copy link

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

@2pd
Copy link
Contributor

2pd commented Aug 20, 2021

暂时还不支持。

@Mr-Yuanhe
Copy link
Author

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

@Mr-Yuanhe
Copy link
Author

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

@aisling11 aisling11 added the enhancement New feature or request label Oct 1, 2021
@ZeroDY
Copy link

ZeroDY commented Nov 3, 2021

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

image

@JDYG
Copy link

JDYG commented Dec 28, 2021

可以在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

@Kiuyam
Copy link

Kiuyam commented Jul 26, 2022

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

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

@Kiuyam
Copy link

Kiuyam commented Jul 27, 2022

已解决
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()

@aisling-2
Copy link
Collaborator

@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.

@cloud2haohao
Copy link

这个包要怎么用啊

@Mrhi77
Copy link

Mrhi77 commented Mar 18, 2024

用clash挂代理,然后在连接时添加下面的语句,可以走clash的代理正常连接了
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

9 participants