menu LittleJake's Blog
color_lens
avatar
Jake Liu
Never Settle
creative commons by-nc-sa
hit
Category
keyboard_arrow_down

© 2024 LittleJake's Blog.

萌ICP备20223020号

测试DNS-over-HTTPS服务器方式、工具、生成b64

前言

RFC 8484的raw dns format太晦涩难懂了,甚至连chatgpt都生成错误,目前找到几个转换的资料供参考。

记录

powershell转换对应get

param (
   [string]$hostname = "www.qq.com"
)

# 
[byte[]]$dnswire= @(00,00,01,00,00,01,00,00,00,00,00,00)

foreach ($namepart in $hostname.split(".")){
   $dnswire += $namepart.length
   $dnswire += [System.Text.Encoding]::ascii.GetBytes($namepart)
}
$dnswire += @(00,00,01,00,01)
$dnswireb64 = [Convert]::ToBase64String($dnswire)
$dnswireb64


json方式

curl https://dns.google/resolve?name=www.qq.com&type=A

其他工具

knot-utils
dog

参考文档

DoH - DNS over HTTPS
RFC 8484
Obfuscated DNS Queries

Buy me a beer

buymeacoffee
Jake Liu
Never Settle

Title: 测试DNS-over-HTTPS服务器方式、工具、生成b64

Author: Jake Liu

Origin:

Creative Commons License

This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0) For any re-post you must give appropriate credit.

文章遵循CC许可 署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0) 转载请注明出处

Tag:DNS-over-HTTPS, dog, doh

评论区

Add a new comment.

Theme