Replies: 1 comment
-
The reason I'm trying to figure this out is that on Android clients, the Private DNS feature accepts only a hostname, not a URL. As a result the only way to get it working is using the AGH hostname as the client ID like I describe above. Has anyone gotten the wildcard hostname feature released in v0.108.0-b.18 working? Even just an indicator that it's worked for anyone would be a good pointer here. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have
v0.108.0-b.60
of AdGuardHome running which supports deriving the ClientID from the AGH hostname as of v0.108.0-b.18.According to that wiki page, if a DoH request comes into AGH to a URL like
https://my-client.example.org/dns-query
, then AGH will identifymy-client
as the ClientID.I'm running AGH behind a reverse proxy of SWAG which is just Nginx.
I've confirmed things are generally working because if I make a DoH request passing the ClientID in the URL (e.g.
https://example.org/dns-query/my-client
), SWAG proxies the call to AGH and AGH correctly identifies the client by thatmy-client
ID and applies the right filters.I trigger a URL path DoH call by running
Log lines for successful URL Path DoH call
But if I make the request, passing the ClientID in the hostname, AGH doesn't detect the ClientID from the hostname and falls back to determining the client from the IP address of the client.
I trigger a hostname DoH call by running
Log lines for an unsuccessful hostname DoH call
The interesting line in there to me is
which shows it's not getting a
clientid
.For context, I have the wildcard DNS working so that
my-client.example.org
points to the server with SWAG and AGH, and I have the wildcard certificate working on the SWAG (Nginx) reverse proxy where TLS is terminated.I have
allow_unencrypted_doh: true
configured inAdGuardHome.yaml
as well as putting172.16.0.0/12
, which includes the SWAG docker IP in it in thetrusted_proxies
list.I can't tell from the logs and have not yet had luck determining from the AGH code, how AGH uses the hostname to determine the ClientID.
Does AGH determine the Client ID by
Host
header in the http header of the DoH call which contains the hostname?I think if I can figure out the method AGH uses to extract the ClientID from the hostname, I can figue out why it isn't working for me.
Beta Was this translation helpful? Give feedback.
All reactions