Closed anyuta1166 closed 2 years ago
试试设置允许应用自启动。
试试设置允许应用自启动。
I didn't mention it, but I already enabled Autostart in application settings too as well as setting the background usage to unrestricted and disabling battery optimization. The difference is that without autostart, Shadowsocks is not automatically launched after reboot. But that setting doesn't affect periodic background service killing.
It seems that I've found an undocumented workaround.
@anyuta1166 how you solved this issue?
@foi Settings - Apps - System app settings - Security - Boost speed - Lock apps - find Shadowsocks and enable the toggle. This way the app will not be killed by both manual and automatic cleanup. The downside is that the app will always stay in memory even if it is not used and not needed.
@anyuta1166 thanks!
Describe the bug VPN occasionally disconnects
To Reproduce Steps to reproduce the behavior:
Smartphone (please complete the following information):
Configuration Put an
x
inside the [ ] that applies.Additional context I've recently bought a new phone and found that Shadowsocks doesn't work as expected on it. I enable the VPN but after some time it occasionally disconnects.
I've researched the logcat and found that MIUI occasionally kills all background services, usually during the night time, despite that background usage is set to unrestricted in application settings.
It seems that this is a known MIUI feature and nothing can be done with this behavior. But another applications seems to survive through this. I guess that their workaround is to periodically check if the background service is alive and relaunch it if needed. Is it possible to add the same workaround to Shadowsocks? I guess it should be possible as there is already the auto-connect on boot feature.