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

don't u see this? http://stackoverflow.com/questions/10590506/how-to-run-localtunnel-v2-properly #50

Closed
mobeyond opened this issue May 20, 2012 · 4 comments

Comments

@mobeyond
Copy link

I'm using localtunnel v1. But I found that v2 allows you to customize the subdomain, and I need this feature.

I followed the tutorial described in the README from the repository, but it confused me in several parts and, in the end, it did not work.

First step is to run some web-app: checked, on port no. 8000.

Then, it says something about hostnames:

Localtunnel does some stuff with the hostname, so you want to set up two hostnames. One for localtunnel registration, one for your localtunnel. Normally it expects a wildcard, but we'll just hardcode a hostname for this example tunnel.

example.localtunnel.local -> 127.0.0.1
localtunnel.local -> 127.0.0.1

You can do this in /etc/hosts or use that fancy ghost utility.

I've got lost here, but still I edited my /etc/hosts:

127.0.0.1 localhost
127.0.1.1 my-pc-name
127.0.0.1 example.localtunnel.local
127.0.0.1 localtunnel.local
Next step...

Now you can start the server. It's based on a configuration file in the config directory. You can make your own, but this one is configured to run the server on port 9999 and expects the hostname localtunnel.local

ginkgo config/default.conf.py

Which one? Anyway... I created myconfig.conf.py based on the files in localtunnel repo's dir /deploy:

port = 9999
hostname = 'localtunnel.local'
service = 'localtunnel.server.TunnelBroker'
But, when I run:

lt --broker 127.0.0.1:9999 --name example 8000
I got:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/greenlet.py", line 390, in run
result = self._run(_self.args, *_self.kwargs)
File "/usr/local/lib/python2.7/dist-packages/localtunnel/client.py", line 53, in listen
msg = self.ws.receive(msg_obj=True)
TypeError: receive() got an unexpected keyword argument 'msg_obj'
<Greenlet at 0xb6e0db1cL: <bound method TunnelClient.listen of <localtunnel.client.TunnelClient object at 0xb6def52c>>> failed with TypeError
And in the ginkgo process:

Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/gevent/pywsgi.py", line 438, in handle_one_response
self.run_application()
File "/usr/local/lib/python2.7/dist-packages/ws4py/server/geventserver.py", line 85, in run_application
self.result = self.application(self.environ, start_response_for_upgrade)
File "/usr/local/lib/python2.7/dist-packages/ws4py/server/wsgi/middleware.py", line 131, in call
environ.copy()))
TypeError: handle_websocket() takes exactly 3 arguments (2 given)
: Failed to handle request:
request = GET /t/example HTTP/1.1 from ('127.0.0.1', 35907)
application = <ws4py.server.wsgi.middleware.WebSocketUpgradeMiddleware object at 0x95bc2ac>

127.0.0.1 - - [2012-05-14 17:18:18] "GET /t/example HTTP/1.1" 101 162 0.000933
And, obviously, http://example.localtunnel.local:9999 does not work.

How to fix this? And where I have to modify to change the final subdomain?

@progrium
Copy link
Owner

I don't understand. Are you copying what was posted on stackoverflow? Did you post it on stackoverflow?

@mobeyond
Copy link
Author

Yes, copied from stackoverflow, and failed in the same way here.

@jjmaestro
Copy link

Me too, BTW. Just tried following the instructions in the README to no avail. Will try googling more stuff and hopefully will get this to work, eventually.

@progrium
Copy link
Owner

progrium commented Dec 1, 2012

The latest version should work pretty straightforwardly. See the latest README for details.

@progrium progrium closed this as completed Dec 1, 2012
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

3 participants