Skip to content

Commit

Permalink
补充 doh resolver 示例
Browse files Browse the repository at this point in the history
  • Loading branch information
Mei-Zhao authored Sep 2, 2021
1 parent a899b33 commit 71993ad
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ DnsManager 可以创建一次,一直使用。
IResolver[] resolvers = new IResolver[3];
resolvers[0] = AndroidDnsServer.defaultResolver(getContext()); //系统默认 DNS 服务器
resolvers[1] = new DnsUdpResolver("8.8.8.8"); //自定义 DNS 服务器地址
resolvers[2] = new DohResolver("https://dns.alidns.com/dns-query");
DnsManager dns = new DnsManager(NetworkInfo.normal(), resolvers);
Record[] records = dns.queryRecords("www.qiniu.com");
```
Expand Down

0 comments on commit 71993ad

Please sign in to comment.