mirror of
https://github.com/2dust/v2rayN.git
synced 2025-11-29 03:02:53 +00:00
Compare commits
4 commits
df7ca81837
...
24f8d767b1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
24f8d767b1 | ||
|
|
31a8ddef23 | ||
|
|
30e9e64fd5 | ||
|
|
f677934257 |
10 changed files with 25 additions and 31 deletions
|
|
@ -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-greatfire.srs \
|
||||
geosite-cn.srs geosite-gfw.srs geosite-google.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
|
||||
|
|
|
|||
|
|
@ -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.5" />
|
||||
<PackageVersion Include="NLog" Version="6.0.6" />
|
||||
<PackageVersion Include="sqlite-net-pcl" Version="1.9.172" />
|
||||
<PackageVersion Include="TaskScheduler" Version="2.12.2" />
|
||||
<PackageVersion Include="WebDav.Client" Version="2.9.0" />
|
||||
|
|
|
|||
|
|
@ -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 = "V3-";
|
||||
var ver = "V4-";
|
||||
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 > 0)
|
||||
if (!blImportAdvancedRules && items.Count(u => u.Remarks.StartsWith(ver)) > 0)
|
||||
{
|
||||
//migrate
|
||||
//TODO Temporary code to be removed later
|
||||
|
|
|
|||
|
|
@ -13,20 +13,19 @@
|
|||
"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",
|
||||
|
|
|
|||
|
|
@ -1,18 +1,17 @@
|
|||
[
|
||||
{
|
||||
"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",
|
||||
|
|
|
|||
|
|
@ -14,9 +14,8 @@
|
|||
],
|
||||
"rules": [
|
||||
{
|
||||
"domain_suffix": [
|
||||
"googleapis.cn",
|
||||
"gstatic.com"
|
||||
"rule_set": [
|
||||
"geosite-google"
|
||||
],
|
||||
"server": "remote",
|
||||
"strategy": "prefer_ipv4"
|
||||
|
|
|
|||
|
|
@ -8,8 +8,7 @@
|
|||
"address": "1.1.1.1",
|
||||
"skipFallback": true,
|
||||
"domains": [
|
||||
"domain:googleapis.cn",
|
||||
"domain:gstatic.com"
|
||||
"geosite:google"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,9 +14,8 @@
|
|||
],
|
||||
"rules": [
|
||||
{
|
||||
"domain_suffix": [
|
||||
"googleapis.cn",
|
||||
"gstatic.com"
|
||||
"rule_set": [
|
||||
"geosite-google"
|
||||
],
|
||||
"server": "remote",
|
||||
"strategy": "prefer_ipv4"
|
||||
|
|
|
|||
|
|
@ -316,10 +316,8 @@ public partial class CoreConfigSingboxService
|
|||
}
|
||||
else if (domain.StartsWith("domain:"))
|
||||
{
|
||||
rule.domain ??= [];
|
||||
rule.domain_suffix ??= [];
|
||||
rule.domain?.Add(domain.Substring(7));
|
||||
rule.domain_suffix?.Add("." + domain.Substring(7));
|
||||
rule.domain_suffix?.Add(domain.Substring(7));
|
||||
}
|
||||
else if (domain.StartsWith("full:"))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -396,6 +396,7 @@ 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");
|
||||
|
|
|
|||
Loading…
Reference in a new issue