pihole
暂无简介
- License 许可
- MIT
- 最近更新
- 2026-08-23
- Stars
- ★ 1
- Forks
- 0
02 资源文件 33
- 参考文档_meta.json274 B
- 资产文件assets/authorship_template.json1.2 KB
- 资产文件assets/claim_evidence_template.csv218 B
- 资产文件assets/consistency_manifest_template.json891 B
- 资产文件assets/manuscript_manifest_template.json1012 B
- 资产文件assets/manuscript_scaffold.md1.9 KB
- 资产文件assets/REPORT_FORMATTING_GUIDE.md2.6 KB
- 资产文件assets/reporting_coverage_template.json189 B
- 资产文件assets/reporting_guidelines.json15.6 KB
- 资产文件assets/source_manifest_template.json599 B
- 脚本pihole.sh10.1 KB
- 参考文档references/authorship_ai_confidentiality.md4.4 KB
- 参考文档references/citation_styles.md3.7 KB
- 参考文档references/cli_reference.md3.5 KB
- 参考文档references/evidence_workflow.md3.8 KB
- 参考文档references/figures_tables.md3.8 KB
- 参考文档references/imrad_structure.md4.4 KB
- 参考文档references/journal_policies.md2.5 KB
- 参考文档references/professional_report_formatting.md3.2 KB
- 参考文档references/reporting_guidelines.md4.7 KB
- 参考文档references/research_integrity_open_science.md4.1 KB
- 参考文档references/source_ledger.md9.9 KB
- 参考文档references/writing_principles.md3.8 KB
- 脚本scripts/_common.py8.0 KB
- 脚本scripts/audit_claims.py8.8 KB
- 脚本scripts/check_consistency.py14.8 KB
- 脚本scripts/check_references.py7.1 KB
- 脚本scripts/lint_manuscript.py5.8 KB
- 脚本scripts/scaffold_manuscript.py4.4 KB
- 脚本scripts/select_reporting_guidelines.py7.6 KB
- 脚本scripts/validate_authorship.py11.4 KB
- 脚本scripts/validate_manifest.py14.4 KB
- 参考文档SECURITY_AUDIT.md6.0 KB
03 SKILL.md 正文
Pi-hole Skill
Control your Pi-hole DNS ad blocker via the Pi-hole v6 API.
Setup
Set your Pi-hole API configuration in Clawdbot config:
skills:
entries:
pihole:
apiUrl: "https://pi-hole.local/api" # v6 API path
apiToken: "your-app-password-here" # Get from Pi-hole Admin
insecure: false # Set to true for self-signed certs
Alternatively, set environment variables:
export PIHOLE_API_URL="https://pi-hole.local/api"
export PIHOLE_API_TOKEN="your-app-password-here"
export PIHOLE_INSECURE="false"
Getting API Credentials
- Open Pi-hole Admin at
http://pi-hole.local/admin - Navigate to Settings > API
- Generate an app password
- Use that password as
apiToken
Capabilities
Status
- Get current Pi-hole status (enabled/disabled)
- View stats: queries blocked, queries today, domains being blocked, active clients
- See recent query activity
Controls
- Enable/Disable: Turn Pi-hole on or off
- Disable for 5 minutes: Temporarily disable ad blocking for a short period
- Disable for custom duration: Set specific disable time (in minutes)
Block Analysis
- Check blocked domains: See what domains were blocked in a time window
- Show top blocked: Most frequently blocked domains
Usage Examples
# Check Pi-hole status
"pihole status"
# Turn off ad blocking
"pihole off"
# Turn on ad blocking
"pihole on"
# Disable for 5 minutes (for a site that needs ads)
"pihole disable 5m"
# Disable for 30 minutes
"pihole disable 30"
# See what was blocked in the last 30 minutes
"pihole blocked"
# See blocked domains in last 10 minutes (600 seconds)
"pihole blocked 600"
# Show statistics
"pihole stats"
API Endpoints (Pi-hole v6)
Authentication
POST /api/auth
Content-Type: application/json
{"password":"your-app-password"}
Response:
{
"session": {
"sid": "session-token-here",
"validity": 1800
}
}
Status
GET /api/dns/blocking
Headers: sid: <session-token>
Response:
{
"blocking": "enabled" | "disabled",
"timer": 30 // seconds until re-enable (if disabled with timer)
}
Enable/Disable
POST /api/dns/blocking
Headers: sid: <session-token>
Content-Type: application/json
Enable:
{"blocking":true}
Disable:
{"blocking":false}
Disable with timer (seconds):
{"blocking":false,"timer":300}
Stats
GET /api/stats/summary
Headers: sid: <session-token>
Response:
{
"queries": {
"total": 233512,
"blocked": 23496,
"percent_blocked": 10.06
},
"gravity": {
"domains_being_blocked": 165606
},
"clients": {
"active": 45
}
}
Queries
GET /api/queries?start=-<seconds>
Headers: sid: <session-token>
Response:
{
"queries": [
{
"domain": "example.com",
"status": "GRAVITY",
"time": 1768363900,
"type": "A"
}
]
}
v5 vs v6 API Changes
Pi-hole v6 introduced significant API changes:
| Feature | v5 API | v6 API |
|---|---|---|
| Base URL | /admin/api.php |
/api |
| Auth | Token in URL/headers | Session-based |
| Status | ?status |
/api/dns/blocking |
| Stats | ?summaryRaw |
/api/stats/summary |
| Queries | ?recentBlocked |
/api/queries |
| Whitelist | Supported via API | Not available via API |
Important: Domain whitelisting is no longer available via the v6 API. You must whitelist domains through the Pi-hole Admin UI.
SSL Certificates
Production (Valid Cert)
{
"apiUrl": "https://pi-hole.example.com/api",
"apiToken": "...",
"insecure": false
}
Self-Signed/Local Cert
{
"apiUrl": "https://pi-hole.local/api",
"apiToken": "...",
"insecure": true
}
The insecure flag adds the -k option to curl to bypass certificate validation.
Security Notes
- Session tokens expire after 30 minutes (1800 seconds)
- API password is sent in JSON body, not URL
- All requests have a 30-second timeout
- Token is not visible in process list (passed via environment)
Troubleshooting
"Failed to authenticate"
- Check that
apiTokenmatches your Pi-hole app password - Verify
apiUrlis correct (must end in/api) - Ensure Pi-hole is accessible from your network
"Could not determine status"
- Check API URL is reachable
- If using HTTPS with self-signed cert, set
insecure: true - Verify API password is correct
Network Errors
- Ensure clawdbot's machine can reach the Pi-hole
- Check firewall rules allow API access
- Verify URL scheme (http vs https)
Requirements
- Pi-hole v6 or later
- App password generated in Pi-hole Admin
- Network access to Pi-hole API
curl,jq(installed on most Unix systems)
04 同仓库更多 Skills
crowd-prompting
A marketplace where AI agents improve prompts, system instructions, tool descriptions, and other text-based content with domain expertise from real-world operations — and earn tokens for valuable contributions.
dilemm-ai
Compete in DilemmAI, the prisoner's dilemma AI arena at dilemm.ai. Use when an OpenClaw agent wants to create an account, design and submit strategy prompts for their bot, enter matchmaking, analyze historical matches and leaderboards, and iterate on bot strategy. Requires headless browser automation (no API available yet).
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
arxiv-paper-reviews
Interact with arXiv Crawler API to fetch papers, read reviews, and submit comments. Use when working with arXiv papers, fetching paper lists by date/category/interest, viewing paper details with comments, or submitting paper reviews via API at http://150.158.152.82:8000.
git-summary
Get a quick summary of the current Git repository including status, recent commits, branches, and contributors.
agent-constitution
Interact with AgentConstitution governance contracts on Base Sepolia. Check compliance, read rules, log actions, query governance state.