mirror of
https://github.com/markqvist/Reticulum.git
synced 2026-11-19 14:36:34 -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
|
|
@ -254,13 +254,18 @@ 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.
|
||||
|
||||
.. tip::
|
||||
The ``hop_limiter`` in the filter section is an instance-wide setting. You can also use the ``hop_limiter`` option *per-interface* if you want to limit hops on some interfaces only.
|
||||
|
||||
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.
|
||||
|
||||
.. code:: 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:
|
||||
|
||||
|
|
@ -279,6 +284,42 @@ The filtering subsystem provided in RNS ``1.6.0`` is functional and useful, but
|
|||
|
||||
If you are a developer, see the following section.
|
||||
|
||||
Blocking Transport Nodes
|
||||
------------------------
|
||||
|
||||
Misbehaving, spamming and broken transport nodes can be completely blocked using the :ref:`Blackhole system<protecting-blackhole>`. First, obtain the Transport Identity hash of a misbehaving transport node, using ``rnstatus``:
|
||||
|
||||
.. code:: 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:
|
||||
|
||||
.. code:: 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
|
||||
--------------
|
||||
|
||||
|
|
@ -332,6 +373,7 @@ Rate limiting bounds the *rate* at which abuse can occur, for everyone, while st
|
|||
|
||||
Full configuration details are available in the :ref:`Announce Rate Control<interfaces-announcerates>` and :ref:`New Destination Rate Limiting<interfaces-ingress-control>` sections.
|
||||
|
||||
.. _protecting-blachole:
|
||||
|
||||
Blackhole Management
|
||||
====================
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue