[HN Gopher] Tunnelmole, an ngrok alternative (open source)
       ___________________________________________________________________
        
       Tunnelmole, an ngrok alternative (open source)
        
       Author : aussieguy1234
       Score  : 76 points
       Date   : 2024-03-19 11:46 UTC (2 days ago)
        
 (HTM) web link (softwareengineeringstandard.com)
 (TXT) w3m dump (softwareengineeringstandard.com)
        
       | vishalontheline wrote:
       | Also, Local Tunnel: https://localtunnel.github.io/www/
        
         | aussieguy1234 wrote:
         | I tried to test this out. But got blocked when I visited my
         | Public URL by some security warning page around phishing? Which
         | is fair enough, but it wasn't clear to me how I could remove
         | that and get the URL to point to my local server like I wanted.
        
       | jstanley wrote:
       | It's not mentioned anywhere in this blog post, but the project
       | has a website at https://tunnelmole.com/ and a github repo at
       | https://github.com/robbie-cahill/tunnelmole-client
       | 
       | EDIT: And, actually, I don't think this is really an ngrok
       | alternative. Unless I'm mistaken it looks like it only supports
       | HTTP, whereas ngrok is a generic TCP proxy. (Albeit that ngrok
       | does not support TCP half-close because it treats it like a full
       | close).
        
         | aussieguy1234 wrote:
         | TCP is something i'm thinking about. It is possible with
         | sockets and different port numbers opening/closing on the
         | server side, it will take some work however. Perhaps you might
         | be interested in contributing?
        
       | llmblockchain wrote:
       | If you have a web server you control, it's pretty easy to use an
       | ssh tunnel to do this and you control the entire thing.
        
       | vorticalbox wrote:
       | > sudo npm install -g tunnelmole
       | 
       | Why not simply use npx?
       | 
       | npx tunnelmole
        
         | scubbo wrote:
         | (I'm no Node expert, so this might be flawed, but) presumably,
         | because they hope that you'll use the app more than a few
         | times, and so the one-time overhead of typing `sudo npm install
         | -g` once will outweigh the repeated requirement to use `npx`
         | every time you invoke it. Or, taking a less mechanistic and
         | more usability-focused approach - because the intention is for
         | it to be seen as a fundamental tool, just as accessible as grep
         | or cat or less, rather than "hidden" behind npx.
        
           | aussieguy1234 wrote:
           | I actually tried advertising the `npx tmole` / `npx
           | tunnelmole` methods but not too many people picked them up,
           | so I ended up not adding these methods to the docs.
        
         | aussieguy1234 wrote:
         | You can do that, also `npx tmole` works because of the wrapper
         | package I added to NPM.
        
       | aborsy wrote:
       | Many alternatives: SSH reverse tunnels, Cloudflare tunnels,
       | various reverse proxies like FRP, Tailscale funnel (probably for
       | short lived light connections), ngrok, etc
        
         | PLG88 wrote:
         | also https://zrok.io/. Its open source, and has a free SaaS.
         | Its also more comprehensive than Tunnelmore, e.g., supporting
         | TCP or UDP tunnels.
        
         | qudat wrote:
         | Also https://ssi.sh with a managed service at https://tuns.sh
        
         | aussieguy1234 wrote:
         | These can work but all take a bit more work however than
         | running a single command, including Cloudflare tunnels which
         | according to their docs, requires you to make a DNS record on
         | your domain. I use SSH reverse tunnels for some things where I
         | need tighter security.
        
       | apitman wrote:
       | I maintain a list of similar tools here:
       | 
       | https://github.com/anderspitman/awesome-tunneling
       | 
       | I'm not sure there's a single class of software that's been
       | implemented more times than ngrok-style tunneling. I keep finding
       | more and more.
       | 
       | Honestly it's a really fun exercise. Fairly challenging, but well
       | within the reach of a single developer. I believe I'm currently
       | working on my 5th incarnation.
        
         | LoganDark wrote:
         | > I'm not sure there's a single class of software that's been
         | implemented more times than ngrok-style tunneling. I keep
         | finding more and more.
         | 
         | AFAIK ngrok was the first widespread implementation of it, and
         | there was such a sheer lack of it before that everyone started
         | working on their own implementations at once and now we have an
         | abundance.
         | 
         | (At least that's my personal theory.)
        
           | kelnos wrote:
           | I think "widespread" in this case means "marketed better".
           | There were open source implementations before ngrok, whose
           | founder even worked with someone who'd written one of those.
           | (ngrok back then was certainly better than a lot of those
           | other options, though.)
           | 
           | Webhooks created the need for local tunneling software.
           | Before ngrok, webhooks themselves were just starting to
           | become more common. The need for local tunneling is much much
           | greater than it was 15 years ago.
           | 
           | (Also consider that ngrok today is far more then a local
           | tunnel proxy. They noticed the abundance of open source
           | options years ago and have moved on from the basic concept.)
        
       | lxe wrote:
       | Does it have the same spam prevention policies as ngrok?
        
         | aussieguy1234 wrote:
         | In the early days there where several attempts to use
         | Tunnelmole for phishing.
         | 
         | When you think about it, a service that hides your IP under a
         | domain that is not yours means you can do whatever you want
         | without risking your own server or domain being taken down for
         | abuse, instead risking my server.
         | 
         | So I added code to forward an X-Forwarded-For header, which
         | contains the real IP address of the client. Also random URLs
         | have the ip address added to them.
        
       | evrimoztamur wrote:
       | I've been self-hosting https://github.com/fatedier/frp on my
       | little box, and it feels insane to think of the times where I
       | didn't have it set up. There are many choices in the space as
       | others pointed out, but frp's capabilities and lightweight
       | packaging blows all other setups out of the water. I placed mine
       | behind nginx with Let's Encrypt for SSL support. Hella fresh!
        
       | hellovue wrote:
       | Note that server source code contains a feature to capture all
       | traffic that you send over it: https://github.com/robbie-
       | cahill/tunnelmole-service/blob/c58...
       | 
       | I would only use the self-hosted version.
        
         | ihumanable wrote:
         | In the commit you linked this function is only ever called once
         | and seems to just capture that a connection was initialized
         | from a clientId to a hostname https://github.com/robbie-
         | cahill/tunnelmole-service/blob/c58...
        
           | aussieguy1234 wrote:
           | this is correct. Its simply logging the connection so I can
           | see server load/usage stats. There is other code that logs
           | the NodeJS version and OS, this is so I can make better
           | decisions on which NodeJS version I should get TypeScript
           | compile to. The second log can be turned off however,
           | instructions are in the README.
        
       | zilti wrote:
       | Or, y'know, just open a reverse tunnel using autossh.
        
         | aussieguy1234 wrote:
         | could you give more details? what steps are involved in this?
        
       ___________________________________________________________________
       (page generated 2024-03-21 23:00 UTC)