19 Commits

Author SHA1 Message Date
Roman Shtylman
8efcb3a294 v1.8.2 2016-11-17 22:31:06 -08:00
Roman Shtylman
b9c1901d60 fix host header transform to support Host and host header 2016-11-17 22:28:34 -08:00
Roman Shtylman
edc182125f update request dep to 2.78 2016-11-17 22:27:57 -08:00
Sigve Sebastian Farstad
81c28d4d68 Fix typo in README.md (#143) 2016-09-06 06:58:25 -07:00
Roman Shtylman
9a1d48764a Merge pull request #113 from CircleCode/patch-1
[README] update the link to localtunnel server
2016-03-11 07:51:05 -08:00
Matthieu Codron
371db2870a [README] update the link to localtunnel server 2016-03-11 13:08:31 +01:00
Roman Shtylman
4ae493ae44 v1.8.1 2016-01-20 13:32:02 -08:00
Roman Shtylman
f487effe3a update History 2016-01-20 13:31:46 -08:00
Roman Shtylman
333af2b08f Merge pull request #108 from joshuaxls/master
Fix bug w/ HeaderHostTransformer and binary data
2016-01-20 13:29:50 -08:00
Joshua Slayton
b32041d8aa fix unnecessary binary->string conversion 2016-01-20 13:11:40 -08:00
Roman Shtylman
649de1b840 Merge pull request #107 from TooTallNate/patch-1
README: add missing back tick
2016-01-09 07:42:54 -08:00
Nathan Rajlich
f791217756 README: add missing back tick 2016-01-08 15:58:02 -08:00
Roman Shtylman
cce9d1490a update travis to node 4 and fix travis badge 2015-11-04 20:43:17 -08:00
Roman Shtylman
86cd2d3c58 v1.8.0 2015-11-04 08:04:54 -08:00
Roman Shtylman
d70c743014 update history 2015-11-04 08:04:29 -08:00
Roman Shtylman
4940043378 Merge pull request #102 from aronwoost/patch-01
Emit socket errors, so they can be handled
2015-11-04 07:54:45 -08:00
Aron Woost
b4a22bff64 Re-emit socket error 2015-11-04 12:04:07 +01:00
Roman Shtylman
176ec0479d Merge pull request #92 from cbas/master
Bumped deps to fix upstream SPDX license issues
2015-11-03 16:13:30 -08:00
Sebastiaan Deckers
fe316de3e0 Bumped deps to fix upstream SPDX license issues 2015-11-04 08:10:18 +08:00
6 changed files with 32 additions and 11 deletions

View File

@@ -1,3 +1,4 @@
language: node_js language: node_js
node_js: node_js:
- "0.10" - "4"
- "6"

View File

@@ -1,3 +1,16 @@
# 1.8.2 (2016-11-17)
* fix host header transform
* update request dependency
# 1.8.1 (2016-01-20)
* fix bug w/ HostHeaderTransformer and binary data
# 1.8.0 (2015-11-04)
* pass socket errors up to top level
# 1.7.0 (2015-07-22) # 1.7.0 (2015-07-22)
* add short arg options * add short arg options

View File

@@ -1,4 +1,6 @@
# localtunnel [![Build Status](https://travis-ci.org/defunctzombie/localtunnel.png?branch=master)](https://travis-ci.org/defunctzombie/localtunnel) # # localtunnel
[![Build Status](https://travis-ci.org/localtunnel/localtunnel.svg?branch=master)](https://travis-ci.org/localtunnel/localtunnel)
localtunnel exposes your localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes. localtunnel exposes your localhost to the world for easy testing and sharing! No need to mess with DNS or deploy just to have others test out your changes.
@@ -69,7 +71,7 @@ The `tunnel` instance returned to your callback emits the following events
|error|err|fires when an error happens on the tunnel| |error|err|fires when an error happens on the tunnel|
|close||fires when the tunnel has closed| |close||fires when the tunnel has closed|
The `tunnel instance has the following methods The `tunnel` instance has the following methods
|method|args|description| |method|args|description|
|----|----|----| |----|----|----|
@@ -83,7 +85,7 @@ Clients in other languages
## server ## ## server ##
See defunctzombie/localtunnel-server for details on the server that powers localtunnel. See [localtunnel/server](//github.com/localtunnel/server) for details on the server that powers localtunnel.
## License ## ## License ##
MIT MIT

View File

@@ -19,12 +19,12 @@ util.inherits(HeaderHostTransformer, Transform);
HeaderHostTransformer.prototype._transform = function (chunk, enc, cb) { HeaderHostTransformer.prototype._transform = function (chunk, enc, cb) {
var self = this; var self = this;
chunk = chunk.toString();
// after replacing the first instance of the Host header // after replacing the first instance of the Host header
// we just become a regular passthrough // we just become a regular passthrough
if (!self.replaced) { if (!self.replaced) {
self.push(chunk.replace(/(\r\nHost: )\S+/, function(match, $1) { chunk = chunk.toString();
self.push(chunk.replace(/(\r\n[Hh]ost: )\S+/, function(match, $1) {
self.replaced = true; self.replaced = true;
return $1 + self.host; return $1 + self.host;
})); }));

View File

@@ -88,6 +88,11 @@ Tunnel.prototype._establish = function(info) {
self.emit('url', info.url); self.emit('url', info.url);
}); });
// re-emit socket error
tunnels.on('error', function(err) {
self.emit('error', err);
});
var tunnel_count = 0; var tunnel_count = 0;
// track open count // track open count

View File

@@ -2,16 +2,16 @@
"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": "1.7.0", "version": "1.8.2",
"license": "MIT", "license": "MIT",
"repository": { "repository": {
"type": "git", "type": "git",
"url": "git://github.com/shtylman/localtunnel.git" "url": "git://github.com/localtunnel/localtunnel.git"
}, },
"dependencies": { "dependencies": {
"request": "2.11.4", "request": "2.78.0",
"yargs": "3.15.0", "yargs": "3.29.0",
"debug": "0.7.4", "debug": "2.2.0",
"openurl": "1.1.0" "openurl": "1.1.0"
}, },
"devDependencies": { "devDependencies": {