fix: Add margin for error message

This commit is contained in:
Nathan Woodburn 2025-02-28 13:10:33 +11:00
parent 7f0a13f44b
commit edbfa66249
Signed by: nathanwoodburn
GPG Key ID: 203B000478AD0EF1
2 changed files with 8 additions and 4 deletions
templates/assets/js
tools.py

View File

@ -149,7 +149,7 @@ document.querySelector('.dnssec-toggle').addEventListener('click', function() {
} else {
// Display an error message
document.getElementById("ssl-results").innerHTML = `<h2>Error</h2>
<p>${data.message}</p>`;
<p style="margin-bottom: 3rem;">${data.message}</p>`;
}
})
.catch(error => {

View File

@ -11,14 +11,14 @@ from dns import resolver
import requests
import re
from bs4 import BeautifulSoup
from requests_doh import DNSOverHTTPSSession, add_dns_provider
import requests_doh
import urllib3
import socket
resolver = dns.resolver.Resolver()
resolver.nameservers = ["194.50.5.28","194.50.5.27","194.50.5.26"]
resolver.port = 53
add_dns_provider("HNSDoH", "https://hnsdoh.com/dns-query")
requests_doh.add_dns_provider("HNSDoH", "https://hnsdoh.com/dns-query")
# Disable warnings
urllib3.disable_warnings()
@ -211,7 +211,11 @@ class ProxyError(Exception):
def proxy(url: str) -> requests.Response:
try:
session = DNSOverHTTPSSession("HNSDoH")
session = requests_doh.DNSOverHTTPSSession("HNSDoH")
ip = socket.gethostbyname("hnsdoh.com")
print(f"Resolved IP: {ip}")
ip = requests_doh.resolve_dns("dso.dprofile")
print(f"Resolved IP: {ip}")
r = session.get(url,verify=False,timeout=30)
return r
except Exception as e: