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

Can't make it work #21

Closed
vvo opened this issue Feb 26, 2015 · 26 comments
Closed

Can't make it work #21

vvo opened this issue Feb 26, 2015 · 26 comments

Comments

@vvo
Copy link

vvo commented Feb 26, 2015

Hi, here's what I did:

  • setup *.localtunnel.function.fr CNAME function.fr.
  • ping localtunnel.function.fr works
  • ping dsadsa.localtunnel.function.fr works
  • using lt --host http://localtunnel.function.fr --port 8080 fails

It fails because maybe_bounce() does not find any client and so return true; and respond 502 to client.

I wonder how this could work, I know it does, but can you help on this? Everything is up and running if you want to test.

Also, I am setting this up because I get "Not running" errors most of the time while testing with zuul/saucelabs.

@vvo vvo changed the title Cannot make it work Can't make it work Feb 26, 2015
@vvo
Copy link
Author

vvo commented Feb 26, 2015

I removed the last comment, not relevant. I only really want to make localtunnel-server work.. Can you help @defunctzombie?

@defunctzombie
Copy link
Contributor

How does ping dsadsa.localtunnel.function.fr works work if no tunnel has yet been established?

@vvo
Copy link
Author

vvo commented Feb 26, 2015

Because there's a wildcard DNS set on *.function.fr.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

Maybe we can chat on gitte quickly to solve this.

@defunctzombie
Copy link
Contributor

Sure. Link me.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

Reading the code: https://github.com/defunctzombie/localtunnel-server/blob/master/server.js#L28

When doing a requets, it goes to maybe_bounce(), I have a hostname, I have a subdomain (localtunnel.function.fr is a subdomain), returns false.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

AH! I know, is localtunnel compatible with being served on a subdomain? This is the case: I am trying to use --lt localtunnel.function.fr, it may break?

@defunctzombie
Copy link
Contributor

I think as long as the server code around identifying the "client id" (subdomain) is correct it should work. That code (using the module to do that) might be wrong or returning too much of the subdomain.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

https://gitter.im/defunctzombie/localtunnel-server But you have to create it.

@defunctzombie
Copy link
Contributor

I suspect it is returning everything before function.fr instead of just the stuff before the first dot.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

So the strategy is:

if no hostname return false (go to localtunnel app)
if no subdomain (clientID) then return false, but in my case, it's returning "localtunnel"

@vvo
Copy link
Author

vvo commented Feb 26, 2015

I will try to host localtunnel on a top level TLD, it should work then

@defunctzombie
Copy link
Contributor

Yea. I think the code could be made to handle this better. It may be that auto-detecting the "base domain" part is not a great way to do it and we can just accept an ENV var for the basename.

@defunctzombie
Copy link
Contributor

Yes, as a top level domain it should work.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

So tried the toplevel, now it almost work:

> lt --host http://localtunnel.eu --port 8080
your url is: http://pgpnimhrzm.localtunnel.eu

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: connection refused: localtunnel.eu:46831 (check your firewall settings)
    at Socket.<anonymous> (/home/vvo/.nvm/v0.10.36/lib/node_modules/localtunnel/client.js:84:32)
    at Socket.emit (events.js:95:17)
    at net.js:441:14
    at process._tickCallback (node.js:442:13)

@vvo
Copy link
Author

vvo commented Feb 26, 2015

My server seems to not have any specific iptables rule set, strange

@defunctzombie
Copy link
Contributor

Make sure your local network is also not doing anything funky. Sometimes
outbound connections on high ports are blocked to protect against malware.

On Thursday, February 26, 2015, Vincent Voyer notifications@github.com
wrote:

My server seems to not have any specific iptables rule set, strange


Reply to this email directly or view it on GitHub
#21 (comment)
.

@vvo
Copy link
Author

vvo commented Feb 26, 2015

Sometimes it just works and I get a url but then going to the url, it says "no active client.."

@vvo
Copy link
Author

vvo commented Feb 26, 2015

I should note, using localtunnel.me always works

@vvo
Copy link
Author

vvo commented Feb 26, 2015

http://localtunnel.eu/ app is showing, at least something works :D

@vvo
Copy link
Author

vvo commented Feb 26, 2015

rebooting, because, well..

@vvo
Copy link
Author

vvo commented Feb 26, 2015

now it works (sometimes), but all I can get is "localtunnel error: no active client for 'xxxxx'", omg

@vvo
Copy link
Author

vvo commented Feb 26, 2015

specifying a subdomain will always work,untill I shutdown/restart the server and try to reuse the same domain, then it fails with connection refused, what is different from my server from yours localtunnel.me. that's magic

@vvo
Copy link
Author

vvo commented Feb 26, 2015

mhh might be a DNS problem, seems like *.localtunnel.eu does not resolves to the good IP..

@vvo
Copy link
Author

vvo commented Feb 26, 2015

Ok now it works but I still have the sort of caching issue that when restarting the localtunnel server, it will fail from the client side with "connection refused".

Maybe DNS configuration/caching involved or some unclosed connection somewhere

@vvo
Copy link
Author

vvo commented Feb 26, 2015

Ok I think Ill use sauce connect for my needs, thanks for help

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

No branches or pull requests

2 participants