Live data from Hacker News

Tunnelmole, an ngrok alternative (open source)

softwareengineeringstandard.com

21–30 of 87 posts

Re: Tunnelmole, an ngrok alternative (open source)

#22
post #11

Does it have the same spam prevention policies as ngrok?

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.

Re: Tunnelmole, an ngrok alternative (open source)

#25
post #13

> sudo npm install -g tunnelmole Why not simply use npx? npx tunnelmole

(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 access…

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.

Re: Tunnelmole, an ngrok alternative (open source)

#26
post #8

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.

> 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.)

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.)

Re: Tunnelmole, an ngrok alternative (open source)

#27
post #21

Or, y'know, just open a reverse tunnel using autossh.

could you give more details? what steps are involved in this?

Basically: autossh -M 20000 -N -R host:8080:localhost:80 user@host

-M sets the control port for autossh which it uses to check if all is working right. The rest is standard SSH syntax; in this example, a loopback socket on port 8080 on host will get opened, and all requests to it are forwarded to localhost's port 80.

If you want it to be a "real" socket instead of just loopback, set "GatewayPorts clientspecified" in sshd_config.

Re: Tunnelmole, an ngrok alternative (open source)

#28
post #21

Or, y'know, just open a reverse tunnel using autossh.

could you give more details? what steps are involved in this?

All autossh does is try to keep open/restart an ssh connection as a daemon — I’m not sure there’s any benefit to it these days than just using a systemd service.

That being said, as an example `ssh user@host.com -R 8181:localhost:8080` will open port 8181 on the remote machine you’re connecting to, and forward traffic that’s addressed there to port 8181 on the machine you’re connecting from. That is, you’ll be able to open a browser to http://host.com:8181 to test something running on your dev machine at port 8080. Traffic gets forwarded along the ssh tunnel.

Autossh (or a systemd service supervising an `ssh` connection) will keep that tunnel open.

Re: Tunnelmole, an ngrok alternative (open source)

#29
post #8

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.

> 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.)

Before ngrok we set it up in 15 minutes by configuring ssh and nginx a la https://gist.github.com/gdamjan/4586758

Re: Tunnelmole, an ngrok alternative (open source)

#30
post #7

Many alternatives: SSH reverse tunnels, Cloudflare tunnels, various reverse proxies like FRP, Tailscale funnel (probably for short lived light connections), ngrok, etc

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.

Cloudflare offers quick tunnels too, for when you dont have (or want) a domain. https://developers.cloudflare.com/cloudflare-one/connections...
Post reply on HN