How darcas/smart-dns-promises works
SmartDns is a small Node.js DNS-resolution library. Its principal workflow is to configure the process-wide resolver, resolve a URL’s hostname, and return the resolved address and rewritten URL; caching and lookup statistics support that workflow. The runtime implementation is concentrated in src/index.ts. The source excerpt was not provided, so the internal component boundaries and calls below rely on README descriptions rather than inspected implementation details.
Main entry points: index.ts URL resolver
Components 9
Other components
- Application
- Singleton factory
src/index.ts - DNS configuration
src/index.ts - Node DNS
- URL resolver
src/index.ts - Lookup cache
src/index.ts - Lookup statistics
src/index.ts - DNS providers
src/index.ts - HTTP clients
Connections 9
- Application → Singleton factory: creates instance
README.md - Application → URL resolver: resolves URL
README.md - Application → DNS configuration: sets servers
README.md - DNS configuration → Node DNS: configures process
README.md - DNS providers → DNS configuration: selects servers
README.md - URL resolver → Lookup cache: uses caching
src/index.ts - URL resolver → Node DNS: looks up hostname
- URL resolver → Lookup statistics: updates counters
src/index.ts - Node DNS → HTTP clients: serves lookups
README.md