mirror of
https://github.com/bitinflow/localtunnel.git
synced 2026-03-15 06:25:55 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a9b0274ff4 | ||
|
|
83ecb29eff | ||
|
|
21df257d16 |
@@ -11,12 +11,17 @@ var argv = require('optimist')
|
|||||||
.options('subdomain', {
|
.options('subdomain', {
|
||||||
describe: 'request this 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')
|
.describe('port', 'internal http server port')
|
||||||
.argv;
|
.argv;
|
||||||
|
|
||||||
var opt = {
|
var opt = {
|
||||||
host: argv.host,
|
host: argv.host,
|
||||||
port: argv.port,
|
port: argv.port,
|
||||||
|
local_host: argv['local-host'],
|
||||||
subdomain: argv.subdomain,
|
subdomain: argv.subdomain,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,9 @@ var request_url = function(params, cb) {
|
|||||||
var connect = function(opt) {
|
var connect = function(opt) {
|
||||||
var ev = new EventEmitter();
|
var ev = new EventEmitter();
|
||||||
|
|
||||||
|
// local host
|
||||||
|
var local_host = opt.local_host;
|
||||||
|
|
||||||
// local port
|
// local port
|
||||||
var local_port = opt.port;
|
var local_port = opt.port;
|
||||||
|
|
||||||
@@ -39,7 +42,7 @@ var connect = function(opt) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
var local_opt = {
|
var local_opt = {
|
||||||
host: 'localhost',
|
host: local_host,
|
||||||
port: local_port
|
port: local_port
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"author": "Roman Shtylman <shtylman@gmail.com>",
|
"author": "Roman Shtylman <shtylman@gmail.com>",
|
||||||
"name": "localtunnel",
|
"name": "localtunnel",
|
||||||
"description": "expose localhost to the world",
|
"description": "expose localhost to the world",
|
||||||
"version": "0.1.2",
|
"version": "0.1.3",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "git://github.com/shtylman/localtunnel.git"
|
"url": "git://github.com/shtylman/localtunnel.git"
|
||||||
|
|||||||
Reference in New Issue
Block a user