Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
Localtunnel: Show localhost to the rest of the world (progrium.com)
135 points by rohshall on July 30, 2012 | hide | past | favorite | 55 comments


The one day I get bored and check Hacker News, localtunnel is again on the front page. I'm really happy people appreciate it and people keep discovering it. I just want to apologize for neglecting it for so long. People continue to use it despite a few bugs that I've never addressed.

When I get back from vacation, I'm going to focus on releasing v2, which has been in the works for a while. It will continue to be a free service supported by me and hopefully someday the community. Twilio is mentioned, but only because I worked for them recently. Their designer also threw together the website design.

I also want to point out that with version 2 coming out, I'd love input on how to cultivate more community involvement and contributions. I want localtunnel to live for as long as people want to use it, but I will probably move on from it much sooner.

Anyway, thanks again!


Thanks for building this. I use this all the time.


"gem install X" never, ever works for me on the first try (on OS X AND on Ubuntu, as someone who rarely does any Ruby hacking). I wish packages like this would include a link to somewhere that helps troubleshoot things when they go wrong.

Last time I used localtunnel I eventually figured out I needed to run "sudo apt-get install ruby1.9.1-dev" first.


I used to be an occasional Ruby user and it was only after I started using it more often that I got the hang of things. I can give you a "pro tip", which is to never, ever use the Ruby provided by your distro, and to always use RVM. Getting RVM running on OS X and Ubuntu should be smooth sailing, and you'll find that installing gems just works after that.

The only caveat is that some gems require compilation of native C extensions, which if you don't regularly compile things on your machine may require you to install lots of extra stuff (especially on the Mac).


The state of affairs with Ruby OS integration is pretty poor.

It's not a problem for me because Ruby is my bread and butter, so of course I have rvm (or rbenv) installed at all times. But as I user I think it's unacceptable to have to do a manual installation just to run extremely simple programs. It'd be nice if the community were more responsive to fixing the problems faced by the package manager maintainers.


IMO, it'd also be nicer if package manager maintainers worked harder to not break the default assumptions of Ruby developers.

All of the RubyGems developers are volunteers—as are most (if not all) of the various package manager maintainers. The way that Debian broke Ruby in the past (I don't know if it still does, but I have heard reports that it's better)…was unconscionable. (This mostly because Debian tried to treat RubyGems like C-based libraries, which are hard to have multiple usable versions of; RubyGems was based on the idea that you might need multiple usable versions of a package around.)


Rather than repos providing out of date Rubies and gems, wouldn't it make sense to solve the conflict between the two approaches in just one place, and make nice reliable RVM packages for everyone to use if they need Ruby?


As a Python user, I think Python is just about equally bad.

If you want a strange Python package or a certain version, you're better off on Debian and Ubuntu just installing pythonbrew to keep a compiled python in your home folder.


Its quite difficult for anyone who is newish to linux to do an RVM installation using the provided instructions: https://rvm.io/rvm/install/ - the instructions are not very clear. They also recommend reading the installation script, which is long and scary: "I recommend you read the installation script yourself. This will give you a chance to understand what it is doing before installing, and allow you to feel more comfortable running it if you do so." ... https://github.com/wayneeseguin/rvm/blob/master/binscripts/r...


Amen. I just guided my manager through the install and only then realised how much of it was muscle memory for me. The script tells you to install XCode 4.1 because it doesn't work with 4.2... but XCode is up to 4.4 now, and I know 4.3 works because that's what I have installed! It also advises you to install "latest stable" but has references to 1.9.2 in several places... it is, overall, a mess.


I ran through installing RVM yesterday on a new Mac and it wasn't a problem - 10.8, XCode 4.4, homebrew (okay, you have to install XCode CLI and Quartz separately), but it ran right through it. Then again, this is one combination that I know to work, I've definitely had it get byzantine with other versions of XCode in the past.


I've found rbenv to be a much easier option with homebrew.


well yeah you need ruby to run a ruby gem?


I had ruby - I was missing the ruby-dev header files.

My original complaint though is that people are using "gem install" as the sole documentation for installing a general purpose command-line tool. I'd rather not even know it's written in Ruby (I just want to install it and use it) - instead, I need deep Ruby knowledge just to get the thing running.


I hate that it's using gem for install, too.


If knowing how to type "yum install ruby-devel" qualifies as "deep Ruby knowledge", I must be some kind of god.


More importantly, apparently in this case you need the ruby dev package to install the relevant gem from source.


Smug reply implies that gems are only for people who develop in ruby.


Smug reply says that gems require things to work, and given that they're usually dependent on some version of ruby then the smug reply is usually right.


It's not generally obvious to non-developer end users that they will (sometimes) need to install the -dev package on their OS. Would be nice if it were. I'm mostly taking issue with the unfriendliness of the comment.


Gems ARE only for people who develop in ruby.


Did you happen to read the article? It has nothing to do with developing in ruby.


There is no article attached to this post. Just the homepage of a small piece of software targeted at developers who are familiar with installing gems.

If YOU read the content that was linked, you'd see there is a very long README targeted at people who aren't Ruby developers.


Strange that you mention this, because it ALWAYS works for me on my Windows machine. Kind of nice to be on the other side of the fence for a change....


It's about the same for Pythonistas, but I think I generally have less trouble with Python packages than Ruby packages.


In case you want to access localhost on a server you're working remotely on, and would rather show localhost to your local machine than the world:

$ ssh -N <user>@<yourserver> -L <localport>/localhost/<serverport>

so if I'm bob at bobsbookwonderland.com, and I run a test server there on its localhost 5000 that I want to access from home, I'd type (from home):

$ ssh -N bob@bobsbookwonderland.com -L 5000/localhost/5000

and then on my local machine I'd just point my web browser to localhost:5000 as if I were running the test server locally.


The right way to do it is:

    $ ssh -N -L <localport>:localhost:<serverport> <user>@<yourserver>
and

    $ ssh -N -L 5000:localhost:5000 bob@bobsbookwonderland.com 

(the : is standard syntax used on platforms, including OSX and PuTTY, and some platforms don't support getopt arguments after the first non-flag argument)


Another useful setting is

    -g      Allows remote hosts to connect to local forwarded ports.
if you want to allow non-local connections.


http://pagekite.net/ is a great alternative (Python based)


Author of PageKite here - funny to see this reposted yet again. :-) In case anyone has any comments/questions/... we're listening.

Also, if you haven't checked out PageKite in a while, the most recent 0.5 release fixes a lot of minor issues the older versions had, it may be worth another look, especially if folks are using Windows or aren't based in "the west" (we recently deployed a relay server in Asia, in addition to our American and European relays).


FYI: In Firefox 17 on Snow Leopard there's a "skip to navigation" link way to the right (like 10000px or so) that I can scroll sideways to on your homepage. I only noticed because I'm using a trackpad. :D


Thanks for pointing that out! Sounds like a bug.


I just opened the two pages in rapid sucession (Localtunnel -> Pagekite) and was surprised by how different they are. wink


PageKite is not a localtunnel clone, it is a much bigger concept. Otherwise I wouldn't have founded a company around it.

It just happens that the use case for web developers overlaps and that is what folks seem to care about around here. :-)


How much bigger?


http://pagekite.net/wiki/Floss/FreedomAndPrivacy/ is what motivates me - PageKite is an attempt to bootstrap a peer-to-peer web where IP addresses don't matter anymore and servers can run literally anywhere, so people can actually self-host content at home without learning all about IP addresses, routers, firewalls, DNS, SSL, ...

I don't know how much bigger that is than your vision, since I can only guess what your vision is. :-) I can guess based on your design, that until now you haven't cared much about people using localtunnel for anything except dev testing.


This was a total surprise! Interesting.


Also, may as well publicly repeat my invitation to have a chat about standardizing a protocol around this kind of thing. You're rewriting everything anyway... bre at pagekite dot net. :-)


Yes! I forgot all about that. Do you have your current protocol documented? I can document what I was going with and then we can go from there.


It needs updating for my flow control and on-line reconfiguration enhancements, but this is what I have got documented at the moment: https://pagekite.net/wiki/Floss/PageKiteProtocol/

If I were starting from scratch today, I'd base off websockets instead of the HTTP chunked encoding as I did, but other than that I have been very happy with it.


Cool. That's not far off from what I'm doing, plus I'm already using WebSockets. :)


Mail me! :-)


great service, although it has been posted before.

The popular alternative was https://showoff.io but this is a payed service. I believe local tunnel is free because it is sponsored by twilio.

I also recommend http://xip.io for sharing within the same network.


http://proxylocal.com does the same also and the code is open-sourced


Here's one that's shell-based: http://i8a.be/


Very, very nice. Did you write it?


Nope, but a friend did.


Could this be used to tunnel something other than HTTP?


I don't think Localtunnel can, but PageKite will carry any TCP stream as long as the client knows how to prefix its request with an HTTP CONNECT preamble. This has mostly proven popular for remote administration via. SSH, since most SSH clients can easily be configured to take advantage of this: http://pagekite.net/wiki/Howto/SshOverPageKite/

We are also quite open to the idea of supporting other protocols, but it turns out relatively few Internet protocols are amenable to "name based virtual routing" (the same thing as name based virtual hosting, except routing connection streams by name instead of serving local content).


That's pretty neat. When I need to make a firewalled machine SSHable I typically set up an 'ssh -R' reverse tunnel to a VPS, and then do a two-step connect (ssh to the VPS, ssh to localhost through the tunnel). PageKite seems like it might be a more convenient way to get that up and running.


Obviously, I am biased, but I use this all the time.

It's just so nice to be able to use ssh and rsync and git and all the other standard tools to interact with mobile and virtual devices, no matter what kind of network connection they have. The .deb/.rpm packages just make this feature part of the OS as far as I am concerned.



What's the difference between this and opening a port in your router?


I think this is targeted at users who don't have the ability to forward ports on their routers.


[deleted]


This service exposes your local port to the internet without the need to forward ports (which could get hairy quickly if you're behind multiple NAT layers), I don't see how it's related to serving directory contents through inbuilt python web server that you mention.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: