Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

luci-app-adguardhome: Add new app #5853

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Commits on Jun 27, 2022

  1. luci-app-adguardhome: Add new app

    There is no integration into the web UI for AdGuard Home. This PR adds
    * A Lua script for rpcd to interface with the AGH REST API
    * ACL controls allowing JS code to call rpcd, uci, logread
    * Menu entries to put AdGuard Home under Services
    * Three UIs - status, logs, config
    
    The Lua script supports three API calls:
    * get_status - maps to /control/status in the AGH REST API
    * get_statistics - maps to /control/stats in the AGH REST API
    * get_config - converts /etc/adguardhome.yaml to JSON
    
    Authentication details must be provided by the user, as the password in the YAML file is encrypted. This results in the AGH password being stored cleartext in /etc/config/adguardhome.
    
    The Lua script will log if it encounters an error, in an effort to make it easier to debug. These logs are visible in the Logs UI of the application.
    
    I could not find any unit testing for things like the UI or the Lua code, so the only testing done was by hand.
    
    The credentials were removed from the config, and both the ubus call and the web UI render the failure to acquire the credentials.
    
    Incorrect credentials were supplied, and the UI was verified as showing a RPC error message.
    
    ACLs were checked by removing luci-compat.json (which wildcard allows saving/reading), and ensuring that the UI could read and save the config.
    
    Package was built and tested with
    ```
     make package/luci-app-adguardhome/compile  -j20
     scp bin/packages/i386_pentium4/cricalixluci/luci-app-adguardhome_unknown_all.ipk root@192.168.0.1:
     ssh root@192.168.0.1
     opkg remove luci-app-adguardhome && opkg install luci-app-adguardhome_unknown_all.ipk && rm luci-app-adguardhome_unknown_all.ipk
    ```
    and then browsing the UI to make sure the deployment was clean and behaved as expected.
    
    Signed-off-by: Duncan Hill <openwrt-dev@cricalix.net>
    Duncan Hill committed Jun 27, 2022
    Configuration menu
    Copy the full SHA
    3253c26 View commit details
    Browse the repository at this point in the history

Commits on Jun 16, 2023

  1. Configuration menu
    Copy the full SHA
    913cb4f View commit details
    Browse the repository at this point in the history

Commits on Aug 5, 2023

  1. Configuration menu
    Copy the full SHA
    0efa0b3 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    f6f18a3 View commit details
    Browse the repository at this point in the history

Commits on Jan 6, 2024

  1. Configuration menu
    Copy the full SHA
    2d6502c View commit details
    Browse the repository at this point in the history
  2. Rebase on recent pull, update README, handle new AGH config file, tes…

    …t on 23.05, format code
    cricalix committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    04effa4 View commit details
    Browse the repository at this point in the history
  3. Update translations

    cricalix committed Jan 6, 2024
    Configuration menu
    Copy the full SHA
    903e9ad View commit details
    Browse the repository at this point in the history