This commit is contained in:
robin
2026-03-05 02:44:43 +08:00
parent 49021c7415
commit 49776c3d0a
41 changed files with 432 additions and 297 deletions

View File

@@ -21,22 +21,22 @@
// 头文件包含需使用相对目录,确保通过 CocoaPods 安装后能被模块化编译找到
// #import "HttpdnsRequest.h"
// #import "HttpdnsResult.h"
// #import "HttpdnsDegradationDelegate.h"
// #import "HttpdnsDegradationDelegate.h"
// #import "HttpdnsLoggerProtocol.h"
#import <TrustHTTPDNS/HttpdnsRequest.h>
#import <TrustHTTPDNS/HttpDnsResult.h>
#import <TrustHTTPDNS/HttpdnsLoggerProtocol.h>
#import <TrustHTTPDNS/HttpdnsDegradationDelegate.h>
#import <NewHTTPDNS/HttpdnsRequest.h>
#import <NewHttpDNS/HttpDnsResult.h>
#import <NewHttpDNS/HttpdnsLoggerProtocol.h>
#import <NewHttpDNS/HttpdnsDegradationDelegate.h>
#define Trust_HTTPDNS_DEPRECATED(explain) __attribute__((deprecated(explain)))
#define NEW_HTTPDNS_DEPRECATED(explain) __attribute__((deprecated(explain)))
#ifndef TrustHDNS_STACK_KEY
#define TrustHDNS_STACK_KEY
#ifndef NewHDNS_STACK_KEY
#define NewHDNS_STACK_KEY
#define TrustHDNS_IPV4 @"TrustHDNS_IPV4"
#define TrustHDNS_IPV6 @"TrustHDNS_IPV6"
#define NewHDNS_IPV4 @"NewHDNS_IPV4"
#define NewHDNS_IPV6 @"NewHDNS_IPV6"
#endif
@@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN
/// @param host 域名
/// @param ipType 当前查询的IP类型
/// @param ttl 当次域名解析返回的TTL
- (int64_t)httpdnsHost:(NSString * _Nonnull)host ipType:(TrustHttpDNS_IPType)ipType ttl:(int64_t)ttl;
- (int64_t)httpdnsHost:(NSString * _Nonnull)host ipType:(NewHttpDNS_IPType)ipType ttl:(int64_t)ttl;
@end
@@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN
@property (nonatomic, copy, readonly, nullable) NSString *aesSecretKey;
@property (nonatomic, weak, setter=setDelegateForDegradationFilter:) id<HttpDNSDegradationDelegate> delegate Trust_HTTPDNS_DEPRECATED("不再建议通过设置此回调实现降级逻辑而是自行在调用HTTPDNS解析域名前做判断");
@property (nonatomic, weak, setter=setDelegateForDegradationFilter:) id<HttpDNSDegradationDelegate> delegate NEW_HTTPDNS_DEPRECATED("不再建议通过设置此回调实现降级逻辑而是自行在调用HTTPDNS解析域名前做判断");
@property (nonatomic, weak) id<HttpdnsTTLDelegate> ttlDelegate;
@@ -81,7 +81,7 @@ NS_ASSUME_NONNULL_BEGIN
* 注意本接口<E68EA5><E58FA3>?.2.1起废弃后续将进行移除<EFBFBD><EFBFBD>?
* @param accountID 您的 HTTPDNS Account ID
*/
- (nonnull instancetype)initWithAccountID:(NSInteger)accountID Trust_HTTPDNS_DEPRECATED("Deprecated. This method will be removed in the future. Use -[HttpDnsService initWithAccountID:secretKey:] instead.");
- (nonnull instancetype)initWithAccountID:(NSInteger)accountID NEW_HTTPDNS_DEPRECATED("Deprecated. This method will be removed in the future. Use -[HttpDnsService initWithAccountID:secretKey:] instead.");
/*!
* @brief 启用鉴权功能的初始化接口
@@ -108,7 +108,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 开启鉴权功能后,鉴权的签名计算默认读取设备当前时间。若担心设备时间不准确导致签名不准确,可以使用此接口校正 APP 内鉴权计算使用的时间<E697B6><E997B4>?
/// 注意,校正操作在 APP 的一个生命周期内生效APP 重启后需要重新设置才能重新生<E696B0><E7949F>?
/// @param authCurrentTime 用于校正的时间戳单位为<E4BD8D><E4B8BA>?
- (void)setAuthCurrentTime:(NSUInteger)authCurrentTime Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setInternalAuthTimeBaseBySpecifyingCurrentTime:] instead.");
- (void)setAuthCurrentTime:(NSUInteger)authCurrentTime NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setInternalAuthTimeBaseBySpecifyingCurrentTime:] instead.");
/// 开启鉴权功能后,鉴权的签名计算默认读取设备当前时间。若担心设备时间不准确导致签名不准确,可以使用此接口校正 APP 内鉴权计算使用的时间<E697B6><E997B4>?
@@ -119,7 +119,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 设置持久化缓存功<E5AD98><E58A9F>?
/// @param enable YES: 开<><E5BC80>?NO: 关闭
- (void)setCachedIPEnabled:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setPersistentCacheIPEnabled:] instead.");
- (void)setCachedIPEnabled:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setPersistentCacheIPEnabled:] instead.");
/// 设置持久化缓存功<E5AD98><E58A9F>?
@@ -137,7 +137,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 是否允许 HTTPDNS 返回 TTL 过期域名<E59F9F><E5908D>?ip ,建议允许(默认不允许)
/// @param enable YES: 开<><E5BC80>?NO: 关闭
- (void)setExpiredIPEnabled:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setReuseExpiredIPEnabled:] instead.");
- (void)setExpiredIPEnabled:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setReuseExpiredIPEnabled:] instead.");
/// 是否允许 HTTPDNS 返回 TTL 过期域名<E59F9F><E5908D>?ip ,建议允许(默认不允许)
@@ -191,7 +191,7 @@ NS_ASSUME_NONNULL_BEGIN
/// 域名预解<E9A284><E8A7A3>?
/// @param hosts 域名
/// @param ipType 4: ipv4; 6: ipv6; 64: ipv4+ipv6
- (void)setPreResolveHosts:(NSArray *)hosts queryIPType:(TrustHttpDNS_IPType)ipType Trust_HTTPDNS_DEPRECATED("Deprecated, this method will be removed in the future. Use -[HttpDnsService setPreResolveHosts:byIPType:] instead.");
- (void)setPreResolveHosts:(NSArray *)hosts queryIPType:(NewHttpDNS_IPType)ipType NEW_HTTPDNS_DEPRECATED("Deprecated, this method will be removed in the future. Use -[HttpDnsService setPreResolveHosts:byIPType:] instead.");
/// 本地日志 log 开<><E5BC80>?
@@ -221,28 +221,28 @@ NS_ASSUME_NONNULL_BEGIN
/// 设置是否 开<><E5BC80>?IPv6 结果解析。只有开启状态下对域名的解析才会尝试解析v6记录并返回v6的结<E79A84><E7BB93>?
/// @param enable YES: 开<><E5BC80>?NO: 关闭
- (void)enableIPv6:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setIPv6Enabled:] instead.");
- (void)enableIPv6:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService setIPv6Enabled:] instead.");
/// 设置是否 开<><E5BC80>?IPv6 结果解析。只有开启状态下对域名的解析才会尝试解析v6记录并返回v6的结<E79A84><E7BB93>?
/// 已弃用。默认支持IPv6。如果不需要IPv6类型的结果只需在请求时指定`queryIpType`为`HttpdnsQueryIPTypeIpv4`
/// @param enable YES: 开<><E5BC80>?NO: 关闭
- (void)setIPv6Enabled:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated. If ipv6 is unnecessary, you can set the `queryIpType` as HttpdnsQueryIPTypeIpv4 when resolving domain.");
- (void)setIPv6Enabled:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated. If ipv6 is unnecessary, you can set the `queryIpType` as HttpdnsQueryIPTypeIpv4 when resolving domain.");
/// 是否允许通过 CNCopyCurrentNetworkInfo 获取wifi ssid bssid
/// @param enable YES: 开<><E5BC80>?NO: 关闭 默认关<E8AEA4><E585B3>?
- (void)enableNetworkInfo:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated. We do not utilize network information anymore");
- (void)enableNetworkInfo:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated. We do not utilize network information anymore");
/// 是否允许通过 CNCopyCurrentNetworkInfo 获取wifi ssid bssid
/// @param enable YES: 开<><E5BC80>?NO: 关闭 默认关<E8AEA4><E585B3>?
- (void)setReadNetworkInfoEnabled:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated. We do not utilize network information anymore.");
- (void)setReadNetworkInfoEnabled:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated. We do not utilize network information anymore.");
/// 是否开启IP探测功能
/// @param enable YES: 开<><E5BC80>?NO: 关闭 默认打开
- (void)enableCustomIPRank:(BOOL)enable Trust_HTTPDNS_DEPRECATED("Deprecated, will be removed in the future.");
- (void)enableCustomIPRank:(BOOL)enable NEW_HTTPDNS_DEPRECATED("Deprecated, will be removed in the future.");
/// 设置软件自定义解析全局默认参数设置后调用软件自定义解析时每个请求默认都会带上这里配置的参<E79A84><E58F82>?
@@ -333,31 +333,31 @@ NS_ASSUME_NONNULL_BEGIN
/// 获取域名对应的IP单IP
/// @param host 域名
- (NSString *)getIpByHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSString *)getIpByHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的IP数组多IP
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSArray *)getIpsByHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSArray *)getIpsByHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的ipv6, 单IP 需要开启ipv6 开<><E5BC80>?enableIPv6<76><36>?
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSString *)getIPv6ByHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSString *)getIPv6ByHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的ipv6数组, 多IP 需要开启ipv6 开<><E5BC80>?enableIPv6<76><36>?
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSArray *)getIPv6sByHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSArray *)getIPv6sByHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 同时获取ipv4 ipv6的IP 需要开启ipv6 开<><E5BC80>?enableIPv6<76><36>?
/// @param host 域名
/// @result 返回字典类型结构
/// {
/// TrustHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// TrustHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// NewHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// NewHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
- (NSDictionary <NSString *, NSArray *>*)getIPv4_v6ByHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSDictionary <NSString *, NSArray *>*)getIPv4_v6ByHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 根据当前设备的网络状态自动返回域名对应的 IPv4/IPv6地址<E59CB0><E59D80>?
/// 使用此API 需要确<E8A681><E7A1AE>?enableIPv6 开关已打开
@@ -368,48 +368,48 @@ NS_ASSUME_NONNULL_BEGIN
/// @param host 要解析的域名
/// @result 返回字典类型结构
/// {
/// TrustHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// TrustHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// NewHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// NewHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
-(NSDictionary <NSString *, NSArray *>*)autoGetIpsByHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
-(NSDictionary <NSString *, NSArray *>*)autoGetIpsByHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的IPv4地址单IPv4
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSString *)getIPv4ForHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSString *)getIPv4ForHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的IP数组多IP
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSArray *)getIPv4ListForHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSArray *)getIPv4ListForHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 获取IPv4地址列表同步接口必须在子线程中执行否则会转变为异步接口
/// 同步接口有超时机制,超时时间为[HttpDnsService sharedInstance].timeoutInterval, 但是超时上限<E4B88A><E99990>?s<><73>?
/// 即使[HttpDnsService sharedInstance].timeoutInterval设置的时间大<E997B4><E5A4A7>?s同步接口也最多阻塞当前线<E5898D><E7BABF>?s
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起同步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSArray *)getIPv4ListForHostSync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
- (NSArray *)getIPv4ListForHostSync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的ipv6, 单IP 需要开启ipv6 开<><E5BC80>?enableIPv6<76><36>?
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSString *)getIPv6ForHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSString *)getIPv6ForHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应的ipv6数组, 多IP 需要开启ipv6 开<><E5BC80>?enableIPv6<76><36>?
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSArray *)getIPv6ListForHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSArray *)getIPv6ListForHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 获取IPv6地址列表同步接口必须在子线程中执行否则会转变为异步接口
/// 同步接口有超时机制,超时时间为[HttpDnsService sharedInstance].timeoutInterval, 但是超时上限<E4B88A><E99990>?s<><73>?
/// 即使[HttpDnsService sharedInstance].timeoutInterval设置的时间大<E997B4><E5A4A7>?s同步接口也最多阻塞当前线<E5898D><E7BABF>?s
/// @param host 域名
- (NSArray *)getIPv6ListForHostSync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
- (NSArray *)getIPv6ListForHostSync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
/// 异步接口首次结果可能为空获取域名对应格式化后的IP (针对ipv6)
/// 先查询缓存缓存中存在未过期的结果则直接返回结果如果缓存未命中则发起异步解析请<E69E90><E8AFB7>?
/// @param host 域名
- (NSString *)getIpByHostAsyncInURLFormat:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSString *)getIpByHostAsyncInURLFormat:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 异步接口首次结果可能为空同时获取ipv4 ipv6的IP 需要开启ipv6 开<><E5BC80>?enableIPv6<76><36>?
@@ -417,10 +417,10 @@ NS_ASSUME_NONNULL_BEGIN
/// @param host 域名
/// @result 返回字典类型结构
/// {
/// TrustHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// TrustHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// NewHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// NewHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
- (NSDictionary <NSString *, NSArray *>*)getHttpDnsResultHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
- (NSDictionary <NSString *, NSArray *>*)getHttpDnsResultHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// NOTE: 同步接口必须在子线程中执行否则会转变为异步接<E6ADA5><E68EA5>?
/// 同步接口有超时机制,超时时间为[HttpDnsService sharedInstance].timeoutInterval, 但是超时上限<E4B88A><E99990>?s<><73>?
@@ -430,10 +430,10 @@ NS_ASSUME_NONNULL_BEGIN
/// @param host 域名
/// @result 返回字典类型结构
/// {
/// TrustHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// TrustHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// NewHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// NewHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
- (NSDictionary <NSString *, NSArray *>*)getHttpDnsResultHostSync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
- (NSDictionary <NSString *, NSArray *>*)getHttpDnsResultHostSync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
/// 异步接口,首次结果可能为空,根据当前设备的网络状态自动返回域名对应的 IPv4/IPv6地址<E59CB0><E59D80>?
/// 使用此API 需要确<E8A681><E7A1AE>?enableIPv6 开关已打开
@@ -444,10 +444,10 @@ NS_ASSUME_NONNULL_BEGIN
/// @param host 要解析的域名
/// @result 返回字典类型结构
/// {
/// TrustHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// TrustHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// NewHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// NewHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
-(NSDictionary <NSString *, NSArray *>*)autoGetHttpDnsResultForHostAsync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
-(NSDictionary <NSString *, NSArray *>*)autoGetHttpDnsResultForHostAsync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:] instead.");
/// 根据当前设备的网络状态自动返回域名对应的 IPv4/IPv6地址组同步接口必须在子线程中执行否则会转变为异步接<E6ADA5><E68EA5>?
/// 同步接口有超时机制,超时时间为[HttpDnsService sharedInstance].timeoutInterval, 但是超时上限<E4B88A><E99990>?s<><73>?
@@ -457,13 +457,13 @@ NS_ASSUME_NONNULL_BEGIN
/// @param host 域名
/// @result 返回字典类型结构
/// {
/// TrustHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// TrustHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// NewHDNS_IPV4: ['xxx.xxx.xxx.xxx', 'xxx.xxx.xxx.xxx'],
/// NewHDNS_IPV6: ['xx:xx:xx:xx:xx:xx:xx:xx', 'xx:xx:xx:xx:xx:xx:xx:xx']
/// }
- (NSDictionary <NSString *, NSArray *>*)autoGetHttpDnsResultForHostSync:(NSString *)host Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
- (NSDictionary <NSString *, NSArray *>*)autoGetHttpDnsResultForHostSync:(NSString *)host NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSync:byIpType:] instead.");
/// 软件自定义解析接<E69E90><E68EA5>?
- (NSDictionary *)getIpsByHostAsync:(NSString *)host withParams:(NSDictionary<NSString *, NSString *> *)params withCacheKey:(NSString *)cacheKey Trust_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:withSdnsParams:sdnsCacheKey:] instead.");
- (NSDictionary *)getIpsByHostAsync:(NSString *)host withParams:(NSDictionary<NSString *, NSString *> *)params withCacheKey:(NSString *)cacheKey NEW_HTTPDNS_DEPRECATED("Deprecated. Use -[HttpDnsService resolveHostSyncNonBlocking:byIpType:withSdnsParams:sdnsCacheKey:] instead.");
/// 清除指定host缓存<EFBC88><E58685>?沙盒数据库)