pub struct RendguardConfig {
pub use_global_start_count: u32,
pub use_scale_at_count: u32,
pub use_relay_start_count: u32,
pub use_max_use_to_bw_ratio: f64,
pub use_max_consensus_weight_churn: f64,
pub close_circuits_on_overuse: bool,
}Expand description
Rendezvous point monitoring configuration options.
Controls detection of rendezvous point overuse attacks. These attacks attempt to identify hidden services by observing which relays are frequently used as rendezvous points.
§Attack Detection
Rendguard tracks rendezvous point usage and compares it to expected bandwidth distribution:
┌─────────────────────────────────────────────────────────────────┐
│ Rendezvous Point Overuse Detection │
└─────────────────────────────────────────────────────────────────┘
Expected Usage = Relay Bandwidth Weight / Total Network Bandwidth
Actual Usage = Times Used as Rend Point / Total Rend Point Uses
Overuse Ratio = Actual Usage / Expected Usage
If Overuse Ratio > use_max_use_to_bw_ratio:
└── Alert and optionally close circuits§Fields
| Field | Default | Description |
|---|---|---|
use_global_start_count | 1000 | Min total uses before checking |
use_scale_at_count | 20000 | Scale counts by half at this total |
use_relay_start_count | 100 | Min relay uses before checking |
use_max_use_to_bw_ratio | 5.0 | Max ratio of use to bandwidth |
use_max_consensus_weight_churn | 1.0 | Max consensus weight churn % |
close_circuits_on_overuse | true | Close circuits on overuse detection |
§Example
use vanguards_rs::RendguardConfig;
let mut config = RendguardConfig::default();
// More aggressive detection
config.use_max_use_to_bw_ratio = 3.0;
// Require more samples before alerting
config.use_global_start_count = 2000;
config.use_relay_start_count = 200;§See Also
Fields§
§use_global_start_count: u32Minimum total uses before checking for overuse.
use_scale_at_count: u32Scale counts by half when reaching this total.
use_relay_start_count: u32Minimum relay uses before checking for overuse.
use_max_use_to_bw_ratio: f64Maximum ratio of use to bandwidth weight.
use_max_consensus_weight_churn: f64Maximum consensus weight churn percentage.
close_circuits_on_overuse: boolClose circuits on rendezvous point overuse.
Trait Implementations§
Source§impl Clone for RendguardConfig
impl Clone for RendguardConfig
Source§fn clone(&self) -> RendguardConfig
fn clone(&self) -> RendguardConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for RendguardConfig
impl Debug for RendguardConfig
Source§impl Default for RendguardConfig
impl Default for RendguardConfig
Source§impl<'de> Deserialize<'de> for RendguardConfig
impl<'de> Deserialize<'de> for RendguardConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for RendguardConfig
impl PartialEq for RendguardConfig
Source§impl Serialize for RendguardConfig
impl Serialize for RendguardConfig
impl StructuralPartialEq for RendguardConfig
Auto Trait Implementations§
impl Freeze for RendguardConfig
impl RefUnwindSafe for RendguardConfig
impl Send for RendguardConfig
impl Sync for RendguardConfig
impl Unpin for RendguardConfig
impl UnwindSafe for RendguardConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more