HTTPS & Adguard Home Settings Page

I followed the instructions here for using https with Adguard Home using a Let's Encrypt cert for my domain: Access GL.iNet and Adguard Home via HTTPS - GL.iNet Router Docs 4

It is working, except the link to AGH "Settings Page" from the gl.inet Admin Panel still points to the old unsecured port, 3000.

So, when I access my gl.inet admin console at https(domain), the link for ADG "Settings Page" points not to https(domain):3001 but instead to https(domain):3000, which is invalid (not https).

Can the link be updated to point to port 3001 when using https?

Let me park right here :thinking:

Hi,

Unfortunately, the current Settings Page button always uses HTTP on port 3000.

As a manual workaround, you could modify adgHref() in /www/views/gl-sdk4-ui-adguardhome.common.js.gz. After decompressing the file, an example implementation is:

adgHref() {
  const { hostname, protocol } = window.location;
  if (/^(rtty-web|rttys-web)/.test(hostname)) return "";

  const isHttps = protocol === "https:";
  return `${isHttps ? "https" : "http"}://${hostname}:${isHttps ? 3001 : 3000}`;
}

Important: This assumes AdGuard Home already serves HTTPS on port 3001. It follows the Admin Panel's protocol; it does not enable or detect AGH HTTPS.

Recompress the file as gzip, save it back to the same path, and hard-refresh the Admin Panel. Check that the link points to HTTP port 3000 from the HTTP Admin Panel, or HTTPS port 3001 from the HTTPS Admin Panel. This customization may be overwritten by firmware updates.

To undo this change on stock firmware, restore the matching original file and hard-refresh again:

cp -p /rom/www/views/gl-sdk4-ui-adguardhome.common.js.gz /www/views/gl-sdk4-ui-adguardhome.common.js.gz