Help
RSS
API
Feed
Maltego
Contact
Domain > cm.anyapis.com
×
More information on this domain is in
AlienVault OTX
Is this malicious?
Yes
No
DNS Resolutions
Date
IP Address
2025-10-06
104.21.53.244
(
ClassC
)
Port 443
HTTP/1.1 200 OKDate: Mon, 06 Oct 2025 11:15:20 GMTContent-Type: text/html;charsetUTF-8Transfer-Encoding: chunkedConnection: keep-aliveVary: accept-encodingReport-To: {group:cf-nel,max_age:604800,endpoints:{url:https://a.nel.cloudflare.com/report/v4?scatA3FV2%2FMm1geGlxNaWYuKHVhBe16K7NHfx%2FsXHphwyrVZaT6zdoK5xRnNvO8SZtTIAKqezs%2B6A7tMh9FoYMtaXIz8FIqPYVW1e8Q%3D%3D}}Nel: {report_to:cf-nel,success_fraction:0.0,max_age:604800}Server: cloudflarecf-cache-status: DYNAMICCF-RAY: 98a4bd843a6d5ef0-PDXalt-svc: h3:443; ma86400 !DOCTYPE html>html langzh-CN>head> meta charsetUTF-8> meta nameviewport contentwidthdevice-width, initial-scale1.0> title>DNS-over-HTTPS Resolver/title> link relstylesheet hrefhttps://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css> link relicon hrefhttps://cf-assets.www.cloudflare.com/dzlvafdwdttg/6TaQ8Q7BDmdAFRoHpDCb82/8d9bc52a2ac5af100de3a9adcf99ffaa/security-shield-protection-2.svg typeimage/x-icon> style> body { font-family: Segoe UI, Tahoma, Geneva, Verdana, sans-serif; min-height: 100vh; padding: 0; margin: 0; line-height: 1.6; background: url(https://cf-assets.www.cloudflare.com/dzlvafdwdttg/5B5shLB8bSKIyB9NJ6R1jz/87e7617be2c61603d46003cb3f1bd382/Hero-globe-bg-takeover-xxl.png), linear-gradient(135deg, rgba(253, 101, 60, 0.85) 0%, rgba(251,152,30, 0.85) 100%); background-size: cover; background-position: center center; background-repeat: no-repeat; background-attachment: fixed; padding: 30px 20px; box-sizing: border-box; } .page-wrapper { width: 100%; max-width: 800px; margin: 0 auto; } .container { width: 100%; max-width: 800px; margin: 20px auto; background-color: rgba(255, 255, 255, 0.65); border-radius: 16px; box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15); padding: 30px; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid rgba(255, 255, 255, 0.4); } h1 { /* 创建文字渐变效果 */ background-image: linear-gradient(to right, rgb(249, 171, 76), rgb(252, 103, 60)); /* 回退颜色,用于不支持渐变文本的浏览器 */ color: rgb(252, 103, 60); -webkit-background-clip: text; -moz-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; -moz-text-fill-color: transparent; font-weight: 600; /* 注意:渐变文本和阴影效果同时使用可能不兼容,暂时移除阴影 */ text-shadow: none; } .card { margin-bottom: 20px; border: none; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05); background-color: rgba(255, 255, 255, 0.8); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); } .card-header { background-color: rgba(255, 242, 235, 0.9); font-weight: 600; padding: 12px 20px; border-bottom: none; } .form-label { font-weight: 500; margin-bottom: 8px; color: rgb(70, 50, 40); } .form-select, .form-control { border-radius: 6px; padding: 10px; border: 1px solid rgba(253, 101, 60, 0.3); background-color: rgba(255, 255, 255, 0.9); } .btn-primary { background-color: rgb(253, 101, 60); border: none; border-radius: 6px; padding: 10px 20px; font-weight: 500; transition: all 0.2s ease; } .btn-primary:hover { background-color: rgb(230, 90, 50); transform: translateY(-1px); } pre { background-color: rgba(255, 245, 240, 0.9); padding: 15px; border-radius: 6px; border: 1px solid rgba(253, 101, 60, 0.2); white-space: pre-wrap; word-break: break-all; font-family: Consolas, Monaco, Andale Mono, monospace; font-size: 14px; max-height: 400px; overflow: auto; } .loading { display: none; text-align: center; padding: 20px 0; } .loading-spinner { border: 4px solid rgba(0, 0, 0, 0.1); border-left: 4px solid rgb(253, 101, 60); border-radius: 50%; width: 30px; height: 30px; animation: spin 1s linear infinite; margin: 0 auto 10px; } .badge { margin-left: 5px; font-size: 11px; vertical-align: middle; } @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } .footer { margin-top: 30px; text-align: center; color: rgba(255, 255, 255, 0.9); font-size: 14px; } .beian-info { text-align: center; font-size: 13px; } .beian-info a { color: var(--primary-color); text-decoration: none; border-bottom: 1px dashed var(--primary-color); padding-bottom: 2px; } .beian-info a:hover { border-bottom-style: solid; } @media (max-width: 576px) { .container { padding: 20px; } .github-corner:hover .octo-arm { animation: none; } .github-corner .octo-arm { animation: octocat-wave 560ms ease-in-out; } } .error-message { color: #e63e00; margin-top: 10px; } .success-message { color: #e67e22; } .nav-tabs .nav-link { border-top-left-radius: 6px; border-top-right-radius: 6px; padding: 8px 16px; font-weight: 500; color: rgb(150, 80, 50); } .nav-tabs .nav-link.active { background-color: rgba(255, 245, 240, 0.8); border-bottom-color: rgba(255, 245, 240, 0.8); color: rgb(253, 101, 60); } .tab-content { background-color: rgba(255, 245, 240, 0.8); border-radius: 0 0 6px 6px; padding: 15px; border: 1px solid rgba(253, 101, 60, 0.2); border-top: none; } .ip-record { padding: 5px 10px; margin-bottom: 5px; border-radius: 4px; background-color: rgba(255, 255, 255, 0.9); border: 1px solid rgba(253, 101, 60, 0.15); } .ip-record:hover { background-color: rgba(255, 235, 225, 0.9); } .ip-address { font-family: monospace; font-weight: 600; min-width: 130px; color: rgb(80, 60, 50); cursor: pointer; position: relative; transition: color 0.2s ease; display: inline-block; } .ip-address:hover { color: rgb(253, 101, 60); } .ip-address:after { content: ; position: absolute; left: 100%; /* 从IP地址的右侧开始定位 */ top: 0; opacity: 0; white-space: nowrap; font-size: 12px; color: rgb(253, 101, 60); transition: opacity 0.3s ease; font-family: Segoe UI, sans-serif; font-weight: normal; } .ip-address.copied:after { content: ✓ 已复制; opacity: 1; } .result-summary { margin-bottom: 15px; padding: 10px; background-color: rgba(255, 235, 225, 0.8); border-radius: 6px; } .result-tabs { margin-bottom: 20px; } .geo-info { margin: 0 10px; font-size: 0.85em; flex-grow: 1; text-align: center; } .geo-country { color: rgb(230, 90, 50); font-weight: 500; padding: 2px 6px; background-color: rgba(255, 245, 240, 0.8); border-radius: 4px; display: inline-block; } .geo-as { color: rgb(253, 101, 60); padding: 2px 6px; background-color: rgba(255, 245, 240, 0.8); border-radius: 4px; margin-left: 5px; display: inline-block; } .geo-loading { color: rgb(150, 100, 80); font-style: italic; } .ttl-info { min-width: 80px; text-align: right; color: rgb(180, 90, 60); } .copy-link { color: rgb(253, 101, 60); text-decoration: none; border-bottom: 1px dashed rgb(253, 101, 60); padding-bottom: 2px; cursor: pointer; position: relative; } .copy-link:hover { border-bottom-style: solid; } .copy-link:after { content: ; position: absolute; top: 0; right: -65px; opacity: 0; white-space: nowrap; color: rgb(253, 101, 60); font-size: 12px; transition: opacity 0.3s ease; } .copy-link.copied:after { content: ✓ 已复制; opacity: 1; } .github-corner svg { fill: rgb(255, 255, 255); color: rgb(251,152,30); position: absolute; top: 0; right: 0; border: 0; width: 80px; height: 80px; } .github-corner:hover .octo-arm { animation: octocat-wave 560ms ease-in-out; } /* 添加章鱼猫挥手动画关键帧 */ @keyframes octocat-wave { 0%, 100% { transform: rotate(0); } 20%, 60% { transform: rotate(-25deg); } 40%, 80% { transform: rotate(10deg); } } @media (max-width: 576px) { .container { padding: 20px; } .github-corner:hover .octo-arm { animation: none; } .github-corner .octo-arm { animation: octocat-wave 560ms ease-in-out; } } /style>/head>body> a hrefhttps://github.com/cmliu/CF-Workers-DoH target_blank classgithub-corner aria-labelView source on Github> svg viewBox0 0 250 250 aria-hiddentrue> path dM0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z>/path> path dM128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2 fillcurrentColor styletransform-origin: 130px 106px; classocto-arm>/path> path dM115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z fillcurrentColor classocto-body>/path> /svg> /a> div classcontainer> h1 classtext-center mb-4>DNS-over-HTTPS Resolver/h1> div classcard> div classcard-header>DNS 查询设置/div> div classcard-body> form idresolveForm> div classmb-3> label fordohSelect classform-label>选择 DoH 地址:/label> select iddohSelect classform-select> option valuecurrent selected idcurrentDohOption>自动 (当前站点)/option> option valuehttps://dns.alidns.com/resolve>https://dns.alidns.com/resolve (阿里)/option> option valuehttps://doh.pub/dns-query>https://doh.pub/dns-query (腾讯)/option> option valuehttps://doh.360.cn/resolve>https://doh.360.cn/resolve (360)/option> option valuehttps://cloudflare-dns.com/dns-query>https://cloudflare-dns.com/dns-query (Cloudflare)/option> option valuehttps://dns.google/resolve>https://dns.google/resolve (谷歌)/option> option valuehttps://dns.adguard-dns.com/resolve>https://dns.adguard-dns.com/resolve (AdGuard)/option> option valuehttps://dns.sb/dns-query>https://dns.sb/dns-query (DNS.SB)/option> option valuehttps://dns.twnic.tw/dns-query>https://dns.twnic.tw/dns-query (Quad101 TWNIC)/option> option valuecustom>自定义.../option> /select> /div> div idcustomDohContainer classmb-3 styledisplay:none;> label forcustomDoh classform-label>输入自定义 DoH 地址:/label> input typetext idcustomDoh classform-control placeholderhttps://example.com/dns-query> /div> div classmb-3> label fordomain classform-label>待解析域名:/label> div classinput-group> input typetext iddomain classform-control valuewww.google.com placeholder输入域名,如 example.com> button typebutton classbtn btn-outline-secondary idclearBtn>清除/button> /div> /div> div classd-flex gap-2> button typesubmit classbtn btn-primary flex-grow-1>解析/button> button typebutton classbtn btn-outline-primary idgetJsonBtn>Get Json/button> /div> /form> /div> /div> div classcard> div classcard-header d-flex justify-content-between align-items-center> span>解析结果/span> button classbtn btn-sm btn-outline-secondary idcopyBtn styledisplay: none;>复制结果/button> /div> div classcard-body> div idloading classloading> div classloading-spinner>/div> p>正在查询中,请稍候.../p> /div> !-- 结果展示区,包含选项卡 --> div idresultContainer styledisplay: none;> ul classnav nav-tabs result-tabs idresultTabs roletablist> li classnav-item rolepresentation> button classnav-link active idipv4-tab data-bs-toggletab data-bs-target#ipv4 typebutton roletab>IPv4 地址/button> /li> li classnav-item rolepresentation> button classnav-link idipv6-tab data-bs-toggletab data-bs-target#ipv6 typebutton roletab>IPv6 地址/button> /li> li classnav-item rolepresentation> button classnav-link idns-tab data-bs-toggletab data-bs-target#ns typebutton roletab>NS 记录/button> /li> li classnav-item rolepresentation> button classnav-link idraw-tab data-bs-toggletab data-bs-target#raw typebutton roletab>原始数据/button> /li> /ul> div classtab-content idresultTabContent> div classtab-pane fade show active idipv4 roletabpanel aria-labelledbyipv4-tab> div classresult-summary idipv4Summary>/div> div idipv4Records>/div> /div> div classtab-pane fade idipv6 roletabpanel aria-labelledbyipv6-tab> div classresult-summary idipv6Summary>/div> div idipv6Records>/div> /div> div classtab-pane fade idns roletabpanel aria-labelledbyns-tab> div classresult-summary idnsSummary>/div> div idnsRecords>/div> /div> div classtab-pane fade idraw roletabpanel aria-labelledbyraw-tab> pre idresult>等待查询.../pre> /div> /div> /div> !-- 错误信息区域 --> div iderrorContainer styledisplay: none;> pre iderrorMessage classerror-message>/pre> /div> /div> /div> div classbeian-info> p>strong>DNS-over-HTTPS:span iddohUrlDisplay classcopy-link title点击复制>https://span idcurrentDomain>.../span>/ohX6io/span>/strong>br>基于 Cloudflare Workers 上游 cloudflare-dns.com 的 DoH (DNS over HTTPS) 解析服务/p> /div> /div> script srchttps://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js>/script> script> // 获取当前页面的 URL 和主机名 const currentUrl window.location.href; const currentHost window.location.host; const currentProtocol window.location.protocol; const currentDohPath ohX6io; const currentDohUrl currentProtocol + // + currentHost + / + currentDohPath; // 记录当前使用的 DoH 地址 let activeDohUrl currentDohUrl; // 显示当前正在使用的 DoH 服务 function updateActiveDohDisplay() { const dohSelect document.getElementById(dohSelect); if (dohSelect.value current) { activeDohUrl currentDohUrl; } } // 初始更新 updateActiveDohDisplay(); // 当选择自定义时显示输入框 document.getElementById(dohSelect).addEventListener(change, function () { const customContainer document.getElementById(customDohContainer); customContainer.style.display (this.value custom) ? block : none; if (this.value current) { activeDohUrl currentDohUrl; } else if (this.value ! custom) { activeDohUrl this.value; } }); // 清除按钮功能 document.getElementById(clearBtn).addEventListener(click, function () { document.getElementById(domain).value ; document.getElementById(domain).focus(); }); // 复制结果功能 document.getElementById(copyBtn).addEventListener(click, function () { const resultText document.getElementById(result).textContent; navigator.clipboard.writeText(resultText).then(function () { const originalText this.textContent; this.textContent 已复制; setTimeout(() > { this.textContent originalText; }, 2000); }.bind(this)).catch(function (err) { console.error(无法复制文本: , err); }); }); // 格式化 TTL function formatTTL(seconds) { if (seconds 60) return seconds + 秒; if (seconds 3600) return Math.floor(seconds / 60) + 分钟; if (seconds 86400) return Math.floor(seconds / 3600) + 小时; return Math.floor(seconds / 86400) + 天; } // 查询 IP 地理位置信息 - 使用我们自己的代理API而非直接访问HTTP地址 async function queryIpGeoInfo(ip) { try { // 改为使用我们自己的代理接口 const response await fetch(`./ip-info?ip${ip}&tokenohX6io`); if (!response.ok) { throw new Error(`HTTP 错误: ${response.status}`); } return await response.json(); } catch (error) { console.error(IP 地理位置查询失败:, error); return null; } } // 处理点击复制功能 function handleCopyClick(element, textToCopy) { navigator.clipboard.writeText(textToCopy).then(function() { // 添加复制成功的反馈 element.classList.add(copied); // 2秒后移除复制成功效果 setTimeout(() > { element.classList.remove(copied); }, 2000); }).catch(function(err) { console.error(复制失败:, err); }); } // 显示记录 function displayRecords(data) { document.getElementById(resultContainer).style.display block; document.getElementById(errorContainer).style.display none; document.getElementById(result).textContent JSON.stringify(data, null, 2); // IPv4 记录 const ipv4Records data.ipv4?.records || ; const ipv4Container document.getElementById(ipv4Records); ipv4Container.innerHTML ; if (ipv4Records.length 0) { document.getElementById(ipv4Summary).innerHTML `strong>未找到 IPv4 记录/strong>`; } else { document.getElementById(ipv4Summary).innerHTML `strong>找到 ${ipv4Records.length} 条 IPv4 记录/strong>`; ipv4Records.forEach(record > { const recordDiv document.createElement(div); recordDiv.className ip-record; if (record.type 5) { // CNAME 记录 recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center> span classip-address data-copy${record.data}>${record.data}/span> span classbadge bg-success>CNAME/span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> `; ipv4Container.appendChild(recordDiv); // 添加点击事件 const copyElem recordDiv.querySelector(.ip-address); copyElem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); } else if (record.type 1) { // A记录 recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center> span classip-address data-copy${record.data}>${record.data}/span> span classgeo-info geo-loading>正在获取位置信息.../span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> `; ipv4Container.appendChild(recordDiv); // 添加点击事件 const copyElem recordDiv.querySelector(.ip-address); copyElem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); // 添加地理位置信息 const geoInfoSpan recordDiv.querySelector(.geo-info); // 异步查询 IP 地理位置信息 queryIpGeoInfo(record.data).then(geoData > { if (geoData && geoData.status success) { // 更新为实际的地理位置信息 geoInfoSpan.innerHTML ; geoInfoSpan.classList.remove(geo-loading); // 添加国家信息 const countrySpan document.createElement(span); countrySpan.className geo-country; countrySpan.textContent geoData.country || 未知国家; geoInfoSpan.appendChild(countrySpan); // 添加 AS 信息 const asSpan document.createElement(span); asSpan.className geo-as; asSpan.textContent geoData.as || 未知 AS; geoInfoSpan.appendChild(asSpan); } else { // 查询失败或无结果 geoInfoSpan.textContent 位置信息获取失败; } }); } }); } // IPv6 记录 const ipv6Records data.ipv6?.records || ; const ipv6Container document.getElementById(ipv6Records); ipv6Container.innerHTML ; if (ipv6Records.length 0) { document.getElementById(ipv6Summary).innerHTML `strong>未找到 IPv6 记录/strong>`; } else { document.getElementById(ipv6Summary).innerHTML `strong>找到 ${ipv6Records.length} 条 IPv6 记录/strong>`; ipv6Records.forEach(record > { const recordDiv document.createElement(div); recordDiv.className ip-record; if (record.type 5) { // CNAME 记录 recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center> span classip-address data-copy${record.data}>${record.data}/span> span classbadge bg-success>CNAME/span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> `; ipv6Container.appendChild(recordDiv); // 添加点击事件 const copyElem recordDiv.querySelector(.ip-address); copyElem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); } else if (record.type 28) { // AAAA记录 recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center> span classip-address data-copy${record.data}>${record.data}/span> span classgeo-info geo-loading>正在获取位置信息.../span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> `; ipv6Container.appendChild(recordDiv); // 添加点击事件 const copyElem recordDiv.querySelector(.ip-address); copyElem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); // 添加地理位置信息 const geoInfoSpan recordDiv.querySelector(.geo-info); // 异步查询 IP 地理位置信息 queryIpGeoInfo(record.data).then(geoData > { if (geoData && geoData.status success) { // 更新为实际的地理位置信息 geoInfoSpan.innerHTML ; geoInfoSpan.classList.remove(geo-loading); // 添加国家信息 const countrySpan document.createElement(span); countrySpan.className geo-country; countrySpan.textContent geoData.country || 未知国家; geoInfoSpan.appendChild(countrySpan); // 添加 AS 信息 const asSpan document.createElement(span); asSpan.className geo-as; asSpan.textContent geoData.as || 未知 AS; geoInfoSpan.appendChild(asSpan); } else { // 查询失败或无结果 geoInfoSpan.textContent 位置信息获取失败; } }); } }); } // NS 记录 const nsRecords data.ns?.records || ; const nsContainer document.getElementById(nsRecords); nsContainer.innerHTML ; if (nsRecords.length 0) { document.getElementById(nsSummary).innerHTML `strong>未找到 NS 记录/strong>`; } else { document.getElementById(nsSummary).innerHTML `strong>找到 ${nsRecords.length} 条名称服务器记录/strong>`; nsRecords.forEach(record > { const recordDiv document.createElement(div); recordDiv.className ip-record; // 不同类型的记录使用不同的显示方式 if (record.type 2) { // NS 记录 recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center> span classip-address data-copy${record.data}>${record.data}/span> span classbadge bg-info>NS/span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> `; // 添加点击事件 const copyElem recordDiv.querySelector(.ip-address); copyElem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); } else if (record.type 6) { // SOA 记录 // SOA 记录格式: primary_ns admin_email serial refresh retry expire minimum const soaParts record.data.split( ); let adminEmail soaParts1.replace(., @); if (adminEmail.endsWith(.)) adminEmail adminEmail.slice(0, -1); recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center mb-2> span classip-address data-copy${record.name}>${record.name}/span> span classbadge bg-warning>SOA/span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> div classps-3 small> div>strong>主 NS:/strong> span classip-address data-copy${soaParts0}>${soaParts0}/span>/div> div>strong>管理邮箱:/strong> span classip-address data-copy${adminEmail}>${adminEmail}/span>/div> div>strong>序列号:/strong> ${soaParts2}/div> div>strong>刷新间隔:/strong> ${formatTTL(soaParts3)}/div> div>strong>重试间隔:/strong> ${formatTTL(soaParts4)}/div> div>strong>过期时间:/strong> ${formatTTL(soaParts5)}/div> div>strong>最小 TTL:/strong> ${formatTTL(soaParts6)}/div> /div> `; // 添加点击事件,为SOA记录中的所有可点击元素添加事件 const copyElems recordDiv.querySelectorAll(.ip-address); copyElems.forEach(elem > { elem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); }); } else { // 其他类型的记录 recordDiv.innerHTML ` div classd-flex justify-content-between align-items-center> span classip-address data-copy${record.data}>${record.data}/span> span classbadge bg-secondary>类型: ${record.type}/span> span classtext-muted ttl-info>TTL: ${formatTTL(record.TTL)}/span> /div> `; // 添加点击事件 const copyElem recordDiv.querySelector(.ip-address); copyElem.addEventListener(click, function() { handleCopyClick(this, this.getAttribute(data-copy)); }); } nsContainer.appendChild(recordDiv); }); } // 当用户切换到IPv4或IPv6选项卡时,确保显示已加载的地理位置信息 document.getElementById(ipv4-tab).addEventListener(click, function() { // 如果还有加载中的地理位置信息,可以在这里处理 }); document.getElementById(ipv6-tab).addEventListener(click, function() { // 如果还有加载中的地理位置信息,可以在这里处理 }); // 显示复制按钮 document.getElementById(copyBtn).style.display block; } // 显示错误 function displayError(message) { document.getElementById(resultContainer).style.display none; document.getElementById(errorContainer).style.display block; document.getElementById(errorMessage).textContent message; document.getElementById(copyBtn).style.display none; } // 表单提交后发起 DNS 查询请求 document.getElementById(resolveForm).addEventListener(submit, async function(e) { e.preventDefault(); const dohSelect document.getElementById(dohSelect).value; let doh; if(dohSelect current) { doh currentDohUrl; } else if(dohSelect custom) { doh document.getElementById(customDoh).value; if (!doh) { alert(请输入自定义 DoH 地址); return; } } else { doh dohSelect; } const domain document.getElementById(domain).value; if (!domain) { alert(请输入需要解析的域名); return; } // 显示加载状态 document.getElementById(loading).style.display block; document.getElementById(resultContainer).style.display none; document.getElementById(errorContainer).style.display none; document.getElementById(copyBtn).style.display none; try { // 发起查询,参数采用 GET 请求方式,typeall 表示同时查询 A 和 AAAA const response await fetch(`?doh${encodeURIComponent(doh)}&domain${encodeURIComponent(domain)}&typeall`); if (!response.ok) { throw new Error(`HTTP 错误: ${response.status}`); } const json await response.json(); // 检查响应是否包含错误 if (json.error) { displayError(json.error); } else { displayRecords(json); } } catch (error) { displayError(查询失败: + error.message); } finally { // 隐藏加载状态 document.getElementById(loading).style.display none; } }); // 页面加载完成后执行 document.addEventListener(DOMContentLoaded, function() { // 使用本地存储记住最后使用的域名 const lastDomain localStorage.getItem(lastDomain); if (lastDomain) { document.getElementById(domain).value lastDomain; } // 监听域名输入变化并保存 document.getElementById(domain).addEventListener(input, function() { localStorage.setItem(lastDomain, this.value); }); // 更新显示当前域名 document.getElementById(currentDomain).textContent currentHost; // 更新DoH下拉选择框的自动选项,显示完整URL const currentDohOption document.getElementById(currentDohOption); if (currentDohOption) { currentDohOption.textContent currentDohUrl + (当前站点); } // 设置DoH链接复制功能 const dohUrlDisplay document.getElementById(dohUrlDisplay); if (dohUrlDisplay) { dohUrlDisplay.addEventListener(click, function() { const textToCopy currentProtocol + // + currentHost + / + currentDohPath; navigator.clipboard.writeText(textToCopy).then(function() { dohUrlDisplay.classList.add(copied); setTimeout(() > { dohUrlDisplay.classList.remove(copied); }, 2000); }).catch(function(err) { console.error(复制失败:, err); }); }); } // 添加Get Json按钮的点击事件 document.getElementById(getJsonBtn).addEventListener(click, function() { const dohSelect document.getElementById(dohSelect).value; let dohUrl; // 获取当前选择的DoH服务器URL if(dohSelect current) { dohUrl currentDohUrl; } else if(dohSelect custom) { dohUrl document.getElementById(customDoh).value; if (!dohUrl) { alert(请输入自定义 DoH 地址); return; } } else { dohUrl dohSelect; } // 获取域名 const domain document.getElementById(domain).value; if (!domain) { alert(请输入需要解析的域名); return; } // 构建完整的查询URL let jsonUrl new URL(dohUrl); // 使用name参数(标准DNS-JSON格式) jsonUrl.searchParams.set(name, domain); // 在新标签页打开 window.open(jsonUrl.toString(), _blank); }); }); /script>/body>/html>
View on OTX
|
View on ThreatMiner
Please enable JavaScript to view the
comments powered by Disqus.
Data with thanks to
AlienVault OTX
,
VirusTotal
,
Malwr
and
others
. [
Sitemap
]