Skip to content

Repository files navigation

cloudflare-pal

Cloudflare diagnostic and utility tool. A CLI tool for DNS, TCP, TLS, and WHOIS diagnostics with automatic HTTPS support.

Install

go install github.com/geektr-cloud/cloudflare-pal@latest

Or using Docker:

docker pull ghcr.io/geektr-cloud/cloudflare-pal:latest

Usage

Start server

# HTTP mode (default port 8080)
cloudflare-pal serve

# Custom port
CFPAL_PORT=9090 cloudflare-pal serve

# HTTPS mode with automatic certificate
CFPAL_DOMAIN=your-domain.com cloudflare-pal serve

API Examples

DNS Query

# Basic A record
curl "http://localhost:8080/dig?host=example.com&type=A"

# AAAA record
curl "http://localhost:8080/dig?host=example.com&type=AAAA"

# MX records
curl "http://localhost:8080/dig?host=google.com&type=MX"

# TXT records (SPF, DKIM, etc.)
curl "http://localhost:8080/dig?host=example.com&type=TXT"

# Custom nameserver
curl "http://localhost:8080/dig?host=example.com&type=A&nameserver=8.8.8.8"

TCP Connectivity Check

# Check if port is reachable
curl "http://localhost:8080/tcp?host=example.com&port=443"

# With custom timeout (seconds)
curl "http://localhost:8080/tcp?host=example.com&port=22&timeout=10"

TLS Certificate Info

# Check TLS certificate (default port 443)
curl "http://localhost:8080/tls?host=example.com"

# Custom port
curl "http://localhost:8080/tls?host=example.com&port=8443"

WHOIS Lookup

# Basic domain lookup
curl "http://localhost:8080/whois?domain=example.com"

# Specify WHOIS server
curl "http://localhost:8080/whois?domain=example.com&server=whois.verisign-grs.com"

Configuration

Config file locations (in order):

  • /etc/cloudflare-pal/config.yaml
  • ./config.yaml

Environment variables prefix: CFPAL_

# domain: "your-domain.com"  # Enable automatic HTTPS
# port: 8080                 # HTTP port (default: 8080)

Install as systemd service

sudo cloudflare-pal install

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages