mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 03:02:53 +00:00
Compare commits
No commits in common. "24f8d767b11ce22789b0363cd9a4c4f420fe2fbb" and "df7ca81837232266f08a6024d388aa4ea2229a32" have entirely different histories.
24f8d767b1
...
df7ca81837
10 changed files with 31 additions and 25 deletions
|
|
@ -458,7 +458,7 @@ download_geo_assets() {
|
||||||
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
|
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geoip/$f" || true
|
||||||
done
|
done
|
||||||
for f in \
|
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
|
geosite-geolocation-cn.srs geosite-category-ads-all.srs geosite-private.srs; do
|
||||||
curl -fsSL -o "$srss_dir/$f" \
|
curl -fsSL -o "$srss_dir/$f" \
|
||||||
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true
|
"https://raw.githubusercontent.com/2dust/sing-box-rules/rule-set-geosite/$f" || true
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
<PackageVersion Include="Semi.Avalonia" Version="11.3.7" />
|
<PackageVersion Include="Semi.Avalonia" Version="11.3.7" />
|
||||||
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.1" />
|
<PackageVersion Include="Semi.Avalonia.AvaloniaEdit" Version="11.2.0.1" />
|
||||||
<PackageVersion Include="Semi.Avalonia.DataGrid" Version="11.3.7" />
|
<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="sqlite-net-pcl" Version="1.9.172" />
|
||||||
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
||||||
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||||
|
|
|
||||||
|
|
@ -2080,7 +2080,7 @@ public static class ConfigHandler
|
||||||
/// <returns>0 if successful</returns>
|
/// <returns>0 if successful</returns>
|
||||||
public static async Task<int> InitBuiltinRouting(Config config, bool blImportAdvancedRules = false)
|
public static async Task<int> InitBuiltinRouting(Config config, bool blImportAdvancedRules = false)
|
||||||
{
|
{
|
||||||
var ver = "V4-";
|
var ver = "V3-";
|
||||||
var items = await AppManager.Instance.RoutingItems();
|
var items = await AppManager.Instance.RoutingItems();
|
||||||
|
|
||||||
//TODO Temporary code to be removed later
|
//TODO Temporary code to be removed later
|
||||||
|
|
@ -2091,7 +2091,7 @@ public static class ConfigHandler
|
||||||
items = await AppManager.Instance.RoutingItems();
|
items = await AppManager.Instance.RoutingItems();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!blImportAdvancedRules && items.Count(u => u.Remarks.StartsWith(ver)) > 0)
|
if (!blImportAdvancedRules && items.Count > 0)
|
||||||
{
|
{
|
||||||
//migrate
|
//migrate
|
||||||
//TODO Temporary code to be removed later
|
//TODO Temporary code to be removed later
|
||||||
|
|
|
||||||
|
|
@ -13,19 +13,20 @@
|
||||||
"api.ip.sb"
|
"api.ip.sb"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"remarks": "Google cn",
|
||||||
|
"outboundTag": "proxy",
|
||||||
|
"domain": [
|
||||||
|
"domain:googleapis.cn",
|
||||||
|
"domain:gstatic.com"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"remarks": "阻断udp443",
|
"remarks": "阻断udp443",
|
||||||
"outboundTag": "block",
|
"outboundTag": "block",
|
||||||
"port": "443",
|
"port": "443",
|
||||||
"network": "udp"
|
"network": "udp"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"remarks": "代理Google",
|
|
||||||
"outboundTag": "proxy",
|
|
||||||
"domain": [
|
|
||||||
"geosite:google"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"remarks": "绕过局域网IP",
|
"remarks": "绕过局域网IP",
|
||||||
"outboundTag": "direct",
|
"outboundTag": "direct",
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,18 @@
|
||||||
[
|
[
|
||||||
|
{
|
||||||
|
"remarks": "Google cn",
|
||||||
|
"outboundTag": "proxy",
|
||||||
|
"domain": [
|
||||||
|
"domain:googleapis.cn",
|
||||||
|
"domain:gstatic.com"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"remarks": "阻断udp443",
|
"remarks": "阻断udp443",
|
||||||
"outboundTag": "block",
|
"outboundTag": "block",
|
||||||
"port": "443",
|
"port": "443",
|
||||||
"network": "udp"
|
"network": "udp"
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"remarks": "代理Google",
|
|
||||||
"outboundTag": "proxy",
|
|
||||||
"domain": [
|
|
||||||
"geosite:google"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"remarks": "绕过局域网IP",
|
"remarks": "绕过局域网IP",
|
||||||
"outboundTag": "direct",
|
"outboundTag": "direct",
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
],
|
],
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"rule_set": [
|
"domain_suffix": [
|
||||||
"geosite-google"
|
"googleapis.cn",
|
||||||
|
"gstatic.com"
|
||||||
],
|
],
|
||||||
"server": "remote",
|
"server": "remote",
|
||||||
"strategy": "prefer_ipv4"
|
"strategy": "prefer_ipv4"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,8 @@
|
||||||
"address": "1.1.1.1",
|
"address": "1.1.1.1",
|
||||||
"skipFallback": true,
|
"skipFallback": true,
|
||||||
"domains": [
|
"domains": [
|
||||||
"geosite:google"
|
"domain:googleapis.cn",
|
||||||
|
"domain:gstatic.com"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -14,8 +14,9 @@
|
||||||
],
|
],
|
||||||
"rules": [
|
"rules": [
|
||||||
{
|
{
|
||||||
"rule_set": [
|
"domain_suffix": [
|
||||||
"geosite-google"
|
"googleapis.cn",
|
||||||
|
"gstatic.com"
|
||||||
],
|
],
|
||||||
"server": "remote",
|
"server": "remote",
|
||||||
"strategy": "prefer_ipv4"
|
"strategy": "prefer_ipv4"
|
||||||
|
|
|
||||||
|
|
@ -316,8 +316,10 @@ public partial class CoreConfigSingboxService
|
||||||
}
|
}
|
||||||
else if (domain.StartsWith("domain:"))
|
else if (domain.StartsWith("domain:"))
|
||||||
{
|
{
|
||||||
|
rule.domain ??= [];
|
||||||
rule.domain_suffix ??= [];
|
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:"))
|
else if (domain.StartsWith("full:"))
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -396,7 +396,6 @@ public class UpdateService(Config config, Func<bool, string, Task> updateFunc)
|
||||||
}
|
}
|
||||||
|
|
||||||
//append dns items TODO
|
//append dns items TODO
|
||||||
geoSiteFiles.Add("google");
|
|
||||||
geoSiteFiles.Add("cn");
|
geoSiteFiles.Add("cn");
|
||||||
geoSiteFiles.Add("geolocation-cn");
|
geoSiteFiles.Add("geolocation-cn");
|
||||||
geoSiteFiles.Add("category-ads-all");
|
geoSiteFiles.Add("category-ads-all");
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue