bcambl 3966d6ba73 feat: support stdin for --config values via - marker
`pihole-FTL --config <key> <value>` puts the value in argv, which is
visible via /proc/<pid>/cmdline and `ps -eo args=`. For secret values
(notably the web password) this leaks to other unprivileged users for
the lifetime of the child process.

Allow reading the value from stdin by passing `-` in place of the
value: `echo secret | pihole-FTL --config webserver.api.password -`.
fgets reads up to 4095 bytes into a stack buffer, trailing CR/LF is
stripped, and the existing set_config_from_CLI validation pipeline is
reused unchanged.

Buffer is bounded at 4096 bytes; values that fill the buffer without
a terminating newline are rejected with a clear error rather than
silently truncated.

Signed-off-by: bcambl <5565939+bcambl@users.noreply.github.com>
2026-08-17 17:39:09 -06:00
2026-05-12 19:54:47 +02:00
2026-06-27 16:37:10 +00:00
2026-06-27 16:37:10 +00:00
2026-06-08 19:59:53 +02:00

Pi-hole logo
Network-wide ad blocking via your own Linux hardware

FTLDNS logo

FTLDNS (pihole-FTL) provides an interactive API and also generates statistics for Pi-hole®'s Web interface.

  • Fast: stats are read directly from memory by coupling our codebase closely with dnsmasq
  • Versatile: upstream changes to dnsmasq can quickly be merged in without much conflict
  • Lightweight: runs smoothly with minimal hardware and software requirements such as Raspberry Pi Zero
  • Interactive: our API can be used to interface with your projects
  • Insightful: stats normally reserved inside of dnsmasq are made available so you can see what's really happening on your network

Official documentation

The official FTLDNS documentation can be found here.

Installation

FTLDNS (pihole-FTL) is automatically installed when installing Pi-hole.

IMPORTANT

FTLDNS will disable any existing installations of dnsmasq. This is because FTLDNS is dnsmasq + Pi-hole's code, so both cannot run simultaneously.

S
Description
The Pi-hole FTL engine
Readme EUPL-1.2
256 MiB
Languages
C 96.8%
C++ 1.1%
Python 1%
Shell 0.7%
CMake 0.3%