alireza0 / s-ui

An advanced Web Panel • Built for SagerNet/Sing-Box
https://t.me/XrayUI
GNU General Public License v3.0
2.11k stars 304 forks source link

The remote ruleset causes the sing-box service to fail to start after the computer restarts. #172

Closed lingbaoboy closed 5 days ago

lingbaoboy commented 1 week ago

When using a remote ruleset, the s-ui fails to launch the sing-box service after restarting the computer because the remote ruleset has not been downloaded yet, causing the sing-box startup to fail. After using s-ui restart, the sing-box service starts normally.

lingbaoboy commented 1 week ago

Jun 23 18:48:23 ip-172-26-29-150 runSingbox.sh[368]: FATAL[0005] start service: initialize rule-set[3]: initial rule-set: privateip.srs: Get "https://github.com/DustinWin/ruleset_geodata/raw/sing-box-ruleset/privateip.srs": exchange4: context canceled | exchange6: context canceled | initialize rule-set[3]: initial rule-set: ads.srs: Get "https://github.com/DustinWin/ruleset_geodata/raw/sing-box-ruleset/ads.srs": exchange6: context canceled | exchange4: context canceled | initialize rule-set[3]: initial rule-set: cnip.srs: Get "https://github.com/DustinWin/ruleset_geodata/raw/sing-box-ruleset/cnip.srs": exchange4: context canceled | exchange6: context canceled | initialize rule-set[3]: initial rule-set: cn.srs: Get "https://github.com/DustinWin/ruleset_geodata/raw/sing-box-ruleset/cn.srs": exchange4: context canceled | exchange6: context canceled

alireza0 commented 5 days ago

You URLs are not valid at least in server side.

lingbaoboy commented 5 days ago

I am sure that the URLs are normal because everything is fine after I use "s-ui restart", and the URLs can download the correct rule set. Therefore, I think there may be an issue with the logic of Singbox startup. For example, if remote rule sets are configured, when restarting on the VPS, the network may not be ready, and there is no cached rule set locally. At this point, starting the Singbox service causes the service to fail to start.

alireza0 commented 4 days ago

Sing-box service has autorestart enabled