thecasualcoder / lazy-connect

Shell function to fuzzy search an IPSec VPN by name and connect to it automatically.
56 stars 17 forks source link
applescript fzf ipsec-vpn oathtool osx shell-script

lazy-connect

Shell function to fuzzy search an IPSec VPN by name and connect to it automatically.

Prerequisite

  1. fzf
  2. OATH Toolkit
brew install oath-toolkit fzf

Install

Using Homebrew

brew tap thecasualcoder/stable
brew install lazy-connect

Manual

git clone https://github.com/thecasualcoder/lazy-connect.git ~/.lazy-connect
sudo ln -s ~/.lazy-connect/lazy-connect /usr/local/bin/lazy-connect

Usage

lazy-connect - Shell function to fuzzy search an IPSec VPN by name
               and connect to it automatically.

-i    - Initialize lazy-connect. Stores the TOTP secret and VPN list.
-r    - Refresh vpn list in ~/.config/lazy-connect .
-n    - Do not fill the password automatically. Instead copy the password to clipboard.
-h    - Show this help.

YubiKey Support

Prerequisite

  1. yubikey-manager

To use TOTP from YubiKey set the following environment variable

export LAZY_CONNECT_TOTP_GENERATOR=yubikey
export LAZY_CONNECT_TOTP_QUERY=<name of the issuer>

Note