mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-11 01:50:26 +08:00
智能DNS增加中国香港、中国澳门、中国台湾、中国大陆、海外等线路
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
package dnsconfigs
|
package dnsconfigs
|
||||||
|
|
||||||
|
type RouteCode = string
|
||||||
|
|
||||||
type Route struct {
|
type Route struct {
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Code string `json:"code"`
|
Code string `json:"code"`
|
||||||
@@ -105,6 +107,12 @@ var AllDefaultISPRoutes = []*Route{
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
ChinaProvinceCodeHK RouteCode = "china:province:hk"
|
||||||
|
ChinaProvinceCodeMO RouteCode = "china:province:mo"
|
||||||
|
ChinaProvinceCodeTW RouteCode = "china:province:tw"
|
||||||
|
)
|
||||||
|
|
||||||
// AllDefaultChinaProvinceRoutes 中国地域线路
|
// AllDefaultChinaProvinceRoutes 中国地域线路
|
||||||
var AllDefaultChinaProvinceRoutes = []*Route{
|
var AllDefaultChinaProvinceRoutes = []*Route{
|
||||||
{
|
{
|
||||||
@@ -264,29 +272,63 @@ var AllDefaultChinaProvinceRoutes = []*Route{
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "香港特别行政区",
|
Name: "香港特别行政区",
|
||||||
Code: "china:province:hk",
|
Code: ChinaProvinceCodeHK,
|
||||||
AliasNames: []string{"香港特别行政区", "香港"},
|
AliasNames: []string{"香港特别行政区", "香港"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "澳门特别行政区",
|
Name: "澳门特别行政区",
|
||||||
Code: "china:province:mo",
|
Code: ChinaProvinceCodeMO,
|
||||||
AliasNames: []string{"澳门特别行政区", "澳门"},
|
AliasNames: []string{"澳门特别行政区", "澳门"},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
Name: "台湾省",
|
Name: "台湾省",
|
||||||
Code: "china:province:tw",
|
Code: ChinaProvinceCodeTW,
|
||||||
AliasNames: []string{"台湾省", "台湾"},
|
AliasNames: []string{"台湾省", "台湾"},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
WorldRegionCodeChina RouteCode = "world:CN"
|
||||||
|
WorldRegionCodeHK RouteCode = "world:CN:hk"
|
||||||
|
WorldRegionCodeMO RouteCode = "world:CN:mo"
|
||||||
|
WorldRegionCodeTW RouteCode = "world:CN:tw"
|
||||||
|
WorldRegionCodeChinaMainland RouteCode = "world:CN:mainland"
|
||||||
|
WorldRegionCodeChinaAbroad RouteCode = "world:CN:abroad"
|
||||||
|
)
|
||||||
|
|
||||||
// AllDefaultWorldRegionRoutes 世界地域线路
|
// AllDefaultWorldRegionRoutes 世界地域线路
|
||||||
// 参考:https://zh.wikipedia.org/wiki/%E5%9C%8B%E5%AE%B6%E5%9C%B0%E5%8D%80%E4%BB%A3%E7%A2%BC
|
// 参考:https://zh.wikipedia.org/wiki/%E5%9C%8B%E5%AE%B6%E5%9C%B0%E5%8D%80%E4%BB%A3%E7%A2%BC
|
||||||
var AllDefaultWorldRegionRoutes = []*Route{
|
var AllDefaultWorldRegionRoutes = []*Route{
|
||||||
{
|
{
|
||||||
Name: "中国",
|
Name: "中国全境",
|
||||||
Code: "world:CN",
|
Code: WorldRegionCodeChina,
|
||||||
AliasNames: []string{"中国"},
|
AliasNames: []string{"中国"},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
Name: "中国香港",
|
||||||
|
Code: WorldRegionCodeHK,
|
||||||
|
AliasNames: []string{"中国香港地区"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "中国澳门",
|
||||||
|
Code: WorldRegionCodeMO,
|
||||||
|
AliasNames: []string{"中国澳门地区"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "中国台湾",
|
||||||
|
Code: WorldRegionCodeTW,
|
||||||
|
AliasNames: []string{"中国台湾地区"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "中国大陆",
|
||||||
|
Code: WorldRegionCodeChinaMainland,
|
||||||
|
AliasNames: []string{"中国大陆大区"},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
Name: "海外",
|
||||||
|
Code: WorldRegionCodeChinaAbroad,
|
||||||
|
AliasNames: []string{"中国海外地区"},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
Name: "蒙古",
|
Name: "蒙古",
|
||||||
Code: "world:MN",
|
Code: "world:MN",
|
||||||
|
|||||||
Reference in New Issue
Block a user