Skip to content

VPN Client for Cisco AnyConnect with no need to prompt password every time. Lives in macOS tray

Notifications You must be signed in to change notification settings

sematgt/cp-vpn-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CP VPN Client

VPN Client for Cisco AnyConnect with no need to prompt password every time. Lives in macOS tray

Menu

A macOS tray app with “Connect” / “Disconnect” VPN buttons and status indicators (🟢/🔴/⚪︎). Works with Cisco AnyConnect CLI (/opt/cisco/anyconnect/bin/vpn).

You can use package from releases(you need to fill config) or build app by yourself.

Requirements

  • macOS 12+
  • Cisco AnyConnect installed (/opt/cisco/anyconnect/bin/vpn)
  • Python 3.10+

Set up environment

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Configuration After the first run, a config.json file will be created next to the app. Fill it with:

{
  "server": "vpn.com",
  "username": "user",
  "password": "password"
}

Run from source

python app.py

Build .app

chmod +x build.sh
./build.sh
# Built app: dist/cp-vpn-client.app
# Move it to ~/Applications/ for auto-start
mkdir -p ~/Applications
cp -R "dist/cp-vpn-client.app" ~/Applications/

Launch at login

chmod +x scripts/*.sh
scripts/install_login_item.sh
# Remove:
scripts/uninstall_login_item.sh

Icons / status

  • 🟢 Connected
  • 🔴 Disconnected
  • ⚪︎ Unknown

Diagnostics

  • See AnyConnect logs in the output of vpn status, vpn -s connect, vpn disconnect.
  • The app uses commands:
    • Connect: printf 'user\\password\\ny' | /opt/cisco/anyconnect/bin/vpn -s connect vpn.com
    • Disconnect: /opt/cisco/anyconnect/bin/vpn disconnect
    • Status: /opt/cisco/anyconnect/bin/vpn status

About

VPN Client for Cisco AnyConnect with no need to prompt password every time. Lives in macOS tray

Resources

Stars

Watchers

Forks

Packages

No packages published