Mcat12
ebe0631e5c
Add dummy POST handling for whitelist and blacklist
...
Signed-off-by: Mcat12 <newtoncat12@yahoo.com >
2017-08-08 23:08:54 -04:00
DL6ER
5df32339a8
Send two additional counter values along with the top lists
2017-06-14 17:39:57 +02:00
DL6ER
38ea0a7b88
Use thread locks for API responses
2017-06-14 16:43:15 +02:00
DL6ER
2aa2ff1af2
Added "/overTime/forward_dest", renamed "/stats/overTime" -> "/overTime/graphs"
2017-06-14 16:16:25 +02:00
DL6ER
9cff88566c
Two improvements: 1. Analyze only first line of HTTP request (before the whole header was analyzed), 2. Anaylze passed GET arguments properly, e.g. allow ?limit=123, but ignore ?sfqw=123
2017-06-14 13:01:27 +02:00
DL6ER
b15f537d14
Clean socket routines, move detection of what the client is asking for into process_api_request() (request.c) much like we already do it for socket requests
2017-06-13 11:03:39 +02:00
Mcat12
5f59aff7c6
Add Content-Length to 404 API response
2017-06-12 22:06:54 -04:00
Mcat12
7617293c97
Only show API request HTTP data when debugging
2017-06-12 21:47:53 -04:00
Mcat12
1d29630db2
Implement API JSON output for summary
...
Currently using the cJSON library, as it's entirely contained
within one source and one header file and is very easy to use.
By adding on the API output formats to the previous raw socket
code, we can simply change the output format when the response
type is `API` instead of `SOCKET`. As shown in the implemented
summary API code, this should be very simple for most commands.
2017-06-12 21:32:53 -04:00
DL6ER
19c54b0e0c
Replace sprintf() + swrite() by the new ssend() routine. This enhancement removes the fixed buffer we used before and allows for responses having arbitraty lengths
2017-06-12 19:53:20 +02:00
DL6ER
e159b5626e
We don't allow caching the responds of FTL
2017-06-12 19:33:23 +02:00
DL6ER
03fc5be4a7
Interpret HEAD request
2017-06-12 19:20:20 +02:00
DL6ER
3b99d828b7
Return error 404 if a browser is asking for favicon.ico
2017-06-12 19:11:53 +02:00
DL6ER
941dfb2493
Implement HTTP server into FTL, listening on port 4747 by default
2017-06-12 18:52:08 +02:00
Mcat12
0d561000d3
Spelling
2017-06-12 11:13:42 -04:00
DL6ER
323add3b5e
Revamp socket routines
2017-06-12 16:28:30 +02:00
DL6ER
2f0f68e4d5
Rework thread locks (since we don't need different kinds anymore)
2017-06-03 19:08:24 +02:00
DL6ER
76f2039a2a
bzero is obsolete. Using memset instead
2017-04-08 23:46:33 +02:00
DL6ER
c95198631a
Flush port and PID files on termination of FTL
2017-04-08 23:11:54 +02:00
DL6ER
4fee334c95
Allow re-binding to used port in case FTL is restarted in short intervals. This is common practice in server programs.
2017-04-08 22:57:56 +02:00
DL6ER
9e7a57c417
Removed logg_str_str_int
2017-04-08 18:40:34 +02:00
DL6ER
16a788429b
Removed logg_str
2017-04-08 18:34:37 +02:00
DL6ER
ece9f18c1b
Removed logg_int
2017-04-08 18:27:56 +02:00
DL6ER
78f615201a
Some non-POSIX systems use different conventions for exit status values.
...
For greater portability, we now use the macros EXIT_SUCCESS and EXIT_FAILURE for the conventional status value for success and failure, respectively.
They are declared in stdlib.h
2017-03-29 14:00:51 +02:00
DL6ER
5b4cdc5ce3
Minor optimization for setupVars.conf interpreter
2017-03-27 11:10:03 +02:00
DL6ER
cc7ccc5921
Improve documentation of thread locks. Allow concurrently active clients accessing the data struction in read-only mode
2017-03-16 01:18:09 +01:00
DL6ER
7c9b1b4195
Add config file parser. First config arguments are
...
SOCKET_LISTENING=all|local
INCLUDE_YESTERDAY=true|false
If FTL we cannot find or interpret a config variable value, it will skip it and use the default value
2017-03-14 12:20:07 +01:00
DL6ER
f73ed48dbf
Implement FTL garbage collector
2017-03-12 21:03:05 +01:00
DL6ER
a299f9559b
Don't start log re-parsing if threadlock is set (this could lead to an inifinite loop if ther are > 300.000 queries in todays log on slow devices)
2017-03-12 16:26:43 +01:00
DL6ER
89d6567259
Add thread names
2017-03-12 16:16:36 +01:00
DL6ER
e303d9e670
New command line arguments: debugclients debugthreads
...
Also don't return clients or forwards with a count of 0
2017-03-10 14:12:10 +01:00
DL6ER
ccf51c583b
Create client connection handler threads in detached (instead of joinable) mode. Hereby we can guarantee that any resources allocated by the threads will be automaticall released back to the system when the client thread terminates
2017-03-08 14:29:43 +01:00
DL6ER
6ccfeea2da
Guarantee FTL's thread safety
2017-03-08 11:47:58 +01:00
DL6ER
fa99b5b88d
[MAJOR change] FTL is now multi-threaded. There will be one core process (which catches signals handles them), one log processing thread (waiting for log changes), one listening thread (waiting for incoming connections) and one thread for each client that is connected (waiting for requests to be answered by FTL)
2017-03-08 11:32:25 +01:00
DL6ER
eaf5c569fb
Process some more return values
2017-02-08 12:59:13 +01:00
DL6ER
b01d6b6194
Interpret command line arguments (use pihole-FTL debug for debug mode)
2017-02-06 13:19:17 +01:00
DL6ER
75a3085acb
Save files in new locations + added install target in Makefile
2017-02-06 12:36:02 +01:00
DL6ER
6533043968
Create struct that holds FTL related filenames
2017-02-03 23:51:44 +01:00
DL6ER
68984e354e
Initial upload of the FTL engine
2017-02-02 12:44:45 +01:00