-
Notifications
You must be signed in to change notification settings - Fork 12
/
settings.go
45 lines (40 loc) · 1.29 KB
/
settings.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
package nthclient
import (
"crypto/rsa"
"time"
"github.com/google/uuid"
)
const ConfigRoutePath = "/getserver-190831.php"
// Settings define important constants required for Client operation
type Settings struct {
DomainSeed string
PlatformKey string
JSONSeed string
TLD string
Language string
ID string
AppVersion string
UserAgent string
PublicKey *rsa.PublicKey
BackupDomains []string
Timeout time.Duration
}
// DefaultSettings is Settings with working defaults
var DefaultSettings = &Settings{
DomainSeed: "ewriWabKW6aMTa2W7vFNxKqgUutgpWwH",
//DomainSeed: "7thb8GDjE39iaXXjgutYbgEI8g0aqxnf",
PlatformKey: "jk8Gh9wweC4gF8et",
JSONSeed: "Gu82kdDgus0248gzkqpsl948ab7a8dse",
TLD: "info",
Language: "en-US",
ID: uuid.Must(uuid.NewRandom()).String(),
AppVersion: "5.0.0",
UserAgent: "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) nthLink/5.0.0 Chrome/78.0.3905.1 Electron/7.0.0 Safari/537.36",
PublicKey: DefaultPublicKey(),
BackupDomains: []string{
"https://s3.us-west-1.amazonaws.com/nthassets/getserver.w",
"https://s3-ap-northeast-1.amazonaws.com/nthassets-tokyo/getserver.w",
"https://s3.eu-west-2.amazonaws.com/nthassets-london/getserver.w",
},
Timeout: 5 * time.Second,
}