diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0cafc1c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.venv/ \ No newline at end of file diff --git a/cert.py b/cert.py index 2bf9a38..59666c1 100644 --- a/cert.py +++ b/cert.py @@ -7,7 +7,7 @@ import time AUTH = "" # Check if token file exists -if os.path.isfile("/root/hns_doh_loadbalancer/token"): +if not os.path.isfile("/root/hns_doh_loadbalancer/token"): print("ERROR: Token file not found") # Read token from file @@ -24,7 +24,7 @@ if len(AUTH) == 0: # URL to acme-dns instance -ACMEDNS_URL = "https://nathan.woodburn.au/hnsdoh-acme" +ACMEDNS_URL = "https://nathan.c.woodburn.au/hnsdoh-acme" # Path for acme-dns credential storage STORAGE_PATH = "/etc/letsencrypt/acmedns.json" # Whitelist for address ranges to allow the updates from diff --git a/create_wireform.py b/create_wireform.py new file mode 100644 index 0000000..8964216 --- /dev/null +++ b/create_wireform.py @@ -0,0 +1,15 @@ +import base64 +import dns.message + +# Generate custom request +domain = "woodburn" + +message = dns.message.make_query(domain, dns.rdatatype.A,id=0) + +wireBytes = message.to_wire() +wire = base64.b64encode(wireBytes) +print(wire.decode("utf-8")) + +# Read +message = dns.message.from_wire(wireBytes) +print(str(message)) diff --git a/install.sh b/install.sh index c32d9f6..a033972 100755 --- a/install.sh +++ b/install.sh @@ -20,7 +20,6 @@ sudo apt-get install -y dnsdist sudo apt install snapd -y sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot -sudo certbot certonly --manual --manual-auth-hook /root/hns_doh_loadbalancer/cert.py --preferred-challenges dns -d hnsdoh.com --deploy-hook /root/hns_doh_loadbalancer/cert.sh sudo cp /root/hns_doh_loadbalancer/resolved.conf /etc/systemd/resolved.conf sudo systemctl restart systemd-resolved @@ -32,7 +31,6 @@ sudo systemctl daemon-reload # Restart dnsdist sudo systemctl restart dnsdist - # Install caddy curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list @@ -45,6 +43,8 @@ sudo cp /root/hns_doh_loadbalancer/Caddyfile /etc/caddy/Caddyfile # Restart caddy sudo systemctl restart caddy +sudo certbot certonly --manual --manual-auth-hook /root/hns_doh_loadbalancer/cert.py --preferred-challenges dns -d hnsdoh.com -d *.hnsdoh.com --deploy-hook /root/hns_doh_loadbalancer/cert.sh + # Install NVM curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash diff --git a/public/index.html b/public/index.html index cc663e7..54fd9f2 100644 --- a/public/index.html +++ b/public/index.html @@ -73,13 +73,15 @@
DNS over HTTPS is supported by most browsers. To add HNSDoH to your revolvers add this URL to your Secure DNS settinghttps://hnsdoh.com/dns-query
DNS over HTTPS is supported by most browsers. To add HNSDoH to your revolvers add this URL to your Secure DNS settinghttps://hnsdoh.com/dns-query
You can also specify a specific region to have faster resolution with a lower number of servers for redundancy.https://{region}.hnsdoh.com/dns-query
For example the AU region can be set using: https://au.hnsdoh.com/dns-query
DNS over TLS is the best option for mobile phones. Simply set Private DNS to the hostname hnsdoh.com
You can also specify a specific region to have faster resolution with a lower number of servers for redundancy.{region}.hnsdoh.com
For example the AU region can be set using: au.hnsdoh.com
Region | +Region ID | +# of nodes | +Latency | +
---|---|---|---|
Australia | +au | +1 | +Pinging... | +
Europe | +eu | +2 | +Pinging... | +
North America | +na | +2 | +Pinging... | +
Asia | +as | +1 | +Pinging... | +
Asia Pacific | +ap | +2 | +Pinging... | +