chisel icon indicating copy to clipboard operation
chisel copied to clipboard

Add/Remove Tunnel Endpoints Dynamically?

Open timkeeler opened this issue 5 years ago • 5 comments

I haven't seen this documented, but is it possible to add or remove tunnel endpoints on the fly without having to restart the chisel TCP connection?

This would be an awesome feature. Right now when I want to add/remove a connection I need to either start/stop my existing chisel process (killing any tunneled sessions), or start a separate chisel tunnel. The latter isn't that big of a deal, but it starts becoming a bit of a management headache when I'm dealing with a dozen or so chisel processes.

Thoughts or ideas are welcome!

timkeeler avatar Apr 02 '20 15:04 timkeeler

Possible though not supported yet. Though here are some thoughts:

  • Currently share/tunnel deals with a single set of remotes
  • A new chisel Client method could be added to open another SSH channel with a new set of remotes
  • This is a small architectural change since during handshake, Client sends a single config SSH request, then Server assumes a single request

jpillora avatar Jul 22 '20 23:07 jpillora

I would like this feature as well. It makes sense that you can setup a client connecting to the server, and later on create and remove remotes when possible.

Usecase might be this: on demand access with reverse proxy. There is no need to keep a remote connection open all the time. Only on specific events (signaling through MQTT), someone can request from a cloud app access to an webserver (or any other tcp connection) at the Edge. This way, it's possible to implement an handshake mechanism outside chisel (for example through a MQTT/REST API/or anything else), and when succesful start the appropriate remote tunnel with chisel.

@timkeeler @jpillora what do you think?

cedricve avatar Nov 17 '20 11:11 cedricve

@cedricve - That's a great idea and exactly what I was envisioning. I think this would create a great amount of flexibility for Chisel!

timkeeler avatar Dec 09 '20 18:12 timkeeler

@timkeeler @cedricve @jpillora - I have also use case for adding tunnel endpoints dynamically. Did anyone attempted making changes for this?

smanghate avatar Apr 04 '22 10:04 smanghate

Not that I'm aware of... :( The technical skills required is just a little bit past me (I'm not great w/Go)

timkeeler avatar Apr 04 '22 14:04 timkeeler