AdguardTeam / AdguardTeam/AdGuardHome
Remove `protection_disabled_until` from configuration
- Dominant language
- TypeScript
- Stars
- 36.9k
- Forks
- 2.5k
- PR merge metrics
- No merged PRs in 30d
Description
### Prerequisites
- [x] I have checked the [Wiki](https://github.com/AdguardTeam/AdGuardHome/wiki) and [Discussions](https://github.com/AdguardTeam/AdGuardHome/discussions) and found no answer
- [x] I have searched other issues and found no duplicates
- [x] I want to request a feature or enhancement and not ask a question
### The problem
The config file (/etc/adguardhome.yaml in OpenWRT), contains two keys:
```
filtering:
protection_disabled_until:
protection_enabled:
```
which save the "disabled" state of AGH and (if necessary) the expiry of the disabled state of AGH.
I consider this to be "dynamic runtime data" that shouldn't live in a config file. There are two (imo negative) implications at the moment:
1. This transient data causes false "backups" and config versions.
2. In embedded systems that use flash, it causes a working write (which OpenWRT at least tries to minimise).
I think it can be removed without breaking functionality (or perhaps changing the behaviour in a positive way).
### Proposed solution
For `protection_disabled_until`: Remove the key, and keep the value in memory. This means a reboot during the window will likely cause AGH to be enabled again. I think this lies within expectations. However if we really want to keep that expiry across restarts then the value can be kept in a file in the temp filesystem (as applicable).
For `protection_enabled`: only set this if AGH is disabled without a timer. My expectation is that this isn't often and not transient, so writing this case to config would be reasonable.
### Alternatives considered and additional information
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.