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

JVM的SSL请求代理出错 #31

Open
JeffersonQin opened this issue Jul 30, 2021 · 12 comments
Open

JVM的SSL请求代理出错 #31

JeffersonQin opened this issue Jul 30, 2021 · 12 comments
Labels
bug Something isn't working

Comments

@JeffersonQin
Copy link

image

@shunf4
Copy link
Owner

shunf4 commented Jul 31, 2021

可能是因为 Java 运行时把返回的 Fake IP 转成了 IPv6 再往外连接的原因

@shunf4 shunf4 added the bug Something isn't working label Jul 31, 2021
@JeffersonQin
Copy link
Author

谢谢回复。其实最让我困扰的是同样的执行命令,在Windows上不行,而在WSL内却可以。可以看一下我记录的这篇文章:https://gyrojeff.top/index.php/archives/H-Downloader-%E5%BD%93%E5%B9%B4%E5%86%99%E7%9A%84%E6%9C%AC%E5%AD%90%E4%B8%8B%E8%BD%BD%E5%99%A8/

@shunf4
Copy link
Owner

shunf4 commented Jul 31, 2021

我想到一个变通方法不知是否可行:在 proxychains.conf 里禁用 IPv4,如只设置 remote_dns_subnet_cidr_v6,关闭 first_tunnel_uses_ipv4,再试试

@JeffersonQin
Copy link
Author

我试了一下,还是不行(不过还是感谢建议

@JeffersonQin JeffersonQin changed the title 对于SSL请求代理出错 JVM的SSL请求代理出错 Jul 31, 2021
@shunf4
Copy link
Owner

shunf4 commented Jul 31, 2021

是否可以提供下截图

@JeffersonQin
Copy link
Author

image

proxychains.conf:

...
#remote_dns_subnet 224
remote_dns_subnet_cidr_v6 250d::/16
first_tunnel_uses_ipv4 0
first_tunnel_uses_ipv6 1

其他配置为默认

@JeffersonQin
Copy link
Author

@shunf4
Copy link
Owner

shunf4 commented Jul 31, 2021

使用 OpenJDK 16.0.1+9 和默认配置未复现,proxychains 工作正常

image

@JeffersonQin
Copy link
Author

嘶... 能说一下您的proxy server是如何实现的吗

@shunf4
Copy link
Owner

shunf4 commented Jul 31, 2021

嘶... 能说一下您的proxy server是如何实现的吗

估计是有 SNI 嗅探。如果没有 SNI 嗅探的话,需要确保输出里含有 -> ja.erocool.com:443 才能保证 proxychains 正确地把域名发送到 SOCKS5 代理服务器。

我又用 SSH 的 SOCKS5 隧道和只允许 IPv6 解析和连接的 proxychains 配置试了一下,也成功。

image

注意如果启用了 first_tunnel_uses_ipv6,一定要保证 SOCKS5 服务器能用一个 IPv6 地址进行连接,详见 proxychains.conf 中的配置说明。

@JeffersonQin
Copy link
Author

谢谢回复!不过我这块不是很懂(悲。可以的话能否发个链接或者指个路稍微说一下该看些啥吗(大感谢😳

@shunf4
Copy link
Owner

shunf4 commented Aug 2, 2021

image

从这份截图看,感觉并不是我之前说的问题(截图里提示的是 SSL 消息出错,说明 TCP 连接已经正常建立可以收发字节)。你可以先尝试换一个代理服务器,看同样的问题和同样的错误提示是否还会出现。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants