45 Commits

Author SHA1 Message Date
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
f8af134dc9
start writing http lua stuff, also heartbeat debug printing 2021-11-08 22:08:07 +01:00
Lion Kortlepel
701a7feee3
remove boost, add httplib, temporarily remove http* lua 2021-11-07 23:54:33 +01: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
f632606d76 Heartbeat: Dont report 200 + INVALID_KEY to Sentry 2021-09-15 17:55:34 +02:00
Lion Kortlepel
b055fd8bda GracefullyShutdown: Add "subsystem x/y shutting down" message
Remove old "X shutting down", "X shut down" messages, they were bad and
confusing
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
ba3fd0e144
add GetServerVersion 2021-09-09 12:14:30 +03:00
Lion Kortlepel
80432eb718
implement GetOSName, start working on HttpsPOST 2021-09-09 12:12:54 +03:00
Lion Kortlepel
809a851c71 add trace() as DEBUG debug()
Replace DEBUG debug() with trace() everywhere
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
7f5447f25e Sentry: add debug prints for hard-debug mode 2021-09-08 19:55:03 +03:00
Lion Kortlepel
b33b396089 Sentry: add debug, remove wrong exception to sentry logging 2021-09-08 19:55:03 +03:00
Lion Kortlepel
ff3cbebac0 Sentry: more macro replacements 2021-09-08 19:55:03 +03:00
Lion Kortlepel
0f9a994c10 Sentry: Fix compile error in AssertNotReachable, release version 2021-09-08 19:55:03 +03:00
Lion Kortlepel
c4b72be50a debug prints 2021-09-08 19:55:03 +03:00
Lion Kortlepel
5a3140c84a THeartbeatThread: fix error reporting 2021-09-08 19:55:03 +03:00
Lion Kortlepel
bea8006a26 Sentry: reword 2021-09-08 19:55:03 +03:00
Lion Kortlepel
a2dc42c5f5 THeartbeatThread: fix missing response code 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
8fada3ac04 Sentry: add multiple more logging mechanisms, add [CHAT] 2021-09-08 19:55:03 +03:00
Lion Kortlepel
e92847e628 possible windows compiler fix 2021-09-08 19:55:03 +03:00
Lion Kortlepel
afb18ccff7 THeartbeatThread: fix isAuth being in the wrong scope 2021-09-08 19:55:03 +03:00
Lion Kortlepel
4659a9362d Fix missing semi
didnt do this in a while, wow
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
c0faff5b05 THeartbeatThread: remove second try to heartbeat url 2021-09-08 19:55:03 +03:00
Lion Kortlepel
1409d4ef80 Sentry: use locked contexts to send data to avoid races 2021-09-08 19:55:03 +03:00
Lion Kortlepel
10322bf24e THeartbeatThread: Use Target var in both places 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
5684134894 Sentry: report any issue with backend.beammp or auth.beammp responses 2021-09-08 19:55:03 +03:00
Lion Kortlepel
7d4fd44dbf
print heartbeat on heartbeat 2021-07-15 01:04:06 +02:00
Anonymous-275
f323d50e34 Decreased the scope of read mutex 2021-03-31 00:05:05 +03:00
Lion Kortlepel
b4850f09a9 fully switch to new backend urls 2021-03-30 01:02:53 +02:00
Lion Kortlepel
3094d382ff implement thread names in debug mode 2021-03-30 00:30:24 +02:00
Lion Kortlepel
e6109c98bd Application: Move some string literal URLs to functions 2021-03-18 23:30:52 +01:00
Lion Kortlepel
e039eeaab8 don't count pps changes towards heartbeat hot-changes 2021-03-18 23:44:14 +02:00
Lion Kortlepel
8e4006fc38 clear up heartbeat code, improve logs in debug builds 2021-03-18 23:44:14 +02:00
Anonymous275
9b1bf071a8 Fixed lua crash caused by lion with optimizations 2021-03-18 23:44:14 +02:00
Anonymous275
f52308c439 Cleanup & optimizations 2021-03-18 23:44:14 +02:00
Lion Kortlepel
13f8be5d39 update players info 2021-03-18 23:44:14 +02:00
Lion Kortlepel
aec6ad9c14 fix more stuff 2021-03-18 23:44:14 +02:00
Lion Kortlepel
f19a012509 add PPSMonitor 2021-03-18 23:44:14 +02:00
Lion Kortlepel
ef5db013b3 add socketio, http post & get 2021-03-18 23:44:14 +02:00