Commit Graph
472 Commits
Author SHA1 Message Date
DL6ER 48fc06d46b Add POST /api/teleporter to upload and install backed up configuration
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-25 21:51:12 +01:00
DL6ER e4383775d1 Add /api/action/gravity which can be used to trigger a run of pihole -g. The output is live streamed using HTTP/1.1 chunked encoding.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-24 20:15:45 +01:00
DL6ER 785c21817e Add pihole-FTL --teleporter to create Teleporter ZIP file in the current directory. We need to add "zipinfo" as package to our ftl-build containers to be able to verify the fiel independently (this is already done by Python for the ZIP archive received from the API - but it doesn't hurt to test twice)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-23 22:21:19 +01:00
DL6ER 13168c377b Add GET /api/teleporter
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-23 21:56:11 +01:00
DL6ER 88e8ab9fd5 !!! BREAKING CHANGE !!! Redesign TOML config structure
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-22 12:32:10 +01:00
DL6ER 0856153699 Add ability to list allowed values (for enums) in JSON form. Add pretty-printing for TOML and update all help test descriptions from the official Pi-hole documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-22 12:01:42 +01:00
DL6ER 47ac129a53 !!! BREAKING CHANGE !!! Rename pihole-FTL.toml to pihole.toml and it is a Pi-hole wide config file also covering all the dnsmasq settings, etc.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-22 10:01:54 +01:00
DL6ER 5e67e488dc Tests: Add test for embedded GZIP compressor
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-22 09:24:40 +01:00
DL6ER 88e57ef9e3 Manage custom.list through the universal /config/dns/hosts instead of its own interface. This reduces code duplication.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-20 18:32:21 +01:00
DL6ER 91f2645ace Also allow all IPv6 addresses in default webserver ACL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-20 04:59:43 +01:00
DL6ER 2d6c25d573 Add GET /config/{element} for more specific requests as well as PATCH and DELETE /config/{element}/{value} for direct array manipulation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 18:19:19 +01:00
DL6ER a506d38d9f Materialize the pseudoelement config.port as config.dnsmasq.port (it can now also be changed)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-18 04:39:09 +01:00
DL6ER c34975180e Rename /api/ftl/endpoints -> /api/endpoints
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:37:11 +01:00
DL6ER 0c1c2b0bc3 Add /api/config:dnsmasq.cnames
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:33:01 +01:00
DL6ER 5e96022e63 Group endpoints in /api/ftl/endpoints by supported methods
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-16 21:11:57 +01:00
DL6ER 7546126bbe Add config.dnsmasq.dhcp.hosts
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 21:59:01 +01:00
DL6ER 96c6effa45 Only add "conf-dir=/etc/dnsmasq.d" to the config if this directory exists
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 12:33:32 +01:00
DL6ER aae3905334 Add /config dnsmasq.logging (bool)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 09:27:47 +01:00
DL6ER 393eaa766f Update microtar (using the version from https://github.com/DL6ER/microtar): We now have support for large files and in-memory processing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 18:28:43 +01:00
DL6ER 41ebe5ec51 !!! BREAKING CHANGE !!! Create new dnsmasq config file and test it.
This needs a manual removal of /etc/dnsmasq.d/01-pihole.conf and /etc/dnsmasq.d/02-pihole-dhcp.conf (if existing).
Furthermore, we need a new symlink /etc/pihole/01-pihole.conf -> /etc/dnsmasq.d/01-pihole.conf

Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-12 18:12:41 +01:00
DL6ER 8033c6c6bf Add new config items to the test TOML file
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:34:54 +01:00
DL6ER 140a365806 Tests: Set api.pwhash and dns.blocking.mode using PATCH /api/config
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 21:29:55 +01:00
DL6ER f199ac2f08 Automatically migrate the API password hash and the lists of clients and domains to be excluded from setupVars.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 21:21:38 +01:00
DL6ER 1414e0d397 Ensure checkAPI.py also accepts situations with localAPIauth = false
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 20:59:18 +01:00
DL6ER 4ac52263e9 Implement login for python API checking script
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 16:04:26 +01:00
DL6ER 3c5c1d52b7 Transform log_debug() into a function-like macro to save some time when we are not in debugging mode (the function is not called in this case)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 09:55:51 +01:00
DL6ER b8354c515c Fix debug flag parsing after changing from bit-wise flags to individual bools
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 20:08:38 +01:00
DL6ER 8efd253529 Merge remote-tracking branch 'origin/development' into new/http
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 18:37:13 +01:00
DL6ER e145d20d28 Rewrite the entire config-related code to allow for changing data without having to restart. Hereby, we greatly reduce code duplication in the TOML routines so we won't have to touch tme in the future when adding additional options.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-07 18:06:41 +01:00
DL6ER 8c4b4d7ed5 Add checkAPI.py to test suite
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-04 20:22:40 +01:00
DL6ER 6d7239dbc8 Add example verification when (possibly multiple) global examples are provided below the schema level
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 22:08:55 +01:00
DL6ER f2d68f20d7 Also verify endpoint structure: Query endpoints from FTL and check if all properties mentioned in the docs are present (and of correct type) and that there are no extra properties we forgot to document. Furthermore, also verify that the provided examples are of correct type, too.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-03 21:51:13 +01:00
DL6ER c7803df604 Add /api/stats/upstreams and /api/stats/database/upstreams documentation
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 21:19:11 +01:00
DL6ER 8df3500c83 Move /api/ftl/gateway -> /api/network/gateway, /api/ftl/interfaces -> /api/network/interfaces, /api/ftl/network -> /api/network/devices, and /api/ftl/config -> /api/config and add documentation for /api/network/devices
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 20:52:13 +01:00
DL6ER 69aaa71c97 Improve checkAPI.py script (add handling of {kind} URI variables)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 20:41:21 +01:00
DL6ER ab5722e2a4 Accelerate checkAPI script by ensuring we parse each YAML at most once
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 20:16:01 +01:00
DL6ER 32279e0765 Also rename config options in test pihole-FTL.toml
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-02 20:08:45 +01:00
DL6ER bd5519c6bf Add API checking script
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-01 20:34:40 +01:00
DL6ER 3389b1f0c2 Add /api/ftl/config which can be used to retrieve the entire configuration of FTL. This endpoint only supports GET so far, however, we will add POST in the future so that configuration values can be changed through the API
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-01 18:19:36 +01:00
DL6ER 840e73ec4c Resolve missed merge conflict on Github workflow
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-12-30 16:17:08 +01:00
DL6ER a9ea62a3fc Merge branch 'development' into new/http
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-12-30 15:12:14 +01:00
DL6ER 8cacd8f5ec Adds colors (if available) to verbose version output and completely revamp the help function
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-12-09 10:42:20 +01:00
DL6ER 6b6c069b22 Remove downloading step of inspect.lua from the testing suite - the script is now embedded into FTL
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-20 12:57:46 +01:00
DL6ER 80b1d3edba Run tests for all x86_* architectures
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-13 18:20:27 +01:00
DL6ER 57352c9e7c Add building the full binary in the x86_64 container
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-13 10:44:56 +01:00
DL6ER eec622c687 Add shortcut to compile an all-options build of dnsmasq inside FTL. Note that this does not include ubus as it is an OpenWRT-native thing that cannot be setup easily on any other distro.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-10 20:36:25 +01:00
DL6ER 66ba5cfc43 Tests: Use dnssec.works instead of verteiltesysteme.net
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-09 19:38:45 +01:00
DL6ER 94be8de5b6 Merge pull request #1467 from pi-hole/update/ftl-build
Update included crypto library (nettle)
2022-11-06 15:04:01 +01:00
DL6ER 1429f9a25b Do not check disk usage during tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-06 08:45:37 +01:00
DL6ER a0909894c4 Adjust tests
Signed-off-by: DL6ER <dl6er@dl6er.de>
2022-11-03 20:51:54 +01:00