Skip to content
Back to skills

Adguard Home

FSecurity

๐Ÿ›ก๏ธ Query AdGuard Home instances for DNS statistics, blocked domains, and client activity ---

  • 2 stars
  • 0 votes
  • 0 copies
  • 2 views
  • Added November 11, 2026
securityjavascriptjavashellbashnodeapisecuritydocumentation

Works with

  • cli
  • api

Security analysis

F38/100
  • criticalModifies startup scripts or system services for persistence
  • criticalModifies startup scripts or system services for persistence
  • criticalSends environment variables or credentials to an external URL

Pro scans all 12 files and shows the line behind each finding

Scanned November 11, 2026

npx -y skills add johnalbertini14-glitch/openclaw-skills --skill adguard-home --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Adguard Home?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Adguard Home
[![Security: F โ€” Skills Directory](https://www.skillsdirectory.com/api/skills/johnalbertini14-glitch-adguard-home/badge)](https://www.skillsdirectory.com/skills/johnalbertini14-glitch-adguard-home)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# AdGuard Home Skill

๐Ÿ›ก๏ธ Query AdGuard Home instances for DNS statistics, blocked domains, and client activity

---

## Features

- โœ… Multi-instance support
- โœ… Real-time DNS query statistics
- โœ… Blocked domains leaderboard
- โœ… Active client analysis
- โœ… Health status check
- โœ… Service status monitoring
- โœ… DNS configuration details
- โœ… Filter rules inspection
- โœ… Recent query log
- โœ… TLS/encryption status

---

## Usage

### Basic Commands

```bash
# Statistics & Monitoring
/adguard stats [instance]           # DNS statistics
/adguard top-clients [instance]     # Top 10 active clients
/adguard top-blocked [instance]     # Top 10 blocked domains
/adguard health [instance]          # Health check
/adguard status [instance]          # Service status

# Configuration & Rules
/adguard dns-info [instance]        # DNS configuration
/adguard filter-rules [instance]    # Filter rules and lists
/adguard clients [instance]         # Configured clients
/adguard tls-status [instance]      # TLS/encryption status

# Query Log
/adguard querylog [instance] [n]    # Recent n queries (default: 10)
```

### Examples

```bash
# Query dns1 instance statistics
/adguard stats dns1

# Check service status
/adguard status dns1

# View DNS configuration
/adguard dns-info dns1

# View filter rules
/adguard filter-rules dns1

# View last 20 DNS queries
/adguard querylog dns1 20

# Check TLS status
/adguard tls-status dns1

# If no instance specified, uses the first configured instance
/adguard stats
```

### Output Examples

**stats command:**
```
๐Ÿ“Š AdGuard Home Statistics (dns1)
Total DNS Queries: 141,647
Blocked Requests: 32,540 (23.0%)
Avg Response Time: 0.005ms
```

**status command:**
```
๐Ÿ”ง AdGuard Home Status (dns1)
Version: v0.107.72
Running: โœ… Yes
Protection: โœ… Enabled
DNS Port: 53
HTTP Port: 1080
Language: zh-cn
DHCP Available: โœ… Yes
```

**dns-info command:**
```
๐ŸŒ DNS Configuration (dns1)
Protection: โœ… Enabled
Rate Limit: 20 req/s
Upstream Mode: parallel
Cache: โœ… 4MB
DNSSEC: โŒ Disabled
IPv6: โœ… Enabled

Upstream DNS Servers:
  1. https://dns.alidns.com/dns-query
  2. 192.168.1.1:53
  3. 8.8.8.8:53
```

**filter-rules command:**
```
๐Ÿ›ก๏ธ Filter Rules (dns1)
Filtering: โœ… Enabled
Update Interval: 12 hours
User Rules: 6 custom rules

Filter Lists:
  1. โœ… AdAway Default Blocklist (6540 rules)
  2. โœ… gh_100M_block (1110461 rules)
  3. โœ… Delta Force Blacklist (78126 rules)
```

**querylog command:**
```
๐Ÿ“œ Recent DNS Queries (dns1) - Last 5 entries

1. [12:26:44 AM] ๐Ÿšซ BLOCKED api.telegram.org (192.168.145.188)
2. [12:26:43 AM] ๐Ÿšซ BLOCKED self.events.data.microsoft.com (192.168.145.123)
   Rule: ||events.data.microsoft.com^
3. [12:26:42 AM] โœ… OK open.feishu.cn (192.168.145.188)
```

---

## Configuration

### ๐Ÿ”’ Security Best Practices

**โš ๏ธ Important:** Never store plaintext credentials in files. Always use secure credential injection:

#### Option 1: Environment Variables (Recommended)

Set environment variables before running commands:

```bash
export ADGUARD_URL="http://192.168.145.249:1080"
export ADGUARD_USERNAME="admin"
export ADGUARD_PASSWORD="your-secure-password"
```

Add these to your shell profile (`~/.bashrc`, `~/.zshrc`) for persistence.

#### Option 2: 1Password CLI (Most Secure)

Use `op read` to inject secrets at runtime:

```bash
export ADGUARD_URL=$(op read "op://vault/AdGuard/url")
export ADGUARD_USERNAME=$(op read "op://vault/AdGuard/username")
export ADGUARD_PASSWORD=$(op read "op://vault/AdGuard/password")
```

**โŒ Deprecated: File-based Config**

Previous versions allowed creating `adguard-instances.json` with credentials. **This is no longer supported** due to the risk of accidental commits and plaintext storage. Migrate to environment variables or 1Password.

---

### Configuration Parameters

| Parameter | Description | Example |
|-----------|-------------|---------|
| `url` | AdGuard Home URL (with port) | `http://192.168.145.249:1080` |
| `username` | Admin username | `admin` |
| `password` | Admin password (use env var or secrets manager) | `your-secure-password` |

---

## Technical Details

- **Authentication:** Cookie-based (POST `/control/login`)
- **Data API:** GET `/control/*` endpoints
- **Runtime:** Node.js (ES Module)
- **Entrypoint:** `index.js`

### API Endpoints Used

- `/control/stats` - Statistics data
- `/control/status` - Service status
- `/control/dns_info` - DNS configuration
- `/control/filtering/status` - Filter rules
- `/control/querylog` - Query log
- `/control/clients` - Client management
- `/control/tls/status` - TLS status

---

## FAQ

**Q: Error "No AdGuard instances configured"?**

A: Set environment variables before running commands:
```bash
export ADGUARD_URL="http://your-adguard:1080"
export ADGUARD_USERNAME="admin"
export ADGUARD_PASSWORD="your-password"
```
Or use 1Password CLI to inject credentials securely.

---

**Q: Authentication error when querying?**

A: Verify username/password. Ensure AdGuard Home service is running.

---

**Q: How to add more instances?**

A: Use a secrets manager (1Password) to store multiple instance credentials, or switch between instances by setting different `ADGUARD_URL` values. For advanced multi-instance setups, consider running separate shell sessions with different environment configurations.

---

**Q: querylog shows no data?**

A: Ensure query log is enabled in AdGuard Home settings (Settings โ†’ DNS Settings โ†’ Query log).

---

## Version History

### v1.2.6 (2026-02-25) - Remove File Config References ๐Ÿ”ง

**Bug Fixes:**
- โœ… **Fixed FAQ inconsistency** - Removed `adguard-instances.json` reference from "How to add more instances?" answer
- โœ… **Docs match code** - All documentation now consistent with v1.2.2+ env-vars-only implementation
- โœ… **Updated multi-instance guidance** - Explains using 1Password or separate shell sessions

### v1.2.5 (2026-02-25) - Fix Registry Metadata ๐Ÿ”ง

**Bug Fixes:**
- โœ… **Fixed registry metadata** - `clawhub.json` now correctly declares `requires.env` with `ADGUARD_URL`, `ADGUARD_USERNAME`, `ADGUARD_PASSWORD`
- โœ… **Set primaryEnv** - ClawHub store now shows environment variables as required
- โœ… **Updated security notes** - Documents metadata fix

### v1.2.2 (2026-02-25) - Remove File-based Credentials ๐Ÿ”

**Security Improvements:**
- โœ… **Removed file-based config option** - No longer supports `adguard-instances.json` with plaintext credentials
- โœ… **Env vars only** - Credentials must be provided via environment variables or 1Password
- โœ… **Updated FAQ** - Removed references to config file creation
- โœ… **Clearer warnings** - Explicitly marks file-based config as deprecated and unsupported

### v1.2.1 (2026-02-25) - Credential Security ๐Ÿ”

**Security Improvements:**
- โœ… **Removed plaintext credential storage** - No longer instructs creating config files with admin credentials
- โœ… **Environment variable support** - Secure credential injection via `ADGUARD_URL`, `ADGUARD_USERNAME`, `ADGUARD_PASSWORD`
- โœ… **1Password integration** - Supports secrets management via `op read`
- โœ… **Removed multi-path search** - No longer searches `~/.openclaw-*/workspace/` paths
- โœ… **Workspace-only config** - Local config file only checked in skill directory (dev use)
- โœ… **Updated documentation** - Security best practices prominently featured

### v1.2.0 (2026-02-24) - Security Hardening ๐Ÿ”’

**Security Improvements:**
- โœ… **Removed command injection vulnerability** - Replaced `execSync` + `curl` with native HTTPS client
- โœ… **Input validation** - Sanitized instance names, commands, and parameters
- โœ… **Command whitelist** - Only allowed commands can be executed
- โœ… **URL validation** - Verified URL format before making requests
- โœ… **Parameter bounds** - Limited querylog limit to 1-100 entries
- โœ… **No shell escaping issues** - Pure JavaScript HTTP requests

**Technical Changes:**
- Removed dependency on `child_process` and external `curl` commands
- Implemented native `http`/`https` module for all API calls
- Added cookie-based session management
- Improved error handling and validation

### v1.1.0 (2026-02-24) - Enhanced

**New Commands:**
- `status` - Service status (version, protection, ports)
- `dns-info` - DNS configuration details
- `filter-rules` - Filter rules and lists
- `querylog [n]` - Recent DNS queries
- `clients` - Configured clients
- `tls-status` - TLS/encryption status

**Improvements:**
- Better error handling
- Enhanced output formatting

### v1.0.0 (2026-02-24) - Initial

**Features:**
- stats/top-clients/top-blocked/health commands
- Multi-instance configuration support
- ES Module implementation

---

## Author

**Leo Li (@foxleoly)**  
License: MIT

Files in this skill

  • PUBLISH_GUIDE.md5.5 KB
  • README.md2.4 KB
  • SECURITY_AUDIT.md6.5 KB
  • SECURITY_RESPONSE.md4.4 KB
  • SKILL.en.md8.5 KB
  • SKILL.md8.5 KB
  • SKILL.zh-CN.md12 KB
  • TEST_REPORT.md4.1 KB
  • VERSION_CHECK.md1.4 KB
  • _meta.json808 B
  • clawhub.json2.2 KB
  • index.js13.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in security โ†’

Comments

Loading commentsโ€ฆ

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.