Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cjsheets/airvpn-utils
Python script for interfacing with the AirVPN API
https://github.com/cjsheets/airvpn-utils
Last synced: 13 days ago
JSON representation
Python script for interfacing with the AirVPN API
- Host: GitHub
- URL: https://github.com/cjsheets/airvpn-utils
- Owner: cjsheets
- License: mit
- Created: 2016-08-15T21:27:21.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-18T02:01:03.000Z (over 8 years ago)
- Last Synced: 2024-10-20T07:44:15.112Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 8.79 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# AirVPN Utils
This script is useful for querying the [AirVPN API](https://airvpn.org/) from the command line.
###Install
####Prerequisites
The following python packages are required:
* docopt
* requestsTo install, run `pip install -r requirements.txt`
####Setup
You need an [API key from AirVPN](https://airvpn.org/settings/) to use this script.
Either create a file called api_key.py in the same directory as the airvpn script containing: `API_KEY = 'xxxyyyzzz'` or add your API key to the script `API_KEY = ''`.
*Optional:* Copy the airvpn script into a PATH directory (like /usr/local/bin) so you can run it from anywhere.
###Commands
Using this script, you can retrieve any information provided by [AirVPNs API](https://airvpn.org/faq/api/). See their documentation for details.
`sessions` and `user` commands provide data listed in the userinfo section of their API documentation.####sessions
`airvpn sessions`
*Returns:* All information listed under sessions of their API
`airvpn sessions -k`
*Returns:* The same information in Key -> Value format
`airvpn sessions exit_ip`
*Returns:* Only the exit IP for each connected client
####user
`airvpn user`
*Returns:* Similar to session, returns all user information provided by their API
`airvpn user -k expiration_days`
*Returns:* Number of paid days remaining in Key -> Value format
####status
`airvpn status -s Albireo`
*Returns:* All information relating to the server named Albireo. Information available is
also posted online at their [status page](https://airvpn.org/status/)###To Do:
* Add option to provide API key via CLI
* Add option to request disconnect
* Add option to send a notification
* Test options for running on Windows[![Analytics](https://cjs-beacon.appspot.com/UA-10006093-3/github/cjsheets/airvpn-utils?pixel)](https://github.com/cjsheets/airvpn-utils)