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 +1 -1
- package/src/command/agent/tunnel/{stop.js → remove.js} +5 -5
- package/src/command/agent/tunnel.js +2 -2
- package/src/command/agent/uninstall.js +1 -1
- package/src/command/config/set/token.js +3 -2
- package/src/output/noninteractive/config/tunnel.js +0 -1
- package/src/texts.js +98 -100
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
const Output = require('../../../output.js');
|
|
2
2
|
const {
|
|
3
|
-
|
|
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
|
|
13
|
-
|
|
14
|
-
|
|
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 =
|
|
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
|
|
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(
|
|
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('
|
|
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 = '
|
|
3
|
-
const ERR_TARGET_IS_NOT_VALID = (target) => `Target '${target}'
|
|
4
|
-
const ERR_TYPE_IS_NOT_VALID = (type) => `Type '${type}'
|
|
5
|
-
const ERR_TIMEOUT_IS_NOT_VALID = (timeout) => `Timeout '${timeout}'
|
|
6
|
-
const ERR_TERMINATE_IS_NOT_VALID = (terminate) => `Terminate '${terminate}'
|
|
7
|
-
const ERR_SUBDOMAIN_IS_NOT_VALID = (subdomain) => `Subdomain '${subdomain}'
|
|
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}'
|
|
13
|
-
const ERR_PORT_IS_NOT_VALID = (port) => `Port '${port}'
|
|
14
|
-
const ERR_NAME_WITHOUT_ASTERISK = 'Name
|
|
15
|
-
const ERR_WRONG_KEY_CERT = '
|
|
16
|
-
const ERR_WRONG_CA = (path) => `TLS CA certificate '${path}'
|
|
17
|
-
const ERR_CA_PATH_IS_NOT_VALID = (path) => `
|
|
18
|
-
const ERR_KEY_PATH_IS_NOT_VALID = (path) => `
|
|
19
|
-
const ERR_CERT_PATH_IS_NOT_VALID = (path) => `
|
|
20
|
-
const ERR_DOMAIN_IS_NOT_VALID = (domain) => `Domain '${domain}'
|
|
21
|
-
const ERR_CB_THRESHOLD_IS_NOT_VALID = (val) => `Circuit breaker threshold '${val}'
|
|
22
|
-
const ERR_BA_PASSWORD_NOT_PROVIDED = '
|
|
23
|
-
const ERR_BA_LOGIN_NOT_PROVIDED = '
|
|
24
|
-
const ERR_BA_IS_NOT_VALID = (auth) => `
|
|
25
|
-
const ERR_USER_AGENT_IS_NOT_VALID = (ua) => `User-Agent '${ua}'
|
|
26
|
-
const ERR_WHITELIST_IS_NOT_VALID = (wh) => `
|
|
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
|
|
29
|
-
const ERR_AGENT_NOT_RUNNING = 'Agent
|
|
30
|
-
const ERR_AGENT_NOT_FOUND = 'Agent
|
|
31
|
-
const
|
|
32
|
-
const
|
|
33
|
-
const
|
|
34
|
-
const
|
|
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
|
|
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
|
|
42
|
-
const ERR_TUNNEL_LIMIT_REACHED = '
|
|
43
|
-
const ERR_AGENT_LIMIT_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
|
|
46
|
-
const ERR_FAILED_TO_CONNECT_TO_AGENT = 'Failed
|
|
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
|
|
63
|
-
const TXT_AGENT_IS_ENABLED_AND_STOPPED = 'Agent is
|
|
64
|
-
const TXT_AGENT_IS_ENABLED_AND_INITIALIZING = 'Agent is
|
|
65
|
-
const TXT_AGENT_IS_ENABLED_AND_HAVE_TROUBLES = 'Agent is
|
|
66
|
-
const TXT_AGENT_IS_DISABLED = 'Agent is
|
|
67
|
-
const TXT_AGENT_ENABLED = 'Agent
|
|
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
|
|
70
|
-
const TXT_AGENT_DISABLED = 'Agent
|
|
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 = '
|
|
85
|
-
const DESC_COMMAND_CONFIG_ADD_TCP = '
|
|
86
|
-
const DESC_COMMAND_CONFIG_ADD_TLS = '
|
|
87
|
-
const DESC_COMMAND_CONFIG_GET_REGION = '
|
|
88
|
-
const DESC_COMMAND_CONFIG_GET_TIMEOUT = '
|
|
89
|
-
const DESC_COMMAND_CONFIG_GET_TOKEN = '
|
|
90
|
-
const DESC_COMMAND_CONFIG_GET_TUNNEL = '
|
|
91
|
-
const DESC_COMMAND_CONFIG_GET_TUNNELS = '
|
|
92
|
-
const DESC_COMMAND_CONFIG_GET_WHITELIST = '
|
|
93
|
-
const DESC_COMMAND_CONFIG_REMOVE_TUNNEL = '
|
|
94
|
-
const DESC_COMMAND_CONFIG_SET_REGION = '
|
|
95
|
-
const DESC_COMMAND_CONFIG_SET_TIMEOUT = '
|
|
96
|
-
const DESC_COMMAND_CONFIG_SET_TOKEN = '
|
|
97
|
-
const DESC_COMMAND_CONFIG_SET_WHITELIST = '
|
|
98
|
-
const DESC_COMMAND_CONFIG_ADD = '
|
|
99
|
-
const DESC_COMMAND_CONFIG_GET = '
|
|
100
|
-
const DESC_COMMAND_CONFIG_REMOVE = '
|
|
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 = '
|
|
103
|
-
const DESC_COMMAND_AGENT_TUNNEL_LIST = '
|
|
104
|
-
const DESC_COMMAND_AGENT_TUNNEL_START = '
|
|
105
|
-
const DESC_COMMAND_AGENT_TUNNEL_STATUS = '
|
|
106
|
-
const
|
|
107
|
-
const DESC_COMMAND_AGENT_TUNNEL_TCP = '
|
|
108
|
-
const DESC_COMMAND_AGENT_TUNNEL_TLS = '
|
|
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) => `
|
|
127
|
-
const TXT_NEW_CLI_VERSION = (version) => `
|
|
128
|
-
const TXT_NEW_AGENT_VERSION = (version) => `Agent
|
|
129
|
-
const TXT_NEW_CLI_AGENT_VERSION = (version) => `
|
|
130
|
-
const TXT_DISABLING_AGENT = '
|
|
131
|
-
const TXT_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
|
|
149
|
-
const OPTION_HTTP_AUTH = 'enforce
|
|
150
|
-
const OPTION_HTTP_LOG = 'log
|
|
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 = '
|
|
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
|
|
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 = '
|
|
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
|
|
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) => `
|
|
202
|
-
const LOG_HTTP1_REQUEST = (method, url) => `
|
|
203
|
-
const LOG_HTTP2_CONNECTION = (ip) => `
|
|
204
|
-
const LOG_HTTP2_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
|
|
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
|
|
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
|
|
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}'
|
|
221
|
-
const LOG_TUNNEL_HTTP1_STREAM = (id) => `New
|
|
222
|
-
const LOG_TUNNEL_HTTP2_STREAM = (id) => `New
|
|
223
|
-
const LOG_TUNNEL_TLS_TARGET_STREAM = (id) => `New TLS connection
|
|
224
|
-
const LOG_TUNNEL_TLS_REGION_STREAM = (id) => `New TLS connection
|
|
225
|
-
const LOG_TUNNEL_TLS_AGENT_STREAM = (id) => `New TLS connection
|
|
226
|
-
const LOG_TUNNEL_SSH_STREAM = (id) => `New SSH connection
|
|
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
|
-
|
|
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,
|