XX-net/XX-Net · warning
DoH request no name
Error message
DoH request no name
What it means
The DoH (DNS-over-HTTPS) endpoint was called without a 'name' query parameter. proxy_handler.DoH_handler serves DNS lookups and requires ?name=<domain>; when the parameter is missing it logs this warning and returns HTTP 400 with body {"error":"no name"} (it does not raise).
Source
Thrown at code/default/smart_router/local/proxy_handler.py:379
kv = parse_qs(parsed_url.query)
if parsed_url.path == "/dns-query":
return self.DoH_handler(kv)
else:
xlog.debug("PAC %s %s from:%s", method, url, self.client_address)
handler = pac_server.PacHandler(self.conn, self.client_address, None, xlog)
return handler.handle()
sock = SocketWrap(self.conn, self.client_address[0], self.client_address[1])
sock.replace_pattern = [url[:url_prex_len], b""]
xlog.debug("http %r connect to %s:%d %s %s", self.client_address, host, port, method, path)
handle_domain_proxy(sock, host, port, self.client_address)
def DoH_handler(self, kv):
handler = pac_server.PacHandler(self.conn, self.client_address, None, xlog)
name = kv.get("name", [None])[0]
if not name:
xlog.warn("DoH request no name")
return handler.send_response(content=b'{"error":"no name"}', status=400)
dns_type = kv.get("type", ["1"])[0]
if dns_type.isnumeric():
dns_type = int(dns_type)
ips = utils.to_str(g.dns_query.query(name, dns_type))
info = {
"Status": 0,
"Answer": [
]
}
for ip in ips:
if dns_type == 1 and not utils.check_ip_valid4(ip):
continue
if dns_type == 16 and not utils.check_ip_valid6(ip):
continue
View on GitHub (pinned to cfa5bc17b6)
Solutions
- Always include the name parameter: /dns-query?name=example.com
- For monitoring probes, point health checks at a different endpoint or include a dummy name
- If you need RFC 8484 wire-format DoH, use a dedicated DoH server — this handler expects name/type query params
Example fix
# before GET /dns-query # after GET /dns-query?name=example.com&type=1
Defensive patterns
Strategy: validation
Validate before calling
name = kv.get('name',[None])[0]
if not name:
return handler.send_response(content=b'{"error":"no name"}', status=400) Prevention
- Always include ?name=<domain> on DoH requests
- Point health checks at a dedicated endpoint or add a name param
When it happens
Trigger: GET /dns-query (or the DoH route) without ?name=..., e.g. a health-check probe, browser sending only ?type=A, or a misconstructed DoH client URL.
Common situations: Monitoring/load-balancer probes hitting the DoH endpoint, clients following RFC 8484 binary DoH (no name param) against this JSON-style API, typos in parameter names.
Understand the failure class
Background: Missing required parameter errors: what 'X is required' and 'the required X param is missing' mean, and how to fix them — this error's family across 27 libraries.
Related errors
- DNS server:%s domain:%s fail t:%f
- DNSOverHttpsQuery query fail:%r
- DNS s:%s query:%s fail t:%f
- DnsOverHttpsQuery query %s cost:%f fail:%r
- Servers could not be resolved, %r.
AI-assisted analysis of XX-net/XX-Net@cfa5bc17b6 (2026-08-27).
Data as JSON: /api/errors/6cc21e4decdb8a16.
Report an issue: GitHub.