How aliyun/alibabacloud-httpdns-ios-sdk works
Alicloud HTTPDNS is an iOS SDK that resolves hostnames through authenticated HTTP(S) requests, with IPv4/IPv6 selection, caching, pre-resolution, and optional local-DNS degradation. The principal workflow starts at the app-facing service API, passes through request management, and returns a result; supporting branches cover transport, cache persistence, network-aware scheduling, and logging. The excerpts establish the public API and some internal ownership, but not most implementation calls, so uncertain links are dashed and uncited.
Main entry points: HttpdnsService.h DNS Service · HttpdnsRequestManager.h Request Manager · HttpdnsScheduleCenter.h Schedule Center · HttpdnsRemoteResolver.h Remote Resolver
Components 17
SDK API
- DNS Service
AlicloudHttpDNS/HttpdnsService.h
Resolution
- Request Manager
AlicloudHttpDNS/HttpdnsRequestManager.h - DNS Request
AlicloudHttpDNS/Model/HttpdnsRequest.h - DNS Result
AlicloudHttpDNS/Model/HttpdnsResult.h - Remote Resolver
AlicloudHttpDNS/HttpdnsRemoteResolver.h - Local Resolver
AlicloudHttpDNS/HttpdnsLocalResolver.h - HTTP Client
AlicloudHttpDNS/Network/HttpdnsNWHTTPClient.h
Cache State
- Host Cache
AlicloudHttpDNS/Utils/HttpdnsHostObjectInMemoryCache.h - Host Records
AlicloudHttpDNS/Model/HttpdnsHostObject.h - Persistent Cache
AlicloudHttpDNS/Persistent/HttpdnsDB.h
Network Support
- Schedule Center
AlicloudHttpDNS/Scheduler/HttpdnsScheduleCenter.h - Region Routing
AlicloudHttpDNS/Config/HttpdnsRegionConfigLoader.h - IP Stack Detection
AlicloudHttpDNS/IpStack/HttpdnsIpStackDetector.h - Reachability
AlicloudHttpDNS/Utils/HttpdnsReachability.h - Logging
AlicloudHttpDNS/Log/HttpdnsLog.h
Other components
- Application
- HTTPDNS Service
Connections 18
- Application → DNS Service: calls
- DNS Service → Request Manager: delegates
- DNS Service → DNS Request: accepts
- Request Manager → DNS Result: returns
- Request Manager → Remote Resolver: resolves remotely
- Request Manager → Local Resolver: degrades locally
- Remote Resolver → HTTP Client: sends request
- HTTP Client → HTTPDNS Service: requests DNS
- Request Manager → Host Cache: checks cache
- Request Manager → Persistent Cache: loads and saves
- Host Cache → Host Records: holds records
- Persistent Cache → Host Records: stores records
- DNS Service → Schedule Center: configures
- Schedule Center → Request Manager: pre-resolves
- DNS Service → Region Routing: selects region
- DNS Service → IP Stack Detection: selects IP type
- Reachability → Schedule Center: network changes
- DNS Service → Logging: configures logs