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

Add navigation.indexes feature to mkdocs-material #1101

Merged
merged 11 commits into from
Sep 26, 2024
2 changes: 0 additions & 2 deletions docs/api/auth.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# API Reference: Authentication

Authentication is required for most API endpoints. The Pi-hole API uses a session-based authentication system. This means that you will not be able to use a static token to authenticate your requests. Instead, you will be given a session ID (SID) that you will have to use. If you didn't set a password for your Pi-hole, you don't have to authenticate your requests.

To get a session ID, you will have to send a `POST` request to the `/api/auth` endpoint with a payload containing your password. Note that is also possible to use an application password instead of your regular password, e.g., if you don't want to put your password in your scripts or if you have 2FA enabled for your regular password. One application password can be generated in the web interface on the settings page.
Expand Down
2 changes: 0 additions & 2 deletions docs/api/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
# API Reference: Overview

The Pi-hole API is organized around [REST](http://en.wikipedia.org/wiki/Representational_State_Transfer). Our API has predictable resource-oriented URLs, accepts and returns reliable UTF-8 [JavaScript Object Notation (JSON)-encoded](http://www.json.org/) data for all API responses, and uses standard HTTP response codes and verbs.

Most (but not all) endpoints require authentication. API endpoints requiring authentication will fail with code `401 Unauthorized` if no key is supplied. See [API Reference: Authentication](auth.md) for details.
Expand Down
Binary file removed docs/core/chronometer-thumb.jpg
Binary file not shown.
Binary file removed docs/core/[email protected]
Binary file not shown.
Binary file removed docs/core/chronometer.jpg
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
## Group management
---
title: Group Management
---

Groups are defined in the `group` table and can have an optional description in addition to the mandatory name of the group.

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
title: Domain Database
---

Pi-hole uses the well-known relational database management system SQLite3 for managing the various domains that are used to control the DNS filtering system. The database-based domain management has been added with Pi-hole v5.0. The ability to subscribe to external *allow*lists has been added with Pi-hole v6.0.

## Priorities
Expand Down
4 changes: 2 additions & 2 deletions docs/database/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ Pi-hole uses the well-known relational database management system SQLite3 both f

Details concerning the databases, their contained tables and exemplary SQL commands allowing even complex requests to Pi-hole's databases are described on the subpages of this category.

- [Query database `/etc/pihole/pihole-FTL.db`](ftl.md)
- [Domain database `/etc/pihole/gravity.db`](gravity/index.md)
- [Query database `/etc/pihole/pihole-FTL.db`](query-database.md)
- [Domain database `/etc/pihole/gravity.db`](domain-database/index.md)
24 changes: 12 additions & 12 deletions docs/database/ftl.md → docs/database/query-database.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ Label | Type | Allowed to by empty | Content
--- | --- | ---- | -----
`id` | integer | No | autoincrement ID for the table, only used by SQLite3, not by *FTL*DNS
`timestamp` | integer | No | Unix timestamp when this query arrived at *FTL*DNS (used as index)
`type` | integer | No | Type of this query (see [Supported query types](ftl.md#supported-query-types))
`status` | integer | No | How was this query handled by *FTL*DNS? (see [Supported status types](ftl.md#supported-status-types))
`type` | integer | No | Type of this query (see [Supported query types](query-database.md#supported-query-types))
`status` | integer | No | How was this query handled by *FTL*DNS? (see [Supported status types](query-database.md#supported-status-types))
`domain` | text | No | Requested domain
`client` | text | No | Requesting client (IP address)
`forward` | text | Yes | Forward destination used for this query (only set if `status == 2`)
`additional_info` | blob | Yes | Data-dependent content, see below
`reply_type` | integer | Yes | Type of the reply for this query (see [Supported reply types](ftl.md#supported-reply-types))
`reply_type` | integer | Yes | Type of the reply for this query (see [Supported reply types](query-database.md#supported-reply-types))
`reply_time` | real | Yes | Seconds it took until the final reply was received
`dnssec` | integer | Yes | Type of the DNSSEC status for this query (see [DNSSEC status](ftl.md#dnssec-status))
`dnssec` | integer | Yes | Type of the DNSSEC status for this query (see [DNSSEC status](query-database.md#dnssec-status))
`regex_id` | integer | Yes | ID of the regex filter that matched this query (only set if blocked by a regex filter)

The `queries` `VIEW` is dynamically generated from the data actually stored in the `query_storage` table and the linking tables `domain_by_id`, `client_by_id`, `forward_by_id`, and `addinfo_by_id` (see below). The table `query_storage` will contains integer IDs pointing to the respective entries of the linking tables to save space and make searching the database faster. If you haven't upgraded for some time, the table may still contain strings instead of integer IDs.
Expand All @@ -67,7 +67,7 @@ If a query was blocked due to a CNAME inspection (status 9, 10, 11), this field

##### Query influenced by a black- or whitelist entry {#additional_info_list data-toc-label='domainlist_id'}

If a query was influenced by a black- or whitelist entry, this field contains the ID of the corresponding entry in the [`domainlist`](gravity/index.md#domain-tables-domainlist) table.
If a query was influenced by a black- or whitelist entry, this field contains the ID of the corresponding entry in the [`domainlist`](domain-database/index.md#domain-tables-domainlist) table.

### Counters table

Expand Down Expand Up @@ -115,17 +115,17 @@ Any other query type will be stored with an offset of 100, i.e., `TYPE66` will b
ID | Status | | Details
--- | --- | --- | ---
0 | Unknown | ❔ | Unknown status (not yet known)
1 | Blocked | ❌ | Domain contained in [gravity database](gravity/index.md#gravity-tables-gravity-and-antigravity)
1 | Blocked | ❌ | Domain contained in [gravity database](domain-database/index.md#gravity-tables-gravity-and-antigravity)
2 | Allowed | ✅ | Forwarded
3 | Allowed | ✅ | Replied from cache
4 | Blocked | ❌ | Domain matched by a [regex blacklist](gravity/index.md#domain-tables-domainlist) filter
5 | Blocked | ❌ | Domain contained in [exact blacklist](gravity/index.md#domain-tables-domainlist)
4 | Blocked | ❌ | Domain matched by a [regex blacklist](domain-database/index.md#domain-tables-domainlist) filter
5 | Blocked | ❌ | Domain contained in [exact blacklist](domain-database/index.md#domain-tables-domainlist)
6 | Blocked | ❌ | By upstream server (known blocking page IP address)
7 | Blocked | ❌ | By upstream server (`0.0.0.0` or `::`)
8 | Blocked | ❌ | By upstream server (`NXDOMAIN` with `RA` bit unset)
9 | Blocked | ❌ | Domain contained in [gravity database](gravity/index.md#gravity-tables-gravity-and-antigravity)<br>*Blocked during deep CNAME inspection*
10 | Blocked | ❌ | Domain matched by a [regex blacklist](gravity/index.md#domain-tables-domainlist) filter<br>*Blocked during deep CNAME inspection*
11 | Blocked | ❌ | Domain contained in [exact blacklist](gravity/index.md#domain-tables-domainlist)<br>*Blocked during deep CNAME inspection*
9 | Blocked | ❌ | Domain contained in [gravity database](domain-database/index.md#gravity-tables-gravity-and-antigravity)<br>*Blocked during deep CNAME inspection*
10 | Blocked | ❌ | Domain matched by a [regex blacklist](domain-database/index.md#domain-tables-domainlist) filter<br>*Blocked during deep CNAME inspection*
11 | Blocked | ❌ | Domain contained in [exact blacklist](domain-database/index.md#domain-tables-domainlist)<br>*Blocked during deep CNAME inspection*
12 | Allowed | ✅ | Retried query
13 | Allowed | ✅ | Retried but ignored query (this may happen during ongoing DNSSEC validation)
14 | Allowed | ✅ | Already forwarded, not forwarding again
Expand Down Expand Up @@ -201,7 +201,7 @@ Label | Type | Allowed to by empty | Content
Valid `type` IDs are currently

- `ADDINFO_CNAME_DOMAIN = 1` - `content` is a string (the related CNAME)
- `ADDINFO_DOMAIN_ID = 2` - `content` is an integer (ID pointing to a domain in the [`domainlist` table](gravity/index.md#domain-tables-domainlist))
- `ADDINFO_DOMAIN_ID = 2` - `content` is an integer (ID pointing to a domain in the [`domainlist` table](domain-database/index.md#domain-tables-domainlist))

### Example for interaction with the long-term query database

Expand Down
2 changes: 1 addition & 1 deletion docs/ftldns/configfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ Print information about ARP table processing: How long did parsing take, whether

Controls if *FTL*DNS should print extended details about regex matching into `FTL.log`.

**[More details](../regex/overview.md)**
**[More details](../regex/index.md)**

#### `DEBUG_API=false|true` {#debug_api data-toc-label='API'}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
## Group management

Any blocklist or domain on the white-/black-/regex-lists can be managed through groups. This allows not only grouping them to highlight their relationship, but also enabling/disabling them together if one, for instance, wants to visit a specific service only temporarily.

Group `Default` (`group_id` `0`) is special as it is automatically assigned to domains and clients not being a member of other groups. Each newly added client or domain gets assigned to group zero when being added.
Expand Down
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion docs/guides/vpn/openvpn/deprecation_notice.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
!!! warning "OpenVPN is no longer recommended"
We do no longer recommending the use of OpenVPN for new deployments. Although OpenVPN has served us well in the past, we believe it's time to move towards more modern and efficient solutions.

We suggest that users now turn their attention to [WireGuard](../wireguard/overview.md), a forward-thinking VPN solution that offers better performance, faster speeds, and easier implementation. WireGuard has been designed with the latest technology in mind, providing simple yet powerful tools for securing your network communications. Pi-hole's step-by-step tutorial is designed to help you understand the ins and outs of WireGuard, regardless of your technical expertise.
We suggest that users now turn their attention to [WireGuard](../wireguard/index.md), a forward-thinking VPN solution that offers better performance, faster speeds, and easier implementation. WireGuard has been designed with the latest technology in mind, providing simple yet powerful tools for securing your network communications. Pi-hole's step-by-step tutorial is designed to help you understand the ins and outs of WireGuard, regardless of your technical expertise.
File renamed without changes.
11 changes: 11 additions & 0 deletions docs/main/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Before installing Pi-hole, you need to make sure your system meets the [prerequisites](prerequisites.md) (hardware and operating system) and decide whether you want a [normal installation](basic-install.md) (bare metal) or a [docker installation](https://github.com/pi-hole/docker-pi-hole/).

After the installation is complete, check the [Post-Install steps](post-install.md) to make sure your network is using Pi-hole.

With the [`pihole` command](pihole-command.md), you can manually run Pi-hole commands, including [update Pi-hole](update.md).

Alternatively, you can also use the [web interface](https://github.com/pi-hole/web/) to run and configure your Pi-hole.

The web interface also allows you to use [Group Management](../group_management/index.md) functions to manage the relationship between clients, blocking rules, and allowing rules.

If you need help, please visit our [Discourse Forum](https://discourse.pi-hole.net/c/bugs-problems-issues/11).
14 changes: 5 additions & 9 deletions docs/core/pihole-command.md → docs/main/pihole-command.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
---
title: The pihole command - Pi-hole documentation
---

Pi-hole makes use of many commands, and here we will break down those required to administer the program via the command-line Interface.

| Index | Invocation |
Expand Down Expand Up @@ -52,12 +48,12 @@ The core script of Pi-hole provides the ability to tie many DNS related function

Administrators need to be able to manually add and remove domains for various purposes, and these commands serve that purpose.

See [Regex Blocking](../regex/overview.md) for more information about using Regex.
See [Regex Blocking](../regex/index.md) for more information about using Regex.

**Basic Script Process**:

* Each domain is validated using regex (except when using `--regex`), to ensure invalid domains and IDNs are not added
* A domain gets added to or removed from the `domainlist` table in [`/etc/pihole/gravity.db`](../database/gravity/index.md)
* A domain gets added to or removed from the `domainlist` table in [`/etc/pihole/gravity.db`](../database/domain-database/index.md)
* The DNS server is then reloaded

### Debugger
Expand Down Expand Up @@ -120,11 +116,11 @@ Gravity is one of the most important scripts of Pi-hole. Its main purpose is to
**Basic Script Process**:

* It will determine Internet connectivity, and give time for `pihole-FTL` to be resolvable on low-end systems if has just been restarted
* It extracts all URLs and domains from the `adlists` table in [`/etc/pihole/gravity.db`](../database/gravity/index.md)
* It extracts all URLs and domains from the `adlists` table in [`/etc/pihole/gravity.db`](../database/domain-database/index.md)
* It runs through each URL, downloading it if necessary
* `curl` checks the servers `Last-Modified` header to ensure it is getting a newer version
* It will attempt to parse the file into a domains-only format if necessary
* Lists are merged, comments removed, sorted uniquely and stored in the `gravity` table of [`/etc/pihole/gravity.db`](../database/gravity/index.md)
* Lists are merged, comments removed, sorted uniquely and stored in the `gravity` table of [`/etc/pihole/gravity.db`](../database/domain-database/index.md)
* Gravity cleans up temporary content and reloads the DNS server

### Logging
Expand All @@ -151,7 +147,7 @@ This command will query your whitelist, blacklist, wildcards and adlists for a s

* User-specified options are handled
* Using `idn`, it will convert [Internationalized domain names](https://en.wikipedia.org/wiki/Internationalized_domain_name) into [punycode](https://en.wikipedia.org/wiki/Punycode)
* Database at [`/etc/pihole/gravity.db`](../database/gravity/index.md) is queried to return a list of adlists in which the queried domain exists.
* Database at [`/etc/pihole/gravity.db`](../database/domain-database/index.md) is queried to return a list of adlists in which the queried domain exists.

### Update

Expand Down
2 changes: 1 addition & 1 deletion docs/regex/overview.md → docs/regex/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ There are two locations where regex filters are important:

## How to use regular expressions for filtering domains

*FTL*DNS reads in regular expression filters from the two [`regex` database views](../database/gravity/index.md).
*FTL*DNS reads in regular expression filters from the two [`regex` database views](../database/domain-database/index.md).
To tell *FTL*DNS to reload the list of regex filters, either:

- Execute `pihole restartdns reload-lists` or
Expand Down
2 changes: 1 addition & 1 deletion docs/regex/pi-hole.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Only match specific query types

You can amend the regular expressions by special keywords added at the end to fine-tine regular expressions to match only specific [query types](../database/ftl.md#supported-query-types). In contrast to the description of `OTHER` as being deprecated for storing queries in the database, it is still supported for regular expressions and will match all queries that are not *explicitly* covered by the other query types (see also example below).
You can amend the regular expressions by special keywords added at the end to fine-tine regular expressions to match only specific [query types](../database/query-database.md#supported-query-types). In contrast to the description of `OTHER` as being deprecated for storing queries in the database, it is still supported for regular expressions and will match all queries that are not *explicitly* covered by the other query types (see also example below).

Example:

Expand Down
Loading
Loading