sttz / expresso

expresso is a command line interface to control the ExpressVPN app
MIT License
63 stars 11 forks source link

It would be great if there was a "vpn off" command to disconnect #13

Open purpleglow opened 2 years ago

purpleglow commented 2 years ago

VPN on = connect to the last one used VPN off = disconnect

sttz commented 2 years ago

What would be the difference between the existing expresso disconnect command and vpn off?

expresso doesn't keep any state so I cannot save the most recent location. I'm not sure if the list of recent locations returned by ExpressVPN are sorted and if it therefore would be possible to get the most recent location. But you can just specify a location with expresso connect LOCATION (and use your shell's history), why would you specifically need to connect to the last used one?

purpleglow commented 2 years ago

Sorry I should have been more specific. These are Alfred commands that work with expresso. expresso disconnect is not an Alfred command.

purpleglow commented 2 years ago

why would you specifically need to connect to the last used one?

Because that's how Express VPN works. When you click the ON button, it connects to the last used one. When you click the OFF button, it disconnects. Therefore VPN on = connect to last used VPN off = disconnects

(Both are commands typed in Alfred)