mirror of https://github.com/2dust/v2rayN
Built-in routing rule set upgraded to V2
parent
5c0c07c78f
commit
d961ea22a6
|
@ -1674,14 +1674,15 @@ namespace v2rayN.Handler
|
|||
|
||||
public static int InitBuiltinRouting(Config config, bool blImportAdvancedRules = false)
|
||||
{
|
||||
var ver = "V2-";
|
||||
var items = LazyConfig.Instance.RoutingItems();
|
||||
if (blImportAdvancedRules || items.Count <= 0)
|
||||
if (blImportAdvancedRules || items.Where(t => t.remarks.StartsWith(ver)).ToList().Count <= 0)
|
||||
{
|
||||
var maxSort = items.Count;
|
||||
//Bypass the mainland
|
||||
var item2 = new RoutingItem()
|
||||
{
|
||||
remarks = "绕过大陆(Whitelist)",
|
||||
remarks = $"{ver}绕过大陆(Whitelist)",
|
||||
url = string.Empty,
|
||||
sort = maxSort + 1,
|
||||
};
|
||||
|
@ -1690,7 +1691,7 @@ namespace v2rayN.Handler
|
|||
//Blacklist
|
||||
var item3 = new RoutingItem()
|
||||
{
|
||||
remarks = "黑名单(Blacklist)",
|
||||
remarks = $"{ver}黑名单(Blacklist)",
|
||||
url = string.Empty,
|
||||
sort = maxSort + 2,
|
||||
};
|
||||
|
@ -1699,7 +1700,7 @@ namespace v2rayN.Handler
|
|||
//Global
|
||||
var item1 = new RoutingItem()
|
||||
{
|
||||
remarks = "全局(Global)",
|
||||
remarks = $"{ver}全局(Global)",
|
||||
url = string.Empty,
|
||||
sort = maxSort + 3,
|
||||
};
|
||||
|
|
|
@ -13,20 +13,10 @@
|
|||
},
|
||||
{
|
||||
"outboundTag": "proxy",
|
||||
"ip": [
|
||||
"geoip:cloudflare",
|
||||
"geoip:cloudfront",
|
||||
"geoip:facebook",
|
||||
"geoip:fastly",
|
||||
"geoip:google",
|
||||
"geoip:netflix",
|
||||
"geoip:telegram",
|
||||
"geoip:twitter"
|
||||
],
|
||||
|
||||
"domain": [
|
||||
"geosite:gfw",
|
||||
"geosite:greatfire",
|
||||
"geosite:tld-!cn"
|
||||
"geosite:geolocation-!cn",
|
||||
"geosite:greatfire"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -15,7 +15,8 @@
|
|||
{
|
||||
"outboundTag": "direct",
|
||||
"domain": [
|
||||
"geosite:cn"
|
||||
"geosite:cn",
|
||||
"geosite:geolocation-cn"
|
||||
]
|
||||
},
|
||||
{
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
{
|
||||
"address": "223.5.5.5",
|
||||
"domains": [
|
||||
"geosite:cn"
|
||||
"geosite:cn",
|
||||
"geosite:geolocation-cn"
|
||||
],
|
||||
"expectIPs": [
|
||||
"geoip:cn"
|
||||
|
|
Loading…
Reference in New Issue