Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introducing a --host option to allow using (n) subdomains #50

Closed
wants to merge 4 commits into from

Conversation

manuelbieh
Copy link

@manuelbieh manuelbieh commented May 10, 2016

Fixes #31

Example usage:
$ node bin/server --port 1234 --host multi.levels.deep.mydomain.com

Client:

$ lt --port 80 --host http://multi.levels.deep.mydomain.com:1234
your url is: http://ypxwyyefij.multi.levels.deep.mydomain.com:1234

Also allows usage of sub-sub[-sub[...]] domains:
$ node bin/server --port 1234 --host levels.deep.mydomain.com

Client:

$ lt --port 80 --host http://levels.deep.mydomain.com --subdomain one.two
your url is: http://one.two.levels.deep.mydomain.com:1234

Possible usecase (my particular case): debugging of "customer specific subdomain webapps" on a developer machine running localtunnel (exampleproject.manuel.tunnelserver.company.org). tunnelserver.company.org would be the tunnel server's url and exampleproject.manuel a custom subdomain pointing to a very specific project on my machine.

Imagine you needed access to a specific team on Slack (teamname.slack.com) on a developer's local machine (teamname.manuelsmachine.slack.com) from outside via localtunnel on a company's dev domain (teamname.manuelsmachine.localtunnel.slack.com). It would be as simple as node bin/server --host localtunnel.slack.com and lt --port 80 --host http://localtunnel.slack.com --subdomain teamname.manuelsmachine

(I'm not working for Slack, just using it as example since everybody knows the pattern behind Slack's URLs)

@manuelbieh manuelbieh changed the title Introducing a --host option to allow using subdomains Introducing a --host option to allow using (n) subdomains May 10, 2016
mamboer added a commit to mamboer/server that referenced this pull request Sep 1, 2016
@mskims
Copy link

mskims commented Jan 17, 2017

i made docker file for this pr.
https://hub.docker.com/r/ohwhos/localtunnel-server/

@zodman
Copy link

zodman commented Mar 22, 2017

im testings and works +1

@zzh8829
Copy link

zzh8829 commented May 16, 2017

is anyone still working on this PR ?

@zodman
Copy link

zodman commented May 16, 2017

the PR works!

@manuelbieh
Copy link
Author

Looks like we're having a conflict here.

@wclr
Copy link

wclr commented Jun 6, 2017

@manuelbieh I think docs need to be added.

@defunctzombie will you merge an publish new version with docker image please?

@arthot
Copy link

arthot commented Jul 12, 2017

@manuelbieh, please, resolve so simple conflict on empty lines, otherwise this PR will stuck for another year 🤦‍♂️

@arthot
Copy link

arthot commented Jul 12, 2017

@manuelbieh, you are 🚀. Resolved in 5 minutes 👍
@defunctzombie, now it's your turn. Please, merge this PR. One year of waiting.. It can close at least 4 issues #31, #51, #13, #40

@manuelbieh
Copy link
Author

manuelbieh commented Jul 12, 2017

I usually respond within 5 minutes or never 😁😉

@wclr wclr mentioned this pull request Jul 13, 2017
@wclr
Copy link

wclr commented Jul 13, 2017

BTW I've made alternative implementation of this feature, some may check if needed #65

@chmduquesne
Copy link

When is this feature going to be integrated?

@taniki
Copy link

taniki commented Nov 24, 2017

Using this PR. I now have a new error when trying to get a tunnel

  localtunnel server listening on port: 3000 +0ms
  localtunnel:server request /?new +1m
[error]	bookrc.js:10 Assignment to constant variable.
TypeError: Assignment to constant variable.
    at maybe_bounce (server.js:59:9)
    at Server.<anonymous> (server.js:330:52)
    at emitTwo (events.js:106:13)
    at Server.emit (events.js:191:7)
    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:546:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)
TypeError: Assignment to constant variable.
    at maybe_bounce (server.js:59:9)
    at Server.<anonymous> (server.js:330:52)
    at emitTwo (events.js:106:13)
    at Server.emit (events.js:191:7)
    at HTTPParser.parserOnIncoming [as onIncoming] (_http_server.js:546:12)
    at HTTPParser.parserOnHeadersComplete (_http_common.js:99:23)

node version : 6.9.1
same with 9.2.0

@wclr
Copy link

wclr commented Nov 24, 2017

@taniki try this one #65

@defunctzombie
Copy link
Contributor

Closing in favor of #65. Will evaluate that PR as a potential enhancement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

10 participants