github.com/nxtrace/NTrace-core@v1.3.1-0.20240513132635-39169291e8c9/fast_trace/basic.go (about)

     1  package fastTrace
     2  
     3  type AllLocationCollection struct {
     4  	Beijing   BackBoneCollection
     5  	Shanghai  BackBoneCollection
     6  	Guangzhou BackBoneCollection
     7  	Hangzhou  BackBoneCollection
     8  	Hefei     BackBoneCollection
     9  	Changsha  BackBoneCollection
    10  }
    11  
    12  type BackBoneCollection struct {
    13  	Location string
    14  	CT163    ISPCollection
    15  	CTCN2    ISPCollection
    16  	CU169    ISPCollection
    17  	CU9929   ISPCollection
    18  	CM       ISPCollection
    19  	CMIN2    ISPCollection
    20  	EDU      ISPCollection
    21  	CST      ISPCollection
    22  }
    23  
    24  type ISPCollection struct {
    25  	ISPName string
    26  	IP      string
    27  	IPv6    string
    28  }
    29  
    30  const (
    31  	CT163  string = "电信 163 AS4134"
    32  	CTCN2  string = "电信 CN2 AS4809"
    33  	CU169  string = "联通 169 AS4837"
    34  	CU9929 string = "联通 A网 AS9929"
    35  	CM     string = "移动 骨干网 AS9808"
    36  	CMIN2  string = "移动 CMIN2 AS58807"
    37  	EDU    string = "教育网 CERNET AS4538"
    38  )
    39  
    40  var TestIPsCollection = AllLocationCollection{
    41  	Beijing:   Beijing,
    42  	Shanghai:  Shanghai,
    43  	Guangzhou: Guangzhou,
    44  	Hangzhou:  Hangzhou,
    45  	Hefei:     Hefei,
    46  }
    47  
    48  var Beijing = BackBoneCollection{
    49  	Location: "北京",
    50  	CT163: ISPCollection{
    51  		ISPName: CT163,
    52  		IP:      "ipv4.pek-4134.endpoint.nxtrace.org.",
    53  		IPv6:    "ipv6.pek-4134.endpoint.nxtrace.org.",
    54  	},
    55  
    56  	CU169: ISPCollection{
    57  		ISPName: CU169,
    58  		IP:      "ipv4.pek-4837.endpoint.nxtrace.org.",
    59  		IPv6:    "ipv6.pek-4837.endpoint.nxtrace.org.",
    60  	},
    61  
    62  	CU9929: ISPCollection{
    63  		ISPName: CU9929,
    64  		IP:      "ipv4.pek-9929.endpoint.nxtrace.org.",
    65  	},
    66  
    67  	CM: ISPCollection{
    68  		ISPName: CM,
    69  		IP:      "ipv4.pek-9808.endpoint.nxtrace.org.",
    70  		IPv6:    "ipv6.pek-9808.endpoint.nxtrace.org.",
    71  	},
    72  
    73  	CMIN2: ISPCollection{
    74  		ISPName: CMIN2,
    75  		IP:      "ipv4.pek-58807.endpoint.nxtrace.org.",
    76  	},
    77  
    78  	EDU: ISPCollection{
    79  		ISPName: EDU,
    80  		IP:      "ipv4.pek-4538.endpoint.nxtrace.org.",
    81  		IPv6:    "ipv6.pek-4538.endpoint.nxtrace.org.",
    82  	},
    83  }
    84  
    85  var Shanghai = BackBoneCollection{
    86  	Location: "上海",
    87  	CT163: ISPCollection{
    88  		ISPName: CT163,
    89  		IP:      "ipv4.sha-4134.endpoint.nxtrace.org.",
    90  		IPv6:    "ipv6.sha-4134.endpoint.nxtrace.org.",
    91  	},
    92  
    93  	CTCN2: ISPCollection{
    94  		ISPName: CTCN2,
    95  		IP:      "ipv4.sha-4809.endpoint.nxtrace.org.",
    96  	},
    97  
    98  	CU169: ISPCollection{
    99  		ISPName: CU169,
   100  		IP:      "ipv4.sha-4837.endpoint.nxtrace.org.",
   101  		IPv6:    "ipv6.sha-4837.endpoint.nxtrace.org.",
   102  	},
   103  
   104  	CU9929: ISPCollection{
   105  		ISPName: CU9929,
   106  		IP:      "ipv4.sha-9929.endpoint.nxtrace.org.",
   107  		IPv6:    "ipv6.sha-9929.endpoint.nxtrace.org.",
   108  	},
   109  
   110  	CM: ISPCollection{
   111  		ISPName: CM,
   112  		IP:      "ipv4.sha-9808.endpoint.nxtrace.org.",
   113  		IPv6:    "ipv6.sha-9808.endpoint.nxtrace.org.",
   114  	},
   115  
   116  	CMIN2: ISPCollection{
   117  		ISPName: CMIN2,
   118  		IP:      "ipv4.sha-58807.endpoint.nxtrace.org.",
   119  	},
   120  
   121  	EDU: ISPCollection{
   122  		ISPName: EDU,
   123  		IP:      "ipv4.sha-4538.endpoint.nxtrace.org.",
   124  		IPv6:    "ipv6.sha-4538.endpoint.nxtrace.org.",
   125  	},
   126  }
   127  
   128  var Guangzhou = BackBoneCollection{
   129  	Location: "广州",
   130  	CT163: ISPCollection{
   131  		ISPName: CT163,
   132  		IP:      "ipv4.can-4134.endpoint.nxtrace.org.",
   133  		IPv6:    "ipv6.can-4134.endpoint.nxtrace.org.",
   134  	},
   135  
   136  	CU169: ISPCollection{
   137  		ISPName: CU169,
   138  		IP:      "ipv4.can-4837.endpoint.nxtrace.org.",
   139  		IPv6:    "ipv6.can-4837.endpoint.nxtrace.org.",
   140  	},
   141  
   142  	CM: ISPCollection{
   143  		ISPName: CM,
   144  		IP:      "ipv4.can-9808.endpoint.nxtrace.org.",
   145  		IPv6:    "ipv6.can-9808.endpoint.nxtrace.org.",
   146  	},
   147  }
   148  
   149  var Hangzhou = BackBoneCollection{
   150  	Location: "杭州",
   151  	CT163: ISPCollection{
   152  		ISPName: CT163,
   153  		IP:      "ipv4.hgh-4134.endpoint.nxtrace.org.",
   154  		IPv6:    "ipv6.hgh-4134.endpoint.nxtrace.org.",
   155  	},
   156  	CU169: ISPCollection{
   157  		ISPName: CU169,
   158  		IP:      "ipv4.hgh-4837.endpoint.nxtrace.org.",
   159  	},
   160  	CM: ISPCollection{
   161  		ISPName: CM,
   162  		IP:      "ipv4.hgh-9808.endpoint.nxtrace.org.",
   163  		IPv6:    "ipv6.hgh-9808.endpoint.nxtrace.org.",
   164  	},
   165  	// 浙江大学 教育网
   166  	EDU: ISPCollection{
   167  		ISPName: EDU,
   168  		IP:      "ipv4.hgh-4538.endpoint.nxtrace.org.",
   169  		IPv6:    "ipv6.hgh-4538.endpoint.nxtrace.org.",
   170  	},
   171  }
   172  
   173  var Hefei = BackBoneCollection{
   174  	Location: "合肥",
   175  	// 中国科学技术大学 教育网
   176  	EDU: ISPCollection{
   177  		ISPName: EDU,
   178  		IP:      "ipv4.hfe-4538.endpoint.nxtrace.org.",
   179  		IPv6:    "ipv6.hfe-4538.endpoint.nxtrace.org.",
   180  	},
   181  	// 中国科学技术大学 科技网
   182  	CST: ISPCollection{
   183  		ISPName: "中国科学技术大学 科技网 AS7497",
   184  		IP:      "ipv4.hfe-7497.endpoint.nxtrace.org.",
   185  	},
   186  }