From 62db7f81457724b02acb3522e1ac15d4b5c3a1b0 Mon Sep 17 00:00:00 2001 From: Sambo Chea Date: Fri, 14 Jul 2023 08:31:10 +0700 Subject: [PATCH] Fixed the start port --- CHANGELOG.md | 4 ++++ package.json | 2 +- src/api.ts | 3 ++- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 30bb06c..016fd48 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +### 14/07/2023 (1.0.8) + +- Fixed the start with port unable to start + ### 11/07/2023 (1.0.8) - Support tunnel with host with port diff --git a/package.json b/package.json index dee4c82..f1acd31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@cubetiq/hlt", - "version": "0.1.8", + "version": "0.1.9", "description": "A lightweight http tunnel client using nodejs and socket.io client", "main": "dist/cli.js", "bin": { diff --git a/src/api.ts b/src/api.ts index 5ca4a4e..f4ed47a 100644 --- a/src/api.ts +++ b/src/api.ts @@ -305,7 +305,7 @@ class HttpTunnelClient implements Client { return; } } else { - if (address) { + if (typeof address !== "number" && address && address.includes(":")) { const [host, portStr] = address.split(":"); if (host) { options.host = host; @@ -321,6 +321,7 @@ class HttpTunnelClient implements Client { } } else { options.port = port; + console.log(`default port: ${port} will be forwared`); } }