firewall + random init pkt size

This commit is contained in:
Evgeny committed 2026-03-26 22:42:22 +03:00
1 parent 42eef31a64
commit dbcd167a85
12 files changed
+286 -4

No files matched your search

+27
View File
@@ -0,0 +1,27 @@
// firewall.h - Firewall rules for utun
#ifndef FIREWALL_H
#define FIREWALL_H
#include <stdint.h>
#include "config_parser.h"
#ifdef __cplusplus
extern "C" {
#endif
struct firewall_ctx {
struct CFG_FIREWALL_RULE *rules;
int count;
int bypass_all;
};
int fw_init(struct firewall_ctx *ctx);
int fw_load_rules(struct firewall_ctx *ctx, const struct global_config *cfg);
int fw_check(const struct firewall_ctx *ctx, uint32_t ip, uint16_t port);
void fw_free(struct firewall_ctx *ctx);
#ifdef __cplusplus
}
#endif
#endif