-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.go
102 lines (100 loc) · 3.69 KB
/
config.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
93
94
95
96
97
98
99
100
101
102
package main
//
// The /etc/nettica directory holds the configuration files for the Nettica Client and Agent. Each file contains a JSON message object with each server's specific configuration.
// The files are named using the server name and the .json extension. Service host configuration files are in server.name-service-host.json file. A Message object looks like this:
//
//
/*
{
"version" : "3.0",
"id": "device-Ln7qwN2dA27G",
"device": {
"id": "device-Ln7qwN2dA27G",
"server": "https://my.nettica.com",
"apiKey": "device-api-...",
"accountid": "account-aa5F...",
"name": "gabba1",
"description": "",
"enable": true,
"tags": null,
"platform": "Windows",
"os": "windows",
"arch": "amd64",
"clientid": "FuE6p0feioTrAypLhkcMhoskpsVs8YfK", // remove
"authdomain": "auth.nettica.com", // remove
"apiid": "http://meshify-resource-server", // remove
"appdata": "undefined", // remove
"checkInterval": 10,
"sourceAddress": "0.0.0.0",
"registered": true,
"updateKeys": false,
"version": "3.0",
"createdBy": "[email protected]",
"updatedBy": "alan1",
"created": "2023-10-20T00:18:24.959598155Z",
"updated": "2024-05-30T02:47:37.273660218Z"
},
"config": [
{
"netName": "africa",
"netid": "net-WMboKtEwOvhG",
"vpns": [
{
"id": "vpn-T3pAdHzY4InI",
"accountid": "account-Va5F1mfmQ1OcBrif",
"deviceid": "device-Ln7qwN2dA27G",
"name": "alan1.africa",
"netid": "net-WMboKtEwOvhG",
"netName": "africa",
"failover": 0,
"failCount": 0,
"enable": false,
"tags": [],
"createdBy": "[email protected]",
"updatedBy": "alan1",
"created": "2024-02-02T12:19:04.221032726Z",
"updated": "2024-05-25T01:47:48.326262206Z",
"current": {
"privateKey": "",
"publicKey": "0Ch/wVQK4olThS5/uh/G//JYHdrjdP8AkIZho32VPQ0=",
"presharedKey": "LhJNrRHV5vyhHh/mTCmz1ZqMqFEDOPjpiWg6YOptrNI=",
"allowedIPs": [
"10.10.25.2/32"
],
"address": [
"10.10.25.2/32"
],
"dns": [
"1.1.1.1"
],
"persistentKeepalive": 0,
"listenPort": 0,
"endpoint": "",
"mtu": 0,
"postDownomitempty": ""
},
"default": {
"privateKey": "",
"publicKey": "",
"presharedKey": "LhJNrRHV5vyhHh/mTCmz1ZqMqFEDOPjpiWg6YOptrNI=",
"allowedIPs": [
"10.10.25.0/24"
],
"address": [
"10.10.25.0/24"
],
"dns": [
"1.1.1.1"
],
"persistentKeepalive": 0,
"listenPort": 0,
"endpoint": "",
"mtu": 0,
"postDownomitempty": ""
}
},
]
}
]
}
*/