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

fix: The proxy configuration is not correctly passed. #2566

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

DeJeune
Copy link
Collaborator

@DeJeune DeJeune commented Feb 28, 2025

#549 (修复部分)
之前的PR #2294 有个bug,紧急修复一下

@DeJeune
Copy link
Collaborator Author

DeJeune commented Feb 28, 2025

@kangfenmao 猫哥review下

@kangfenmao kangfenmao merged commit 5bacf04 into CherryHQ:main Feb 28, 2025
@eeee0717
Copy link
Collaborator

eeee0717 commented Mar 1, 2025

@DeJeune 这个功能好像还有bug,我不开代理用硅基流动的Pro/BAAI/bge-m3嵌入知识库报错
CleanShot 2025-03-01 at 19 57 00@2x

@eeee0717
Copy link
Collaborator

eeee0717 commented Mar 1, 2025 via email

@LordHumphrey
Copy link

复现了问题了,而且添加代理url时,不能使用socks代理,但是空白输入框里面提示的代理url格式是socks://xxx。
另,关闭代理用tun模式居然也不行,(此条不排除是我本地的问题)。
感谢开发者的付出,想你们致以敬意。

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

关闭系统代理,使用硅基流动的不行;采用分流规则,使用GitHub Model的不行。 退回原先的可以执行。猫哥现在在修,你们可以交流一下。

ok,我也在改。当时测试时没考虑到直连的情况

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

复现了问题了,而且添加代理url时,不能使用socks代理,但是空白输入框里面提示的代理url格式是socks://xxx。 另,关闭代理用tun模式居然也不行,(此条不排除是我本地的问题)。 感谢开发者的付出,想你们致以敬意。

TUN模式,我是测试了的。奇怪

@kangfenmao
Copy link
Collaborator

socks5 会出错

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

@kangfenmao 猫哥,初步问题是proxyAgent的传惨必须是代理URL,所以在proxy URL为空的时候就不能设置undici ProxyAgent

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

socks5 会出错

undici不支持socks协议代理,需要特殊处理一下

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

我还没找到能够用socks协议代理nodejs 原生fetch请求的库

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

要不要不支持socks代理,我看了下都没支持
nodejs/undici#2224
imputnet/cobalt#588 (comment)
DIYgod/RSSHub#15096 (comment)

@LordHumphrey
Copy link

要不要不支持socks代理,我看了下都没支持 nodejs/undici#2224 imputnet/cobalt#588 (comment) DIYgod/RSSHub#15096 (comment)

个人认为socks还得支持的,这是RFC定义的,常用的代理啊。😘

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

ok,我改完了。然后已经全部重新测试了一遍,测了TUN, 系统代理规则,系统代理直连,自定义http代理,自定义socks5代理。直接继续提交这个PR吗?

@kangfenmao
Copy link
Collaborator

重新再来一个吧,我暂时在 main 分支 revert 了上面两个改动,可能要麻烦你一下把之前两个改动和最新的改动一起提交一个新的 pr

@DeJeune
Copy link
Collaborator Author

DeJeune commented Mar 1, 2025

OK,我刚提交的PR在revert之前的,那也删了。重新从主分支提交

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

Successfully merging this pull request may close these issues.

4 participants