56 Commits

Author SHA1 Message Date
SaltySnail
277036fc52 fix not following naming convention 2024-06-16 03:00:18 +02:00
SaltySnail
e776848a76
Update src/Http.cpp
Co-authored-by: Lion <development@kortlepel.com>
2024-06-16 02:53:01 +02:00
SaltySnail
63fa65e9a7
Update src/Http.cpp
Co-authored-by: Lion <development@kortlepel.com>
2024-06-16 02:52:55 +02:00
SaltySnail
c07baeed1a add reusing Http connections 2024-06-16 02:45:53 +02:00
Lion Kortlepel
aff537afdf add AGPL-3.0 license header 2024-01-23 21:00:11 +01:00
Lion Kortlepel
24c98eb2b2
add more compile-time diagnostics, implement fixes for them
Before, a lot of common errors went unnoticed, due to insufficient
compiler diagnostics. This commit fixes this by adding a lot of new
diagnostics, and fixing the issues found by this.
2022-09-26 12:02:05 +02:00
Lion Kortlepel
28c43a51ee
add some tests for LuaAPI FS, termios 2022-05-26 13:33:08 +02:00
Lion Kortlepel
a0876ed58c
update submodules, remove ssl crap 2022-05-26 11:59:36 +02:00
Lion Kortlepel
4f69ca1ad0
remove ssl code
@jimkoen

This was removed because, as useful and as much work as this was, we
can't reasonably take responsibility for this. Instead, a server like
this should *always* be localhost only, and if it's not, it should be
behind an nginx reverse proxy anyways. We're removing the config options
regarding this in one of the next commits.
2022-05-26 11:54:19 +02:00
Lion Kortlepel
974dda9f8b
HTTPServer: Add config value to specify listen IP
Change default IP to localhost,
Set default SSL to false due to this.
2022-04-28 14:12:26 +02:00
Lion Kortlepel
0979c8b1e4
HTTPServer: Attempt to catch more errors 2022-04-28 14:04:54 +02:00
Lion Kortlepel
cd4129e05d
add api-v header to heartbeat post 2022-01-20 16:09:08 +01:00
Lion Kortlepel
c42c748b37
start fixing backend heartbeat 2022-01-20 15:46:13 +01:00
Lion Kortlepel
ca5b3956a1
Http: Dont generate ssl key/cert with ssl off, reinterpret_cast for
windows
2021-12-08 17:39:13 +01:00
Lion Kortlepel
924e18c163
Remove /status placeholder 2021-12-08 17:39:13 +01:00
Lion Kortlepel
a19943c96d
Example impl for /status 2021-12-07 15:34:01 +01:00
Lion Kortlepel
cd19ae0836
Add shutting down / shutdown states to state keeper 2021-12-07 14:25:04 +01:00
Lion Kortlepel
3ee83904a1
Windows rewrite when
jfc since when is `c_str()` not convertible to `const char*`?
2021-12-06 15:13:55 +01:00
Lion Kortlepel
fe652cbf42
Fix server paths 2021-12-06 15:08:01 +01:00
Lion Kortlepel
3cce875fbb
Add UseSSL option to server config 2021-12-06 13:47:07 +01:00
Lion Kortlepel
a1335e8c7d
Add statuses, status messages 2021-12-06 13:17:54 +01:00
Lion Kortlepel
0f74eca2ee
Fix various issues and crashes 2021-12-06 12:28:52 +01:00
Lion Kortlepel
279c93179c
Fix segfault in http 2021-12-06 10:22:52 +01:00
awesome_milou
9d283738aa
Add preliminary work for HTTP health endpoint (#68)
* Add preliminary work for HTTP health endpoint

* Http: Fix infinite loop bug in Tx509KeypairGenerator::generateKey()

* update commandline

* Add TLS Support class for use with http server

* Add preliminary HTTP Server; TLS still broken; fix in later commit

* Fix TLS handshake, due to server being unable to serve key/certfile in 'Http.h/Http.cpp'; Cause was httlib not being threadsafe due to being a blocking http library

* Run clang format

* Add option to configure http server port via ServerConfig

* TConfig: add HTTPServerPort to config parsing step

* Fix SSL Cert / Key path not auto generating when not existing

* Add health endpoint; Fix SSL Cert serial no. not refreshing when regenerating

* Switch arround status codes in /health route

* Run clang format

Co-authored-by: Lion Kortlepel <development@kortlepel.com>
2021-12-05 18:24:55 +01:00
Lion Kortlepel
c36ea52f60
Http: Use ipv4 2021-11-08 23:45:35 +01:00
Lion Kortlepel
701a7feee3
remove boost, add httplib, temporarily remove http* lua 2021-11-07 23:54:33 +01:00
Lion Kortlepel
1e305c3c90
Http: cleanup 2021-11-07 23:09:06 +01:00
Lion Kortlepel
6de625682d
fix compiler error, empty content_type does nothing now 2021-10-26 02:12:17 +02:00
Lion Kortlepel
c4d6aab08b
fix MP.HttpGET (was not passing contentType) 2021-10-08 08:44:20 +02:00
Lion Kortlepel
48caae25fd
Finalize master&new-lua-features merge 2021-09-17 14:58:40 +02:00
Lion Kortlepel
883d69ba27
Merge remote-tracking branch 'origin/master' into rewrite-lua 2021-09-17 14:24:12 +02:00
Lion Kortlepel
15704abf6c Http, Heartbeat: Process status < 0 differently, report as "Invalid
Response Code"
2021-09-15 17:55:34 +02:00
Lion Kortlepel
6883c96d33 Http: Add Sentry error breadcrumbs on internal https POST errors 2021-09-15 17:55:34 +02:00
Lion Kortlepel
0f9f81e9fa Http: Add cloudflare 5XX status code strings 2021-09-11 11:38:06 +03:00
Lion Kortlepel
6462636b29
Multiple merge fixes, rebase, working Https::GET 2021-09-09 12:15:55 +03:00
Lion Kortlepel
853b078124
add MP.HttpsGET, MP.HttpsPOST 2021-09-09 12:12:54 +03:00
Lion Kortlepel
80432eb718
implement GetOSName, start working on HttpsPOST 2021-09-09 12:12:54 +03:00
Lion Kortlepel
003a8269aa Fix url 2021-09-08 19:55:03 +03:00
Lion Kortlepel
12123582ad add non-working GET for version 2021-09-08 19:55:03 +03:00
Lion Kortlepel
f98c8dabb0 Http: add Status::ToString method, use to report errors to sentry for custom fingerprint 2021-09-08 19:55:03 +03:00
Lion Kortlepel
4b92532203 Sentry: sort by response code 2021-09-08 19:55:03 +03:00
Lion Kortlepel
9d6dbefb9d Sentry: add request headers 2021-09-08 19:55:03 +03:00
Lion Kortlepel
8fada3ac04 Sentry: add multiple more logging mechanisms, add [CHAT] 2021-09-08 19:55:03 +03:00
Lion Kortlepel
fe6e1e6266 Heartbeat: Try backup1 and backup2, refactor sentry reporting 2021-09-08 19:55:03 +03:00
Lion Kortlepel
85fd9e9ee3 Sentry: add loads more information 2021-09-08 19:55:03 +03:00
Lion Kortlepel
0a31107e56 Sentry: add x-upstream 2021-09-08 19:55:03 +03:00
Lion Kortlepel
9237f0dd43 Http: add debug print 2021-09-08 19:55:03 +03:00
Lion Kortlepel
b0475f262f remove curl submodule, add it as an external dependency 2021-09-08 19:55:03 +03:00
Lion Kortlepel
aa72b2507e fix weird macro compile error 2021-03-30 16:21:08 +02:00
Lion Kortlepel
9860240e24 revert change, apparently this doesn't do it 2021-03-30 16:16:55 +02:00