Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cubetiq/hlt

Package Overview
Dependencies
Maintainers
2
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cubetiq/hlt - npm Package Compare versions

Comparing version 0.1.5 to 0.1.6

dist/api.js

6

CHANGELOG.md

@@ -0,1 +1,7 @@

### 11/07/2023
- Support Client API
- Support Proxy (HTTP/HTTPS) and TCP
- Improvements and Bugs fixed
### 30/11/2022

@@ -2,0 +8,0 @@

27

dist/lib.js

@@ -17,5 +17,28 @@ "use strict";

})();
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.TunnelResponse = exports.TunnelRequest = void 0;
var stream = require("stream");
var stream = __importStar(require("stream"));
var TunnelRequest = /** @class */ (function (_super) {

@@ -79,3 +102,3 @@ __extends(TunnelRequest, _super);

if (duplex) {
// for websocket request: bidirection
// for websocket request: bidirection
var onResponsePipe_1 = function (responseId, data) {

@@ -82,0 +105,0 @@ if (_this.responseId === responseId) {

7

dist/sdk.js

@@ -49,5 +49,8 @@ "use strict";

};
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getTokenFree = void 0;
var axios = require("axios");
var axios_1 = __importDefault(require("axios"));
var getTokenFree = function (baseUrl, data) {

@@ -59,3 +62,3 @@ if (data === void 0) { data = {}; }

url = "".concat(baseUrl, "/__free__/api/get_token");
return [2 /*return*/, axios({
return [2 /*return*/, (0, axios_1.default)({
method: "POST",

@@ -62,0 +65,0 @@ url: url,

"use strict";
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
var desc = Object.getOwnPropertyDescriptor(m, k);
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
desc = { enumerable: true, get: function() { return m[k]; } };
}
Object.defineProperty(o, k2, desc);
}) : (function(o, m, k, k2) {
if (k2 === undefined) k2 = k;
o[k2] = m[k];
}));
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
Object.defineProperty(o, "default", { enumerable: true, value: v });
}) : function(o, v) {
o["default"] = v;
});
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
__setModuleDefault(result, mod);
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.generateUUID = exports.addPrefixOnHttpSchema = void 0;
var crypto = require("crypto");
exports.generateUUID = exports.addPrefixOnHttpSchema = exports.isValidTarget = exports.isValidHost = exports.isValidPort = exports.isValidHostname = exports.isValidIP = exports.isValidUrl = void 0;
var crypto = __importStar(require("crypto"));
var addPrefixOnHttpSchema = function (url, prefixDomain) {

@@ -19,1 +42,40 @@ var prefixSubDomain = prefixDomain;

exports.generateUUID = generateUUID;
var isValidUrl = function (url) {
try {
new URL(url);
return true;
}
catch (err) {
return false;
}
};
exports.isValidUrl = isValidUrl;
var isValidIP = function (ip) {
var regex = new RegExp("^((25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)(\\.|$)){4}$");
return regex.test(ip);
};
exports.isValidIP = isValidIP;
var isValidHostname = function (hostname) {
var regex = new RegExp("^(?:(?:(?:xn--)?[a-z0-9]+(?:-[a-z0-9]+)*\\.?)+(?:(?:[a-z]{2,}\\.)?[a-z]{2,})|localhost)$", "i");
return regex.test(hostname) || (0, exports.isValidIP)(hostname);
};
exports.isValidHostname = isValidHostname;
var isValidPort = function (port) {
return port > 0 && port < 65536;
};
exports.isValidPort = isValidPort;
var isValidHost = function (host) {
var _a = host.split(":"), hostname = _a[0], port = _a[1];
return (0, exports.isValidHostname)(hostname) && (0, exports.isValidPort)(parseInt(port, 10));
};
exports.isValidHost = isValidHost;
var isValidTarget = function (target) {
if ((0, exports.isValidUrl)(target)) {
return true;
}
if ((0, exports.isValidHost)(target)) {
return true;
}
return false;
};
exports.isValidTarget = isValidTarget;
{
"name": "@cubetiq/hlt",
"version": "0.1.5",
"version": "0.1.6",
"description": "A lightweight http tunnel client using nodejs and socket.io client",
"main": "dist/client.js",
"main": "dist/cli.js",
"bin": {

@@ -10,5 +10,6 @@ "hlt": "bin/hlt"

"scripts": {
"start": "ts-node-dev --respawn --transpile-only src/client.ts",
"local": "ts-node-dev --respawn --transpile-only src/client.ts start -p local",
"build": "tsc"
"start": "ts-node-dev --respawn --transpile-only src/cli.ts",
"test": "ts-node-dev --respawn --transpile-only test/test.ts",
"local": "ts-node-dev --respawn --transpile-only src/cli.ts start -p local",
"build": "rimraf dist && tsc"
},

@@ -27,4 +28,6 @@ "repository": {

"axios": "^1.2.0",
"commander": "^9.3.0",
"https-proxy-agent": "^5.0.1",
"commander": "^11.0.0",
"express": "^4.18.2",
"http-proxy-middleware": "^2.0.6",
"https-proxy-agent": "^7.0.0",
"socket.io-client": "^4.5.1"

@@ -36,6 +39,8 @@ },

"devDependencies": {
"@types/node": "^18.0.3",
"@types/express": "^4.17.15",
"@types/node": "^20.0.0",
"rimraf": "^5.0.1",
"ts-node-dev": "^2.0.0",
"typescript": "^4.7.4"
"typescript": "^5.0.0"
}
}
{
"compilerOptions": {
"lib": ["ES2015"],
"target": "es5",
"compilerOptions": {
"lib": ["ES2015"],
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": false,
"outDir": "dist",
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true
}
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": false,
"outDir": "dist",
"forceConsistentCasingInFileNames": true,
"strict": true,
"skipLibCheck": true,
"esModuleInterop": true
},
"exclude": ["node_modules", "dist", "test", "src/**/*.spec.ts"]
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc