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=production
You 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 dev
Advanced connection:
vpn connect cisco --retry 3 --delay 5
vpn connect cisco -r 3 -d 5
Manual connection (with host, user, and password):
vpn connect cisco --host=vpn.example.com --user=user --password=pass
Manual connection with saved credentials:
vpn connect cisco --host=vpn.example.com --user=user --password=pass --save=dev
You can disconnect from a VPN using the following options: Basic disconnection:
vpn disconnect cisco
You can check the status of a VPN connection using the following options: Basic status check:
vpn status cisco
You can create a VPN configuration using the following options:
Create a new configuration
vpn create --config=dev
After 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 autovpn
Contributions 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.