bdy 1.7.54-dev → 1.7.56-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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "bdy",
3
3
  "preferGlobal": false,
4
- "version": "1.7.54-dev",
4
+ "version": "1.7.56-dev",
5
5
  "type": "commonjs",
6
6
  "license": "MIT",
7
7
  "dependencies": {
@@ -1,6 +1,6 @@
1
1
  const Output = require('../../../output.js');
2
2
  const {
3
- DESC_COMMAND_AGENT_TUNNEL_STOP,
3
+ DESC_COMMAND_AGENT_TUNNEL_REMOVE,
4
4
  ERR_AGENT_NOT_ENABLED,
5
5
  OPTION_ID,
6
6
  TXT_TUNNEL_STOPPED
@@ -9,9 +9,9 @@ const ApiAgent = require('../../../api/agent.js');
9
9
  const AgentManager = require('../../../agent/manager');
10
10
  const { newCommand } = require('../../../utils');
11
11
 
12
- const commandAgentTunnelStop = newCommand('stop', DESC_COMMAND_AGENT_TUNNEL_STOP);
13
- commandAgentTunnelStop.argument('<id>', OPTION_ID);
14
- commandAgentTunnelStop.action(async (id) => {
12
+ const commandAgentTunnelRemove = newCommand('rm', DESC_COMMAND_AGENT_TUNNEL_REMOVE);
13
+ commandAgentTunnelRemove.argument('<id>', OPTION_ID);
14
+ commandAgentTunnelRemove.action(async (id) => {
15
15
  const isEnabled = await AgentManager.system.isEnabled();
16
16
  if (!isEnabled) {
17
17
  Output.exitError(ERR_AGENT_NOT_ENABLED);
@@ -26,4 +26,4 @@ commandAgentTunnelStop.action(async (id) => {
26
26
  }
27
27
  });
28
28
 
29
- module.exports = commandAgentTunnelStop;
29
+ module.exports = commandAgentTunnelRemove;
@@ -1,6 +1,6 @@
1
1
  const commandAgentTunnelTcp = require('./tunnel/tcp.js');
2
2
  const commandAgentTunnelList = require('./tunnel/list.js');
3
- const commandAgentTunnelStop = require('./tunnel/stop.js');
3
+ const commandAgentTunnelRemove = require('./tunnel/remove.js');
4
4
  const commandAgentTunnelTls = require('./tunnel/tls.js');
5
5
  const commandAgentTunnelHttp = require('./tunnel/http.js');
6
6
  const commandAgentTunnelStart = require('./tunnel/start.js');
@@ -13,7 +13,7 @@ commandAgentTunnel.addCommand(commandAgentTunnelTcp);
13
13
  commandAgentTunnel.addCommand(commandAgentTunnelTls);
14
14
  commandAgentTunnel.addCommand(commandAgentTunnelHttp);
15
15
  commandAgentTunnel.addCommand(commandAgentTunnelStart);
16
- commandAgentTunnel.addCommand(commandAgentTunnelStop);
16
+ commandAgentTunnel.addCommand(commandAgentTunnelRemove);
17
17
  commandAgentTunnel.addCommand(commandAgentTunnelList);
18
18
  commandAgentTunnel.addCommand(commandAgentTunnelStatus);
19
19
 
@@ -8,7 +8,7 @@ const ApiBuddy = require('../../api/buddy.js');
8
8
  const { ERR_AGENT_ADMIN_RIGHTS } = require('../../texts');
9
9
  const { newCommand } = require('../../utils');
10
10
 
11
- const commandAgentUninstall = newCommand('disable', DESC_COMMAND_AGENT_UNINSTALL);
11
+ const commandAgentUninstall = newCommand('uninstall', DESC_COMMAND_AGENT_UNINSTALL);
12
12
  commandAgentUninstall.action(async () => {
13
13
  const hasAdminRights = await AgentManager.system.hasAdminRights();
14
14
  if (!hasAdminRights) {
@@ -3,7 +3,8 @@ const Output = require('../../../output.js');
3
3
  const {
4
4
  DESC_COMMAND_CONFIG_SET_TOKEN,
5
5
  OPTION_TOKEN,
6
- TXT_TOKEN_SAVED
6
+ TXT_TOKEN_SAVED,
7
+ TXT_TOKEN_REMOVED
7
8
  } = require('../../../texts.js');
8
9
  const { newCommand } = require('../../../utils');
9
10
 
@@ -11,7 +12,7 @@ const commandConfigSetToken = newCommand('token', DESC_COMMAND_CONFIG_SET_TOKEN)
11
12
  commandConfigSetToken.argument('[token]', OPTION_TOKEN, '');
12
13
  commandConfigSetToken.action((token) => {
13
14
  Cfg.setToken(token);
14
- Output.exitSuccess(TXT_TOKEN_SAVED);
15
+ Output.exitSuccess(!token ? TXT_TOKEN_REMOVED : TXT_TOKEN_SAVED);
15
16
  });
16
17
 
17
18
  module.exports = commandConfigSetToken;
@@ -21,7 +21,6 @@ class OutputNoninteractiveConfigTunnel {
21
21
  data.push(['Target', Format.target(this.tunnel.type, this.tunnel.target)]);
22
22
  }
23
23
  data.push(['Region', Format.tunnelRegion(this.tunnel.region)]);
24
- data.push(['Server ID', this.tunnel.sshId]);
25
24
  data.push(['Timeout', Format.tunnelTimeout(this.tunnel.timeout)]);
26
25
  data.push(['Whitelist', Format.tunnelWhitelist(this.tunnel.whitelist)]);
27
26
  data.push(['Domain', Format.tunnelDomain(this.tunnel.domain)]);
package/src/texts.js CHANGED
@@ -1,49 +1,48 @@
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`;
1
+ const ERR_AGENT_NOT_REGISTERED = 'Agent not registered. Exiting.';
2
+ const ERR_SAVING_AGENT_CONFIG = 'Failed saving agent config. Exiting.';
3
+ const ERR_TARGET_IS_NOT_VALID = (target) => `Target '${target}' invalid`;
4
+ const ERR_TYPE_IS_NOT_VALID = (type) => `Type '${type}' invalid`;
5
+ const ERR_TIMEOUT_IS_NOT_VALID = (timeout) => `Timeout '${timeout}' invalid`;
6
+ const ERR_TERMINATE_IS_NOT_VALID = (terminate) => `Terminate '${terminate}' invalid`;
7
+ const ERR_SUBDOMAIN_IS_NOT_VALID = (subdomain) => `Subdomain '${subdomain}' invalid`;
8
8
  const ERR_SUBDOMAIN_IS_TOO_SHORT = (subdomain) => `Subdomain '${subdomain}' is too short`;
9
9
  const ERR_SUBDOMAIN_IS_TOO_LONG = (subdomain) => `Subdomain '${subdomain}' is too long`;
10
10
  const ERR_DIRECTORY_DOES_NOT_EXISTS = (dir) => `Directory '${dir}' does not exists`;
11
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`;
12
+ const ERR_REGION_IS_NOT_VALID = (region) => `Region '${region}' invalid`;
13
+ const ERR_PORT_IS_NOT_VALID = (port) => `Port '${port}' invalid`;
14
+ const ERR_NAME_WITHOUT_ASTERISK = 'Name: no \'*\' allowed';
15
+ const ERR_WRONG_KEY_CERT = 'Invalid TLS key or cert';
16
+ const ERR_WRONG_CA = (path) => `TLS CA certificate '${path}'invalid`;
17
+ const ERR_CA_PATH_IS_NOT_VALID = (path) => `Invalid TLS CA cert path: '${path}'`;
18
+ const ERR_KEY_PATH_IS_NOT_VALID = (path) => `Invalid TLS key path: '${path}'`;
19
+ const ERR_CERT_PATH_IS_NOT_VALID = (path) => `Invalid TLS cert path: '${path}'`;
20
+ const ERR_DOMAIN_IS_NOT_VALID = (domain) => `Domain '${domain}' invalid`;
21
+ const ERR_CB_THRESHOLD_IS_NOT_VALID = (val) => `Circuit breaker threshold '${val}' invalid`;
22
+ const ERR_BA_PASSWORD_NOT_PROVIDED = 'HTTP BA password not provided';
23
+ const ERR_BA_LOGIN_NOT_PROVIDED = 'HTTP BA username not provided';
24
+ const ERR_BA_IS_NOT_VALID = (auth) => `HTTP BA '${auth}' invalid`;
25
+ const ERR_USER_AGENT_IS_NOT_VALID = (ua) => `Invalid User-Agent regex: '${ua}'`;
26
+ const ERR_WHITELIST_IS_NOT_VALID = (wh) => `Invalid CIDR: '${wh}'`;
27
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';
28
+ const ERR_AGENT_NOT_ENABLED = 'Agent not installed';
29
+ const ERR_AGENT_NOT_RUNNING = 'Agent not running';
30
+ const ERR_AGENT_NOT_FOUND = 'Agent not found';
31
+ const ERR_SWW_AGENT_ENABLING = 'Failed installing agent';
32
+ const ERR_SWW_AGENT_DISABLING = 'Failed uninstalling agent';
33
+ const ERR_SWW_AGENT_UPDATING = 'Failed updating agent';
34
+ const ERR_AGENT_ENABLE = 'Agent disabled: install first';
36
35
  const ERR_AGENT_ADMIN_RIGHTS = 'Command must be run with administrator rights';
37
36
  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';
37
+ const ERR_TUNNEL_ALREADY_EXISTS = 'Tunnel name exists: change or use -f to overwrite';
39
38
  const ERR_FAILED_TO_CONNECT = (host) => `Failed to connect to '${host}'`;
40
39
  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';
40
+ const ERR_SUBDOMAIN_TAKEN = 'Subdomain name unavailable70342556';
41
+ const ERR_TUNNEL_LIMIT_REACHED = 'Tunnels limit reached';
42
+ const ERR_AGENT_LIMIT_REACHED = 'Agents limit reached';
44
43
  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';
44
+ const ERR_TUNNEL_REMOVED = 'Tunnel removed';
45
+ const ERR_FAILED_TO_CONNECT_TO_AGENT = 'Failed connecting to agent';
47
46
  const ERR_NOT_FOUND = 'Not found';
48
47
  const ERR_SWW = 'Something went wrong';
49
48
  const ERR_FETCH_VERSION = 'Failed to fetch version';
@@ -59,20 +58,20 @@ const ERR_CONFIG_CORRUPTED = 'Config file is corrupted';
59
58
  const TXT_AGENT_STOPPED = 'Agent stopped';
60
59
  const TXT_AGENT_STARTED = 'Agent started';
61
60
  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';
61
+ const TXT_AGENT_IS_ENABLED_AND_STARTED = 'Agent is installed & started';
62
+ const TXT_AGENT_IS_ENABLED_AND_STOPPED = 'Agent is installed & stopped';
63
+ const TXT_AGENT_IS_ENABLED_AND_INITIALIZING = 'Agent is installed & initializing';
64
+ const TXT_AGENT_IS_ENABLED_AND_HAVE_TROUBLES = 'Agent is installed [connection issues detected]';
65
+ const TXT_AGENT_IS_DISABLED = 'Agent is not installed';
66
+ const TXT_AGENT_ENABLED = 'Agent installed';
68
67
  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';
68
+ const TXT_AGENT_ALREADY_ENABLED = 'Agent already installed';
69
+ const TXT_AGENT_DISABLED = 'Agent uninstalled';
72
70
  const TXT_TUNNEL_STARTED = (type) => `${type} tunnel started`;
73
71
  const TXT_TUNNEL_STOPPED = 'Tunnel stopped';
74
72
  const TXT_WHITELIST_SAVED = 'Whitelist saved';
75
73
  const TXT_TOKEN_SAVED = 'Token saved';
74
+ const TXT_TOKEN_REMOVED = 'Token cleared';
76
75
  const TXT_TIMEOUT_SAVED = 'Timeout saved';
77
76
  const TXT_REGION_SAVED = 'Region saved';
78
77
  const TXT_TUNNEL_REMOVED = 'Tunnel removed';
@@ -81,31 +80,31 @@ const TXT_TUNNEL_ADDED = 'Tunnel added';
81
80
  const NO_TUNNELS_STARTED = 'No tunnels started';
82
81
  const AGENT_FETCH_RETRY = 'Agent fetch failed. Retrying in 3s...';
83
82
 
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';
83
+ const DESC_COMMAND_CONFIG_ADD_HTTP = 'Add a new HTTP tunnel';
84
+ const DESC_COMMAND_CONFIG_ADD_TCP = 'Add a new TCP tunnel';
85
+ const DESC_COMMAND_CONFIG_ADD_TLS = 'Add a new TLS tunnel';
86
+ const DESC_COMMAND_CONFIG_GET_REGION = 'Get region configuration';
87
+ const DESC_COMMAND_CONFIG_GET_TIMEOUT = 'Get timeout configuration';
88
+ const DESC_COMMAND_CONFIG_GET_TOKEN = 'Get token configuration';
89
+ const DESC_COMMAND_CONFIG_GET_TUNNEL = 'Get tunnel configuration';
90
+ const DESC_COMMAND_CONFIG_GET_TUNNELS = 'Get tunnels configuration';
91
+ const DESC_COMMAND_CONFIG_GET_WHITELIST = 'Get IP access restrictions';
92
+ const DESC_COMMAND_CONFIG_REMOVE_TUNNEL = 'Remove tunnel configuration';
93
+ const DESC_COMMAND_CONFIG_SET_REGION = 'Set region';
94
+ const DESC_COMMAND_CONFIG_SET_TIMEOUT = 'Set timeout';
95
+ const DESC_COMMAND_CONFIG_SET_TOKEN = 'Set token';
96
+ const DESC_COMMAND_CONFIG_SET_WHITELIST = 'Set IP access restrictions';
97
+ const DESC_COMMAND_CONFIG_ADD = 'Add a new HTTP/TCP/TLS tunnel';
98
+ const DESC_COMMAND_CONFIG_GET = 'Get configuration tunnel/token/region/whitelist/timeout';
99
+ const DESC_COMMAND_CONFIG_REMOVE = 'Remove tunnels configuration';
101
100
  const DESC_COMMAND_CONFIG_SET = 'Set configuration token/region/whitelist/timeout';
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';
101
+ const DESC_COMMAND_AGENT_TUNNEL_HTTP = 'Manage agent\'s tunnels';
102
+ const DESC_COMMAND_AGENT_TUNNEL_LIST = 'Manage agent\'s tunnels';
103
+ const DESC_COMMAND_AGENT_TUNNEL_START = 'Manage agent\'s tunnels';
104
+ const DESC_COMMAND_AGENT_TUNNEL_STATUS = 'Manage agent\'s tunnels';
105
+ const DESC_COMMAND_AGENT_TUNNEL_REMOVE = 'Manage agent\'s tunnels';
106
+ const DESC_COMMAND_AGENT_TUNNEL_TCP = 'Manage agent\'s tunnels';
107
+ const DESC_COMMAND_AGENT_TUNNEL_TLS = 'Manage agent\'s tunnels';
109
108
  const DESC_COMMAND_AGENT_UNINSTALL = 'Uninstall bdy service';
110
109
  const DESC_COMMAND_AGENT_INSTALL = 'Install bdy as operating system service on Windows, OS X and Linux systems';
111
110
  const DESC_COMMAND_AGENT_START = 'Starts agent and all tunnels from configuration file';
@@ -123,12 +122,12 @@ const DESC_COMMAND_TCP = 'Starts a tunnel which forwards all TCP traffic on a pu
123
122
  const DESC_COMMAND_TLS = 'Starts a tunnel listening for TLS traffic on port 443 with a specific hostname.';
124
123
  const DESC_PROGRAM = 'Buddy exposes local networked services behinds NATs and firewalls to the public internet over a secure tunnel. Share local websites, build/test webhook consumers, and self-host personal services.';
125
124
 
126
- const TXT_NEW_CLI_DOCKER_VERSION = (version) => `There is a new CLI Docker image version (${version})\n\n`;
127
- const TXT_NEW_CLI_VERSION = (version) => `There is a new CLI version (${version})\n\n`;
128
- const TXT_NEW_AGENT_VERSION = (version) => `Agent needs update. To update it to version ${version} run:\n\`bdy agent update\`\n\n`;
129
- 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`;
130
- const TXT_DISABLING_AGENT = 'Disabling agent...';
131
- const TXT_ENABLING_AGENT = 'Enabling agent...';
125
+ const TXT_NEW_CLI_DOCKER_VERSION = (version) => `New CLI Docker image: ${version}\n\n`;
126
+ const TXT_NEW_CLI_VERSION = (version) => `New CLI version: ${version}\n\n`;
127
+ const TXT_NEW_AGENT_VERSION = (version) => `Agent update required. Update to ${version}:\n\`bdy agent update\`\n\n`;
128
+ const TXT_NEW_CLI_AGENT_VERSION = (version) => `New CLI version (${version}). Update:\n\`bdy agent update\`\n\n`;
129
+ const TXT_DISABLING_AGENT = 'Uninstalling agent...';
130
+ const TXT_ENABLING_AGENT = 'Installing agent...';
132
131
  const TXT_UPDATING_AGENT = 'Updating agent...';
133
132
  const TXT_OPENING_TUNNEL = 'Opening tunnel...';
134
133
 
@@ -145,9 +144,9 @@ const OPTION_DOMAIN = 'provide custom domain';
145
144
  const OPTION_TIMEOUT = 'enforce connection timeout in seconds';
146
145
  const OPTION_TOKEN = 'token to authorize agent';
147
146
  const OPTION_FORCE = 'overwrite tunnel if it already exist';
148
- const OPTION_HTTP_HOST = 'provide custom http host header';
149
- const OPTION_HTTP_AUTH = 'enforce http basic authorization';
150
- const OPTION_HTTP_LOG = 'log http requests';
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';
151
150
  const OPTION_HTTP_VERIFY = 'enforce TLS verify';
152
151
  const OPTION_HTTP_2 = 'enforce HTTP/2';
153
152
  const OPTION_HTTP_COMPRESSION = 'turn on HTTP response compression';
@@ -162,9 +161,9 @@ const OPTION_ID = 'id of the tunnel';
162
161
  const OPTION_AGENT_ID = 'start existing agent';
163
162
  const OPTION_AGENT_START = 'start agent right away';
164
163
  const OPTION_AGENT_TOKEN = 'token to authorize existing agent agent or token to add a new agent';
165
- 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)';
164
+ const OPTION_USER = 'OS user name. Default: root (macOS/Linux), LocalSystem (Windows. Provide as DOMAIN\\USER (use `whoami` to get full username)';
166
165
  const OPTION_PASS = 'password of the user. Only set for Windows';
167
- const OPTION_AGENT_PORT = 'agent api port';
166
+ const OPTION_AGENT_PORT = 'agent API port';
168
167
  const OPTION_AGENT_DEBUG = 'turns on debug mode';
169
168
 
170
169
  const LOG_REGISTERING_AGENT = 'Registering agent...';
@@ -178,10 +177,10 @@ const LOG_AGENT_SYSTEM_DIR = 'Creating agent system directory...';
178
177
  const LOG_AGENT_DOWNLOADING_ARCHIVE = 'Downloading agent archive...';
179
178
  const LOG_AGENT_EXTRACTING_ARCHIVE = 'Extracting agent archive...';
180
179
  const LOG_AGENT_SYSTEM_SERVICE_CONFIG = 'Saving agent system service config...';
181
- const LOG_AGENT_ENABLING_SYSTEM = 'Enabling agent in system...';
180
+ const LOG_AGENT_ENABLING_SYSTEM = 'Installing agent in system...';
182
181
  const LOG_AGENT_STOPPING_SYSTEM = 'Stopping agent in system...';
183
182
  const LOG_AGENT_STARTING_SYSTEM = 'Starting agent in system...';
184
- const LOG_AGENT_ENABLED = 'Agent enabled in system';
183
+ const LOG_AGENT_ENABLED = 'Agent installed in system';
185
184
  const LOG_AGENT_NSSM_DOWNLOADING = 'Agent nssm downloading...';
186
185
  const LOG_AGENT_NSSM_EXTRACTING = 'Agent nssm extracting...';
187
186
  const LOG_AGENT_NSSM_CLEARING = 'Agent nssm clearing...';
@@ -198,32 +197,32 @@ const LOG_REMOVING_TUNNEL = 'Removing tunnel...';
198
197
  const LOG_STARTING_TUNNEL = (id) => `Starting tunnel '${id}'`;
199
198
  const LOG_STOPPING_TUNNEL = (id) => `Stopping tunnel '${id}'`;
200
199
  const LOG_ERROR = 'error';
201
- const LOG_HTTP1_CONNECTION = (ip) => `HTTP1 server will handle tunnel connection from ${ip}`;
202
- const LOG_HTTP1_REQUEST = (method, url) => `HTTP1 server new request ${method} ${url}`;
203
- const LOG_HTTP2_CONNECTION = (ip) => `HTTP2 server will handle tunnel connection from ${ip}`;
204
- const LOG_HTTP2_REQUEST = (method, url) => `HTTP2 server new request ${method} ${url}`;
200
+ const LOG_HTTP1_CONNECTION = (ip) => `HTTP/1.1 server: New tunnel connection from ${ip}`;
201
+ const LOG_HTTP1_REQUEST = (method, url) => `HTTP/1.1 server: New request ${method} ${url}`;
202
+ const LOG_HTTP2_CONNECTION = (ip) => `HTTP/2 server: New tunnel connection from ${ip}`;
203
+ const LOG_HTTP2_REQUEST = (method, url) => `HTTP/2 server: New request ${method} ${url}`;
205
204
  const LOG_DETECTED_STREAM = (type) => `Detected stream '${type}'`;
206
205
  const LOG_WRONG_STREAM = 'Wrong stream type';
207
- const LOG_SSH_CONNECTION = 'New SSH tcp connection';
206
+ const LOG_SSH_CONNECTION = 'New SSH TCP connection';
208
207
  const LOG_REQUEST = (url) => `request: ${url}`;
209
- const LOG_ERROR_STARTING_AGENT_SERVER = 'Error while starting agent api server';
208
+ const LOG_ERROR_STARTING_AGENT_SERVER = 'Error while starting agent API server';
210
209
  const LOG_AGENT_SERVER_STARTED = 'Agent server started';
211
210
  const LOG_AGENT_STARTED = 'Agent started';
212
211
  const LOG_TUNNEL_CONNECTED = (id, port) => `Tunnel '${id}' connected. Forwarding port '${port}'`;
213
212
  const LOG_TUNNEL_FAILED = (id) => `Tunnel '${id}' forwarding failed`;
214
213
  const LOG_TUNNEL_DISCONNECTED = (id) => `Tunnel '${id}' disconnected`;
215
214
  const LOG_TUNNEL_IDENTIFIED = (id, type) => `Tunnel ${id} identified as ${type}`;
216
- const LOG_TUNNEL_HTTP_WRON_AUTH = 'HTTP request wrong basic auth';
217
- const LOG_TUNNEL_HTTP_RATE_LIMIT = 'HTTP request rate limited';
215
+ const LOG_TUNNEL_HTTP_WRON_AUTH = 'HTTP request: HTTP BA failed';
216
+ const LOG_TUNNEL_HTTP_RATE_LIMIT = 'HTTP request: rate limited';
218
217
  const LOG_TUNNEL_HTTP_CIRCUIT_BREAKER_OPEN = 'HTTP request circuit breaker open';
219
218
  const LOG_TUNNEL_HTTP_WRONG_USER_AGENTS = 'HTTP request wrong user-agents';
220
- const LOG_TUNNEL_TCP_STREAM = (id) => `New TCP connection on tunnel '${id}'. Stream to target`;
221
- const LOG_TUNNEL_HTTP1_STREAM = (id) => `New HTTP1 connection on tunnel '${id}'. Handle HTTP1`;
222
- const LOG_TUNNEL_HTTP2_STREAM = (id) => `New HTTP2 connection on tunnel '${id}'. Handle HTTP2`;
223
- const LOG_TUNNEL_TLS_TARGET_STREAM = (id) => `New TLS connection on tunnel '${id}'. Terminated at target. Stream to target`;
224
- const LOG_TUNNEL_TLS_REGION_STREAM = (id) => `New TLS connection on tunnel '${id}'. Terminated at region. Stream to target`;
225
- const LOG_TUNNEL_TLS_AGENT_STREAM = (id) => `New TLS connection on tunnel '${id}'. Terminated at agent. Handle TLS`;
226
- const LOG_TUNNEL_SSH_STREAM = (id) => `New SSH connection on tunnel '${id}'. Stream to localhost`;
219
+ const LOG_TUNNEL_TCP_STREAM = (id) => `New TCP connection on tunnel '${id}' [streamed to target]`;
220
+ const LOG_TUNNEL_HTTP1_STREAM = (id) => `New HTTP/1.1 connection to '${id}'`;
221
+ const LOG_TUNNEL_HTTP2_STREAM = (id) => `New HTTP/2 connection to '${id}'`;
222
+ const LOG_TUNNEL_TLS_TARGET_STREAM = (id) => `New TLS connection to '${id}' [Terminated at target, streamed to target]`;
223
+ const LOG_TUNNEL_TLS_REGION_STREAM = (id) => `New TLS connection to '${id}' [Terminated at region, streamed to target]`;
224
+ const LOG_TUNNEL_TLS_AGENT_STREAM = (id) => `New TLS connection to '${id}' [Terminated at agent]`;
225
+ const LOG_TUNNEL_SSH_STREAM = (id) => `New SSH connection to '${id}' [Streamed to localhost]`;
227
226
 
228
227
  module.exports = {
229
228
  LOG_ERROR_WHILE_REFRESHING_AGENT,
@@ -316,7 +315,7 @@ module.exports = {
316
315
  DESC_COMMAND_AGENT_UNINSTALL,
317
316
  DESC_COMMAND_AGENT_TUNNEL_TLS,
318
317
  DESC_COMMAND_AGENT_TUNNEL_TCP,
319
- DESC_COMMAND_AGENT_TUNNEL_STOP,
318
+ DESC_COMMAND_AGENT_TUNNEL_REMOVE,
320
319
  DESC_COMMAND_AGENT_TUNNEL_STATUS,
321
320
  DESC_COMMAND_AGENT_TUNNEL_START,
322
321
  DESC_COMMAND_AGENT_TUNNEL_LIST,
@@ -364,6 +363,7 @@ module.exports = {
364
363
  TXT_TUNNEL_ADDED,
365
364
  TXT_TIMEOUT_SAVED,
366
365
  TXT_TOKEN_SAVED,
366
+ TXT_TOKEN_REMOVED,
367
367
  TXT_WHITELIST_SAVED,
368
368
  TXT_TUNNEL_STOPPED,
369
369
  TXT_TUNNEL_STARTED,
@@ -371,7 +371,6 @@ module.exports = {
371
371
  TXT_AGENT_UPDATED,
372
372
  TXT_AGENT_ALREADY_ENABLED,
373
373
  TXT_AGENT_DISABLED,
374
- TXT_AGENT_ALREADY_DISABLED,
375
374
  TXT_AGENT_STARTED,
376
375
  TXT_AGENT_RESTARTED,
377
376
  TXT_AGENT_IS_DISABLED,
@@ -405,7 +404,6 @@ module.exports = {
405
404
  ERR_NAME_WITHOUT_ASTERISK,
406
405
  ERR_BA_PASSWORD_NOT_PROVIDED,
407
406
  ERR_BA_LOGIN_NOT_PROVIDED,
408
- ERR_AGENT_DOCKER_NOT_FOUND,
409
407
  ERR_FETCH_VERSION,
410
408
  ERR_TUNNEL_LIMIT_REACHED,
411
409
  ERR_AGENT_LIMIT_REACHED,