Conversation
|
I came here to specifically look for whether this feature was being implemented. +1 on this being absolutely necessary and the most basic functionality. |
…nt `status` calls if necessary
…etails object we all know and love for consistent handling
|
I just added some code that will write to the |
…fore but we have the connection details
Hey all,
As it says on the tin, this is a "simple"
statuscommand added to the CLI tool. I'm not sure if this is how it should be done, but this is at least a start. Hopefully someone from Proton or who is more familiar with the codebase can help improve upon this and streamline it a bit. Most of the Lines of Code (LoCs) are just building a large dict with all of the possible information I would think folks would be interested in getting from the status command, though I'm sure there are more data points people might want.This addresses the Linux CLI connection status feature request posted on the ProtonVPN UserVoice.
The main issue I'm having is that the connection_details object isn't consistently populated. I couldn't divine how it was being populated or not populated, so I just left it as-is and figured someone smarter than I could figure it out. As-is, it is sometimes populated when called, and other times, it isn't.
When using for something like
Polybarori3bar, you'll want to pipe the outputs of this command togrep -v "Server list"to avoid getting the message about the server list updating which sometimes pops up. I also included a--simpleor-sflag to the command that will make the output "simple" for use with something like a status bar.Thanks!