
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
@pektin/toluol-wasm-web
Advanced tools
Send DOH(DNS over Http(s)) queries with the binary "content-type": "application/dns-message" and decode the response in the browser!
Send DOH(DNS over Http(s)) queries with the binary "content-type": "application/dns-message" and decode the response in the browser!
import * as toluol from "@pektin/toluol-wasm";
const f = fetch;
const publicResolvers = [
"https://cloudflare-dns.com",
"https://dns.digitale-gesellschaft.ch",
"https://google.dns",
"http://[::]"
];
const resolver = publicResolvers[3];
const post = async query => {
const res = await f(`${resolver}/dns-query`, {
headers: {
"content-type": "application/dns-message"
},
credentials: "omit",
method: "POST",
body: query
});
return new Uint8Array(await res.arrayBuffer());
};
const get = async query => {
const q = Buffer.from(query).toString("base64").replace(/\+/g, "-").replace(/\//g, "_");
const res = await f(`${resolver}/dns-query?dns=${q.replace(/=/g, "")}`, {
headers: {
accept: "application/dns-message"
},
credentials: "omit"
});
return new Uint8Array(await res.arrayBuffer());
};
(async () => {
toluol.init_panic_hook();
const query = toluol.new_query("pektin.xyz", "A");
const res = await get(query);
const parsed = toluol.parse_answer(res);
console.log(parsed);
})();
FAQs
Send DOH(DNS over Http(s)) queries with the binary "content-type": "application/dns-message" and decode the response in the browser!
We found that @pektin/toluol-wasm-web demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.