mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-11-20 23:16:26 -05:00
Added ability to filter destination types by hash
This commit is contained in:
parent
29ce7ca568
commit
e96c81c3f2
12 changed files with 204 additions and 30 deletions
|
|
@ -137,6 +137,7 @@ to participate in the development of Reticulum itself.
|
|||
* [Configuring Stamps](protecting.md#configuring-stamps)
|
||||
* [Filtering & QoS](protecting.md#filtering-qos)
|
||||
* [Instance Configuration](protecting.md#id1)
|
||||
* [Blocking Transport Nodes](protecting.md#blocking-transport-nodes)
|
||||
* [For Developers](protecting.md#id2)
|
||||
* [Ingress & Burst Control](protecting.md#ingress-burst-control)
|
||||
* [Blackhole Management](protecting.md#blackhole-management)
|
||||
|
|
|
|||
|
|
@ -1398,11 +1398,11 @@ but all the parameters are exposed for configuration if needed.
|
|||
> sub-interfaces when a new client connects.
|
||||
>
|
||||
> * The `ic_burst_freq_new` option sets the maximum announce ingress
|
||||
> frequency for newly spawned interfaces. Defaults to `3.5`
|
||||
> frequency for newly spawned interfaces. Defaults to `3.0`
|
||||
> announces per second.
|
||||
>
|
||||
> * The `ic_burst_freq` option sets the maximum announce ingress
|
||||
> frequency for other interfaces. Defaults to `12` announces
|
||||
> frequency for other interfaces. Defaults to `10.0` announces
|
||||
> per second.
|
||||
>
|
||||
> > *If an interface exceeds its burst frequency, incoming announces
|
||||
|
|
@ -1410,21 +1410,21 @@ but all the parameters are exposed for configuration if needed.
|
|||
> > not processed until later.*
|
||||
> * The `ic_max_held_announces` option sets the maximum amount of
|
||||
> unique announces that will be held in the queue. Any additional
|
||||
> unique announces will be dropped. Defaults to `256` announces.
|
||||
> unique announces will be dropped. Defaults to `64` announces.
|
||||
>
|
||||
> * The `ic_burst_hold` option sets how much time (in seconds) must
|
||||
> pass after the burst frequency drops below its threshold, for the
|
||||
> announce burst to be considered cleared. Defaults to `60`
|
||||
> announce burst to be considered cleared. Defaults to `15`
|
||||
> seconds.
|
||||
>
|
||||
> * The `ic_burst_penalty` option sets how much time (in seconds) must
|
||||
> pass after the burst is considered cleared, before held announces can
|
||||
> start being released from the queue. Defaults to `5*60`
|
||||
> start being released from the queue. Defaults to `15`
|
||||
> seconds.
|
||||
>
|
||||
> * The `ic_held_release_interval` option sets how much time (in seconds)
|
||||
> must pass between releasing each held announce from the queue. Defaults
|
||||
> to `30` seconds.
|
||||
> to `5` seconds.
|
||||
>
|
||||
|
||||
All of the above settings can be configured both as instance-wide defaults
|
||||
|
|
|
|||
|
|
@ -232,12 +232,14 @@ The filtering subsystem can operate in two modes:
|
|||
> In addition, any application using the shared instance can temporarily request required destination types for its use. Applications that request required destination types will automatically have them granted, unless they are included in the `ignored_types` list.
|
||||
>
|
||||
|
||||
The filtering defaults and base settings are configured in the `[filter]` section of the configuration file. For example, it is possible to explicitly ignore a series of destination types, while also limiting hop reach to a more local topology:
|
||||
The filtering defaults and base settings are configured in the `[filter]` section of the configuration file. For example, it is possible to explicitly ignore a series of destination types, while also limiting hop reach to a more local topology.
|
||||
|
||||
If you do not know the human readable destination type aspects for a destination type you want to ignore, you can also add entries as 10-byte (20 hexadecimal character) hashes using the `<c4ace368262d845c9dd3>` format.
|
||||
|
||||
```ini
|
||||
[filter]
|
||||
hop_limiter = 14
|
||||
ignored_types = application.that.spams, traffic.heavy.service
|
||||
ignored_types = application.that.spams, traffic.heavy.service, <c4ace368262d845c9dd3>
|
||||
```
|
||||
|
||||
In some situations, you may want to allow *only* certain destination types. If, for example, you are creating a high-performance transport node intended to handle thousands of simultaneous voice calls at minimal latency, a configuration might look something like:
|
||||
|
|
@ -257,6 +259,41 @@ This ensures that a local, non-transport node (running on resource-limited hardw
|
|||
|
||||
If you are a developer, see the following section.
|
||||
|
||||
### Blocking Transport Nodes
|
||||
|
||||
Misbehaving, spamming and broken transport nodes can be completely blocked using the Blackhole system. First, obtain the Transport Identity hash of a misbehaving transport node, using `rnstatus`:
|
||||
|
||||
```txt
|
||||
$ rnstatus -FATa "71.29.190.5"
|
||||
|
||||
BackboneInterface[Client on Bern IPv4/71.29.190.5:37062]
|
||||
Status : Up
|
||||
Mode : Gateway
|
||||
Rate : 250.00 Mbps, MTU 65536
|
||||
Running : Unknown implementation
|
||||
Rem.Tr.ID : <a0c289d131c7bfa8d5ddc8b652c0f40d>
|
||||
Held : 64 announces
|
||||
Violatns. : 382 protocol
|
||||
Flt. Hits : 92
|
||||
Announces : 147174↓ 11193↑ total, 140554 filtered
|
||||
1.2 Hz↑ (↓0% / ↑0% of flow)
|
||||
7.8 Hz↓ (t:6h/p:0s/g:1) burst for 4h, 54m and 42.69s
|
||||
Traffic : ↑4.75 MB 0 bps
|
||||
↓1.50 MB 0 bps
|
||||
Filtered : ↑0 B 0 bps
|
||||
↓55.43 MB 380.14 Kbps
|
||||
```
|
||||
|
||||
You can then block it by its Transport ID:
|
||||
|
||||
```txt
|
||||
$ rnpath -B a0c289d131c7bfa8d5ddc8b652c0f40d --reason "Broken node"
|
||||
|
||||
Blackholed identity a0c289d131c7bfa8d5ddc8b652c0f40d
|
||||
```
|
||||
|
||||
Its connection will be immediately torn down, and further reconnection attempts will be ignored.
|
||||
|
||||
### For Developers
|
||||
|
||||
At some point during the `1.6.x` release cycle, RNS will move to using the `required_only` mode for *non-transport* instances by default. This means that applications will, in most cases, have to request what types of destinations they are interested in receiving announces from.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue