Download the PHP package tourze/dns-server-bundle without Composer
On this page you can find all versions of the php package tourze/dns-server-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tourze/dns-server-bundle
More information about tourze/dns-server-bundle
Files in tourze/dns-server-bundle
Package dns-server-bundle
Short Description DNS服务端管理系统,支持权威DNS解析和上游DNS服务器配置
License MIT
Informations about the package dns-server-bundle
DNS Server Bundle
中文
A comprehensive DNS server implementation for Symfony applications with async I/O support, admin interface, and complete DNS record management.
Table of Contents
- Features
- Dependencies
- Installation
- Configuration
- Quick Start
- Commands
- Admin Interface
- Advanced Usage
- Performance Considerations
- Security
- Contributing
- License
Features
- Async DNS Server: Built with ReactPHP for high-performance async I/O
- Multi-Protocol Support: UDP and TCP DNS protocols
- Complete Record Types: Support for A, AAAA, NS, CNAME, MX, TXT, SOA, PTR, SRV, CAA, and DNSSEC records
- Admin Interface: EasyAdmin-based management interface for DNS records and logs
- Query Logging: Comprehensive logging of DNS queries with IP tracking
- Upstream Forwarding: Configurable upstream DNS servers with different protocols
- Flexible Matching: Domain pattern matching strategies for selective forwarding
- Performance Optimized: Built-in caching and query optimization
Dependencies
Required
- PHP: ^8.1
- Symfony: ^6.4 || ^7.0
- ReactPHP: For async I/O operations
- Doctrine ORM: For entity management
- EasyAdmin: For admin interface
Optional
- Monolog: For enhanced logging (recommended)
- Symfony Security: For admin interface authentication
Installation
Add the bundle to your config/bundles.php:
Configuration
Service Configuration
Configure the bundle in config/services.yaml:
Database Entities
The bundle provides two main entities:
DnsQueryLog: Stores DNS query logs with IP trackingUpstreamDnsServer: Manages upstream DNS server configurations
Quick Start
1. Database Setup
Run migrations to create the required tables:
2. Start the DNS Server
3. Configure Upstream DNS Servers
Access the admin interface at /admin and add upstream DNS servers:
4. Basic Usage in Code
Commands
DNS Worker
Start the DNS server daemon:
Options:
--host: DNS server binding host (default: 0.0.0.0)--port: DNS server binding port (default: 53)
Note: Port 53 requires root privileges on most systems.
Admin Interface
The bundle integrates with EasyAdmin to provide:
- DNS Query Logs: View and analyze DNS query history
- Upstream DNS Servers: Manage upstream server configurations
- Real-time Monitoring: Track DNS server performance and statistics
Access the admin interface at /admin after proper authentication setup.
Advanced Usage
DNS Record Types
Full support for DNS record types including:
- A/AAAA: IPv4/IPv6 address records
- NS: Name server records
- CNAME: Canonical name records
- MX: Mail exchange records
- TXT: Text records
- SOA: Start of authority records
- PTR: Pointer records for reverse DNS
- SRV: Service location records
- CAA: Certificate Authority Authorization
- DNSSEC: DS, RRSIG, NSEC, DNSKEY records
Match Strategies
Configure how domains are matched for upstream forwarding:
- EXACT: Exact domain match
- SUFFIX: Domain suffix matching
- PREFIX: Domain prefix matching
- REGEX: Regular expression matching
- WILDCARD: Wildcard pattern matching (e.g.,
*.example.com)
Protocol Support
- UDP: Standard DNS over UDP (implemented)
- TCP: DNS over TCP for large responses (implemented)
- DoH: DNS over HTTPS (implemented)
- DoT: DNS over TLS (implemented)
Upstream Server Configuration
Configure multiple upstream DNS servers with different settings:
DNS Query Logging
All DNS queries are automatically logged with detailed information:
Custom DNS Resolvers
Create custom resolvers for specific use cases:
Performance Considerations
- Memory Usage: Default cache limit is 10,000 entries
- Query Performance: ~5,000 QPS per instance
- Cache Hit Rate: Optimize for >80% cache hit rate
- Concurrent Connections: Async I/O handles thousands of concurrent queries
Security
- Query Logging: All DNS queries are logged with IP tracking
- Access Control: Configurable upstream server restrictions
- Rate Limiting: Built-in query rate limiting (configurable)
- Input Validation: Comprehensive DNS message validation
Contributing
Please see CONTRIBUTING.md for details.
License
The MIT License (MIT). Please see License File for more information.
All versions of dns-server-bundle with dependencies
ext-intl Version *
ext-json Version *
ext-mbstring Version *
ext-pcre Version *
ext-spl Version *
doctrine/dbal Version ^4.0
doctrine/doctrine-bundle Version ^2.13
doctrine/orm Version ^3.0
doctrine/persistence Version ^4.1
easycorp/easyadmin-bundle Version ^4
knplabs/knp-menu Version ^3.7
monolog/monolog Version ^3.1
psr/cache Version ^2.0 || ^3.0
psr/log Version ^3|^2|^1
react/datagram Version ^1.9
react/dns Version ^1.13
react/event-loop Version ^1.5
react/promise Version ^3.2
spatie/dns Version ^2.0
symfony/cache Version ^7.3
symfony/config Version ^7.3
symfony/console Version ^7.3
symfony/dependency-injection Version ^7.3
symfony/doctrine-bridge Version ^7.3
symfony/form Version ^7.3
symfony/framework-bundle Version ^7.4
symfony/http-client Version ^7.3
symfony/http-client-contracts Version ^3.6
symfony/http-foundation Version ^7.4
symfony/http-kernel Version ^7.3
symfony/property-access Version ^7.3
symfony/routing Version ^7.3
symfony/yaml Version ^7.3
tourze/arrayable Version 1.*
tourze/bundle-dependency Version 1.*
tourze/doctrine-indexed-bundle Version 1.0.*
tourze/doctrine-ip-bundle Version 1.1.*
tourze/doctrine-timestamp-bundle Version 1.1.*
tourze/doctrine-track-bundle Version 1.1.*
tourze/doctrine-user-bundle Version 1.0.*
tourze/easy-admin-menu-bundle Version 1.0.*
tourze/enum-extra Version 1.0.*
tourze/symfony-dependency-service-loader Version 1.0.*
tourze/symfony-routing-auto-loader-bundle Version 1.0.*