Work in progress HTTP API for Pi-hole. The API reads FTL's shared memory so it can directly read the statistics FTL generates. This API is the replacement for most of FTL's socket/telnet API, as well as the PHP API of the pre-5.0 web interface.
Getting Started (Development)
- Install Rust: https://www.rust-lang.org/tools/install
- Currently the project uses Rust nightly. The exact version used is stored
rust-toolchain. The version should be detected and used automatically when you run a Rust command in the project directory, such as
cargo check(this is a feature of
- After installing, make sure the Rust tools are on your PATH:
- Currently the project uses Rust nightly. The exact version used is stored in
- Install your distro's build tools
build-essentialfor Debian distros,
makefor RHEL distros
- Install libsqlite3
libsqlite3-devfor Debian distros,
- Fork the repository and clone to your computer (not the Pi-hole). In
production the Pi-hole only needs the compiled output of the project, not its
- Checkout the
developmentbranch for the latest changes.
- Checkout the
cargo check. This will download the Rust nightly toolchain and project dependencies, and it will check the program for errors. If everything was set up correctly, the final output should look like this:
Finished dev [unoptimized + debuginfo] target(s) in 1m 11s
cargo test. This will compile and run the tests. They should all pass
- If you've never used Rust, you should look at the documentation, including the Rust Book, before diving too deep into the code.
- When you are ready to make changes, make a branch off of
developmentin your fork to work in. When you're ready to make a pull request, base the PR against