3 Commits

Author SHA1 Message Date
Roman Shtylman
a9b0274ff4 0.1.3 2013-11-14 12:10:02 -05:00
Roman Shtylman
83ecb29eff Merge pull request #26 from EverythingMe/override_localhost
Added the --localhost parameter to tunnel the traffic to other hosts
2013-11-14 09:08:47 -08:00
Omri Bahumi
21df257d16 Added the --local-host parameter to tunnel the traffic to other hosts 2013-11-14 18:06:19 +02:00
3 changed files with 10 additions and 2 deletions

View File

@@ -11,12 +11,17 @@ var argv = require('optimist')
.options('subdomain', {
describe: 'request this subdomain'
})
.options('local-host', {
describe: 'tunnel traffic to this host instead of localhost'
})
.default('local-host', 'localhost')
.describe('port', 'internal http server port')
.argv;
var opt = {
host: argv.host,
port: argv.port,
local_host: argv['local-host'],
subdomain: argv.subdomain,
}

View File

@@ -19,6 +19,9 @@ var request_url = function(params, cb) {
var connect = function(opt) {
var ev = new EventEmitter();
// local host
var local_host = opt.local_host;
// local port
var local_port = opt.port;
@@ -39,7 +42,7 @@ var connect = function(opt) {
};
var local_opt = {
host: 'localhost',
host: local_host,
port: local_port
};

View File

@@ -2,7 +2,7 @@
"author": "Roman Shtylman <shtylman@gmail.com>",
"name": "localtunnel",
"description": "expose localhost to the world",
"version": "0.1.2",
"version": "0.1.3",
"repository": {
"type": "git",
"url": "git://github.com/shtylman/localtunnel.git"