simple_repeater: filter hash throttle + opt-in message age limit (tth #3)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e3029de6e4
commit
548b96d15c
8 files changed
+370
-29
No files matched your search
@@ -34,6 +34,7 @@
|
||||
#include <helpers/StatsFormatHelper.h>
|
||||
#include <helpers/TxtDataHelpers.h>
|
||||
#include <helpers/FairnessLimiter.h>
|
||||
#include <helpers/ChannelGate.h>
|
||||
#include <helpers/RegionMap.h>
|
||||
#include <helpers/RoutingPolicy.h>
|
||||
#include "RateLimiter.h"
|
||||
@@ -210,6 +211,8 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
||||
// upstream proposal #1502). Kill switch: _prefs.fairness_enabled.
|
||||
FairnessLimiter fairness_limiter;
|
||||
uint32_t filter_hash_dropped; // forwards vetoed by the channel-hash deny list
|
||||
uint32_t filter_hash_passed; // throttled entries: forwards let through within budget
|
||||
HashThrottle hash_throttle; // per-entry windows of `filter hash add <hex> <secs>`
|
||||
unsigned long next_fair_sender_normal_refill, next_fair_sender_low_refill, next_fair_group_refill;
|
||||
uint32_t pending_discover_tag;
|
||||
unsigned long pending_discover_until;
|
||||
@@ -249,6 +252,7 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
||||
#endif
|
||||
#ifdef FILTER_CHANNEL_PSKS
|
||||
uint32_t filter_dropped; // forwards vetoed by the deny list
|
||||
uint32_t filter_age_dropped; // forwards vetoed by `filter age`
|
||||
#endif
|
||||
#ifdef BOT_CHANNEL_PSK
|
||||
// Default zde, ne az v ChannelBot.h -- ten se includuje na konci MyMesh.cpp,
|
||||
@@ -323,8 +327,10 @@ class MyMesh : public mesh::Mesh, public CommonCLICallbacks {
|
||||
// CUSTOM (TeTeHacko): `fairness [on|off|grid|cap ...|refill ...]` CLI. Defined in MyMesh.cpp.
|
||||
bool fairnessHandleCommand(const char* command, char* reply, int reply_max);
|
||||
// CUSTOM (TeTeHacko): keyless deny-forward by channel hash. Definitions in ChannelFilter.h.
|
||||
bool filterHashDenied(const mesh::Packet* packet) const;
|
||||
bool filterHashDenied(const mesh::Packet* packet);
|
||||
bool filterHashHandleCommand(const char* command, char* reply, int reply_max);
|
||||
// `filter dryrun [on|off]` and `filter age [<min>|off]`. Definitions in ChannelFilter.h.
|
||||
bool filterMiscHandleCommand(const char* command, char* reply, int reply_max);
|
||||
// Refill interval in ms: persisted pref (seconds) if set, else the build default.
|
||||
uint32_t fairGroupRefillMs() const {
|
||||
return _prefs.fair_group_refill_s ? (uint32_t)_prefs.fair_group_refill_s * 1000 : FAIRNESS_GROUP_REFILL_MS;
|
||||
|
||||
Reference in new issue
Block a user