Commit Graph

4872 Commits

Author SHA1 Message Date
DL6ER 64ea7ff5b2 Do not warn about not being able to open setupVars.conf - it may simply not exist
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 20:33:25 +01:00
DL6ER 4e754521c5 Free allocated memory in readTOMLvalue()
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 20:32:59 +01:00
DL6ER 2411818ecc Add null values to /api/version if corresponding lines are not present in /etc/pihole/versions
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 13:30:23 +01:00
DL6ER b95dbbe579 Merge branch 'development' into new/http 2023-01-15 12:43:16 +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 ffaa625800 !!! BREAKING CHANGE !!! Use /etc/pihole/dnsmasq.conf as default config file for FTL. Pi-hole will not touch /etc/dnsmasq.conf or any files in /etc/dnsmasq.d/ any longer. They are solely reserved for user-provided scripts. This also adds the ability to easily have a separate dnsmasq instance running on the same host (using anther port or binding to other interfaces, of course)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 11:41:05 +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 a0a9572d7b Add /api/versions docker.{local,remote}
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-15 08:15:11 +01:00
DL6ER 4e0face988 Merge pull request #1521 from pi-hole/dependabot-github_actions-development-benoitchantre-setup-ssh-authentication-action-1.0.1
Bump benoitchantre/setup-ssh-authentication-action from 1.0.0 to 1.0.1
2023-01-14 21:07:32 +01:00
DL6ER 52898d0d05 Rename new option -c to --config to avoid possible ambiguity
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-14 20:40:58 +01:00
DL6ER 3bb8050cf8 Remove extra system.hostname property from /api/sysinfo. It is already contained as system.uname.nodename of the very same API endpoint
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-14 20:36:49 +01:00
DL6ER 8541346fae Add config getter and setter for the CLI
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-14 20:35:40 +01:00
dependabot[bot] 6333d4c2cd Bump benoitchantre/setup-ssh-authentication-action from 1.0.0 to 1.0.1
Bumps [benoitchantre/setup-ssh-authentication-action](https://github.com/benoitchantre/setup-ssh-authentication-action) from 1.0.0 to 1.0.1.
- [Release notes](https://github.com/benoitchantre/setup-ssh-authentication-action/releases)
- [Changelog](https://github.com/benoitchantre/setup-ssh-authentication-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/benoitchantre/setup-ssh-authentication-action/compare/1.0.0...1.0.1)

---
updated-dependencies:
- dependency-name: benoitchantre/setup-ssh-authentication-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-14 10:00:49 +00:00
DL6ER 7afd123530 Add system.hostname and ftl.{pid,%cpu,%mem} to /api/ftl/sysinfo
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-14 10:08:03 +01:00
DL6ER 3b8fd4d4e1 Use NO_DLOPEN extension in civetweb
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 21:38:21 +01:00
DL6ER 44937a747a Add civetweb patch to disable DLOPEN
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 21:38:08 +01:00
DL6ER 1b81285fed Add NO_DLOPEN option to civetweb's LUA routines
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 21:37:31 +01:00
DL6ER 0ea3a077ba !!! Another breaking change !!! Inline 06-rfc6761.conf into FTLs generated config file, too. The symlink should be now be /etc/pihole/dnsmasq.conf -> /etc/dnsmasq.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 20:31:04 +01:00
DL6ER 33dd385478 Add LUA support into embedded webserver
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 19:50:42 +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 ddd2b02bf4 Further debug logging for setupVars.conf importing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-13 17:38:25 +01:00
DL6ER b9f95a389a Add library miniz - a lossless, high performance data compression library in a single source file that implements the zlib (RFC 1950) and Deflate (RFC 1951) compressed data format specification standards
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-12 19:35:31 +01:00
DL6ER b952f5e5e2 Add library microtar - A lightweight tar library written in ANSI C
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-12 19:33:42 +01:00
DL6ER 4a033795c1 Add misc.temp.unit and move misc.temp_limit to misc.temp.limit
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-12 19:27:24 +01:00
DL6ER 1ef587f552 Add build.sh ci option to allow for easier co-operation of native and devcontainer builds in the same workspace
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-12 19:15:36 +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 70127edd52 Add config.dnsmasq and routines to write dnsmasq config files
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-11 20:14:46 +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 8bbd49acf4 Modify /version to match the new /etc/pihole/versions file format
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:31:14 +01:00
DL6ER d8e95f4e46 Add config.http.interface.boxed and config.http.interface.theme primed by setupVars.conf:WEBUIBOXEDLAYOUT and WEBTHEME, respectively
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:25:24 +01:00
DL6ER 64441ed6d8 Add config.misc.temp_limit setting primed by setupVars.conf:TEMPERATURE_LIMIT (if available) used to signal beyond which temperature the frontend should consider the temperature "hot"
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:19:59 +01:00
DL6ER 999a9735cb Do not store the payload on the stack but allocate heap memory for it. Using dozens of KB for each API connection is dangerous, hundreds of KB large payloads is surely a very bad idea. (rmemeber, the answer to how-much-it-too-much is the rather vague: too much is when the stack overflows)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-09 20:08:39 +01:00
DL6ER c4f38c7ce7 Merge pull request #1520 from pi-hole/colors
Remove gray color in help output
2023-01-09 19:41:36 +01:00
Christian König 6bb3927e7a Remove gray color in help output
Signed-off-by: Christian König <ckoenig@posteo.de>
2023-01-08 22:20:36 +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 4abba45878 Add "uname" object to /ftl/sysinfo containing the nodename, domainname, architecture and other details from uname
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 448550fd9a Add PATCH /config which allows modifying all FTL config values. Changed values go into effect *immediately* and the config file is updated.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 20:55:31 +01:00
DL6ER 8a2ebe197c Update ftl-build containers
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 20:21:42 +01:00
DL6ER a9e93ba1f8 Calculate percentage of blocked queries only of there is at least one blocked query to prevent division-by-zero issues (leading to None)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 19:04:31 +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 27b4a6d805 Ensure dhcp-discover and regex-test do not overwrite the config file after parsing
Signed-off-by: DL6ER <dl6er@dl6er.de>
2023-01-08 15:06:11 +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
Adam Warner d4ea54bc54 Merge pull request #1517 from pi-hole/dependabot-github_actions-development-actions-download-artifact-3.0.2
Bump actions/download-artifact from 3.0.1 to 3.0.2
2023-01-07 13:45:24 +00:00
dependabot[bot] 031c137a3b Bump actions/download-artifact from 3.0.1 to 3.0.2
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 3.0.1 to 3.0.2.
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](https://github.com/actions/download-artifact/compare/v3.0.1...v3.0.2)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-07 13:41:14 +00:00
Adam Warner 348a864a4d Merge pull request #1516 from pi-hole/dependabot-github_actions-development-actions-upload-artifact-3.1.2
Bump actions/upload-artifact from 3.1.1 to 3.1.2
2023-01-07 13:40:31 +00:00