Add sing-box srs custom url support for fix TUN (#5835)

Co-authored-by: 2dust <31833384+2dust@users.noreply.github.com>
This commit is contained in:
runetfreedom
2024-10-15 08:28:51 +03:00
committed by GitHub
parent e96c9abd69
commit eebb6735aa
11 changed files with 70 additions and 3 deletions
@@ -1367,12 +1367,16 @@ namespace ServiceLib.Services.CoreConfig
}
else
{
var srsUrl = string.IsNullOrEmpty(_config.constItem.srsSourceUrl)
? Global.SingboxRulesetUrl
: _config.constItem.srsSourceUrl;
customRuleset = new()
{
type = "remote",
format = "binary",
tag = item,
url = string.Format(Global.SingboxRulesetUrl, item.StartsWith(geosite) ? geosite : geoip, item),
url = string.Format(srsUrl, item.StartsWith(geosite) ? geosite : geoip, item),
download_detour = Global.ProxyTag
};
}