This repository has been archived by the owner on Dec 21, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
data.go
92 lines (79 loc) · 4.64 KB
/
data.go
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
/*
maryo/data.go
written by superwhiskers, licensed under gnu gplv3.
if you want a copy, go to http://www.gnu.org/licenses/
*/
package main
// struct for the isitworking endpoint
type isitworkingStruct struct {
Server string `json:"server"`
}
// TODO: somewhere in here include a list containing a list of templates to add
// pretendo stock config
var pretendoConf = map[string]map[string]string{"config": map[string]string{"decryptOutgoing": "false"}, "endpoints": map[string]string{"account.nintendo.net": "account.pretendo.cc"}}
// local stock config
var localConf = map[string]map[string]string{"config": map[string]string{"decryptOutgoing": "true"}, "endpoints": map[string]string{"account.nintendo.net": "127.0.0.1:8080"}}
// test endpoints
var testEndpoints = map[string]map[string]string{"official": map[string]string{"account": "account.pretendo.cc"}, "local": map[string]string{"account": "127.0.0.1:8080"}, "ninty": map[string]string{"account": "account.nintendo.net"}}
// supposed return value for custom servers
var resMap = map[string]string{"account": "account.nintendo.net"}
// icons used for displaying results
var utilIcons = map[string]string{"success": "√", "failiure": "×", "uncertain": "-"}
// the nintendo CA cert
var nintyCert = []byte(`-----BEGIN CERTIFICATE-----
MIIEwzCCA6ugAwIBAgIBBjANBgkqhkiG9w0BAQsFADBtMQswCQYDVQQGEwJVUzET
MBEGA1UECBMKV2FzaGluZ3RvbjEhMB8GA1UEChMYTmludGVuZG8gb2YgQW1lcmlj
YSBJbmMuMQswCQYDVQQLEwJJUzEZMBcGA1UEAxMQTmludGVuZG8gQ0EgLSBHMzAe
Fw0xMDA1MTMxOTE5NDZaFw0zNzEyMjIxOTE5NDZaM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