techendeavors/dnsoverhttps 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

techendeavors/dnsoverhttps

Composer 安装命令:

composer require techendeavors/dnsoverhttps

包简介

DNSOverHttps allows you to query DNS records over an HTTPS connection rather than interacting with your local DNS server. Supports the public Mozilla, Cloudflare, and Google API servers.

README 文档

README

DNSOverHttps allows you to query DNS records over an HTTPS connection rather than interacting with your local DNS server

Latest Version on Packagist Total Downloads

DNSOverHttps allows you to query DNS records over an HTTPS connection rather than interacting with your local DNS server. Supports the public Mozilla, Cloudflare, and Google API servers.

The DnsOverHttps servers only support requesting a single record type at a time, but we handle that for you. Just pass an array of record types that you want and the package will query them all and merge them back together into one single object.

While the DNS Over Https servers do a lot of the work, we've also bundled a few extra client-side utilities that might be helpful.

To Do

  • [ ] Build 'techendeavors/tldverify` package and integrate it
  • [ ] Allow overriding the DNS Over Https host in the builder
  • [ ] Make returned data a little easier to work with.
  • [X] Set Guzzle to query in parallel use promises when more than one RR is requested rather than making the request in a serial fashion
  • [X] Combine all guzzle promise responses into one single object
  • [ ] Allow for distributing requests across multiple hosts rather than just using the primary host
  • [X] Allow for package configuration to override constants.
  • [ ] Build some validators (DnsHasA, DnsHasAAAA, DnsHasMX, DnsHasSoa, DnsHasNs, etc)
  • [ ] Write Tests
  • [ ] If Guzzle is not installed, fall back to Curl. Change guzzle requirement to a suggested package.

Installation

You can install the package via composer:

composer require techendeavors/dnsoverhttps

Usage

The most basic. A and AAAA records are assumed unless overridden.

$domain = new DNSOverHttps;
$domain->domain('example.com');
$domain->check();
=> [
     [
       "domain" => "example.com",
       "records" => [
         "A" => [
           "93.184.216.34",
         ],
         "AAAA" => [
           "2606:2800:220:1:248:1893:25c8:1946",
         ],
       ],
     ],
   ]

A bit more advanced.

$domain = new DNSOverHttps();
$domain->domains(['example.com', 'techendeavors.com', 'packagist.org']);
$domain->records(['A', 'AAAA', 'MX', 'CNAME', 'TXT']);
$domain->check();
=> [
     [
       "domain" => "example.com",
       "records" => [
         "A" => [
           "93.184.216.34",
         ],
         "MX" => [],
         "TXT" => [
           ""v=spf1 -all"",
           ""$Id: example.com 4415 2015-08-24 20:12:23Z davids $"",
         ],
         "AAAA" => [
           "2606:2800:220:1:248:1893:25c8:1946",
         ],
       ],
     ],
     [
       "domain" => "packagist.org",
       "records" => [
         "A" => [
           "142.44.164.255",
         ],
         "MX" => [
           "10 aspmx2.googlemail.com.",
           "5 alt2.aspmx.l.google.com.",
           "5 alt1.aspmx.l.google.com.",
           "10 aspmx3.googlemail.com.",
           "10 aspmx4.googlemail.com.",
           "10 aspmx5.googlemail.com.",
           "1 aspmx.l.google.com.",
         ],
         "TXT" => [
           ""v=spf1 a mx mx:ns373883.ip-5-196-92.eu include:_spf.google.com include:amazonses.com ~all"",
           ""google-site-verification=u1ogg4eabdx_nFHnTHC0s4KfKUkSzaME6FIbDj9NU1Y"",
         ],
         "AAAA" => [
           "2607:5300:201:2100::7:2274",
         ],
       ],
     ],
     [
       "domain" => "techendeavors.com",
       "records" => [
         "A" => [
           "104.28.3.33",
           "104.28.2.33",
         ],
         "MX" => [
           "20 eagle-relay.mxlogin.com.",
           "10 eagle.mxlogin.com.",
         ],
         "TXT" => [
           ""keybase-site-verification=qUHhd_PYnbKj0SQIzOZuv-LIhPW8wLoCgMZ3Z6nf8A0"",
           ""keybase-site-verification=5sU4NgQQ1slHOkwKahEVR19_TFm6XQULunmqbtTIXgc"",
           ""v=spf1 include:mxlogin.com -all"",
         ],
         "AAAA" => [
           "2400:cb00:2048:1::681c:221",
           "2400:cb00:2048:1::681c:321",
         ],
       ],
     ],
   ]

Testing

Not yet implemented

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please use the issue tracker

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 30
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-07-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固