bdy 1.7.46-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.yml +23 -0
- package/LICENSE +21 -0
- package/bin/cli.js +5 -0
- package/dockerfile +15 -0
- package/link.sh +3 -0
- package/package.json +39 -0
- package/src/agent/linux.js +127 -0
- package/src/agent/manager.js +404 -0
- package/src/agent/osx.js +150 -0
- package/src/agent/socket/tunnel.js +232 -0
- package/src/agent/socket.js +260 -0
- package/src/agent/system.js +205 -0
- package/src/agent/wait.js +20 -0
- package/src/agent/windows.js +168 -0
- package/src/agent.js +248 -0
- package/src/api/agent.js +95 -0
- package/src/api/buddy.js +131 -0
- package/src/api/socket.js +142 -0
- package/src/cfg.js +228 -0
- package/src/command/agent/disable.js +37 -0
- package/src/command/agent/enable.js +117 -0
- package/src/command/agent/restart.js +28 -0
- package/src/command/agent/run.js +16 -0
- package/src/command/agent/start.js +28 -0
- package/src/command/agent/status.js +45 -0
- package/src/command/agent/stop.js +28 -0
- package/src/command/agent/tunnel/http.js +47 -0
- package/src/command/agent/tunnel/list.js +27 -0
- package/src/command/agent/tunnel/start.js +38 -0
- package/src/command/agent/tunnel/status.js +32 -0
- package/src/command/agent/tunnel/stop.js +30 -0
- package/src/command/agent/tunnel/tcp.js +47 -0
- package/src/command/agent/tunnel/tls.js +47 -0
- package/src/command/agent/tunnel.js +21 -0
- package/src/command/agent/update.js +43 -0
- package/src/command/agent/version.js +23 -0
- package/src/command/agent.js +27 -0
- package/src/command/config/add/http.js +33 -0
- package/src/command/config/add/tcp.js +33 -0
- package/src/command/config/add/tls.js +33 -0
- package/src/command/config/add.js +13 -0
- package/src/command/config/get/region.js +13 -0
- package/src/command/config/get/timeout.js +13 -0
- package/src/command/config/get/token.js +13 -0
- package/src/command/config/get/tunnel.js +21 -0
- package/src/command/config/get/tunnels.js +13 -0
- package/src/command/config/get/whitelist.js +13 -0
- package/src/command/config/get.js +19 -0
- package/src/command/config/remove/tunnel.js +22 -0
- package/src/command/config/remove.js +9 -0
- package/src/command/config/set/region.js +19 -0
- package/src/command/config/set/timeout.js +22 -0
- package/src/command/config/set/token.js +18 -0
- package/src/command/config/set/whitelist.js +19 -0
- package/src/command/config/set.js +15 -0
- package/src/command/config.js +15 -0
- package/src/command/http.js +34 -0
- package/src/command/pre.js +47 -0
- package/src/command/start.js +31 -0
- package/src/command/tcp.js +32 -0
- package/src/command/tls.js +32 -0
- package/src/command/version.js +10 -0
- package/src/format.js +171 -0
- package/src/index.js +32 -0
- package/src/input.js +283 -0
- package/src/logger.js +87 -0
- package/src/output/interactive/tunnel.js +871 -0
- package/src/output/noninteractive/agent/tunnels.js +32 -0
- package/src/output/noninteractive/config/tunnel.js +52 -0
- package/src/output/noninteractive/config/tunnels.js +19 -0
- package/src/output/noninteractive/tunnel.js +79 -0
- package/src/output.js +136 -0
- package/src/server/cert.js +51 -0
- package/src/server/http1.js +79 -0
- package/src/server/http2.js +79 -0
- package/src/server/sftp.js +474 -0
- package/src/server/ssh.js +107 -0
- package/src/server/tls.js +41 -0
- package/src/ssh/client.js +196 -0
- package/src/texts.js +447 -0
- package/src/tunnel/agent.js +100 -0
- package/src/tunnel/compression.js +32 -0
- package/src/tunnel/dns.js +55 -0
- package/src/tunnel/html/404.html +129 -0
- package/src/tunnel/html/503.html +136 -0
- package/src/tunnel/html.js +32 -0
- package/src/tunnel/http/log.js +204 -0
- package/src/tunnel/http/serve.js +127 -0
- package/src/tunnel/http/stream.js +46 -0
- package/src/tunnel/http.js +406 -0
- package/src/tunnel/identification.js +95 -0
- package/src/tunnel/latency.js +63 -0
- package/src/tunnel/tcp.js +71 -0
- package/src/tunnel.js +696 -0
- package/src/utils.js +496 -0
- package/unlink.sh +3 -0
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
const { Client } = require('ssh2');
|
|
2
|
+
const EventEmitter = require('events');
|
|
3
|
+
const logger = require('../logger.js');
|
|
4
|
+
const {
|
|
5
|
+
ERR_WRONG_HANDSHAKE,
|
|
6
|
+
ERR_WRONG_STREAM,
|
|
7
|
+
LOG_DETECTED_STREAM,
|
|
8
|
+
LOG_SSH_CONNECTION,
|
|
9
|
+
LOG_WRONG_STREAM
|
|
10
|
+
} = require('../texts.js');
|
|
11
|
+
const { SSH_CLIENT_EVENT_CONNECTED,
|
|
12
|
+
SSH_CLIENT_EVENT_DISCONNECTED,
|
|
13
|
+
SSH_CLIENT_EVENT_STREAM_TCP,
|
|
14
|
+
SSH_CLIENT_EVENT_STREAM_TLS,
|
|
15
|
+
SSH_CLIENT_EVENT_STREAM_HTTP1,
|
|
16
|
+
SSH_CLIENT_EVENT_STREAM_HTTP2,
|
|
17
|
+
SOCKET_TYPE_TCP,
|
|
18
|
+
SOCKET_TYPE_TLS,
|
|
19
|
+
SOCKET_TYPE_HTTP1,
|
|
20
|
+
SOCKET_TYPE_HTTP2,
|
|
21
|
+
SOCKET_TYPE_SSH,
|
|
22
|
+
SSH_CLIENT_EVENT_STREAM_SSH
|
|
23
|
+
} = require('../utils');
|
|
24
|
+
|
|
25
|
+
class SshClient extends EventEmitter {
|
|
26
|
+
constructor(ip, port, username, password) {
|
|
27
|
+
super();
|
|
28
|
+
this.ip = ip;
|
|
29
|
+
this.port = port;
|
|
30
|
+
this.username = username;
|
|
31
|
+
this.password = password;
|
|
32
|
+
this.keepalive = false;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
async open() {
|
|
36
|
+
return new Promise((resolve, reject) => {
|
|
37
|
+
this.close();
|
|
38
|
+
this.client = new Client();
|
|
39
|
+
this.client.setNoDelay();
|
|
40
|
+
this.client.on('ready', () => {
|
|
41
|
+
this.client.removeAllListeners();
|
|
42
|
+
this.client.on('error', () => {
|
|
43
|
+
});
|
|
44
|
+
resolve();
|
|
45
|
+
});
|
|
46
|
+
this.client.once('error', (err) => {
|
|
47
|
+
this.client.removeAllListeners();
|
|
48
|
+
reject(err);
|
|
49
|
+
});
|
|
50
|
+
try {
|
|
51
|
+
this.client.connect({
|
|
52
|
+
algorithms:{
|
|
53
|
+
cipher: ['aes256-gcm@openssh.com'],
|
|
54
|
+
compress: ['none'],
|
|
55
|
+
hmac: ['hmac-sha2-256-etm@openssh.com'],
|
|
56
|
+
kex: ['ecdh-sha2-nistp256']
|
|
57
|
+
},
|
|
58
|
+
keepaliveInterval: 60000,
|
|
59
|
+
host: this.ip,
|
|
60
|
+
port: this.port,
|
|
61
|
+
username: this.username,
|
|
62
|
+
password: this.password
|
|
63
|
+
});
|
|
64
|
+
} catch (err) {
|
|
65
|
+
reject(err);
|
|
66
|
+
}
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
waitForStreamReadable(s){
|
|
71
|
+
return new Promise((resolve) => {
|
|
72
|
+
s.once('readable', resolve);
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
async readStreamBytes(s, toRead){
|
|
77
|
+
await this.waitForStreamReadable(s);
|
|
78
|
+
const data = s.read(toRead) ?? s.read();
|
|
79
|
+
if (data === null) {
|
|
80
|
+
return this.readStreamBytes(s, toRead);
|
|
81
|
+
}
|
|
82
|
+
const newToRead = toRead - data.length;
|
|
83
|
+
if (newToRead <= 0) return data;
|
|
84
|
+
const newData = await this.readStreamBytes(s, newToRead);
|
|
85
|
+
return Buffer.concat([data, newData]);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
async processStream(stream, info) {
|
|
89
|
+
if (stream.readableFlowing) stream.pause();
|
|
90
|
+
stream.on('error', () => {
|
|
91
|
+
stream.removeAllListeners();
|
|
92
|
+
try {
|
|
93
|
+
stream.close();
|
|
94
|
+
} catch (err) {
|
|
95
|
+
// do nothing
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
stream.on('close', () => {
|
|
99
|
+
stream.removeAllListeners();
|
|
100
|
+
});
|
|
101
|
+
const triggerStream = (type, ip) => {
|
|
102
|
+
stream.removeAllListeners();
|
|
103
|
+
this.emit(type, stream, info, ip);
|
|
104
|
+
};
|
|
105
|
+
let type;
|
|
106
|
+
let ip;
|
|
107
|
+
try {
|
|
108
|
+
const b = await this.readStreamBytes(stream, 50);
|
|
109
|
+
const s = b.toString('utf8').replace(/\s+/, ' ').split(' ');
|
|
110
|
+
if (s.length !== 2) throw new Error(ERR_WRONG_HANDSHAKE);
|
|
111
|
+
type = parseInt(s[0]);
|
|
112
|
+
ip = s[1];
|
|
113
|
+
} catch (err) {
|
|
114
|
+
stream.emit('error', err);
|
|
115
|
+
return;
|
|
116
|
+
}
|
|
117
|
+
if (type === SOCKET_TYPE_TLS) {
|
|
118
|
+
logger.debug(LOG_DETECTED_STREAM('TLS'));
|
|
119
|
+
triggerStream(SSH_CLIENT_EVENT_STREAM_TLS, ip);
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
if (type === SOCKET_TYPE_HTTP1) {
|
|
123
|
+
logger.debug(LOG_DETECTED_STREAM('HTTP1'));
|
|
124
|
+
triggerStream(SSH_CLIENT_EVENT_STREAM_HTTP1, ip);
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
if (type === SOCKET_TYPE_HTTP2) {
|
|
128
|
+
logger.debug(LOG_DETECTED_STREAM('HTTP2'));
|
|
129
|
+
triggerStream(SSH_CLIENT_EVENT_STREAM_HTTP2, ip);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (type === SOCKET_TYPE_TCP) {
|
|
133
|
+
logger.debug(LOG_DETECTED_STREAM('TCP'));
|
|
134
|
+
triggerStream(SSH_CLIENT_EVENT_STREAM_TCP, ip);
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (type === SOCKET_TYPE_SSH) {
|
|
138
|
+
logger.debug(LOG_DETECTED_STREAM('SSH'));
|
|
139
|
+
triggerStream(SSH_CLIENT_EVENT_STREAM_SSH, ip);
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
logger.debug(LOG_WRONG_STREAM);
|
|
143
|
+
stream.emit('error', new Error(ERR_WRONG_STREAM));
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
forwardIn(port) {
|
|
147
|
+
return new Promise((resolve, reject) => {
|
|
148
|
+
this.client.on('tcp connection', async (info, accept) => {
|
|
149
|
+
logger.debug(LOG_SSH_CONNECTION);
|
|
150
|
+
return this.processStream(accept(), info);
|
|
151
|
+
});
|
|
152
|
+
this.client.forwardIn('0.0.0.0', port, (err) => {
|
|
153
|
+
if (err) reject(err);
|
|
154
|
+
else resolve(err);
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
closeKeepAlive() {
|
|
160
|
+
this.keepalive = false;
|
|
161
|
+
this.close();
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
openKeepAlive() {
|
|
165
|
+
this.keepalive = true;
|
|
166
|
+
this.open()
|
|
167
|
+
.then(() => {
|
|
168
|
+
this.emit(SSH_CLIENT_EVENT_CONNECTED);
|
|
169
|
+
this.client.on('close', () => {
|
|
170
|
+
if (this.keepalive) this.openKeepAlive();
|
|
171
|
+
});
|
|
172
|
+
})
|
|
173
|
+
.catch(() => {
|
|
174
|
+
this.emit(SSH_CLIENT_EVENT_DISCONNECTED);
|
|
175
|
+
setTimeout(() => {
|
|
176
|
+
if (this.keepalive) this.openKeepAlive();
|
|
177
|
+
}, 3000);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
close() {
|
|
182
|
+
if (this.client) {
|
|
183
|
+
try {
|
|
184
|
+
this.client.removeAllListeners();
|
|
185
|
+
this.client.on('error', () => {
|
|
186
|
+
});
|
|
187
|
+
this.client.end();
|
|
188
|
+
} catch (err) {
|
|
189
|
+
// nic nie rob
|
|
190
|
+
}
|
|
191
|
+
this.client = null;
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
module.exports = SshClient;
|
package/src/texts.js
ADDED
|
@@ -0,0 +1,447 @@
|
|
|
1
|
+
const ERR_AGENT_NOT_REGISTERED = 'Agent not registered. Exiting...';
|
|
2
|
+
const ERR_SAVING_AGENT_CONFIG = 'Error while saving agent config. Exiting...';
|
|
3
|
+
const ERR_TARGET_IS_NOT_VALID = (target) => `Target '${target}' is not a valid value`;
|
|
4
|
+
const ERR_TYPE_IS_NOT_VALID = (type) => `Type '${type}' is not a valid value`;
|
|
5
|
+
const ERR_TIMEOUT_IS_NOT_VALID = (timeout) => `Timeout '${timeout}' is not a valid value`;
|
|
6
|
+
const ERR_TERMINATE_IS_NOT_VALID = (terminate) => `Terminate '${terminate}' is not a valid value`;
|
|
7
|
+
const ERR_SUBDOMAIN_IS_NOT_VALID = (subdomain) => `Subdomain '${subdomain}' is not a valid value`;
|
|
8
|
+
const ERR_SUBDOMAIN_IS_TOO_SHORT = (subdomain) => `Subdomain '${subdomain}' is too short`;
|
|
9
|
+
const ERR_SUBDOMAIN_IS_TOO_LONG = (subdomain) => `Subdomain '${subdomain}' is too long`;
|
|
10
|
+
const ERR_DIRECTORY_DOES_NOT_EXISTS = (dir) => `Directory '${dir}' does not exists`;
|
|
11
|
+
const ERR_PATH_IS_NOT_DIRECTORY = (path) => `Path '${path}' is not a directory`;
|
|
12
|
+
const ERR_REGION_IS_NOT_VALID = (region) => `Region '${region}' is not a valid value`;
|
|
13
|
+
const ERR_PORT_IS_NOT_VALID = (port) => `Port '${port}' is not a valid value`;
|
|
14
|
+
const ERR_NAME_WITHOUT_ASTERISK = 'Name cannot contain \'*\'';
|
|
15
|
+
const ERR_WRONG_KEY_CERT = 'Wrong TLS key or certificate';
|
|
16
|
+
const ERR_WRONG_CA = (path) => `TLS CA certificate '${path}' is not valid`;
|
|
17
|
+
const ERR_CA_PATH_IS_NOT_VALID = (path) => `Path to TLS CA certificate '${path}' is not valid`;
|
|
18
|
+
const ERR_KEY_PATH_IS_NOT_VALID = (path) => `Path to TLS key '${path}' is not valid`;
|
|
19
|
+
const ERR_CERT_PATH_IS_NOT_VALID = (path) => `Path to TLS certificate '${path}' is not valid`;
|
|
20
|
+
const ERR_DOMAIN_IS_NOT_VALID = (domain) => `Domain '${domain}' is not a valid value`;
|
|
21
|
+
const ERR_CB_THRESHOLD_IS_NOT_VALID = (val) => `Circuit breaker threshold '${val}' is not a valid value`;
|
|
22
|
+
const ERR_BA_PASSWORD_NOT_PROVIDED = 'Basic Auth password is not provided';
|
|
23
|
+
const ERR_BA_LOGIN_NOT_PROVIDED = 'Basic Auth login is not provided';
|
|
24
|
+
const ERR_BA_IS_NOT_VALID = (auth) => `Basic Auth '${auth}' is not a valid value`;
|
|
25
|
+
const ERR_USER_AGENT_IS_NOT_VALID = (ua) => `User-Agent '${ua}' is not a valid regexp`;
|
|
26
|
+
const ERR_WHITELIST_IS_NOT_VALID = (wh) => `Whitelist '${wh}' is not a valid CIDR address`;
|
|
27
|
+
const ERR_TUNNEL_NOT_FOUND = (name) => `Tunnel '${name}' not found`;
|
|
28
|
+
const ERR_AGENT_NOT_ENABLED = 'Agent is not enabled';
|
|
29
|
+
const ERR_AGENT_NOT_RUNNING = 'Agent is not running';
|
|
30
|
+
const ERR_AGENT_NOT_FOUND = 'Agent is not found';
|
|
31
|
+
const ERR_AGENT_DOCKER_NOT_FOUND = 'Can\'t manage agent. First install Docker and enable it for current user';
|
|
32
|
+
const ERR_SWW_AGENT_ENABLING = 'Something went wrong while enabling agent';
|
|
33
|
+
const ERR_SWW_AGENT_DISABLING = 'Something went wrong while disabling agent';
|
|
34
|
+
const ERR_SWW_AGENT_UPDATING = 'Something went wrong while updating agent';
|
|
35
|
+
const ERR_AGENT_ENABLE = 'Can\'t start agent. Enable it first';
|
|
36
|
+
const ERR_AGENT_ADMIN_RIGHTS = 'Command must be run with administrator rights';
|
|
37
|
+
const ERR_AGENT_NOT_SUPPORTED = 'Starting agent is not supported';
|
|
38
|
+
const ERR_TUNNEL_ALREADY_EXISTS = 'Tunnel with that name already exists. Change name or use -f flag to overwrite it';
|
|
39
|
+
const ERR_FAILED_TO_CONNECT = (host) => `Failed to connect to '${host}'`;
|
|
40
|
+
const ERR_AGENT_REMOVED = 'Agent has been removed';
|
|
41
|
+
const ERR_SUBDOMAIN_TAKEN = 'Subdomain already reserved';
|
|
42
|
+
const ERR_TUNNEL_LIMIT_REACHED = 'Limit of tunnels reached';
|
|
43
|
+
const ERR_AGENT_LIMIT_REACHED = 'Limit of agents reached';
|
|
44
|
+
const ERR_TUNNELS_DISABLED = 'Tunnels disabled';
|
|
45
|
+
const ERR_TUNNEL_REMOVED = 'Tunnel has been removed';
|
|
46
|
+
const ERR_FAILED_TO_CONNECT_TO_AGENT = 'Failed to connect to agent';
|
|
47
|
+
const ERR_NOT_FOUND = 'Not found';
|
|
48
|
+
const ERR_SWW = 'Something went wrong';
|
|
49
|
+
const ERR_FETCH_VERSION = 'Failed to fetch version';
|
|
50
|
+
const ERR_WRONG_HANDSHAKE = 'Wrong handshake data';
|
|
51
|
+
const ERR_WRONG_STREAM = 'Wrong stream type';
|
|
52
|
+
const ERR_CONNECTION_TIMEOUT = 'Connection timeout';
|
|
53
|
+
const ERR_CONNECTION_ERROR = 'Connection error';
|
|
54
|
+
const ERR_CANT_CREATE_DIR_IN_HOME = (dir) => `Can't create '${dir}' in home directory`;
|
|
55
|
+
const ERR_TOKEN_NOT_PROVIDED = 'Token not provided';
|
|
56
|
+
const ERR_WRONG_TOKEN = 'Wrong token';
|
|
57
|
+
const ERR_CONFIG_CORRUPTED = 'Config file is corrupted';
|
|
58
|
+
|
|
59
|
+
const TXT_AGENT_STOPPED = 'Agent stopped';
|
|
60
|
+
const TXT_AGENT_STARTED = 'Agent started';
|
|
61
|
+
const TXT_AGENT_RESTARTED = 'Agent restarted';
|
|
62
|
+
const TXT_AGENT_IS_ENABLED_AND_STARTED = 'Agent is enabled & started';
|
|
63
|
+
const TXT_AGENT_IS_ENABLED_AND_STOPPED = 'Agent is enabled & stopped';
|
|
64
|
+
const TXT_AGENT_IS_ENABLED_AND_INITIALIZING = 'Agent is enabled & initializing';
|
|
65
|
+
const TXT_AGENT_IS_ENABLED_AND_HAVE_TROUBLES = 'Agent is enabled & have connection issues';
|
|
66
|
+
const TXT_AGENT_IS_DISABLED = 'Agent is disabled';
|
|
67
|
+
const TXT_AGENT_ENABLED = 'Agent enabled';
|
|
68
|
+
const TXT_AGENT_UPDATED = 'Agent updated';
|
|
69
|
+
const TXT_AGENT_ALREADY_ENABLED = 'Agent already enabled';
|
|
70
|
+
const TXT_AGENT_DISABLED = 'Agent disabled';
|
|
71
|
+
const TXT_AGENT_ALREADY_DISABLED = 'Agent already disabled';
|
|
72
|
+
const TXT_TUNNEL_STARTED = (type) => `${type} tunnel started`;
|
|
73
|
+
const TXT_TUNNEL_STOPPED = 'Tunnel stopped';
|
|
74
|
+
const TXT_WHITELIST_SAVED = 'Whitelist saved';
|
|
75
|
+
const TXT_TOKEN_SAVED = 'Token saved';
|
|
76
|
+
const TXT_TIMEOUT_SAVED = 'Timeout saved';
|
|
77
|
+
const TXT_REGION_SAVED = 'Region saved';
|
|
78
|
+
const TXT_TUNNEL_REMOVED = 'Tunnel removed';
|
|
79
|
+
const TXT_TUNNEL_ADDED = 'Tunnel added';
|
|
80
|
+
|
|
81
|
+
const NO_TUNNELS_STARTED = 'No tunnels started';
|
|
82
|
+
const AGENT_FETCH_RETRY = 'Agent fetch failed. Retrying in 3s...';
|
|
83
|
+
|
|
84
|
+
const DESC_COMMAND_CONFIG_ADD_HTTP = 'add HTTP tunnel to config';
|
|
85
|
+
const DESC_COMMAND_CONFIG_ADD_TCP = 'add TCP tunnel to config';
|
|
86
|
+
const DESC_COMMAND_CONFIG_ADD_TLS = 'add TLS tunnel to config';
|
|
87
|
+
const DESC_COMMAND_CONFIG_GET_REGION = 'get default region';
|
|
88
|
+
const DESC_COMMAND_CONFIG_GET_TIMEOUT = 'get default timeout';
|
|
89
|
+
const DESC_COMMAND_CONFIG_GET_TOKEN = 'get authorization token';
|
|
90
|
+
const DESC_COMMAND_CONFIG_GET_TUNNEL = 'get tunnel configuration';
|
|
91
|
+
const DESC_COMMAND_CONFIG_GET_TUNNELS = 'get tunnels';
|
|
92
|
+
const DESC_COMMAND_CONFIG_GET_WHITELIST = 'get default whitelist';
|
|
93
|
+
const DESC_COMMAND_CONFIG_REMOVE_TUNNEL = 'remove tunnel';
|
|
94
|
+
const DESC_COMMAND_CONFIG_SET_REGION = 'set default region';
|
|
95
|
+
const DESC_COMMAND_CONFIG_SET_TIMEOUT = 'set default timeout';
|
|
96
|
+
const DESC_COMMAND_CONFIG_SET_TOKEN = 'set default authorization token';
|
|
97
|
+
const DESC_COMMAND_CONFIG_SET_WHITELIST = 'set default whitelist';
|
|
98
|
+
const DESC_COMMAND_CONFIG_ADD = 'add configuration';
|
|
99
|
+
const DESC_COMMAND_CONFIG_GET = 'get configuration';
|
|
100
|
+
const DESC_COMMAND_CONFIG_REMOVE = 'remove configuration';
|
|
101
|
+
const DESC_COMMAND_CONFIG_SET = 'set configuration';
|
|
102
|
+
const DESC_COMMAND_AGENT_TUNNEL_HTTP = 'start HTTP tunnel in agent';
|
|
103
|
+
const DESC_COMMAND_AGENT_TUNNEL_LIST = 'list tunnels in agent';
|
|
104
|
+
const DESC_COMMAND_AGENT_TUNNEL_START = 'start tunnel in agent from config';
|
|
105
|
+
const DESC_COMMAND_AGENT_TUNNEL_STATUS = 'status of tunnel in agent';
|
|
106
|
+
const DESC_COMMAND_AGENT_TUNNEL_STOP = 'stop tunnel in agent';
|
|
107
|
+
const DESC_COMMAND_AGENT_TUNNEL_TCP = 'start TCP tunnel in agent';
|
|
108
|
+
const DESC_COMMAND_AGENT_TUNNEL_TLS = 'start TLS tunnel in agent';
|
|
109
|
+
const DESC_COMMAND_AGENT_DISABLE = 'disable agent';
|
|
110
|
+
const DESC_COMMAND_AGENT_ENABLE = 'enable agent';
|
|
111
|
+
const DESC_COMMAND_AGENT_START = 'start agent';
|
|
112
|
+
const DESC_COMMAND_AGENT_RESTART = 'restart agent';
|
|
113
|
+
const DESC_COMMAND_AGENT_STATUS = 'agent status';
|
|
114
|
+
const DESC_COMMAND_AGENT_STOP = 'stop agent';
|
|
115
|
+
const DESC_COMMAND_AGENT_TUNNEL = 'manage agent tunnels';
|
|
116
|
+
const DESC_COMMAND_AGENT_UPDATE = 'update agent version';
|
|
117
|
+
const DESC_COMMAND_AGENT_VERSION = 'agent version';
|
|
118
|
+
const DESC_COMMAND_CONFIG = 'manage configuration';
|
|
119
|
+
const DESC_COMMAND_HTTP = 'start HTTP tunnel';
|
|
120
|
+
const DESC_COMMAND_AGENT = 'manage agent';
|
|
121
|
+
const DESC_COMMAND_START = 'start tunnel from config';
|
|
122
|
+
const DESC_COMMAND_TCP = 'start TCP tunnel';
|
|
123
|
+
const DESC_COMMAND_TLS = 'start TLS tunnel';
|
|
124
|
+
|
|
125
|
+
const TXT_NEW_CLI_DOCKER_VERSION = (version) => `There is a new CLI Docker image version (${version})\n\n`;
|
|
126
|
+
const TXT_NEW_CLI_VERSION = (version) => `There is a new CLI version (${version})\n\n`;
|
|
127
|
+
const TXT_NEW_AGENT_VERSION = (version) => `Agent needs update. To update it to version ${version} run:\n\`bdy agent update\`\n\n`;
|
|
128
|
+
const TXT_NEW_CLI_AGENT_VERSION = (version) => `There is a new CLI version (${version}). After upgrading CLI update agent:\n\`bdy agent update\`\n\n`;
|
|
129
|
+
const TXT_DISABLING_AGENT = 'Disabling agent...';
|
|
130
|
+
const TXT_ENABLING_AGENT = 'Enabling agent...';
|
|
131
|
+
const TXT_UPDATING_AGENT = 'Updating agent...';
|
|
132
|
+
const TXT_OPENING_TUNNEL = 'Opening tunnel...';
|
|
133
|
+
|
|
134
|
+
const OPTION_REGION = 'override default region ("eu", "us")';
|
|
135
|
+
const OPTION_DEFAULT_REGION = 'default region ("eu", "us")';
|
|
136
|
+
const OPTION_WHITELIST = 'whitelist provided IP CIDRs. Use "*" to allow all';
|
|
137
|
+
const OPTION_HEADER = 'header key:value to add to the request';
|
|
138
|
+
const OPTION_RESPONSE_HEADER = 'header key:value to add to the response';
|
|
139
|
+
const OPTION_HEADER_USER_AGENT = 'whitelist browser user-agent by contained text or regular expressions (e.g. /my-user-agent/). By Default all are allowed';
|
|
140
|
+
const OPTION_SERVE = 'serve files from a directory';
|
|
141
|
+
const OPTION_SUBDOMAIN = 'provide custom subdomain';
|
|
142
|
+
const OPTION_FOLLOW = 'follow tunnel details';
|
|
143
|
+
const OPTION_DOMAIN = 'provide custom domain';
|
|
144
|
+
const OPTION_TIMEOUT = 'enforce connection timeout in seconds';
|
|
145
|
+
const OPTION_TOKEN = 'token to authorize agent';
|
|
146
|
+
const OPTION_FORCE = 'overwrite tunnel if it already exist';
|
|
147
|
+
const OPTION_HTTP_HOST = 'provide custom http host header';
|
|
148
|
+
const OPTION_HTTP_AUTH = 'enforce http basic authorization';
|
|
149
|
+
const OPTION_HTTP_LOG = 'log http requests';
|
|
150
|
+
const OPTION_HTTP_VERIFY = 'enforce TLS verify';
|
|
151
|
+
const OPTION_HTTP_2 = 'enforce HTTP/2';
|
|
152
|
+
const OPTION_HTTP_COMPRESSION = 'turn on HTTP response compression';
|
|
153
|
+
const OPTION_HTTP_CIRCUIT_BREAKER = 'turn on circuit breaker. Provide decimal value between 0 to 1';
|
|
154
|
+
const OPTION_TLS_KEY = 'path to a TLS key';
|
|
155
|
+
const OPTION_TLS_CERT = 'path to a TLS PEM certificate';
|
|
156
|
+
const OPTION_TLS_CA = 'path to a TLS PEM CA certificate for TLS auth';
|
|
157
|
+
const OPTION_TLS_TERMINATE = 'terminate TLS at "target", "agent", "region". By default TLS is terminated at "region"';
|
|
158
|
+
const OPTION_TARGET = 'target address to redirect traffic to. Host is optional and by default local machine. Port is by default 80';
|
|
159
|
+
const OPTION_NAME = 'name of the tunnel';
|
|
160
|
+
const OPTION_ID = 'id of the tunnel';
|
|
161
|
+
const OPTION_AGENT_ID = 'start existing agent';
|
|
162
|
+
const OPTION_AGENT_START = 'start agent right away';
|
|
163
|
+
const OPTION_AGENT_TOKEN = 'token to authorize existing agent agent or token to add a new agent';
|
|
164
|
+
const OPTION_USER = 'name of the user in OS. By default agent is run as root (macOS/Linux) or LocalSystem account (Windows). Under Windows user must be passed as DOMAIN\\USER (to find out full name use `whoami` command)';
|
|
165
|
+
const OPTION_PASS = 'password of the user. Only set for Windows';
|
|
166
|
+
const OPTION_AGENT_PORT = 'agent api port';
|
|
167
|
+
const OPTION_AGENT_DEBUG = 'turns on debug mode';
|
|
168
|
+
|
|
169
|
+
const LOG_REGISTERING_AGENT = 'Registering agent...';
|
|
170
|
+
const LOG_SAVING_AGENT_CONFIG = 'Saving agent config...';
|
|
171
|
+
const LOG_SAVING_AGENT_SYSTEM_CONFIG = 'Saving agent system config...';
|
|
172
|
+
const LOG_SAVING_AGENT_LOCAL_CONFIG = 'Saving agent local config...';
|
|
173
|
+
const LOG_ERROR_SAVING_AGENT_CONFIG = 'Error while saving agent config';
|
|
174
|
+
const LOG_ERROR_SAVING_AGENT_SYSTEM_CONFIG = 'Error while saving agent system config';
|
|
175
|
+
const LOG_ERROR_SAVING_AGENT_LOCAL_CONFIG = 'Error while saving agent local config';
|
|
176
|
+
const LOG_AGENT_SYSTEM_DIR = 'Creating agent system directory...';
|
|
177
|
+
const LOG_AGENT_DOWNLOADING_ARCHIVE = 'Downloading agent archive...';
|
|
178
|
+
const LOG_AGENT_EXTRACTING_ARCHIVE = 'Extracting agent archive...';
|
|
179
|
+
const LOG_AGENT_SYSTEM_SERVICE_CONFIG = 'Saving agent system service config...';
|
|
180
|
+
const LOG_AGENT_ENABLING_SYSTEM = 'Enabling agent in system...';
|
|
181
|
+
const LOG_AGENT_STOPPING_SYSTEM = 'Stopping agent in system...';
|
|
182
|
+
const LOG_AGENT_STARTING_SYSTEM = 'Starting agent in system...';
|
|
183
|
+
const LOG_AGENT_ENABLED = 'Agent enabled in system';
|
|
184
|
+
const LOG_AGENT_NSSM_DOWNLOADING = 'Agent nssm downloading...';
|
|
185
|
+
const LOG_AGENT_NSSM_EXTRACTING = 'Agent nssm extracting...';
|
|
186
|
+
const LOG_AGENT_NSSM_CLEARING = 'Agent nssm clearing...';
|
|
187
|
+
const LOG_SOCKET_CONNECTED = 'Socket connected';
|
|
188
|
+
const LOG_SOCKET_DISCONNECTED = 'Socket disconnected';
|
|
189
|
+
const LOG_AGENT_REGISTERED = (id) => `Agent registered with id '${id}'`;
|
|
190
|
+
const LOG_REGION_DETECTED = (region) => `Detected region '${region}'`;
|
|
191
|
+
const LOG_UNREGISTERING_AGENT = 'Unregistering agent...';
|
|
192
|
+
const LOG_GETTING_AGENT = 'Getting agent...';
|
|
193
|
+
const LOG_REGISTERING_TUNNEL = 'Registering tunnel...';
|
|
194
|
+
const LOG_ERROR_WHILE_REFRESHING_AGENT = 'Error while refreshing agent';
|
|
195
|
+
const LOG_TUNNEL_REGISTERED = (id) => `Tunnel registered with id '${id}'`;
|
|
196
|
+
const LOG_REMOVING_TUNNEL = 'Removing tunnel...';
|
|
197
|
+
const LOG_STARTING_TUNNEL = (id) => `Starting tunnel '${id}'`;
|
|
198
|
+
const LOG_STOPPING_TUNNEL = (id) => `Stopping tunnel '${id}'`;
|
|
199
|
+
const LOG_ERROR = 'error';
|
|
200
|
+
const LOG_HTTP1_CONNECTION = (ip) => `HTTP1 server will handle tunnel connection from ${ip}`;
|
|
201
|
+
const LOG_HTTP1_REQUEST = (method, url) => `HTTP1 server new request ${method} ${url}`;
|
|
202
|
+
const LOG_HTTP2_CONNECTION = (ip) => `HTTP2 server will handle tunnel connection from ${ip}`;
|
|
203
|
+
const LOG_HTTP2_REQUEST = (method, url) => `HTTP2 server new request ${method} ${url}`;
|
|
204
|
+
const LOG_DETECTED_STREAM = (type) => `Detected stream '${type}'`;
|
|
205
|
+
const LOG_WRONG_STREAM = 'Wrong stream type';
|
|
206
|
+
const LOG_SSH_CONNECTION = 'New SSH tcp connection';
|
|
207
|
+
const LOG_REQUEST = (url) => `request: ${url}`;
|
|
208
|
+
const LOG_ERROR_STARTING_AGENT_SERVER = 'Error while starting agent api server';
|
|
209
|
+
const LOG_AGENT_SERVER_STARTED = 'Agent server started';
|
|
210
|
+
const LOG_AGENT_STARTED = 'Agent started';
|
|
211
|
+
const LOG_TUNNEL_CONNECTED = (id, port) => `Tunnel '${id}' connected. Forwarding port '${port}'`;
|
|
212
|
+
const LOG_TUNNEL_FAILED = (id) => `Tunnel '${id}' forwarding failed`;
|
|
213
|
+
const LOG_TUNNEL_DISCONNECTED = (id) => `Tunnel '${id}' disconnected`;
|
|
214
|
+
const LOG_TUNNEL_IDENTIFIED = (id, type) => `Tunnel ${id} identified as ${type}`;
|
|
215
|
+
const LOG_TUNNEL_HTTP_WRON_AUTH = 'HTTP request wrong basic auth';
|
|
216
|
+
const LOG_TUNNEL_HTTP_RATE_LIMIT = 'HTTP request rate limited';
|
|
217
|
+
const LOG_TUNNEL_HTTP_CIRCUIT_BREAKER_OPEN = 'HTTP request circuit breaker open';
|
|
218
|
+
const LOG_TUNNEL_HTTP_WRONG_USER_AGENTS = 'HTTP request wrong user-agents';
|
|
219
|
+
const LOG_TUNNEL_TCP_STREAM = (id) => `New TCP connection on tunnel '${id}'. Stream to target`;
|
|
220
|
+
const LOG_TUNNEL_HTTP1_STREAM = (id) => `New HTTP1 connection on tunnel '${id}'. Handle HTTP1`;
|
|
221
|
+
const LOG_TUNNEL_HTTP2_STREAM = (id) => `New HTTP2 connection on tunnel '${id}'. Handle HTTP2`;
|
|
222
|
+
const LOG_TUNNEL_TLS_TARGET_STREAM = (id) => `New TLS connection on tunnel '${id}'. Terminated at target. Stream to target`;
|
|
223
|
+
const LOG_TUNNEL_TLS_REGION_STREAM = (id) => `New TLS connection on tunnel '${id}'. Terminated at region. Stream to target`;
|
|
224
|
+
const LOG_TUNNEL_TLS_AGENT_STREAM = (id) => `New TLS connection on tunnel '${id}'. Terminated at agent. Handle TLS`;
|
|
225
|
+
const LOG_TUNNEL_SSH_STREAM = (id) => `New SSH connection on tunnel '${id}'. Stream to localhost`;
|
|
226
|
+
|
|
227
|
+
module.exports = {
|
|
228
|
+
LOG_ERROR_WHILE_REFRESHING_AGENT,
|
|
229
|
+
LOG_STOPPING_TUNNEL,
|
|
230
|
+
LOG_STARTING_TUNNEL,
|
|
231
|
+
LOG_TUNNEL_TLS_AGENT_STREAM,
|
|
232
|
+
LOG_TUNNEL_SSH_STREAM,
|
|
233
|
+
LOG_TUNNEL_TLS_REGION_STREAM,
|
|
234
|
+
LOG_TUNNEL_TLS_TARGET_STREAM,
|
|
235
|
+
LOG_TUNNEL_HTTP2_STREAM,
|
|
236
|
+
LOG_TUNNEL_HTTP1_STREAM,
|
|
237
|
+
LOG_TUNNEL_TCP_STREAM,
|
|
238
|
+
LOG_TUNNEL_HTTP_WRONG_USER_AGENTS,
|
|
239
|
+
LOG_TUNNEL_HTTP_CIRCUIT_BREAKER_OPEN,
|
|
240
|
+
LOG_TUNNEL_HTTP_RATE_LIMIT,
|
|
241
|
+
LOG_TUNNEL_HTTP_WRON_AUTH,
|
|
242
|
+
LOG_TUNNEL_IDENTIFIED,
|
|
243
|
+
LOG_TUNNEL_DISCONNECTED,
|
|
244
|
+
LOG_TUNNEL_FAILED,
|
|
245
|
+
LOG_TUNNEL_CONNECTED,
|
|
246
|
+
LOG_AGENT_STARTED,
|
|
247
|
+
LOG_AGENT_SERVER_STARTED,
|
|
248
|
+
LOG_ERROR_STARTING_AGENT_SERVER,
|
|
249
|
+
LOG_REQUEST,
|
|
250
|
+
LOG_SSH_CONNECTION,
|
|
251
|
+
LOG_WRONG_STREAM,
|
|
252
|
+
LOG_DETECTED_STREAM,
|
|
253
|
+
LOG_HTTP2_REQUEST,
|
|
254
|
+
LOG_HTTP2_CONNECTION,
|
|
255
|
+
LOG_HTTP1_REQUEST,
|
|
256
|
+
LOG_HTTP1_CONNECTION,
|
|
257
|
+
LOG_ERROR,
|
|
258
|
+
LOG_REMOVING_TUNNEL,
|
|
259
|
+
LOG_TUNNEL_REGISTERED,
|
|
260
|
+
LOG_REGISTERING_TUNNEL,
|
|
261
|
+
LOG_GETTING_AGENT,
|
|
262
|
+
LOG_UNREGISTERING_AGENT,
|
|
263
|
+
LOG_REGION_DETECTED,
|
|
264
|
+
LOG_AGENT_REGISTERED,
|
|
265
|
+
LOG_REGISTERING_AGENT,
|
|
266
|
+
OPTION_AGENT_PORT,
|
|
267
|
+
OPTION_AGENT_DEBUG,
|
|
268
|
+
OPTION_AGENT_TOKEN,
|
|
269
|
+
OPTION_AGENT_ID,
|
|
270
|
+
OPTION_AGENT_START,
|
|
271
|
+
OPTION_ID,
|
|
272
|
+
OPTION_NAME,
|
|
273
|
+
OPTION_TARGET,
|
|
274
|
+
OPTION_TLS_TERMINATE,
|
|
275
|
+
OPTION_TLS_CA,
|
|
276
|
+
OPTION_TLS_CERT,
|
|
277
|
+
OPTION_TLS_KEY,
|
|
278
|
+
OPTION_HTTP_CIRCUIT_BREAKER,
|
|
279
|
+
OPTION_HTTP_COMPRESSION,
|
|
280
|
+
OPTION_HTTP_2,
|
|
281
|
+
OPTION_HTTP_VERIFY,
|
|
282
|
+
OPTION_HTTP_LOG,
|
|
283
|
+
OPTION_HTTP_AUTH,
|
|
284
|
+
OPTION_HTTP_HOST,
|
|
285
|
+
OPTION_FORCE,
|
|
286
|
+
OPTION_TOKEN,
|
|
287
|
+
OPTION_TIMEOUT,
|
|
288
|
+
OPTION_DOMAIN,
|
|
289
|
+
OPTION_FOLLOW,
|
|
290
|
+
OPTION_SUBDOMAIN,
|
|
291
|
+
OPTION_SERVE,
|
|
292
|
+
OPTION_HEADER_USER_AGENT,
|
|
293
|
+
OPTION_RESPONSE_HEADER,
|
|
294
|
+
OPTION_HEADER,
|
|
295
|
+
OPTION_WHITELIST,
|
|
296
|
+
OPTION_DEFAULT_REGION,
|
|
297
|
+
OPTION_USER,
|
|
298
|
+
OPTION_PASS,
|
|
299
|
+
OPTION_REGION,
|
|
300
|
+
DESC_COMMAND_TLS,
|
|
301
|
+
DESC_COMMAND_TCP,
|
|
302
|
+
DESC_COMMAND_START,
|
|
303
|
+
DESC_COMMAND_AGENT,
|
|
304
|
+
DESC_COMMAND_HTTP,
|
|
305
|
+
DESC_COMMAND_CONFIG,
|
|
306
|
+
DESC_COMMAND_AGENT_VERSION,
|
|
307
|
+
DESC_COMMAND_AGENT_UPDATE,
|
|
308
|
+
DESC_COMMAND_AGENT_TUNNEL,
|
|
309
|
+
DESC_COMMAND_AGENT_STOP,
|
|
310
|
+
DESC_COMMAND_AGENT_STATUS,
|
|
311
|
+
DESC_COMMAND_AGENT_START,
|
|
312
|
+
DESC_COMMAND_AGENT_RESTART,
|
|
313
|
+
DESC_COMMAND_AGENT_ENABLE,
|
|
314
|
+
DESC_COMMAND_AGENT_DISABLE,
|
|
315
|
+
DESC_COMMAND_AGENT_TUNNEL_TLS,
|
|
316
|
+
DESC_COMMAND_AGENT_TUNNEL_TCP,
|
|
317
|
+
DESC_COMMAND_AGENT_TUNNEL_STOP,
|
|
318
|
+
DESC_COMMAND_AGENT_TUNNEL_STATUS,
|
|
319
|
+
DESC_COMMAND_AGENT_TUNNEL_START,
|
|
320
|
+
DESC_COMMAND_AGENT_TUNNEL_LIST,
|
|
321
|
+
DESC_COMMAND_AGENT_TUNNEL_HTTP,
|
|
322
|
+
DESC_COMMAND_CONFIG_SET,
|
|
323
|
+
DESC_COMMAND_CONFIG_REMOVE,
|
|
324
|
+
DESC_COMMAND_CONFIG_GET,
|
|
325
|
+
DESC_COMMAND_CONFIG_ADD,
|
|
326
|
+
DESC_COMMAND_CONFIG_SET_WHITELIST,
|
|
327
|
+
DESC_COMMAND_CONFIG_SET_TOKEN,
|
|
328
|
+
DESC_COMMAND_CONFIG_SET_TIMEOUT,
|
|
329
|
+
DESC_COMMAND_CONFIG_SET_REGION,
|
|
330
|
+
DESC_COMMAND_CONFIG_REMOVE_TUNNEL,
|
|
331
|
+
DESC_COMMAND_CONFIG_GET_WHITELIST,
|
|
332
|
+
DESC_COMMAND_CONFIG_GET_TUNNELS,
|
|
333
|
+
DESC_COMMAND_CONFIG_GET_TUNNEL,
|
|
334
|
+
DESC_COMMAND_CONFIG_GET_TOKEN,
|
|
335
|
+
DESC_COMMAND_CONFIG_GET_TIMEOUT,
|
|
336
|
+
DESC_COMMAND_CONFIG_GET_REGION,
|
|
337
|
+
DESC_COMMAND_CONFIG_ADD_TLS,
|
|
338
|
+
DESC_COMMAND_CONFIG_ADD_TCP,
|
|
339
|
+
DESC_COMMAND_CONFIG_ADD_HTTP,
|
|
340
|
+
ERR_CONFIG_CORRUPTED,
|
|
341
|
+
ERR_TOKEN_NOT_PROVIDED,
|
|
342
|
+
ERR_WRONG_TOKEN,
|
|
343
|
+
ERR_AGENT_NOT_FOUND,
|
|
344
|
+
ERR_CANT_CREATE_DIR_IN_HOME,
|
|
345
|
+
ERR_AGENT_NOT_SUPPORTED,
|
|
346
|
+
ERR_CONNECTION_ERROR,
|
|
347
|
+
ERR_CONNECTION_TIMEOUT,
|
|
348
|
+
ERR_WRONG_STREAM,
|
|
349
|
+
ERR_WRONG_HANDSHAKE,
|
|
350
|
+
ERR_SWW,
|
|
351
|
+
ERR_NOT_FOUND,
|
|
352
|
+
ERR_FAILED_TO_CONNECT_TO_AGENT,
|
|
353
|
+
ERR_FAILED_TO_CONNECT,
|
|
354
|
+
ERR_AGENT_REMOVED,
|
|
355
|
+
ERR_SUBDOMAIN_TAKEN,
|
|
356
|
+
ERR_TUNNELS_DISABLED,
|
|
357
|
+
ERR_TUNNEL_REMOVED,
|
|
358
|
+
AGENT_FETCH_RETRY,
|
|
359
|
+
NO_TUNNELS_STARTED,
|
|
360
|
+
TXT_REGION_SAVED,
|
|
361
|
+
TXT_TUNNEL_REMOVED,
|
|
362
|
+
TXT_TUNNEL_ADDED,
|
|
363
|
+
TXT_TIMEOUT_SAVED,
|
|
364
|
+
TXT_TOKEN_SAVED,
|
|
365
|
+
TXT_WHITELIST_SAVED,
|
|
366
|
+
TXT_TUNNEL_STOPPED,
|
|
367
|
+
TXT_TUNNEL_STARTED,
|
|
368
|
+
TXT_AGENT_ENABLED,
|
|
369
|
+
TXT_AGENT_UPDATED,
|
|
370
|
+
TXT_AGENT_ALREADY_ENABLED,
|
|
371
|
+
TXT_AGENT_DISABLED,
|
|
372
|
+
TXT_AGENT_ALREADY_DISABLED,
|
|
373
|
+
TXT_AGENT_STARTED,
|
|
374
|
+
TXT_AGENT_RESTARTED,
|
|
375
|
+
TXT_AGENT_IS_DISABLED,
|
|
376
|
+
TXT_AGENT_IS_ENABLED_AND_INITIALIZING,
|
|
377
|
+
TXT_AGENT_IS_ENABLED_AND_HAVE_TROUBLES,
|
|
378
|
+
TXT_AGENT_IS_ENABLED_AND_STARTED,
|
|
379
|
+
TXT_AGENT_IS_ENABLED_AND_STOPPED,
|
|
380
|
+
TXT_AGENT_STOPPED,
|
|
381
|
+
ERR_TUNNEL_ALREADY_EXISTS,
|
|
382
|
+
ERR_AGENT_NOT_REGISTERED,
|
|
383
|
+
ERR_SAVING_AGENT_CONFIG,
|
|
384
|
+
ERR_WRONG_KEY_CERT,
|
|
385
|
+
ERR_AGENT_ENABLE,
|
|
386
|
+
ERR_SWW_AGENT_ENABLING,
|
|
387
|
+
ERR_SWW_AGENT_DISABLING,
|
|
388
|
+
ERR_SWW_AGENT_UPDATING,
|
|
389
|
+
ERR_AGENT_NOT_ENABLED,
|
|
390
|
+
ERR_AGENT_NOT_RUNNING,
|
|
391
|
+
ERR_SUBDOMAIN_IS_NOT_VALID,
|
|
392
|
+
ERR_SUBDOMAIN_IS_TOO_SHORT,
|
|
393
|
+
ERR_SUBDOMAIN_IS_TOO_LONG,
|
|
394
|
+
ERR_TUNNEL_NOT_FOUND,
|
|
395
|
+
ERR_REGION_IS_NOT_VALID,
|
|
396
|
+
ERR_TARGET_IS_NOT_VALID,
|
|
397
|
+
ERR_TYPE_IS_NOT_VALID,
|
|
398
|
+
ERR_TERMINATE_IS_NOT_VALID,
|
|
399
|
+
ERR_TIMEOUT_IS_NOT_VALID,
|
|
400
|
+
ERR_DIRECTORY_DOES_NOT_EXISTS,
|
|
401
|
+
ERR_PATH_IS_NOT_DIRECTORY,
|
|
402
|
+
ERR_PORT_IS_NOT_VALID,
|
|
403
|
+
ERR_NAME_WITHOUT_ASTERISK,
|
|
404
|
+
ERR_BA_PASSWORD_NOT_PROVIDED,
|
|
405
|
+
ERR_BA_LOGIN_NOT_PROVIDED,
|
|
406
|
+
ERR_AGENT_DOCKER_NOT_FOUND,
|
|
407
|
+
ERR_FETCH_VERSION,
|
|
408
|
+
ERR_TUNNEL_LIMIT_REACHED,
|
|
409
|
+
ERR_AGENT_LIMIT_REACHED,
|
|
410
|
+
TXT_DISABLING_AGENT,
|
|
411
|
+
TXT_ENABLING_AGENT,
|
|
412
|
+
TXT_UPDATING_AGENT,
|
|
413
|
+
TXT_NEW_CLI_DOCKER_VERSION,
|
|
414
|
+
TXT_NEW_CLI_VERSION,
|
|
415
|
+
TXT_NEW_AGENT_VERSION,
|
|
416
|
+
TXT_NEW_CLI_AGENT_VERSION,
|
|
417
|
+
ERR_WHITELIST_IS_NOT_VALID,
|
|
418
|
+
ERR_USER_AGENT_IS_NOT_VALID,
|
|
419
|
+
ERR_AGENT_ADMIN_RIGHTS,
|
|
420
|
+
ERR_BA_IS_NOT_VALID,
|
|
421
|
+
ERR_KEY_PATH_IS_NOT_VALID,
|
|
422
|
+
ERR_CA_PATH_IS_NOT_VALID,
|
|
423
|
+
ERR_WRONG_CA,
|
|
424
|
+
ERR_CB_THRESHOLD_IS_NOT_VALID,
|
|
425
|
+
ERR_DOMAIN_IS_NOT_VALID,
|
|
426
|
+
ERR_CERT_PATH_IS_NOT_VALID,
|
|
427
|
+
TXT_OPENING_TUNNEL,
|
|
428
|
+
LOG_SOCKET_CONNECTED,
|
|
429
|
+
LOG_SOCKET_DISCONNECTED,
|
|
430
|
+
LOG_SAVING_AGENT_CONFIG,
|
|
431
|
+
LOG_SAVING_AGENT_SYSTEM_CONFIG,
|
|
432
|
+
LOG_SAVING_AGENT_LOCAL_CONFIG,
|
|
433
|
+
LOG_ERROR_SAVING_AGENT_CONFIG,
|
|
434
|
+
LOG_ERROR_SAVING_AGENT_SYSTEM_CONFIG,
|
|
435
|
+
LOG_ERROR_SAVING_AGENT_LOCAL_CONFIG,
|
|
436
|
+
LOG_AGENT_SYSTEM_DIR,
|
|
437
|
+
LOG_AGENT_DOWNLOADING_ARCHIVE,
|
|
438
|
+
LOG_AGENT_EXTRACTING_ARCHIVE,
|
|
439
|
+
LOG_AGENT_SYSTEM_SERVICE_CONFIG,
|
|
440
|
+
LOG_AGENT_ENABLING_SYSTEM,
|
|
441
|
+
LOG_AGENT_STOPPING_SYSTEM,
|
|
442
|
+
LOG_AGENT_STARTING_SYSTEM,
|
|
443
|
+
LOG_AGENT_ENABLED,
|
|
444
|
+
LOG_AGENT_NSSM_DOWNLOADING,
|
|
445
|
+
LOG_AGENT_NSSM_EXTRACTING,
|
|
446
|
+
LOG_AGENT_NSSM_CLEARING
|
|
447
|
+
};
|