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

tunnelmole

Package Overview
Dependencies
Maintainers
1
Versions
81
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tunnelmole - npm Package Compare versions

Comparing version 2.0.13 to 2.0.14

dist/jest.config.d.ts

2

dist/bin/tunnelmole.js

@@ -7,3 +7,3 @@ #!/usr/bin/env node

import dispatchCommand from '../src/cli/dispatch-command.js';
const VERSION = '2.0.13';
const VERSION = '2.0.14';
async function run() {

@@ -10,0 +10,0 @@ program

@@ -0,1 +1,2 @@

import { eventHandler, URL_ASSIGNED } from '../events/event-handler.js';
export default async function hostnameAssigned(message, websocket, options) {

@@ -6,5 +7,8 @@ const port = options.port;

}
console.info("http://" + message.hostname + " is forwarding to localhost:" + port);
console.info("https://" + message.hostname + " is forwarding to localhost:" + port);
const httpUrl = `http://${message.hostname}`;
const httpsUrl = `https://${message.hostname}`;
console.info(`${httpUrl} is forwarding to localhost:${port}`);
console.info(`${httpsUrl} is forwarding to localhost:${port}`);
eventHandler.emit(URL_ASSIGNED, httpsUrl);
}
//# sourceMappingURL=hostname-assigned.js.map
import { Options } from './options.js';
export default function tunnelmole(options: Options): Promise<void>;
export default function tunnelmole(options: Options): Promise<string>;

@@ -10,2 +10,3 @@ import config from '../config.js';

import { initStorage } from './node-persist/storage.js';
import { eventHandler, URL_ASSIGNED } from './events/event-handler.js';
export default async function tunnelmole(options) {

@@ -78,3 +79,9 @@ await initStorage();

});
// Listen for the URL assigned event and return it
return new Promise((resolve, reject) => {
eventHandler.on(URL_ASSIGNED, (url) => {
resolve(url);
});
});
}
//# sourceMappingURL=tunnelmole.js.map
{
"name": "tunnelmole",
"version": "2.0.13",
"version": "2.0.14",
"description": "Tunnelmole, an open source ngrok alternative",

@@ -34,3 +34,4 @@ "main": "dist/src/index.js",

"watch": "tsc -p ./ -w",
"start": "npm run watch & nodemon dist/src/tunnelmole.js 3000"
"start": "npm run watch & nodemon dist/src/tunnelmole.js 3000",
"test": "npm run build && node --experimental-vm-modules node_modules/jest/bin/jest --forceExit"
},

@@ -47,3 +48,3 @@ "bin": {

"@types/is-number": "^7.0.3",
"@types/node": "^13.13.5",
"@types/jest": "^29.5.0",
"@types/node-fetch": "^2.5.7",

@@ -59,2 +60,3 @@ "@types/node-localstorage": "^1.3.0",

"is-number": "^7.0.0",
"multer": "^1.4.5-lts.1",
"nanoid": "^3.1.5",

@@ -68,3 +70,10 @@ "node-fetch": "^2.6.0",

"ws": "^7.2.5"
},
"devDependencies": {
"@types/express": "^4.17.17",
"@types/multer": "^1.4.7",
"@types/node": "^18.15.6",
"express": "^4.18.2",
"jest": "^29.5.0"
}
}
import HostnameAssignedMessage from '../messages/hostname-assigned-message.js';
import HostipWebSocket from '../websocket/host-ip-websocket.js';
import { Options } from '../options.js';
import { eventHandler, URL_ASSIGNED } from '../events/event-handler.js';

@@ -12,4 +13,8 @@ export default async function hostnameAssigned(message: HostnameAssignedMessage, websocket: HostipWebSocket, options: Options) {

console.info("http://" + message.hostname + " is forwarding to localhost:" + port);
console.info("https://" + message.hostname + " is forwarding to localhost:" + port);
const httpUrl = `http://${message.hostname}`;
const httpsUrl = `https://${message.hostname}`;
console.info(`${httpUrl} is forwarding to localhost:${port}`);
console.info(`${httpsUrl} is forwarding to localhost:${port}`);
eventHandler.emit(URL_ASSIGNED, httpsUrl);
}

@@ -12,4 +12,5 @@ import config from '../config.js';

import { initStorage } from './node-persist/storage.js';
import { eventHandler, URL_ASSIGNED } from './events/event-handler.js';
export default async function tunnelmole(options : Options)
export default async function tunnelmole(options : Options): Promise<string>
{

@@ -99,2 +100,9 @@ await initStorage();

});
// Listen for the URL assigned event and return it
return new Promise((resolve, reject) => {
eventHandler.on(URL_ASSIGNED, (url: string) => {
resolve(url);
})
});
}

Sorry, the diff of this file is not supported yet

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