Commit Graph

26 Commits

Author SHA1 Message Date
DL6ER 9a131e5be2 Recheck more often for group updates for new clients to ensure we pick group-based blocking up as soon as possible.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-21 22:44:04 +02:00
DL6ER 843c4ab8c7 Recheck client groups after a certain amount of time.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-05 20:09:54 +02:00
DL6ER f18f758808 Merge branch 'development' into new/mac_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-06-05 14:23:36 +02:00
DL6ER ed4e690245 Add boolean to be able to store if we decided which groups to be used (an empty string can actually mean no groups as a special case)
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-26 18:51:43 +02:00
DL6ER efee05115b Store client group information in shared memory.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-25 18:40:16 +02:00
DL6ER 24a3fa0158 Obtain and store interface also for clients not known through the neigh cache (e.g., VPN connected). This works currently only for clients requesting queries over UDP and when bind-interfaces is NOT used.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-20 14:29:42 +02:00
DL6ER 8133752224 Always chose most suitable (= maximum) subnet for clients. This allows to configure specific settings for a whole range of devices but still exclude others. Complain softly (no error) if multiple configured subnets match with the same number of relevant bits.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-05-11 20:03:28 +02:00
DL6ER 1bdb5ce677 Automatically block _esni.* subdomains of blocked domains. This can be disabled by setting BLOCK_ESNI=false in pihole-FTL.conf
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-21 14:10:33 +02:00
DL6ER 3aa6edcf07 Implement process-private prepared gravity database client statements. This fixes an incompatibility across forks when serving TCP traffic using dedicated workers.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-04-06 12:17:04 +02:00
DL6ER 7ca81e3d59 Merge pull request #685 from pi-hole/new/CNAME_inspection_details
Improvements to deep CNAME inspection data processing
2020-02-12 19:36:36 +01:00
DL6ER acdd2253e6 Finish renaming "forward destionations" to "upstreams".
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-11 10:09:02 +01:00
DL6ER 5c08c56d35 Store ID of matching blacklist regex if this is the blocking reason.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-02-04 08:34:01 +01:00
DL6ER 122a701f16 Add new CNAME-specific blocking modes [QUERY_GRAVITY_CNAME, QUERY_REGEX_CNAME, QUERY_BLACKLIST_CNAME] and store domain that was the reason for blocking during a CNAME inspection
Signed-off-by: DL6ER <dl6er@dl6er.de>
2020-01-29 21:58:58 +00:00
DL6ER e81faf326f Memory alignment optimizations leading to a slightly reduced footprint for domains and clients.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-30 21:24:23 +00:00
DL6ER 4c74a29f87 Add shared per-client regex array. This ensures TCP and UDP workers know the same details about client/regex combinations. This commit also fixes an issue with regex group associations for configured clients that have no assigned group.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-30 17:14:40 +00:00
DL6ER c9c7c27888 Add shared DNS cache for FTL. This cache is shared across forks and can be used by TCP and UDP clients avoiding any doubled amount of work.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-30 14:08:22 +00:00
DL6ER a4f4a09a22 Implement a query-wide whitelisted property that can hold the to-be-permitted property during an entire CNAME inspection process.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-27 21:32:19 +00:00
DL6ER 997d9f9963 Reload all lists (but do not clear the DNS cache itself) on receipt of real-time signal 0.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-12-02 15:37:31 +00:00
DL6ER 8752400609 Ensure domains encountered while following CNAME paths are not double-counted.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-11-25 13:44:23 +01:00
DL6ER 11159d1c40 Increase shared memory version due to the new (FTL-private) field clientstatus in domainsData.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-11-24 09:50:10 +01:00
DL6ER faac7005d1 Improve performance significantly. We store if (and if: why) a certain domain was blocked for any requesting client and can immediately reply similarly if the same client requests the same domain again. This reduces the O(N^3) problem (number of queries * number of domains * number of clients) to a O(N^2) problem (domains * clients). Note that this state of the code still lacks a possibility to reset when entries in the database have changed. For this, we still have to send either SIGHUP (drawback: clears the cache) or define a new signal for it.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-11-22 09:42:06 +01:00
DL6ER 8e7b31713f Implement per-client regular expressions.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-11 09:14:21 +02:00
DL6ER 044c56dfbc Fix relative paths to sqlite3.h. gcc 9 and 6 behave differently when it comes to finding files recursively (or not).
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-07 12:14:23 +02:00
DL6ER 8c3ff39510 Implement client-specific gravity, white- and blacklist database statements.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-09-07 11:48:32 +02:00
DL6ER 5c75fc3e67 Move even more definitions from FTL.h into the respective headers.
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-07 10:09:18 +02:00
DL6ER e365364f72 Move all source files into new subdirectory "src". Put compiled objects into new subdirectory "build".
Signed-off-by: DL6ER <dl6er@dl6er.de>
2019-07-02 00:18:56 +02:00