Download the PHP package cboxdk/laravel-dns without Composer
On this page you can find all versions of the php package cboxdk/laravel-dns. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cboxdk/laravel-dns
More information about cboxdk/laravel-dns
Files in cboxdk/laravel-dns
Package laravel-dns
Short Description Laravel integration for cboxdk/dns — authoritative DNS lookups, domain-ownership verification, DNSSEC validation, and intoDNS/MxToolbox-style diagnostics via a facade, Artisan commands, and validation rules.
License MIT
Homepage https://github.com/cboxdk/laravel-dns
Informations about the package laravel-dns
Cbox DNS
The DNS toolkit for Laravel: authoritative lookups, domain-ownership verification, DNSSEC validation, and intoDNS/MxToolbox-style diagnostics — exposed through a facade, Artisan commands, and validation rules.
This package is the Laravel integration for the framework-agnostic
cboxdk/dns engine. The DNS protocol handling,
verification, propagation, SPF/DMARC parsing, and DNSSEC chain validation all live
in that core library; this package wires it into the container, config, the
console, and the validator so it is one composer require away in a Laravel app.
Installation
The service provider is auto-discovered. Publish the config if you want to tune the resolver:
It works with zero configuration out of the box (a raw UDP/TCP socket resolver
against 1.1.1.1).
Configuration
config/dns.php:
| Key | Env | Default | Purpose |
|---|---|---|---|
resolver |
DNS_RESOLVER |
socket |
Transport: socket (raw UDP/TCP) or doh (DNS-over-HTTPS JSON). |
nameserver |
DNS_NAMESERVER |
1.1.1.1 |
Recursive resolver for the socket transport. |
timeout |
DNS_TIMEOUT |
3.0 |
Per-query timeout, seconds. |
doh_endpoint |
DNS_DOH_ENDPOINT |
https://dns.google/resolve |
JSON DoH endpoint when resolver=doh. |
challenge_prefix |
DNS_CHALLENGE_PREFIX |
_cbox-challenge |
Label for ownership-verification TXT records. |
allow_non_public_nameservers |
DNS_ALLOW_NON_PUBLIC_NAMESERVERS |
false |
Lifts the SSRF filter on authoritative reads. Local testing only. |
The
sockettransport can target a zone's own authoritative nameservers, which domain-ownership verification and propagation checks require. Thedohtransport only queries a provider's recursive resolver, so it cannot answer authoritative or propagation queries.
Facade
You can also inject the core types directly — the container binds both
Cbox\Dns\Dns and the Cbox\Dns\Contracts\Resolver contract:
Artisan commands
Validation rules
DnsRecordExists fails when the value resolves no record of the given type;
DomainVerified fails unless the value publishes the challenge token in its
authoritative TXT record.
Testing
Compose InteractsWithDns into your host application's TestCase to stub records
and assert with zero network I/O:
fakeDns() swaps the container's resolver and Dns bindings for an in-memory
fake, so the facade, commands, and validation rules all resolve stubbed records.
Requirements
- PHP 8.4+
- Laravel 12.x or 13.x
The DNS engine
All DNS behaviour is provided by cboxdk/dns —
including the spoofing-resistant resolver, the SSRF-guarded authoritative reader,
SPF/DMARC/CAA parsing, and DNSSEC chain validation against the IANA root trust
anchors. This package claims only the Laravel integration.
Documentation
Full documentation lives in docs/.
Credits
License
The MIT License (MIT). See LICENSE.md.
All versions of laravel-dns with dependencies
cboxdk/dns Version ^0.1
illuminate/console Version ^12.0 || ^13.0
illuminate/contracts Version ^12.0 || ^13.0
illuminate/support Version ^12.0 || ^13.0