Skip to content

luci-app-adguardhome: add new app#8413

Merged
systemcrash merged 1 commit intoopenwrt:masterfrom
GeorgeSapkin:add-luci-app-adguardhome
Mar 16, 2026
Merged

luci-app-adguardhome: add new app#8413
systemcrash merged 1 commit intoopenwrt:masterfrom
GeorgeSapkin:add-luci-app-adguardhome

Conversation

@GeorgeSapkin
Copy link
Member

@GeorgeSapkin GeorgeSapkin commented Mar 12, 2026

Add LuCI UI for AdGuard Home configuration.

If AdGuard Home service is running, restart it automatically when configuration is applied.

Depends on:

Run Testing Details

  • OpenWrt Version: 25.12-rc3
  • OpenWrt Target/Subtarget: x86/64
  • OpenWrt Device: QEMU
image image image

@GeorgeSapkin GeorgeSapkin force-pushed the add-luci-app-adguardhome branch 9 times, most recently from e58b138 to ba94f94 Compare March 13, 2026 05:15
@systemcrash
Copy link
Contributor

Another yaml config monster :)

Those go variables are globals, yes?

@GeorgeSapkin
Copy link
Member Author

Those go variables are globals, yes?

Not sure I understand what you mean by globals here. These are per-process.

@GeorgeSapkin GeorgeSapkin force-pushed the add-luci-app-adguardhome branch from ba94f94 to ef2d48b Compare March 13, 2026 16:00
@GeorgeSapkin GeorgeSapkin marked this pull request as draft March 13, 2026 16:56
@GeorgeSapkin GeorgeSapkin force-pushed the add-luci-app-adguardhome branch 2 times, most recently from 91cf2e1 to 7acacb3 Compare March 13, 2026 20:01
@GeorgeSapkin GeorgeSapkin marked this pull request as ready for review March 14, 2026 21:58
@systemcrash
Copy link
Contributor

Per-process, implying they control the behaviour of all Go binaries on the system?

@GeorgeSapkin
Copy link
Member Author

Per-process, implying they control the behaviour of all Go binaries on the system?

They can be set for each Go process individually. They could be set on a system-level, but that doesn't make sense.

Here's how it's used for AGH:

	[ "$gc" -le 0 ] || procd_append_param env GOGC="$gc"
	[ "$maxprocs" -le 0 ] || procd_append_param env GOMAXPROCS="$maxprocs"
	[ "$memlimit" -le 0 ] || procd_append_param env GOMEMLIMIT="$memlimit"

@systemcrash
Copy link
Contributor

Ah, OK. That looks like it's set only for the agh sub-process. Is this ready, then?

@GeorgeSapkin
Copy link
Member Author

If nothing jumps out as wrong. Particularly around polling and updating a UI element. I couldn't figure out something that looked idiomatic to update the Service Status field.

@GeorgeSapkin GeorgeSapkin force-pushed the add-luci-app-adguardhome branch 3 times, most recently from 82c035d to 3fdff94 Compare March 15, 2026 19:49
Comment on lines +203 to +205
advSettingsOpt.load = () => sessionStorage.getItem(STORAGE_KEY) || '0';
advSettingsOpt.remove = () => {};
advSettingsOpt.write = (_, value) => sessionStorage.setItem(STORAGE_KEY, value);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit odd. Why store a key for agh in a different uci config file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a session storage entry that marks that advanced settings tab is visible. Nothing is stored in UCI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So user logs out and in and the settings are hidden anew?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The retain = 1 should help, otherwise the dependent settings get erased.

Copy link
Member Author

@GeorgeSapkin GeorgeSapkin Mar 15, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not familiar with all the knobs yet. Can you make a small snippet of what needs to be modified in this case?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you want to store something permanently or only while you're logged in?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something for the duration of the session, hence why I used the session storage. But while logged in also works if that's more idiomatic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Then what you have is fine. It's not idiomatic with conventions in this repo so others might find this and think it's a bug.

Add LuCI UI for AdGuard Home configuration.

If AdGuard Home service is running, restart it automatically when
configuration is applied.

Signed-off-by: George Sapkin <george@sapk.in>
@systemcrash systemcrash force-pushed the add-luci-app-adguardhome branch from 3fdff94 to b43040a Compare March 16, 2026 19:59
@systemcrash
Copy link
Contributor

Let's see how she fares. master only?

@systemcrash systemcrash merged commit c923488 into openwrt:master Mar 16, 2026
5 checks passed
@GeorgeSapkin GeorgeSapkin deleted the add-luci-app-adguardhome branch March 16, 2026 20:01
@GeorgeSapkin
Copy link
Member Author

Let's see how she fares. master only?

Yeah, it depends on config changes on the service side that are not in stable yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants