Comments (4)
Hey @Tormen ,
The vpnutil
command line tool already supports a list
parameter. When running the command vpnutil list
, you will see an output like:
VPN1 Connected
VPN2 Disconnected
VPN3 Disconnected
where VPN1
, VPN2
and VPN3
are the names of the VPNs.
I assume that you would prefer to get a JSON output format like:
{
"VPN1": {
"status": "Connected"
},
"VPN2": {
"status": "Disconnected"
},
"VPN3": {
"status": "Disconnected"
}
}
Would this JSON work for you? Is there anything missing in this output that you would like to see?
from vpnstatus.
Hi @Timac ,
Thank you!
In this case I would suggest the following to avoid similar confusion for others:
Could you please change the output when calling "vpnutil" to show that there is such a list parameter ?
As for me the "Usage" did NOT talk about "list" I (had to assume) that there is no list
parameter :D
This is what I see when executing vpnutil
without parameters (latest stable precompiled version, downloaded today from this GitHub):
Usage: vpnutil [start|stop] [VPN name]
Examples:
To start the VPN called 'MyVPN':
vpnutil start MyVPN
To stop the VPN called 'MyVPN':
vpnutil stop MyVPN
To list all available VPNs and their state:
vpnutil list
To get the status of the VPN called 'MyVPN':
vpnutil status MyVPN
Copyright © 2018-2023 Alexandre Colucci
blog.timac.org
from vpnstatus.
Hi @Timac ,
I had another look at the current output of the list
command and:
The output of the list
command could be improved
by using a "TAB" character, instead of "SPACE"
to separate the NAME of the VPN and the status,
as the VPN NAME /can/ also contain spaces.
Tormen
from vpnstatus.
@Tormen Thanks again for the great suggestions. I implemented 2 changes:
- The usage now mentions the
list
parameter vpnutil list
now outputs a json format. This issue was also tracked by #12 . If you runvpnutil list
, you should now see a json like this:
{
"VPNs" : [
{
"name" : "VPN1",
"status" : "Connected"
},
{
"name" : "VPN2",
"status" : "Disconnected"
},
{
"name" : "VPN3",
"status" : "Disconnected"
}
]
}
from vpnstatus.
Related Issues (20)
- homebrew support 🍻 HOT 4
- ne_session_set_event_handler_block prototype HOT 3
- Changing menu bar icon HOT 2
- VPN Connection The server is unreachable VPN App Server Address Unknown HOT 2
- Swift Version HOT 1
- Trusted Network Detection HOT 3
- Defaults settings not being read HOT 8
- Add preference to hide specific VPN configurations
- IgnoredSSIDs does not work HOT 1
- Is there a way to configure vpnutil to ignore some of the VPNs? HOT 3
- No VPN despite green icon HOT 2
- IgnoredSSIDs doesn't work anymore after upgrading to macOS Sonoma HOT 4
- Run script on connect/disconnect HOT 2
- It will be great to see your tools in brew HOT 7
- VPN drops and the app doesn't reconnect for a while HOT 11
- Alternative to polling HOT 4
- Not starting after upgrade to macos 14.4 HOT 2
- Add UI to edit the preferences HOT 1
- Add a check for update solution HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vpnstatus.