feat: add --firewall (#57)

This commit is contained in:
Arsenii es3n1n
2026-08-15 16:37:25 +02:00
committed by GitHub
parent 0c9be5724f
commit 2acdf7724a
7 changed files with 61 additions and 18 deletions

View File

@@ -6,6 +6,7 @@
#include "shared/util.hpp"
#pragma pack(push, 1)
namespace shared {
constexpr std::size_t kMaxNameLength = 128;
constexpr std::string_view kCtxPath = "ctx.bin";
@@ -28,6 +29,7 @@ namespace shared {
State state = State::ON;
bool verbose = false;
std::array<char, kMaxNameLength + 1> name = {0}; // +1 for the nullterm
bool register_firewall = false;
void serialize() const {
std::ofstream stream(detail::ctx_path(), std::ios::binary);
@@ -50,3 +52,4 @@ namespace shared {
static_assert(std::is_trivially_copyable_v<Context>);
} // namespace shared
#pragma pack(pop)