Live data from Hacker News

Tunnelmole, an ngrok alternative (open source)

softwareengineeringstandard.com

31–40 of 87 posts

Re: Tunnelmole, an ngrok alternative (open source)

#31
post #27

Earlier quoted context omitted.

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…

[deleted]

Re: Tunnelmole, an ngrok alternative (open source)

#32
post #27

Earlier quoted context omitted.

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…

is the `host` part here a server that you run yourself?

Re: Tunnelmole, an ngrok alternative (open source)

#33

Earlier quoted context omitted.

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

I see, for random subdomains. I guess a custom subdomain would still need that DNS record added to your domain.

Re: Tunnelmole, an ngrok alternative (open source)

#37
post #27

Earlier quoted context omitted.

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…

is the `host` part here a server that you run yourself?

yes

Re: Tunnelmole, an ngrok alternative (open source)

#38
Is there any stand-alone open source version of the VS Code port forwarder? That’s what I really want. Not so much public access, just local access to ports on the remote machine that I can easily manage. SSH port forwards don’t work inside docker dev environments (and docker containers have to be rebuilt to export new ports natively), so some extra software is needed.

Re: Tunnelmole, an ngrok alternative (open source)

#39
post #4

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…

If 99% of ngrok users use it for HTTP, it IS an alternative isn't it?

Re: Tunnelmole, an ngrok alternative (open source)

#40

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.

I do that with a private server of my own, but it's quite fragile. The SSH tunnel connection drops sometimes, and it's just raw tunneling. What I love about ngrok is the web interface with logs showing the HTTP requests and responses with all the headers and payload. I'm hoping this has the same, will give it a try when I'm on my laptop.

One benefit of doing it on your own server is the static hostname you get with it. A new hostname every time you start up is not fun at all!

Post reply on HN