All Projects → byu-imaal → dohjs

byu-imaal / dohjs

Licence: MIT license
DNS over HTTPS client for use in the browser

Programming Languages

javascript
184084 projects - #8 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to dohjs

Smartdns
A local DNS server to obtain the fastest website IP for the best Internet experience, 一个本地DNS服务器,获取最快的网站IP,获得最佳上网体验。
Stars: ✭ 4,333 (+6002.82%)
Mutual labels:  dns, dns-over-https, doh
dns-resolver-infra
Privacy DNS infrastructure
Stars: ✭ 39 (-45.07%)
Mutual labels:  dns, dns-over-https, doh
dnsredir
Yet another seems better forward/proxy plugin for CoreDNS
Stars: ✭ 58 (-18.31%)
Mutual labels:  dns, dns-over-https, doh
flareon
🦊A cloudflare DNS over HTTPs resolver client library.
Stars: ✭ 14 (-80.28%)
Mutual labels:  dns, https, dns-over-https
Encrypted Dns
Configuration profiles for DNS HTTPS and DNS over TLS for iOS 14 and MacOS Big Sur
Stars: ✭ 455 (+540.85%)
Mutual labels:  dns, https
Getaltname
Extract subdomains from SSL certificates in HTTPS sites.
Stars: ✭ 320 (+350.7%)
Mutual labels:  dns, https
Dnspython
a powerful DNS toolkit for python
Stars: ✭ 1,838 (+2488.73%)
Mutual labels:  dns, dns-over-https
Chameleon
Customizable honeypots for monitoring network traffic, bots activities and username\password credentials (DNS, HTTP Proxy, HTTP, HTTPS, SSH, POP3, IMAP, STMP, RDP, VNC, SMB, SOCKS5, Redis, TELNET, Postgres and MySQL)
Stars: ✭ 230 (+223.94%)
Mutual labels:  dns, https
Sites Using Cloudflare
💔 Archived list of domains using Cloudflare DNS at the time of the CloudBleed announcement.
Stars: ✭ 1,914 (+2595.77%)
Mutual labels:  dns, https
ansible-cloudflared
Install cloudflared and systemd service for DNS-Over-HTTPS
Stars: ✭ 18 (-74.65%)
Mutual labels:  dns-over-https, doh
DNS-over-Discord
A 1.1.1.1 DNS resolver built for Discord
Stars: ✭ 228 (+221.13%)
Mutual labels:  dns-over-https, doh
Nps
一款轻量级、高性能、功能强大的内网穿透代理服务器。支持tcp、udp、socks5、http等几乎所有流量转发,可用来访问内网网站、本地支付接口调试、ssh访问、远程桌面,内网dns解析、内网socks5代理等等……,并带有功能强大的web管理端。a lightweight, high-performance, powerful intranet penetration proxy server, with a powerful web management terminal.
Stars: ✭ 19,537 (+27416.9%)
Mutual labels:  dns, https
aio-doh
Asynchronous DNS-over-HTTPS client for Python
Stars: ✭ 14 (-80.28%)
Mutual labels:  https, dns-over-https
harddns
RFC8484 and DoH/JSON resolver
Stars: ✭ 35 (-50.7%)
Mutual labels:  dns-over-https, doh
Ymhttp
基于 libcurl 的 IO 多路复用 HTTP 框架,适用于 iOS 平台,支持 HTTP/HTTPS/HTTP2/DNS(SNI)
Stars: ✭ 127 (+78.87%)
Mutual labels:  dns, https
Crypt Le
Crypt::LE - Let's Encrypt / Buypass / ACME client and library in Perl for obtaining free SSL certificates (inc. generating RSA/ECC keys and CSRs). HTTP/DNS verification is supported out of the box, easily extended with plugins, easily dockerized.
Stars: ✭ 277 (+290.14%)
Mutual labels:  dns, https
Partyloud
A simple tool to generate fake web browsing and mitigate tracking
Stars: ✭ 170 (+139.44%)
Mutual labels:  dns, https
dnscrypt-proxy
dnscrypt-proxy 2 - A flexible DNS proxy, with support for encrypted DNS protocols.
Stars: ✭ 9,198 (+12854.93%)
Mutual labels:  dns-over-https, doh
aiodns
A All-In-One DNS Solution written in Go
Stars: ✭ 23 (-67.61%)
Mutual labels:  dns, dns-over-https
dns.sb
https://dns.sb/
Stars: ✭ 32 (-54.93%)
Mutual labels:  dns, dns-over-https

DoHjs

Javascript library for DNS over HTTPS lookups in web apps

npm version build


Try sending DoH lookups from your browser - https://dohjs.org

Contents

Why dohjs

The purpose of dohjs is described well in the Internet standard document for DNS over HTTPS (RFC 8484):

allowing web applications to access DNS information via existing browser APIs in a safe way consistent with Cross Origin Resource Sharing (CORS)

Features

  • Fully compliant DNS over HTTPS client implementation
  • Supports GET and POST wireformat queries
  • Command line DNS over HTTPS lookup tool
  • Web interface to try dohjs
  • CORS proxy to get past CORS errors associated with DoH (source code here). This is mainly for use on https://dohjs.org.

Installation

If you're not using npm, you can skip to quickstart.

npm install dohjs

If you want to just use the command line tool dohjs to issue DoH lookups, install it globally (or use npx):

npm install -g dohjs

NOTE: The above command may need to be run as root (how to fix this)

Quickstart

A simple way to start is to include doh.js in your HTML file. You can include it from jsdelivr or your local installation.

<!-- from CDN -->
<script src="https://cdn.jsdelivr.net/npm/dohjs@latest/dist/doh.min.js"></script>
<!-- from local installation -->
<script src="/path/to/node_modules/dohjs/dist/doh.min.js"></script>

If your project is mostly nodejs-style (e.g. you're using browserify), you can require() dohjs like so:

const doh = require('dohjs');

Now here's a quick example of a DoH lookup using dohjs:

// create your stub resolver
const resolver = new doh.DohResolver('https://1.1.1.1/dns-query');

// lookup the A records for example.com and log the IP addresses to the console
resolver.query('example.com', 'A')
  .then(response => {
    response.answers.forEach(ans => console.log(ans.data));
  })
  .catch(err => console.error(err));

Examples

Checkout our examples to see dohjs in action. See examples/README for a description of the examples.

To serve thr examples, run npm start. Your browser will open up to an index of your current directory, then just navigate to the examples and open whatever html file you were wanting to look at.

Docs

API documentation for dohjs can be found in docs/README.md.

Documentation for the dohjs CLI is in docs/cli.md.

Contributing

We love contributors!

If you find a bug in dohjs, or you have a feature you'd like added, please open an issue and/or submit a pull request.

Tests

To run tests, clone the repo, and run:

npm test

Web interface

The web interface is available at https://dohjs.org.

See the gh-pages branch for code.

CORS issues

You'll probably get some CORS errors when sending DoH queries. A few ways to get around those are:

  • Use a CORS proxy. At dohjs.org, there is an option to use a CORS proxy if you want to try it out.
  • Disable CORS when you launch your browser sometimes works (e.g. google-chrome --user-data-dir=/tmp/asdf --disable-web-security)
  • Run your own DoH server that sets the Access-Control-Allow-Origin header appropriately (e.g. Access-Control-Allow-Origin: * to allow everyone)

License

GPLv3 (see LICENSE)

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].