Home

Awesome

AdGuard VPN CLI Zsh Plugin

This is a Zsh plugin for simplifying interaction with the AdGuard VPN CLI. It provides user-friendly commands that reduce the need to remember complex flags and commands by offering a more intuitive interface.

Features

Requirements

This plugin requires the AdGuard VPN CLI tool (adguardvpncli) to be installed on your system. You can find the installation instructions and download the tool from the official repository: AdGuardVPNCLI GitHub Repository.

Installation

Manual Installation

  1. Clone this repository to your desired location:
    git clone https://github.com/MohamedElashri/adguard-helper ~/.adguard-helper
    
  2. Source the plugin in your .zshrc file:
    source ~/.adguard-helper/adguard-helper.zsh
    
  3. Reload your terminal or run source ~/.zshrc to start using the plugin.

Oh My Zsh Installation

  1. Clone the repository into your Oh My Zsh custom plugins directory:
    git clone https://github.com/MohamedElashri/adguard-helper ~/.oh-my-zsh/custom/plugins/adguard-helper
    
  2. Add adguard-helper to the list of plugins in your .zshrc file:
    plugins=(... adguard-helper)
    
  3. Reload your terminal or run source ~/.zshrc to start using the plugin.

Zinit Installation

  1. Add the following line to your .zshrc file:
    zinit load MohamedElashri/adguard-helper
    
  2. Reload your terminal or run source ~/.zshrc to start using the plugin.

Available Commands

Below is a list of commands provided by this plugin along with their descriptions:

CommandDescriptionExample
ag-loginLog in to the VPN service$ ag-login
ag-logoutLog out from the VPN service$ ag-logout
ag-list-locationsList all available VPN locations$ ag-list-locations
ag-connectConnect to the VPN service$ ag-connect
ag-connect-fastestConnect to the fastest available VPN location$ ag-connect-fastest
ag-connect-locationConnect to a specific VPN location$ ag-connect-location "New York"
ag-disconnectDisconnect from the VPN$ ag-disconnect
ag-statusDisplay the current VPN connection status$ ag-status
ag-licenseView license information$ ag-license
ag-configOpen the configuration settings$ ag-config
ag-check-updateCheck for available updates$ ag-check-update
ag-export-logsExport VPN logs$ ag-export-logs -o /tmp/logs.zip
ag-updateInstall the latest available version$ ag-update
ag-exclusionsManage site exclusions$ ag-exclusions show
ag-add-exclusionAdd a site to exclusions$ ag-add-exclusion "example.com"
ag-remove-exclusionRemove a site from exclusions$ ag-remove-exclusion "example.com"
ag-show-exclusionsDisplay all excluded sites$ ag-show-exclusions
ag-clear-exclusionsClear all excluded sites$ ag-clear-exclusions
ag-set-modeSet the VPN operating mode (TUN/SOCKS)$ ag-set-mode TUN
ag-set-dnsSet the DNS server for the VPN$ ag-set-dns "1.1.1.1"
ag-setup-tunSet up the VPN to use the default TUN routing$ ag-setup-tun
ag-set-socks-portSet the SOCKS proxy port$ ag-set-socks-port 1080
ag-show-configDisplay the current VPN configuration$ ag-show-config

Examples

Here are some examples of using this plugin to simplify AdGuard VPN operations:

License

This project is licensed under the GNU General Public License v2.0. You are free to use, modify, and distribute this software under the terms of the GPLv2 license.

Disclaimer

This is an open-source project and is not officially affiliated with AdGuard. Use it at your own discretion.