DL6ER
|
224d3a5168
|
Improve error handling in read_indexfile(). Memory errors are worrying but not fatal at this point.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
95db7fe471
|
Insert <base href='...'> tag on-the-fly.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
f9e3630e0d
|
Load content of index.html into and serve it from memory.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
be9fac13ae
|
Implement rerouting from all paths without file ending onto index.html. This removes the requirment that FTL needs to know all the endpoints in advance.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
bb1554cdb5
|
Add support for a webhome. This defaults to serving the web interface in /admin now, not / (as before).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
004fb93bbe
|
Add authentication requirement for most API endpoints. Some endpoints are special, e.g., /api/status where GET is allowed for anyone, however, POST is only allowed for authenticated users.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
d45ae84ec5
|
Add attribute malloc as the returned pointer cannot alias any other pointer valid when the function returns.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
34c9091c4a
|
Read actual password from setupVars.conf instead of always substituting 'A'.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
3d81ba7197
|
Remove debugging statement which worked only on 64 Bit architectures.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
ffc49a0b1e
|
Add rewrite-rules to support targets like "pi.hole:8080/dashboard/" which need to be handled by "pi.hole:8080/index.html".
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
406e539511
|
Remove fake "api" object from /api/versions
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:22:51 +02:00 |
|
DL6ER
|
d90a976d78
|
Add CORS header "Access-Control-Allow-Origin: *"
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:21:14 +02:00 |
|
DL6ER
|
543ebc9ff8
|
Directly use prepared integer value instead of trying to cast a double into an int.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:21:13 +02:00 |
|
DL6ER
|
4fe5193b1f
|
Do the same thing just without calling it 'floor' to please the arm architecture.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:21:13 +02:00 |
|
DL6ER
|
e6d7b7e6d0
|
Reduce number of concurrent HTTP workers from 50 (default) to a more sane number of four. This should be totally sufficient.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:21:13 +02:00 |
|
DL6ER
|
32156ec17c
|
Add support for time-delayed blocking enable/disable actions.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:21:13 +02:00 |
|
DL6ER
|
8aed1cf42e
|
Add support for enabling/disabling blocking through the FTL HTTP API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:21:13 +02:00 |
|
DL6ER
|
88d982a78f
|
Add /api/settings/ftldb
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:17:46 +02:00 |
|
DL6ER
|
7f7f41ab88
|
Disable automatic URI-decoding. Otherwise, we cannot delete domains or regular expressions containing "/". Although such domains/filters make no sense, they are not explicitly forbidden so users might add them. If they can add them, then it should also be possible to remove them.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:17:46 +02:00 |
|
DL6ER
|
978a159992
|
Simplify api_dns_somelist_read()
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:17:46 +02:00 |
|
DL6ER
|
e761305779
|
Add support for removing domains through the FTL HTTP API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:16:24 +02:00 |
|
DL6ER
|
243cfb0c81
|
Add support for adding domains through the FTL HTTP API.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:15:46 +02:00 |
|
DL6ER
|
e51a069d48
|
Implement DELETE for /api/auth to allow users to actually log out.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:14:46 +02:00 |
|
DL6ER
|
411cf85ef7
|
Only allow login with correct password.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:14:46 +02:00 |
|
DL6ER
|
99cfb92d63
|
Add /api/auth/salt
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:14:46 +02:00 |
|
DL6ER
|
0cee19659e
|
Implement client validation in the API. Both, the IP address and the set cookie have to be correct, otherwise the authorization is denied. We also check for the validity of the cookie before permitting the user.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:14:46 +02:00 |
|
DL6ER
|
0a3424bcff
|
Add simple /api/auth implementation. Currently, all passwords are accepted and a login session is valid for 5 minutes.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:14:46 +02:00 |
|
DL6ER
|
f500466a1e
|
Greatly reduce code duplication by using a common function for exact/regex white-/blacklist requests.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:14:11 +02:00 |
|
DL6ER
|
21a2ca1e27
|
Add /api/version
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:12:14 +02:00 |
|
DL6ER
|
6e518cc757
|
Add /api/dns/whitelist, /api/dns/whitelist/exact, /api/dns/whitelist/regex, /api/dns/blacklist, /api/dns/blacklist/exact, and /api/dns/blacklist/regex
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:11:51 +02:00 |
|
DL6ER
|
9ec5e5388a
|
Restructure files in /src/api
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:10:15 +02:00 |
|
DL6ER
|
cc805ee635
|
Implement server-side pagination support for the Query Log. This makes browsing log even with millions of queries quick.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:07:29 +02:00 |
|
DL6ER
|
5e4fd9ac62
|
Explicitly cast to show we want to compare these numbers. The long term goal would be to move all the non-negative query->... elements to unsigned types.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:07:29 +02:00 |
|
DL6ER
|
242a8402b6
|
Remove obsolete prototypes and unused parameters.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:07:29 +02:00 |
|
DL6ER
|
091eaaa895
|
Add new /api/stats/recent_blocked
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:07:29 +02:00 |
|
DL6ER
|
834688ccaf
|
Remove legacy function getQueryTypesOverTime().
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:06:05 +02:00 |
|
DL6ER
|
7d18ccd947
|
Add parameter to request fewer than all queries for api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:06:05 +02:00 |
|
DL6ER
|
871fceff0e
|
Add client filtering for api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:06:05 +02:00 |
|
DL6ER
|
d7aea33f4c
|
Add domain filtering for api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:06:05 +02:00 |
|
DL6ER
|
42eab4fafd
|
Add forward destination filtering for api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
a5e79bd891
|
Add query type filtering for api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
bc6572d371
|
Add time filtering for api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
0bf6c10ca9
|
Prevent TypeErrors in teh NG web interface when no query/client is known to FTL (yet).
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
6c057f55a0
|
Add /api/stats/history
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
176e280c34
|
Implement special features of top_domains and top_clients that were also available in the telnet interface.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
894bdd100f
|
Add ability to request an arbitrary number of results from top_domains and top_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
6ea5f372f7
|
Add /api/stats/top_clients and /api/stats/top_blocked_clients
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
17260fb856
|
Add /api/stats/top_domains and /api/stats/top_blocked
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:04:44 +02:00 |
|
DL6ER
|
22f7093488
|
Add /api/stats/upstreams
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:03:23 +02:00 |
|
DL6ER
|
8ca18e6577
|
Comment "not found" as it causes the NG web interface to show an error when receiving something unexpected for still undefined handlers. To be reverted later.
Signed-off-by: DL6ER <dl6er@dl6er.de>
|
2020-05-27 00:01:45 +02:00 |
|