prodigyphp / laravel-ssh-tunnel

Easy creation & maintenance of an SSH Tunnel for Laravel
MIT License
27 stars 13 forks source link

Add a php artisan command to destroy the tunnel #1

Open JoyKevinMaldini opened 11 months ago

JoyKevinMaldini commented 11 months ago

I've just started using this package and think it's awesome. What I've noticed though is that there either might be an error in the setup or it just needs an option to also close the tunnel again.

Currently there isn't any option to close / destroy the tunnel, right? I would like to have that option.

php artisan tunneler:deactivate or php artisan tunneler:destroy would make sense..?

The reason I'm coming up with this is that I need it for multiple projects simultaneously. Now when I open one tunnel it works for that project, when I then try to open another tunnel in another project directory, the artisan command tells me that "The Tunnel is already Activated." which makes me unable to connect to that project as well.

Or did I just miss some configuration in the .env where we would be able to give the tunnel a name or tag or something? If I just missed some things then maybe an update for the README would be appreciated. :)

JoyKevinMaldini commented 11 months ago

PS: As I'm working simultaneously on multiple projects where I need the Tunneler open to different servers, it might make sense to enable opening multiple tunnels. Not sure how much rework or change efforts that would require though or if I would just need to make adjustments in the .env / config() setup.