-
-
Notifications
You must be signed in to change notification settings - Fork 11.6k
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
升级到5.2.3或5.2.4后,juicessh、vlc/kodi访问nfs不正常 #2751
Comments
Same here. |
经反复测试,终于找到bug所在了。ss服务器使用域名就会出现上述问题,改为ip后就一切正常。我是在家里搭了一个SS服务器,家里的公网IP经常会变,所以搞了一个ddns。估计是5.2.3修改ddns相关程序时改出问题来了。 |
Fill out the bug template. |
Fill out the full form. |
Furthermore, are you using Android private DNS? What DNS do you have configured? |
@zonyitoo What's the default timeout of shadowsocks-rust's internal DNS resolver? This issue looks related to the DDNS provider's resolving performance, causing DNS timeout. |
@madeye From my testing, the local DNS result seems cached by the system but it might not be the case on some ROM. |
手机没有root,无论使用4G还是wifi,全是自动获取dns,5.2.2(含)以前ss服务器使用域名访问一直正常。而且,ss的ddns域名指向的ip基本不变化,除非家里宽带猫重启。 |
还是有一点没有想明白,5.2.2(含)以前版本通过域名访问ss服务器就一切正常,但ss客户端启动时,因为ss客户端还没有连通ss服务端,此时,对ss服务器域名的解析应该也是本地解析吧,为何5.2.2(含)以前版本就正常,5.2.3/5.2.4就出现异常呀?还有5.2.3/5.2.4下,JuiceSSH通过SS访问远端ssh 域名服务器,一般选择重试后就正常,而退出JuiceSSH后重新访问,又重复出现上述现象,至于浏览器通过ss访问,目前没有感觉异常。 |
fill out the full template or else |
Ok I can reproduce this now. Let me look into it. |
Guess it's related to the DNS timeout in shadowsocks-rust. |
I am seeing a lot of |
Also |
Can we force using local resolver for the
It's possible if we keep getting UDP requests. |
I think that is the current behavior. |
Another thing I noticed is that every time a connection is made, |
Hmm, but I cannot reproduce the issue locally. Can you enlarge the 5 sec timeout and try again? |
It seems you need a large number of concurrent connections to trigger the issue. |
If so, we may remove the cache from unix_stream lookup here: https://github.com/shadowsocks/shadowsocks-rust/blob/0b1630d1c6abcec3861b1eec39b266e1dad206e5/crates/shadowsocks-service/src/local/dns/client_cache.rs#L129 |
Yes. In fact I don't think the cache is working since |
It looks shadowsocks-rust only cached the socket, not the results. I think @zonyitoo just wants to reuse the socket to the local resolver. |
I am pretty sure my implementation does not permit connection reuse. 🤔 |
Okay, I think we found the issue here. |
🤔 I don't think you can ever assume connection reuse to work for DNS, maybe except for UDP. |
Also |
我估计与5.23的Refined DDNS support有关,但最让我不解的是,如前一贴所述:5.2.2(含)以前版本通过域名访问ss服务器一切正常,但ss客户端启动时,因为ss客户端还没有连通ss服务端,此时,对ss服务器域名的解析也需要本地解析,为何5.2.2(含)以前版本就正常,5.2.3/5.2.4就出现异常呀! |
Please try again with this APK: https://drive.google.com/file/d/1OMgPLhiLoU0_b9lTYWfOvp6SMqO7kk8_/view?usp=sharing It disables the connection reuse for unix stream lookup. |
这个版本正常了,难道5.2.2处理SS服务器域名时没有使用connection reuse for unix stream lookup? |
Right, we don't have this before 5.2.3. |
@madeye Push the changes to a PR and I will test? |
Fixed via 247c4a1 I suppose. |
shadowsocks升级到5.2.3或5.2.4后,JuiceSSH通过SS访问远端ssh服务器,第一次总是提醒“connection error(1005):Socket error:Connection retset by peer 你想重试吗?”,一般重试一次后即正常,偶尔需要重试多次。而vlc/kodi通过SS则干脆无法访问nfs服务器。在使用5.2.2时,无上述异常现象,升级到5.2.3或5.2.4后,出现上述异常,卸载并重新安装5.2.2后,能恢复正常。why?
The text was updated successfully, but these errors were encountered: