Fix license compliance and fix things up, add reverse proxy, fix some security flaws with HttpUtils

This commit is contained in:
2026-08-31 20:57:18 -05:00
parent 313e75b14c
commit 3bce736834
41 changed files with 2227 additions and 384 deletions
+33
View File
@@ -0,0 +1,33 @@
#include "TessesFramework/TessesFramework.hpp"
#include <iostream>
using namespace Tesses::Framework;
using namespace Tesses::Framework::Http;
using namespace Tesses::Framework::Streams;
using namespace Tesses::Framework::TextStreams;
using namespace Tesses::Framework::Threading;
int main(int argc, char **argv) {
TF_InitWithConsole();
uint16_t port = 4269;
Args args(argc, argv);
for (auto &item : args.options) {
if (item.first == "port")
port = (uint16_t)std::stoul(item.second);
}
if (args.positional.empty()) {
Console::WriteLine(args.filename + " [--port=] <url_root>");
return 1;
}
Tesses::Framework::Http::HttpServer server(
port, std::make_shared<ReverseProxyServer>(args.positional[0]));
server.StartAccepting();
TF_RunEventLoop();
std::cout << "Closing server" << std::endl;
TF_Quit();
return 0;
}