HTTPDNS OC Save

HTTPDNS 库 Objdctive-C 实现(使用DNSPod 、AliyunDNS、 Google ...)

Project README

HTTPDNS

Carthage compatible Version License Platform Build Status

HTTPDNS 库 Objdctive-C 实现。

支持 DNSPod、DNSPod 企业版、AliYunDNS、Google 等(方便扩展)

安装

CocoaPod

Podfile 中添加:

platform :ios, '8.0'

pod 'HTTPDNS'

Carthage

github "yourtion/HTTPDNS-OC"

使用方法

解析域名

#import <HTTPDNS/HTTPDNS.h>

// 解析记录
[[HTTPDNSClient sharedInstance] getRecord:@"www.taobao.com" callback:^(HTTPDNSRecord *record) {
	NSLog(@"IP : %@", record.ip);
   NSLog(@"description : %@", record.description);
}];

// 清除缓存
[[HTTPDNSClient sharedInstance] cleanAllCache];

切换 HTTPDNS 服务提供方

// 使用 DNSPod
[[HTTPDNSClient sharedInstance] useDNSPod];

// 使用 DNSPod 企业版
[[HTTPDNSClient sharedInstance] useDNSPodProWithAccount:@"Your DNSPod pro accound id" Key:@"Your DNSPod pro key"];

// 使用阿里云 HTTPDNS
[[HTTPDNSClient sharedInstance] useAliYunWithKey:@"Your Aliyun HTTPNDS accound id"];

// 使用 Google DNS-over-HTTP
[[HTTPDNSClient sharedInstance] useGoogle];

TODO

  • 实现 DNSPod 免费版功能
  • 实现 DNSPod 企业版功能(认证接入)
  • 实现 AliYun HTTPDNS
  • 实现 AliYun HTTPDNS With HTTPS
  • 实现 Google DNS-over-HTTP
  • 提供清除缓存方法
  • 提供自定义解析器方法
Open Source Agenda is not affiliated with "HTTPDNS OC" Project. README Source: yourtion/HTTPDNS-OC
Stars
34
Open Issues
1
Last Commit
7 years ago
Repository
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating