This VPN Command-Line Tool allows you to connect, disconnect, check status, and manage configurations for VPN connections. The tool is designed to be simple and flexible, providing various options to suit different use cases.
- Windows
- VPN Client (Cisco Anyconnect)
- Python 3.10 or higher
- pip install -r requirements.txt
- Cisco Anyconnect
- Download the latest release from the [Releases]
- Extract the zip file
- setup the environment variable for the extracted folder
- setup config file. Example for cisco vpn:
vpn --set-config="C:\\Program Files (x86)\\Cisco\\Cisco AnyConnect Secure Mobility Client\\vpncli.exe" --type=cisco- setup vpn credential. Example for cisco vpn:
vpn create --config=productionYou can connect to a VPN using several options depending on your needs:
Connection using a specific configuration:
vpn connect cisco --config=dev
vpn connect cisco -C devAdvanced connection:
vpn connect cisco --retry 3 --delay 5
vpn connect cisco -r 3 -d 5Manual connection (with host, user, and password):
vpn connect cisco --host=vpn.example.com --user=user --password=passManual connection with saved credentials:
vpn connect cisco --host=vpn.example.com --user=user --password=pass --save=devYou can disconnect from a VPN using the following options: Basic disconnection:
vpn disconnect ciscoYou can check the status of a VPN connection using the following options: Basic status check:
vpn status ciscoYou can create a VPN configuration using the following options:
Create a new configuration
vpn create --config=devAfter running the command above, you will be prompted to enter the following required information:
- VPN Type (required)
- Host (required)
- User (required)
- Password (required)
Compile the script using pyinstaller, install first pip install pyinstaller. dont use --onefile because it will detected as virus.
pyinstaller vpn.py --icon=favicon.ico --name autovpnContributions are welcome! Please feel free to submit a pull request or open an issue if you have any suggestions or feedback.
This project is licensed under the MIT License - see the LICENSE file for details.