inletsctl icon indicating copy to clipboard operation
inletsctl copied to clipboard

Add a --rm flag to "inletsctl create" for a temporary tunnel

Open alexellis opened this issue 5 years ago • 7 comments

We should add a --rm flag to "inletsctl create" for when users need a temporary tunnel.

The use-case would be that I want to share my blog i.e. 127.0.0.1:4000 with a friend or colleague, but I don't want to be billed for the DigitalOcean VM beyond my 1-2 hours of uptime.

I'd run a command similar to docker run --rm which removes the tunnel immediately after I hit control + c or exit.

We'd have something like this, but it'd need to work with inlets-pro too:

OSS:

inletsctl create --rm --upstream http://127.0.0.1:4000

Your IP is: X
Starting "inlets client" now, hit control+c to delete the tunnel.

Pro:

inletsctl create --rm --license $LICENSE --remote-tcp=http://127.0.0.1
Your IP is: X
Starting "inlets-pro client" now, hit control+c to delete the tunnel.

alexellis avatar Jan 30 '20 10:01 alexellis

@alexellis I would love to know what do you think the right approach would be? Including inlets from inletsctl as a binary or including the package in the vendor dir?

utsavanand2 avatar Jan 31 '20 08:01 utsavanand2

For the first attempt you should do nothing and assume that is in the path. At later time we can invoke the existing code which performs a download, if we are unable to locate the binary.

alexellis avatar Jan 31 '20 08:01 alexellis

@adamjohnson01 I think I missed your comment here?

alexellis avatar Jan 31 '20 08:01 alexellis

@alexellis, I said that I would work on it but then I saw @utsavanand2 said in slack that he was working on it so I removed it.

adamjohnson01 avatar Jan 31 '20 08:01 adamjohnson01

@adamjohnson01 I would love your feedback on it! Maybe we can collab together? I'll push some changes tonight. We'll see how it works.

@alexellis I've created a check which makes sure inlets or inlets-pro is in /usr/local/bin/

utsavanand2 avatar Jan 31 '20 09:01 utsavanand2

It might be worth keeping all messages rather than deleting any so that we don't clash or duplicate work. Async communication is hard.

@utsavanand2 for the first version, there's probably no need to check that the tool exists at all. Let's keep it simple and get it shipped quickly.

alexellis avatar Jan 31 '20 09:01 alexellis

@alexellis, you are right I should have commented instead of removing it. I just didn't want to create confusion about who was doing the work.

@utsavanand2, sure I am happy to help out however I can. :)

adamjohnson01 avatar Jan 31 '20 09:01 adamjohnson01