sublink-worker icon indicating copy to clipboard operation
sublink-worker copied to clipboard

Unable to download srs file when using Android Singbox client for the first time.

Open Wikeolf opened this issue 1 year ago • 7 comments

This is probably because the proxy selector “auto-selector” can't determine the outbound firstly. When I manually specify the download_detour item in the config file, it works fine.

Wikeolf avatar Sep 28 '24 09:09 Wikeolf

I think you are right. The urltest may choose a wrong outbound as a download detour.

It may happen in this situation: you have a low latency outbound but it doesn't work well. The urltest will choose it as the detour but fail in the download process. Thus, you may need to double-check your outbounds.

But it works well in most of the situations. Personally, I use the Singbox client on Android with sublink-worker and have not encountered similar problems so far.

Using urltest as the selection mechanism is a trade-off. Considering that GitHub may be blocked in some time and regions, direct downloads may not always be reliable. Compared to randomly selecting an outbound node, the urltest mechanism is clearly a better solution.

If you have any ideas on how to improve this mechanism or address the potential issues, welcome your contributions. Feel free to submit a pull request or open an issue with your suggestions.

7Sageer avatar Sep 28 '24 11:09 7Sageer

我常遇到规则下载失败,用数据流量成功率高一些。 singbox 这个设计用代理节点下载,我感觉好像有点问题

jaydong2016 avatar Sep 28 '24 13:09 jaydong2016

I think you are right. The urltest may choose a wrong outbound as a download detour.

It may happen in this situation: you have a low latency outbound but it doesn't work well. The urltest will choose it as the detour but fail in the download process. Thus, you may need to double-check your outbounds.

But it works well in most of the situations. Personally, I use the Singbox client on Android with sublink-worker and have not encountered similar problems so far.

Using urltest as the selection mechanism is a trade-off. Considering that GitHub may be blocked in some time and regions, direct downloads may not always be reliable. Compared to randomly selecting an outbound node, the urltest mechanism is clearly a better solution.

If you have any ideas on how to improve this mechanism or address the potential issues, welcome your contributions. Feel free to submit a pull request or open an issue with your suggestions.

I think there might be two potential ways to address this instability issue.

First, if user has a stable and reliable outbound, perhaps they could manually specify that outbound for downloading rules. Alternatively, if the user doesn't have it, they could use a public GitHub reverse proxy to download the rules.

In simple terms, this approach allows users to specify an outbound for downloading rules and a public proxy to download the rules. User need to have at least one reliable outbound or a network environment capable of directly accessing the public reverse proxy.

Personally, I lean more towards the second approach. If a user can successfully use this project and get the subscription, it at least shows their network environment can connect directly to CF worker. Perhaps integrating a reverse proxy for rules link within the project could be considered, allowing users to download rules through the reverse proxy established by the project itself. This might be more convenient for the user.

However, the second method seems quite heavy and may not be what a subscription converter should handle. Maybe you could think about how you want to position this project before making a decision. Since I've only just started using Singbox and have experience only with the Android client, I'm not sure if this issue is caused by the subscription file or by Singbox's design.

Thank you very much for your efforts and for creating this open-source project—it’s truly excellent. The PR I submitted earlier was merely an attempt to imitate your clear code, though not as skillfully. Given my current abilities, I may not be able to implement the second approach I mentioned anytime soon.

Thanks again for all your efforts.

Wikeolf avatar Sep 29 '24 07:09 Wikeolf

我常遇到规则下载失败,用数据流量成功率高一些。 singbox 这个设计用代理节点下载,我感觉好像有点问题

我发现首次规则集下载困难是因为走的直连,配置里指定自动选择组代理下载似乎并没有生效, IMG_20240929_152653.jpg

jaydong2016 avatar Sep 29 '24 07:09 jaydong2016

我常遇到规则下载失败,用数据流量成功率高一些。 singbox 这个设计用代理节点下载,我感觉好像有点问题

我发现首次规则集下载困难是因为走的直连,配置里指定自动选择组代理下载似乎并没有生效, IMG_20240929_152653.jpg

你提供的链接好像不是下载规则集的地址,这部分应该是内核在初始化,下载规则集的日志应该在后面?

7Sageer avatar Sep 29 '24 08:09 7Sageer

这部分可能是下载 external_ui 的部分? https://sing-box.sagernet.org/zh/configuration/experimental/clash-api/#_1

抱歉,我其实一知半解。

我用另外一个项目生成的配置就能轻松下载规则并启动,您或许可以参考一下https://cconfig.cc/nodes

jaydong2016 avatar Sep 29 '24 09:09 jaydong2016

这部分可能是下载 external_ui 的部分? https://sing-box.sagernet.org/zh/configuration/experimental/clash-api/#_1

抱歉,我其实一知半解。

我用另外一个项目生成的配置就能轻松下载规则并启动,您或许可以参考一下https://cconfig.cc/nodes

当然,我其实也不太了解sing-box的具体运作

晚点有时间我看看

7Sageer avatar Sep 29 '24 10:09 7Sageer

参考jaydong2016提出的 #55 目前似乎解决了问题

7Sageer avatar Nov 20 '24 13:11 7Sageer