diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 726c9c18..067b53ea 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -23,7 +23,7 @@ namespace v2rayN public const string SpeedPingTestUrl = @"https://www.google.com/generate_204"; public const string JuicityCoreUrl = "https://github.com/juicity/juicity/releases"; public const string CustomRoutingListUrl = @"https://raw.githubusercontent.com/2dust/v2rayCustomRoutingList/master/"; - public const string SingboxRulesetUrlGeosite = @"https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/geosite-{0}.srs"; + public const string SingboxRulesetUrlGeosite = @"https://raw.githubusercontent.com/SagerNet/sing-geosite/rule-set/{0}.srs"; public const string SingboxRulesetUrlGeoip = @"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/srs/{0}.srs"; public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw="; diff --git a/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs index 04c4aee4..01f13ec8 100644 --- a/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs @@ -953,14 +953,14 @@ namespace v2rayN.Handler.CoreConfig } else { - var geo = item.Split('-').FirstOrDefault() ?? geosite; - var value = item.Split('-').LastOrDefault(); singboxConfig.route.rule_set.Add(new() { type = "remote", format = "binary", tag = item, - url = string.Format(geo.Equals(geosite) ? Global.SingboxRulesetUrlGeosite : Global.SingboxRulesetUrlGeoip, value), + url = item.StartsWith(geosite) ? + string.Format(Global.SingboxRulesetUrlGeosite, item) : + string.Format(Global.SingboxRulesetUrlGeoip, item.Replace($"{geoip}-", "")), download_detour = Global.ProxyTag }); } diff --git a/v2rayN/v2rayN/Models/SingboxConfig.cs b/v2rayN/v2rayN/Models/SingboxConfig.cs index ced5adbd..e7b531ad 100644 --- a/v2rayN/v2rayN/Models/SingboxConfig.cs +++ b/v2rayN/v2rayN/Models/SingboxConfig.cs @@ -49,6 +49,7 @@ public string? mode { get; set; } public bool? ip_is_private { get; set; } public string? client_subnet { get; set; } + public bool? invert { get; set; } public List? inbound { get; set; } public List? protocol { get; set; } public List? network { get; set; }