mole-proxy
Advanced tools
Comparing version 1.0.8 to 1.0.9
27
index.js
@@ -11,2 +11,13 @@ var argv = process.argv.slice(2); | ||
if (argv[0] == 'server' && !argv[1]) { | ||
argv[1] = '8008'; | ||
} else if (argv[0] != 'server') { | ||
if (/[a-zA-Z0-9\.\-_\:]+/.test(argv[0])) { | ||
var parts = argv[0].split(':'); | ||
argv.splice(0, 1, parts[0], parts[1] || '8008'); | ||
} else { | ||
argv = []; | ||
} | ||
} | ||
if (argv.length == 2 && argv[0] == 'server') { | ||
@@ -28,7 +39,19 @@ if (Math.floor(argv[1]) == argv[1]) { | ||
} else { | ||
var packageInfo = JSON.parse(require('fs').readFileSync(require('path').join(__dirname, 'package.json'))); | ||
console.log('Mole Proxy v' + packageInfo.version + '. Map your local listen port to a remote server.\n'); | ||
console.log('Usage:'); | ||
console.log(' mole-proxy [udp] server <server tunnel port>'); | ||
console.log(' mole-proxy [udp] server [tunnel port]'); | ||
console.log(' or'); | ||
console.log(' mole-proxy [udp] <server> <server tunnel port> <local destination port> [server source port]'); | ||
console.log(' mole-proxy [udp] <server[:tunnel port]> <local port> [remote port]'); | ||
console.log('\n'); | ||
console.log('Server example:'); | ||
console.log(' mole-proxy server'); | ||
console.log('Client example:'); | ||
console.log(' mole-proxy example.com 8080 8211'); | ||
console.log('\n'); | ||
console.log('Default tunnel port is 8008, you may change it by:'); | ||
console.log(' mole-proxy server 8009'); | ||
console.log(' or'); | ||
console.log(' mole-proxy example.com:8009 8080 8211'); | ||
} | ||
{ | ||
"name": "mole-proxy", | ||
"version": "1.0.8", | ||
"version": "1.0.9", | ||
"description": "Proxy listen ports. Go through NAT.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,3 +6,3 @@ var net = require('net'); | ||
exports.createConnection = function (opt) { | ||
return net.connect(opt); | ||
return net.createConnection(opt); | ||
}; | ||
@@ -9,0 +9,0 @@ |
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
22580
650
1