Skip to main content

Tool to monitor and restart Mac VPN.

Project description

Copyright (c) 2018 Ryan SHea

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Description: INSTALLATION
------------
1) Homebrew
a) Install Homebrew (if you don't have it)
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
b) Update Homebrew
brew update && brew upgrade
2) Install python3
brew install python
3) Install package
pip3 install macvpnhelper

Run by typing "macvpnhelper" in the terminal.

Alternatively, you can run the script located in this package directly. It is located in the bin/ folder.
./macvpnhelper

NOTE: You will be prompted for keychain access for storing/retrieving the user, password, and vpn name.

UPDATING
--------
pip3 install --upgrade macvpnhelper
or
pip3 uninstall macvpnhelper
pip3 --no-cache-dir install macvpnhelper

USAGE
-----
usage: macvpnhelper [-h] [--duration DURATION] [--clickspeed CLICKSPEED]
[--fillpassword FILLPASSWORD] [--warning WARNING]
[--interval INTERVAL] [--simulate] [--reset] [--vpn VPN]

Examples:
macvpnhelper
Uses existing defaults of --warning=yes --duration=fd --clickspeed=normal. The app will display a warning (which must be clicked) before filling password information and stop executing at 6pm.

macvpnhelper --fillpassword=andReturn --warning=no --clickspeed=fast --interval=3
Fills password prompt and doesn't warn that it is doing so (could type password into a different active dialog!), clicks dialog buttons quickly (use on fast machine)

macvpnhelper --reset --vpn="ISS Wi-fi" --duration=3h
Clears existing user/password information and defines a new VPN name. Runs for 3 hours before terminating.

optional arguments:
-h, --help show this help message and exit
--duration DURATION, -d DURATION
(time in hours|'wd'|'fd'|'runOnce') E.g., 8h, the amount of time (in hours) to keep the VPN active. Use 'wd' to do 9-12 and 1-6 (default), 'fd' to do 9-6, and 'runOnce' to do a single check and then terminate.
--clickspeed CLICKSPEED, -cs CLICKSPEED
(superfast|fast|normal|slow|superslow) adjust based on responsiveness of your GUI
--fillpassword FILLPASSWORD, -fp FILLPASSWORD
(yes|no|andReturn) type in password and optionally hit return in the dialogs. CAUTION: since this password is provided to the GUI, it is possible that intermediate clicks will result in your password being typed to, e.g., chat dialogs. Prevent this by using 'yes' instead of 'andReturn', or making sure the clickspeed matches your GUI responsiveness.
--warning WARNING, -w WARNING
(yes|no) Displays warning message prior to filling in password.
--interval INTERVAL, -i INTERVAL
number of seconds to wait between polling connection status (default is 5)
--simulate, -s When set, script which would be executed is instead printed to the terminal.
--reset Use to reset your login information.
--vpn VPN, -n VPN Name of VPN to connect to. Must match your configured connection.
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS :: MacOS X
Classifier: Topic :: Utilities
Classifier: Topic :: System :: Networking
Classifier: Natural Language :: English
Classifier: Development Status :: 4 - BetaIntended Audience :: End Users/Desktop
Classifier: Environment :: Console
Classifier: Environment :: MacOS X
Description-Content-Type: text/markdown

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

macvpnhelper-0.1.0.tar.gz (22.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

macvpnhelper-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file macvpnhelper-0.1.0.tar.gz.

File metadata

  • Download URL: macvpnhelper-0.1.0.tar.gz
  • Upload date:
  • Size: 22.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for macvpnhelper-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cab2d3b161177af9f98dbb06cf0fd07d6fa42f3d7b5b406d61a1253cbf7d55a6
MD5 429025bd0368f48167e028754a5e6e1b
BLAKE2b-256 18a1ba7a7a4a652ad4459a7acfc2dca2f3d58425de29ea0486c5553958e89cd5

See more details on using hashes here.

File details

Details for the file macvpnhelper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: macvpnhelper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.7.0

File hashes

Hashes for macvpnhelper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fd8e8d375af4b976957296c687cecbe3a52192ca6f22c5880c40debd879088ac
MD5 01146c891fc7719f54d75430da25aed4
BLAKE2b-256 947f5b1eee99fac2d91871eadc5693f360971fa12acf1045a5b0b6a2493245e8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page