Compare commits

..

No commits in common. "24f8d767b11ce22789b0363cd9a4c4f420fe2fbb" and "df7ca81837232266f08a6024d388aa4ea2229a32" have entirely different histories.

10 changed files with 31 additions and 25 deletions

View file

@ -458,7 +458,7 @@ download_geo_assets() {
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
done
for f in \
geosite-cn.srs geosite-gfw.srs geosite-google.srs geosite-greatfire.srs \
geosite-cn.srs geosite-gfw.srs geosite-greatfire.srs \
geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do
curl -fsSL -o "$srss_dir/$f" \
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true

View file

@ -22,7 +22,7 @@
<PackageVersion Include="Semi.Avalonia" Version="11.3.7" />
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.1" />
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7" />
<PackageVersion Include="NLog" Version="6.0.6" />
<PackageVersion Include="NLog" Version="6.0.5" />
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
<PackageVersion Include="WebDav.Client" Version="2.9.0" />

View file

@ -2080,7 +2080,7 @@ public static class ConfigHandler
/// <returns>0 if successful</returns>
public static async Task<int> InitBuiltinRouting(Config config, bool blImportAdvancedRules = false)
{
var ver = "V4-";
var ver = "V3-";
var items = await AppManager.Instance.RoutingItems();
//TODO Temporary code to be removed later
@ -2091,7 +2091,7 @@ public static class ConfigHandler
items = await AppManager.Instance.RoutingItems();
}
if (!blImportAdvancedRules && items.Count(u => u.Remarks.StartsWith(ver)) > 0)
if (!blImportAdvancedRules && items.Count > 0)
{
//migrate
//TODO Temporary code to be removed later

View file

@ -13,19 +13,20 @@
"api.ip.sb"
]
},
{
"remarks": "Google cn",
"outboundTag": "proxy",
"domain": [
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{
"remarks": "阻断udp443",
"outboundTag": "block",
"port": "443",
"network": "udp"
},
{
"remarks": "代理Google",
"outboundTag": "proxy",
"domain": [
"geosite:google"
]
},
{
"remarks": "绕过局域网IP",
"outboundTag": "direct",

View file

@ -1,17 +1,18 @@
[
{
"remarks": "Google cn",
"outboundTag": "proxy",
"domain": [
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{
"remarks": "阻断udp443",
"outboundTag": "block",
"port": "443",
"network": "udp"
},
{
"remarks": "代理Google",
"outboundTag": "proxy",
"domain": [
"geosite:google"
]
},
{
"remarks": "绕过局域网IP",
"outboundTag": "direct",

View file

@ -14,8 +14,9 @@
],
"rules": [
{
"rule_set": [
"geosite-google"
"domain_suffix": [
"googleapis.cn",
"gstatic.com"
],
"server": "remote",
"strategy": "prefer_ipv4"

View file

@ -8,7 +8,8 @@
"address": "1.1.1.1",
"skipFallback": true,
"domains": [
"geosite:google"
"domain:googleapis.cn",
"domain:gstatic.com"
]
},
{

View file

@ -14,8 +14,9 @@
],
"rules": [
{
"rule_set": [
"geosite-google"
"domain_suffix": [
"googleapis.cn",
"gstatic.com"
],
"server": "remote",
"strategy": "prefer_ipv4"

View file

@ -316,8 +316,10 @@ public partial class CoreConfigSingboxService
}
else if (domain.StartsWith("domain:"))
{
rule.domain ??= [];
rule.domain_suffix ??= [];
rule.domain_suffix?.Add(domain.Substring(7));
rule.domain?.Add(domain.Substring(7));
rule.domain_suffix?.Add("." + domain.Substring(7));
}
else if (domain.StartsWith("full:"))
{

View file

@ -396,7 +396,6 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
}
//append dns items TODO
geoSiteFiles.Add("google");
geoSiteFiles.Add("cn");
geoSiteFiles.Add("geolocation-cn");
geoSiteFiles.Add("category-ads-all");