README.md

September 20, 2026 ยท View on GitHub

๐Ÿฑ Can I Haz Reachability? ๐Ÿ“ก

A professional tool to verify network reachability, TLS configurations, and firewall settings.

License Stars

๐Ÿ˜บ O HAI! I can haz reachability? I checkz if ur ports are open so u don't haz to guess. It's like ping but fancy. Kthxbye!

๐Ÿ‘‰ Check it out here: https://cgnat.admon.me ๐Ÿ‘ˆ


๐Ÿ’– Support the Project

If you find this tool helpful, consider supporting its development:

GitHub Sponsors Buy Me A Coffee Ko-fi PayPal


๐Ÿ“– About

Can I Haz Reachability? (also known as the Reflector Server) is a robust Go-based service designed to verify if specific ports on a client's IP address are reachable from the internet. It acts as an external "mirror," attempting to connect back to the requestor to validate port forwarding, detect Carrier-Grade NAT (CGNAT), and analyze firewall configurations.

Beyond simple connectivity, it offers advanced features like TLS certificate analysis and service banner grabbing, making it an essential tool for network troubleshooting and verification.


โœจ Features

  • ๐Ÿš€ Port Reachability Check โ€“ Verifies TCP connectivity to specified ports on the requestor's public IP.
  • ๐Ÿ”’ TLS/SSL Analysis โ€“ Performs a detailed inspection of SSL certificates on port 443 (validity, chain, cipher suites).
  • ๐Ÿ•ต๏ธ Banner Grabbing โ€“ Identifies running services (e.g., SSH versions) by retrieving their initial connection banner.
  • ๐Ÿ›ก๏ธ Reflector Challenge โ€“ Supports a token-based challenge system to verify ownership of the target server.
  • ๐Ÿ›‘ Rate Limiting โ€“ Includes built-in, IP-based rate limiting to prevent abuse.
  • ๐Ÿ™ˆ Privacy Focused โ€“ Logs are strictly anonymized. Private/internal IP ranges are blocked by default.

๐Ÿ“‹ Requirements

RequirementDetails
Container EngineDocker or Podman (recommended for deployment)
LanguageGo 1.25+ (if building from source)
Architecturex86_64, arm64 (multi-arch support via Docker)

๐Ÿš€ Quick Start

Using Docker

docker run -d \
  --name can-i-haz-reachability \
  -p 8080:8080 \
  admonstrator/can-i-haz-reachability:latest

The API will be available at http://localhost:8080.

Available Tags

TagDescription
latestLatest stable build from main
sha-<commit>Pinned build for a specific commit

Supported Architectures

ArchitectureDescription
linux/amd64x86-64 (Intel/AMD)
linux/arm64ARM 64-bit (Raspberry Pi 4/5, Apple Silicon, etc.)

Using Docker Compose

  1. Navigate to the deployment directory:

    cd deploy/docker
    
  2. Start the service:

    docker-compose up -d --build
    

Using Podman (Quadlet)

  1. Build the image:

    podman build -t reflector-server -f deploy/docker/Dockerfile .
    
  2. Copy the .container file and create the environment file:

    mkdir -p ~/.config/containers/systemd/
    cp deploy/podman/reflector.container ~/.config/containers/systemd/
    cp env.example ~/.config/containers/systemd/reflector.env
    
  3. (Optional) Edit the environment file to customize settings:

    nano ~/.config/containers/systemd/reflector.env
    
  4. Reload and start the service:

    systemctl --user daemon-reload
    systemctl --user start reflector
    

๐ŸŽ›๏ธ Configuration

The service is configured using environment variables. These can be set in docker-compose.yml or a .env file.

VariableDescriptionDefault
REFLECTOR_PORTThe TCP port the server listens on.8080
REFLECTOR_TIMEOUTConnection timeout for reachability checks.5s
REFLECTOR_ALLOWED_PORTSComma-separated list of ports allowed to be tested.80,443,8080,8443
REFLECTOR_RATE_LIMIT_PER_MINMaximum number of requests per IP per minute.10
REFLECTOR_LOG_DIRDirectory where application logs are stored./logs

Example with custom configuration:

docker run -d \
  --name can-i-haz-reachability \
  -p 8080:8080 \
  -e REFLECTOR_ALLOWED_PORTS="22,80,443,8080" \
  -e REFLECTOR_RATE_LIMIT_PER_MIN=20 \
  -v /var/log/reflector:/logs \
  admonstrator/can-i-haz-reachability:latest

๐Ÿ“š API Usage

Detailed Check (GET /check)

Performs a comprehensive scan of the requested ports.

Query Parameters:

  • ports: Comma-separated list of ports to check (e.g., 80,443).
  • tls_analyze: Set to true to enable TLS certificate analysis (Port 443 only).
  • banner: Set to true to attempt banner grabbing.

Example:

curl "http://localhost:8080/check?ports=80,443&tls_analyze=true"

Simple Check (GET /simple)

Returns a concise "yes" or "no" string, ideal for automated scripts.

Query Parameters:

  • port: The single port to check (default: 80).

Example:

curl "http://localhost:8080/simple?port=443"
# Output: yes

Health Check (GET /health)

Returns the service status and basic runtime statistics.


๐Ÿ” Key Features Explained

Privacy & Security

This service is designed with privacy in mind. Access logs automatically anonymize client IP addresses (e.g., masking the last octet) to ensure user privacy while allowing for basic diagnostics. Additionally, the service refuses to scan private or internal IP ranges (RFC 1918) to prevent misuse as an internal network scanner.


๐Ÿ’ก Getting Help

Need assistance or have questions?


โš ๏ธ Disclaimer

This script is provided as-is without any warranty. Use it at your own risk.

It may potentially:

  • ๐Ÿ”ฅ Break your router, computer, or network
  • ๐Ÿ”ฅ Cause unexpected system behavior
  • ๐Ÿ”ฅ Even burn down your house (okay, probably not, but you get the idea)

You have been warned!

Always read the documentation carefully and understand what a script does before running it.


๐Ÿ“œ License

This project is licensed under the MIT License โ€“ see the LICENSE file for details.


๐Ÿงฐ Part of the GL.iNet Toolbox

This project is part of a comprehensive collection of tools for GL.iNet routers.

Explore more tools and utilities:

GL.iNet Toolbox

Discover AdGuard Home Updater, ACME Certificate Manager, and more community-driven projects!


Made with โค๏ธ by Admon for the GL.iNet Community

โญ If you find this useful, please star the repository!

Last updated: 2026-09-20