đĄïž AdGuard VPN
August 2, 2026 · View on GitHub
đĄïž AdGuard VPN â DankMaterialShell Plugin
Control, monitor, and configure AdGuard VPN directly from your DankBar â no terminal needed. Language / Idioma: English is the primary documentation language. A Portuguese (Brazil) version is provided below for the same user-facing guidance.
âš Features
| Category | What you get |
|---|---|
| Live monitoring | Real-time status, account info, tunnel interface, SOCKS endpoint, and ranked locations |
| One-click actions | Connect / Disconnect / Fastest / Location quick-connect â Enter in the field connects too |
| Runtime config | Mode (TUN / SOCKS), Protocol (Auto / HTTP2 / QUIC), Update channel, DNS upstream |
| Location tools | Search & filter, city/country quick-connect, favorites pinned on top, "show more" paging |
| Resilience | Auto-connect on startup, auto-reconnect with 3-step backoff, connect preflight checks |
| Diagnostics | Last command log, tunnel log viewer, login-required banner with copyable command |
| Accessibility | Full keyboard navigation (Tab + Enter/Space) with visible focus and Accessible roles |
| Multilingual | 22 fully translated languages (EN, PT-BR + 20 additional locales) |
| Tested parsers | ANSI-safe, multi-format CLI parsing covered by 31 unit tests in CI |
đ Requirements
| Dependency | Version |
|---|---|
| DankMaterialShell | >= 1.4.0 |
adguardvpn-cli | Any recent version â install guide |
| AdGuard account | Logged in (adguardvpn-cli login) |
đ Installation
Optional systemd-managed tunnel
By default the plugin invokes adguardvpn-cli directly, so it works without
extra system services. Advanced setups can set useSystemdService: true in
the plugin settings and provide /usr/local/sbin/adguardvpn-dms-control; in
that mode connect and disconnect actions delegate the persistent tunnel to a
root systemd service rather than leaving it in the DMS cgroup. Keep this opt-in
unless the matching service and control wrapper have been installed.
A reference implementation ships in scripts/adguardvpn-dms-control:
sudo install -m 755 -o root -g root \
scripts/adguardvpn-dms-control /usr/local/sbin/adguardvpn-dms-control
Then grant the desktop user a NOPASSWD sudoers rule for that exact path â the
plugin always calls it through sudo -n, so an interactive prompt makes the
action fail silently.
Write your own helper? Make
connect-fastestandconnect-locationidempotent.systemctl restarttears the tunnel down for a few seconds: NetworkManager flags the interface as unmanaged, systemd-resolved swaps DNS servers, and every in-flight connection dies with it â downloads, SSH, long HTTP sessions. A helper that restarts unconditionally turns a no-op click ("connect to the location I'm already on") into a real network outage. The reference implementation exits0without restarting when the unit is already active and/var/lib/adguardvpn-dms/locationalready matches the requested target;--forcerestores the unconditional behaviour for deliberately re-picking a server.
1. Clone into DMS plugins directory
git clone https://github.com/bernardopg/dms-adguard-vpn-plugin.git \
~/.config/DankMaterialShell/plugins/adguardVPplugin
2. Reload & enable
dms ipc plugins reload adguardVPplugin
dms ipc plugins enable adguardVPplugin
3. Add to DankBar
Open DMS Settings â Widgets and add AdGuard VPN to your bar.
âïž Settings
All settings are configurable through the DMS plugin settings screen.
| Setting | Type | Default | Description |
|---|---|---|---|
adguardBinary | string | adguardvpn-cli | CLI binary name or absolute path |
refreshIntervalSec | int | 8 | Status polling interval (3â120 s) |
locationsCount | int | 20 | How many locations to fetch (5â100) |
connectStrategy | enum | fastest | Default connect behavior: fastest or location |
defaultLocation | string | â | Preferred location (city, country, or ISO code) |
ipStack | enum | auto | Force ipv4 or ipv6 on connect |
autoRefreshLocations | bool | true | Periodically refresh ranked server list |
autoConnectOnStartup | bool | false | Auto-connect when plugin / session starts |
autoReconnectOnDrop | bool | false | Auto-reconnect when the tunnel drops unexpectedly |
showLocationInBar | bool | true | Display connection text next to bar icon |
bypassMultiRouteCheck | bool | false | Skip the pre-connect multi-default-route check (Settings â Advanced) if it false-positives on your setup |
useSystemdService | bool | false | Delegate connect/disconnect to the optional, separately installed adguardvpn-dms-control systemd helper |
languageOverride | enum | auto | UI language: auto, en_US, pt_BR, es_ES, zh_CN, hi_IN, ar, bn_BD, fr_FR, de_DE, ja_JP, ru_RU, ko_KR, id_ID, tr_TR, vi_VN, it_IT, pl_PL, nl_NL, fa_IR, th_TH, ur_PK, ms_MY |
đïž Project Structure
adguardVPplugin/
âââ plugin.json # Manifest & permissions
âââ qmldir # QML singleton registration
âââ AdGuardVpnWidget.qml # Bar pill + popout UI
âââ AdGuardVpnSettings.qml # DMS settings screen
âââ AdGuardVpnService.qml # Singleton: polling, actions, state
âââ AdGuardVpnParsers.js # CLI output parsers (status, config, license, locations)
âââ AdGuardVpnI18n.qml # Localization singleton
âââ i18n/
â âââ en.js # English (fallback)
â âââ pt_BR.js # PortuguĂȘs (Brasil)
â âââ es_ES.js # Espanol
â âââ zh_CN.js # Chinese (Simplified)
â âââ hi_IN.js # Hindi
â âââ ar.js # Arabic
â âââ bn_BD.js # Bengali
â âââ fr_FR.js # French
â âââ de_DE.js # German
â âââ ja_JP.js # Japanese
â âââ ru_RU.js # Russian
â âââ ko_KR.js # Korean
â âââ id_ID.js # Indonesian
â âââ tr_TR.js # Turkish
â âââ vi_VN.js # Vietnamese
â âââ it_IT.js # Italian
â âââ pl_PL.js # Polish
â âââ nl_NL.js # Dutch
â âââ fa_IR.js # Persian
â âââ th_TH.js # Thai
â âââ ur_PK.js # Urdu
â âââ ms_MY.js # Malay
â âââ README.md # Translation guide
âââ scripts/
â âââ check-i18n-keys.mjs # i18n key parity checker
â âââ test-parsers.mjs # Parser unit tests (status/license/config/locations)
â âââ lint-markdown.sh # Markdown linter
â âââ validate-qml.sh # QML syntax validator
âââ docs/
â âââ ARCHITECTURE.md # Component design & data flow
â âââ COMMANDS.md # CLI command mapping
â âââ RELEASE_CHECKLIST.md # Release process
â âââ releases/ # Per-version release notes
âââ CHANGELOG.md
âââ CONTRIBUTING.md
âââ LICENSE # MIT
For detailed architecture and data flow, see docs/ARCHITECTURE.md. For the CLI command map, see docs/COMMANDS.md.
đ Security & Permissions
The plugin only executes local CLI commands through the DMS process API.
No credentials are stored â secrets live in adguardvpn-cli's own config.
Network traffic is entirely managed by the CLI itself.
| Permission | Purpose |
|---|---|
settings_read | Load plugin settings |
settings_write | Persist plugin settings |
process | Execute adguardvpn-cli commands |
đ Troubleshooting
adguardvpn-cli unavailable
Verify the binary is accessible:
adguardvpn-cli --version
If using a custom path, update it in plugin settings (adguardBinary).
Auth / session issues
Authenticate interactively, then refresh in the widget:
adguardvpn-cli login
Location connect errors (city / country / ISO not found)
- Hit Refresh in the widget to update the location list.
- Prefer the visible city, country label from the list, or an ISO code when you want the CLI to choose within a country.
- If a saved preferred location is stale, update it in settings.
Plugin not loading
dms ipc plugins status adguardVPplugin
dms ipc plugins reload adguardVPplugin
đ» Development
Follow the DMS plugin development guide.
Recommended loop:
# edit codeâŠ
dms ipc plugins reload adguardVPplugin
Quality checks before committing:
node scripts/check-i18n-keys.mjs # i18n key parity
node scripts/test-parsers.mjs # parser unit tests
bash scripts/lint-markdown.sh # markdown lint
bash scripts/validate-qml.sh # QML syntax
đ Localization
This plugin is now officially multilang and ships with:
- Full locales: English, PortuguĂȘs (Brasil)
- Full locales (previously extended with English fallback): Español, äžæ (çźäœ), à€čà€żà€šà„à€Šà„, ۧÙŰč۱ۚÙŰ©, àŠŹàŠŸàŠàŠČàŠŸ, Français, Deutsch, æ„æŹèȘ, Đ ŃŃŃĐșĐžĐč, íê”ìŽ, Indonesia, TĂŒrkçe, Tiáșżng Viá»t, Italiano, Polski, Nederlands, Ùۧ۱۳Û, àčàžàžą, ۧ۱ۯÙ, Bahasa Melayu
Every shipped locale is now fully translated (all 179 message keys). Untranslated strings, if any are added later, fall back to English.
Adding or extending locales is straightforward â see i18n/README.md.
đ€ Contributing
See CONTRIBUTING.md for workflow, quality checks, and release process.
đŠ Publishing
Follow the Release Checklist, then:
git tag vX.Y.Z
git push origin main --tags
Submit to the DMS Plugin Registry.
đ License
MIT â Bernardo Gomes
PortuguĂȘs (Brasil)
Controle, monitore e configure o AdGuard VPN diretamente pela DankBar â sem precisar abrir o terminal.
Recursos
| Categoria | O que vocĂȘ recebe |
|---|---|
| Monitoramento ao vivo | Status, conta, interface do tĂșnel, endpoint SOCKS e localizaçÔes ranqueadas em tempo real |
| AçÔes em um clique | Conectar / Desconectar / Mais rĂĄpida / Conectar por localização â Enter no campo tambĂ©m conecta |
| Configuração em runtime | Modo (TUN / SOCKS), Protocolo (Auto / HTTP2 / QUIC), canal de atualização e DNS upstream |
| Ferramentas de localização | Busca, filtro, favoritos fixados no topo e paginação "mostrar mais" |
| ResiliĂȘncia | Auto-conectar ao iniciar, auto-reconectar com backoff em 3 etapas e preflight de conexĂŁo |
| DiagnĂłstico | Ăltimo comando, visualizador do log do tĂșnel e banner de login com comando copiĂĄvel |
| Acessibilidade | Navegação completa por teclado (Tab + Enter/Espaço) com foco visĂvel e roles Accessible |
| MultilĂngue | 22 idiomas totalmente traduzidos (EN, PT-BR + 20 locales adicionais) |
| Parsers testados | Remoção de ANSI e parsing multi-formato cobertos por 31 testes unitårios no CI |
Requisitos
| DependĂȘncia | VersĂŁo |
|---|---|
| DankMaterialShell | >= 1.4.0 |
adguardvpn-cli | Qualquer versão recente; veja o guia oficial de instalação |
| Conta AdGuard | SessĂŁo iniciada com adguardvpn-cli login |
Instalação
git clone https://github.com/bernardopg/dms-adguard-vpn-plugin.git \
~/.config/DankMaterialShell/plugins/adguardVPplugin
dms ipc plugins reload adguardVPplugin
dms ipc plugins enable adguardVPplugin
Depois, abra DMS Settings â Widgets e adicione AdGuard VPN Ă barra.
TĂșnel gerenciado por systemd (opcional)
Por padrĂŁo o plugin chama o adguardvpn-cli direto e funciona sem nenhum
serviço extra. ConfiguraçÔes avançadas podem ativar useSystemdService: true e
fornecer /usr/local/sbin/adguardvpn-dms-control; nesse modo, conectar e
desconectar delegam o tĂșnel persistente a um serviço systemd de root em vez de
deixĂĄ-lo no cgroup do DMS. HĂĄ uma implementação de referĂȘncia em
scripts/adguardvpn-dms-control:
sudo install -m 755 -o root -g root \
scripts/adguardvpn-dms-control /usr/local/sbin/adguardvpn-dms-control
Depois conceda ao usuĂĄrio do desktop uma regra NOPASSWD no sudoers para esse
caminho exato â o plugin sempre chama por sudo -n, entĂŁo um prompt
interativo faz a ação falhar em silĂȘncio.
Vai escrever seu próprio helper? Faça
connect-fastesteconnect-locationserem idempotentes. Osystemctl restartderruba o tĂșnel por alguns segundos: o NetworkManager marca a interface comounmanaged, o systemd-resolved troca de servidor DNS e toda conexĂŁo em curso morre junto â downloads, SSH, sessĂ”es HTTP longas. Um helper que reinicia incondicionalmente transforma um clique que nĂŁo muda nada ("conectar na localização em que jĂĄ estou") numa queda de rede real. A implementação de referĂȘncia sai com0sem reiniciar quando a unit jĂĄ estĂĄ ativa e/var/lib/adguardvpn-dms/locationjĂĄ corresponde ao destino pedido;--forcerestaura o comportamento incondicional para reescolher servidor de propĂłsito.
ConfiguraçÔes
Todas as configuraçÔes ficam na tela de settings do plugin no DMS.
| Configuração | Tipo | Padrão | Descrição |
|---|---|---|---|
adguardBinary | string | adguardvpn-cli | Nome do binĂĄrio ou caminho absoluto do CLI |
refreshIntervalSec | int | 8 | Intervalo de polling de status (3â120 s) |
locationsCount | int | 20 | Quantidade de localizaçÔes carregadas (5â100) |
connectStrategy | enum | fastest | Estratégia padrão: fastest ou location |
defaultLocation | string | â | Localização preferida: cidade, paĂs ou ISO |
ipStack | enum | auto | Forçar IPv4 ou IPv6 nas conexÔes |
autoRefreshLocations | bool | true | Atualizar lista de localizaçÔes periodicamente |
autoConnectOnStartup | bool | false | Conectar automaticamente ao iniciar plugin/sessĂŁo |
autoReconnectOnDrop | bool | false | Reconectar se o tĂșnel cair inesperadamente |
showLocationInBar | bool | true | Mostrar texto/localização ao lado do Ăcone |
bypassMultiRouteCheck | bool | false | Pular a checagem de mĂșltiplas rotas padrĂŁo antes de conectar (ConfiguraçÔes â Avançado) em setups com falso positivo |
useSystemdService | bool | false | Delegar conexĂŁo/desconexĂŁo ao helper systemd opcional adguardvpn-dms-control, instalado separadamente |
languageOverride | enum | auto | Idioma da UI; auto segue o locale do sistema |
Segurança e permissÔes
O plugin executa apenas comandos locais pelo processo do DMS. Credenciais nĂŁo sĂŁo armazenadas pelo plugin; elas ficam no prĂłprio adguardvpn-cli.
| PermissĂŁo | Finalidade |
|---|---|
settings_read | Ler configuraçÔes do plugin |
settings_write | Persistir configuraçÔes do plugin |
process | Executar comandos locais do adguardvpn-cli |
Solução de problemas
Se o CLI aparecer como indisponĂvel, verifique:
adguardvpn-cli --version
Se usa caminho customizado, atualize adguardBinary nas configuraçÔes. Para problemas de sessĂŁo, rode adguardvpn-cli login. Para erros de localização, atualize a lista no widget e prefira o rĂłtulo visĂvel cidade, paĂs; use ISO quando quiser deixar o CLI escolher dentro do paĂs.
Desenvolvimento
Loop recomendado:
dms ipc plugins reload adguardVPplugin
Checks antes de commitar:
node scripts/check-i18n-keys.mjs
node scripts/test-parsers.mjs
bash scripts/lint-markdown.sh
bash scripts/validate-qml.sh
Licença
MIT â Bernardo Gomes