Task: Allow to force start with custom api key from cli and updated version for http tunne client
This commit is contained in:
parent
2683bd78c0
commit
cf56b920b3
13
client.js
13
client.js
@ -287,6 +287,10 @@ program
|
||||
"keep connection for client and old connection will be closed (override connection)",
|
||||
true
|
||||
)
|
||||
.option(
|
||||
"-k --key <string>",
|
||||
"setting client api key for authentication access"
|
||||
)
|
||||
.option("-a, --access <string>", "access type (FREE)", TOKEN_FREE)
|
||||
.option("-p, --profile <string>", "profile name", PROFILE_DEFAULT)
|
||||
.option("-h, --host <string>", "local host value", "localhost")
|
||||
@ -311,16 +315,13 @@ program
|
||||
}
|
||||
|
||||
if (!config.token) {
|
||||
console.info(`please set token for ${config.server}`);
|
||||
console.info(
|
||||
"if you don't have token yet, please contact to: sombochea@cubetiqs.com"
|
||||
);
|
||||
console.info(`please init or set token for ${config.server}`);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!config.clientId) {
|
||||
if (!config.apiKey) {
|
||||
console.info(`please create client for ${config.server}`);
|
||||
console.info(`please init or create a client for ${config.server}`);
|
||||
} else {
|
||||
config.clientId = config.apiKey;
|
||||
}
|
||||
@ -332,7 +333,7 @@ program
|
||||
options.access = config.access;
|
||||
options.server = config.server;
|
||||
options.clientId = config.clientId;
|
||||
options.apiKey = config.apiKey;
|
||||
options.apiKey = options.key || config.apiKey;
|
||||
|
||||
if (options.suffix === "port" || options.suffix === "true") {
|
||||
options.suffix = `${port}`;
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@cubetiq/hlt",
|
||||
"version": "0.0.6",
|
||||
"version": "0.0.7",
|
||||
"description": "A lightweight http tunnel client using nodejs and socket.io client",
|
||||
"main": "client.js",
|
||||
"bin": {
|
||||
|
Loading…
Reference in New Issue
Block a user