From 215308c329a7c2a35d679487e561cbde6d322ee7 Mon Sep 17 00:00:00 2001 From: 2dust <31833384+2dust@users.noreply.github.com> Date: Thu, 4 Jul 2024 16:27:44 +0800 Subject: [PATCH] Change srs source https://github.com/2dust/sing-box-rules --- v2rayN/ProtosLib/ProtosLib.csproj | 2 +- v2rayN/v2rayN/Global.cs | 3 +-- v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs | 4 +--- v2rayN/v2rayN/Sample/custom_routing_black | 2 +- v2rayN/v2rayN/v2rayN.csproj | 4 ++-- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/v2rayN/ProtosLib/ProtosLib.csproj b/v2rayN/ProtosLib/ProtosLib.csproj index 81cc41f9..ad943895 100644 --- a/v2rayN/ProtosLib/ProtosLib.csproj +++ b/v2rayN/ProtosLib/ProtosLib.csproj @@ -9,7 +9,7 @@ - + all diff --git a/v2rayN/v2rayN/Global.cs b/v2rayN/v2rayN/Global.cs index 7dda772e..ec1d0d26 100644 --- a/v2rayN/v2rayN/Global.cs +++ b/v2rayN/v2rayN/Global.cs @@ -23,8 +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/{0}.srs"; - public const string SingboxRulesetUrlGeoip = @"https://raw.githubusercontent.com/Loyalsoldier/geoip/release/srs/{0}.srs"; + public const string SingboxRulesetUrl = @"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-{0}/{1}.srs"; public const string PromotionUrl = @"aHR0cHM6Ly85LjIzNDQ1Ni54eXovYWJjLmh0bWw="; public const string ConfigFileName = "guiNConfig.json"; diff --git a/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs b/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs index 2a5ea119..d80ddeef 100644 --- a/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs +++ b/v2rayN/v2rayN/Handler/CoreConfig/CoreConfigSingbox.cs @@ -983,9 +983,7 @@ namespace v2rayN.Handler.CoreConfig type = "remote", format = "binary", tag = item, - url = item.StartsWith(geosite) ? - string.Format(Global.SingboxRulesetUrlGeosite, item) : - string.Format(Global.SingboxRulesetUrlGeoip, item.Replace($"{geoip}-", "")), + url = string.Format(Global.SingboxRulesetUrl, item.StartsWith(geosite) ? geosite : geoip, item), download_detour = Global.ProxyTag }); } diff --git a/v2rayN/v2rayN/Sample/custom_routing_black b/v2rayN/v2rayN/Sample/custom_routing_black index f56cfa2c..adae7612 100644 --- a/v2rayN/v2rayN/Sample/custom_routing_black +++ b/v2rayN/v2rayN/Sample/custom_routing_black @@ -15,7 +15,7 @@ "outboundTag": "proxy", "domain": [ - "geosite:geolocation-!cn", + "geosite:gfw", "geosite:greatfire" ] }, diff --git a/v2rayN/v2rayN/v2rayN.csproj b/v2rayN/v2rayN/v2rayN.csproj index 4d86368f..ff2c9e3b 100644 --- a/v2rayN/v2rayN/v2rayN.csproj +++ b/v2rayN/v2rayN/v2rayN.csproj @@ -15,10 +15,10 @@ - + - +