-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathcmlist.v
135 lines (127 loc) · 3.54 KB
/
cmlist.v
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
module vapor
import rand
// import net.http
import json
const (
hardcoded_cm_list = [
'162.254.196.84:27021',
'162.254.196.68:27025',
'162.254.196.68:27021',
'162.254.196.84:27019',
'162.254.196.84:27020',
'162.254.196.83:27018',
'162.254.196.67:27027',
'162.254.196.68:27026',
'162.254.196.67:27022',
'162.254.196.84:27026',
'162.254.196.83:27025',
'162.254.196.83:27019',
'162.254.196.84:27024',
'162.254.196.83:27022',
'162.254.196.84:27022',
'162.254.196.83:27024',
'162.254.196.84:27025',
'162.254.196.67:27023',
'162.254.196.67:27024',
'162.254.196.84:27023',
'162.254.196.68:27017',
'162.254.196.67:27017',
'162.254.196.67:27021',
'162.254.196.67:27025',
'162.254.196.83:27017',
'162.254.196.68:27023',
'162.254.196.68:27027',
'162.254.196.83:27027',
'162.254.196.67:27018',
'162.254.196.84:27027',
'162.254.196.67:27026',
'162.254.196.83:27020',
'162.254.196.67:27019',
'162.254.196.67:27020',
'162.254.196.83:27026',
'162.254.196.68:27020',
'162.254.196.68:27019',
'162.254.196.83:27023',
'162.254.196.84:27018',
'162.254.196.68:27024',
'162.254.196.84:27017',
'162.254.196.68:27022',
'162.254.196.68:27018',
'162.254.196.83:27021',
'155.133.248.34:27018',
'155.133.248.38:27025',
'155.133.248.39:27020',
'155.133.248.38:27027',
'155.133.248.38:27024',
'155.133.248.38:27018',
'155.133.248.36:27020',
'155.133.248.36:27019',
'155.133.248.34:27019',
'155.133.248.36:27018',
'155.133.248.35:27018',
'155.133.248.39:27026',
'155.133.248.38:27019',
'155.133.248.38:27017',
'155.133.248.38:27021',
'155.133.248.34:27021',
'155.133.248.35:27020',
'155.133.248.37:27019',
'155.133.248.35:27017',
'155.133.248.36:27021',
'155.133.248.39:27024',
'155.133.248.34:27020',
'155.133.248.39:27027',
'155.133.248.39:27023',
'155.133.248.39:27022',
'155.133.248.39:27019',
'155.133.248.38:27022',
'155.133.248.37:27020',
'155.133.248.39:27018',
'155.133.248.39:27025',
'155.133.248.38:27020',
'155.133.248.37:27017',
'155.133.248.38:27026',
'155.133.248.37:27021',
'155.133.248.39:27017',
'155.133.248.35:27019',
'155.133.248.39:27021',
'155.133.248.38:27023',
'155.133.248.37:27018',
'155.133.248.36:27017',
'155.133.248.35:27021',
'155.133.248.34:27017',
'185.25.182.76:27019',
'185.25.182.77:27020',
'185.25.182.76:27020',
'185.25.182.77:27019',
'185.25.182.77:27018',
'185.25.182.76:27017',
'185.25.182.77:27021',
'185.25.182.77:27017',
'185.25.182.76:27021',
'185.25.182.76:27018',
'155.133.246.51:27027',
'155.133.246.51:27021',
'155.133.246.51:27025',
'155.133.246.35:27021'
]
)
fn hardcoded_cm() string {
return hardcoded_cm_list[rand.int_in_range(0, hardcoded_cm_list.len)]
}
// struct CMListResponse {
// serverlist []string
// }
// struct RemoteCMList {
// response CMListResponse
// }
// fn random_cm() ?string {
// resp := http.get('https://api.steampowered.com/ISteamDirectory/GetCMList/v1/?cellid=4') or {
// return none
// }
// o := json.decode(RemoteCMList, resp.text) or {
// return none
// }
// server_list := o.response.serverlist
// return server_list[rand.int_in_range(0, server_list.len)]
// }