mirror of
https://github.com/markqvist/Reticulum
synced 2026-11-24 16:00:32 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e32d4df754 | ||
|
|
561e2f23e1 | ||
|
|
b397870c97 | ||
|
|
6f6751d6b6 | ||
|
|
2aed542e61 | ||
|
|
091e021d0e | ||
|
|
fc69f323a8 | ||
|
|
6b2c5bcf0b | ||
|
|
3885d23293 | ||
|
|
b1aa527861 | ||
|
|
4c69b376b2 | ||
|
|
2b1b9589f1 | ||
|
|
378840a6bf | ||
|
|
7b8923b61f | ||
|
|
b3ef214e72 | ||
|
|
cab513fa31 | ||
|
|
60eb0509f2 | ||
|
|
42f6d64b9c | ||
|
|
6ba7cc8cb4 | ||
|
|
880db0a7b7 | ||
|
|
5f2f4438d0 | ||
|
|
7488336985 | ||
|
|
614e7bd834 | ||
|
|
386ef1f370 | ||
|
|
4ab0755d0a | ||
|
|
d478e380c9 | ||
|
|
05e6717d21 | ||
|
|
9ae3db169e | ||
|
|
68cda4a855 | ||
|
|
4b914fb9a4 | ||
|
|
bde5611a0d | ||
|
|
49073fcca5 | ||
|
|
6738db5437 | ||
|
|
49918c7e1d | ||
|
|
954567c581 | ||
|
|
77a1bb9b19 | ||
|
|
df80181006 | ||
|
|
0c0034f1ae | ||
|
|
2e9443ffe2 | ||
|
|
65222e0de8 | ||
|
|
db7daa4d94 | ||
|
|
c95bb551ab | ||
|
|
acecc1f490 | ||
|
|
39e3854dac | ||
|
|
6cd5be18ec | ||
|
|
0e2041c837 | ||
|
|
338173802d | ||
|
|
40a862acbd | ||
|
|
d825e39379 | ||
|
|
731a63b01b | ||
|
|
7c912d0936 | ||
|
|
503bd6c87b | ||
|
|
1a70bd3cd1 | ||
|
|
636012bbe5 | ||
|
|
e1b7bc316c | ||
|
|
1c488947bd | ||
|
|
1809461a07 | ||
|
|
01a78bee2a | ||
|
|
8c08b9ce09 | ||
|
|
efb8c8500d | ||
|
|
f366dd9cf2 | ||
|
|
0d15cfc134 | ||
|
|
e81532f541 | ||
|
|
d41afd2d81 | ||
|
|
7a1291d530 | ||
|
|
fc0f84f23e | ||
|
|
c2eac12ff5 | ||
|
|
e46496032c | ||
|
|
2d7f858a54 | ||
|
|
9ebcb55cb5 | ||
|
|
bbc1a0d06b | ||
|
|
31298e5eda | ||
|
|
e31c570d2b | ||
|
|
9b4947ef46 | ||
|
|
0d9bf5b862 | ||
|
|
c6f9ef1047 | ||
|
|
90ac62620d | ||
|
|
0c41027765 | ||
|
|
691211bf0d | ||
|
|
0ec51cce67 | ||
|
|
55755c6b3c | ||
|
|
72ba27d63c | ||
|
|
6c1182c2c2 | ||
|
|
ce81b339dc | ||
|
|
3db15dae44 | ||
|
|
38a73f9508 | ||
|
|
ebd9b862e9 | ||
|
|
4fc8e03d65 |
No files matched your search
+53
-4
@@ -1,10 +1,49 @@
|
||||
### 2026-07-26: RNS 1.4.2
|
||||
### 2026-08-22: RNS 1.5.0
|
||||
|
||||
This maintenance release fixes bugs in blackholed identity filtering and recursive path request handling for RNode interfaces.
|
||||
This release significantly improves the core Transport handling of RNS, with a priority-based ingress queue backend, substantially improved efficiency of both data and management traffic handling, more efficient ingress/egress limiting, and a long list of other improvements and bugfixes.
|
||||
|
||||
**Changes**
|
||||
- Fixed a bug where recursive path requests would cause a division by zero error on uninitialized RNode interfaces.
|
||||
- Fixed slow blackholed filtering for discovered interfaces on Android in some cases.
|
||||
- Added ability to include operator LXMF address in interface discovery information
|
||||
- Added prioritized inbound traffic processing to the transport core
|
||||
- Added configurable inbound queue lengths for data, announce, path request and ingress limited traffic
|
||||
- Added early filtering for inbound traffic and improved filtering performance
|
||||
- Added per-interface protocol violation tracking
|
||||
- Added in-flight path requests tracking
|
||||
- Added request and response batching for in-flight path requests
|
||||
- Added ability to signal blackholed status in announce validation return to the API
|
||||
- Added full link MDU utilization for `Channel` and `Buffer`
|
||||
- Added inbound queue pressure and queue drop statistics to `rnstatus`
|
||||
- Added detailed announce and path request traffic flow statistics per interface to `rnstatus`
|
||||
- Added total announce and PR count/frequency stats per interface to `rnstatus`
|
||||
- Added data flow speed and composition stats to `rnstatus`
|
||||
- Added protocol violation stats to `rnstatus`
|
||||
- Added active link statistics to `rnstatus`
|
||||
- Added blocked IP listings to `rnstatus`
|
||||
- Added medium bitrate based timeout calculation helpers and RPC functions, by **Zenith**
|
||||
- Added extra timeout for discovery path requests when slow interfaces are online, by **Zenith**
|
||||
- Added adaptive timeouts to `rncp`, `rnpath`, `rnprobe` and `rnx`, by **Zenith**
|
||||
- Added adaptive timeout calculation to `rngit`, by **Zenith**
|
||||
- Improved overall Transport inbound processing speed
|
||||
- Improved path request handling significantly
|
||||
- Improved path request ingress limiting and accounting
|
||||
- Improved egress limiting responsiveness under high incoming path request load
|
||||
- Improved transport background job processing
|
||||
- Improved early rejection of packets with excessive hop counts
|
||||
- Fixed `BackboneInterface` EPOLL receive starvation and ingress control timestamp handling, by **JRG**
|
||||
- Fixed potential transport deadlock on receipts lock when callbacks sends packets, by **JRG**
|
||||
- Fixed transport state handling edge cases in path request, announce queue and pending link processing, by **JRG**
|
||||
- Fixed link watchdog not resetting on receive exceptions, by **JRG**
|
||||
- Fixed `Resource` cancellation on multi-segment resources, by **JRG**
|
||||
- Fixed `Resource` transfer part index alignment and rebinding, by **JRG**
|
||||
- Fixed stale BLE device reference in `RNodeInterface`, by **JRG**
|
||||
- Fixed ratchet cleaning retained preservation, by **JRG**
|
||||
- Fixed invalid `rnstatus` statistics handling, by **JRG**
|
||||
- Fixed various bugs in packet, link and interface handling, by **JRG**
|
||||
- Fixed per-interface burst count inconsistencies in `rnstatus` output
|
||||
- Fixed `rngit` file resource operations failing on Windows
|
||||
- Fixed `rnodeconf` config summary incorrectly displaying WiFi mode
|
||||
- Fixed speedtest example aborting transfers on stale link status
|
||||
- Updated documentation, including manual sections on queue tuning and interface discovery options
|
||||
|
||||
**Verified Retrieval**
|
||||
You can retrieve and verify this release over Reticulum using the built-in `rngit release` utility. To retrieve only the installation `.whl` package, and the release manifest for future updates, you can use:
|
||||
@@ -34,10 +73,19 @@ rnid -i bc7291552be7a58f361522990465165c -V rns_*.rsm *.rsg
|
||||
|
||||
The `rnid` utility will then verify the signatures, and display whether they are valid. If the signature cannot be verified, the release has been tampered with and should be discarded.
|
||||
|
||||
### 2026-07-26: RNS 1.4.2
|
||||
|
||||
This maintenance release fixes bugs in blackholed identity filtering and recursive path request handling for RNode interfaces.
|
||||
|
||||
**Changes**
|
||||
- Fixed a bug where recursive path requests would cause a division by zero error on uninitialized RNode interfaces.
|
||||
- Fixed slow blackholed filtering for discovered interfaces on Android in some cases.
|
||||
|
||||
### 2026-07-24: RNS 1.4.1
|
||||
|
||||
This release significantly improves path convergence and stability with the new path re-balancing functionality. It also introduces interface gravity configuration, new API functionality and fixes a range of bugs and inefficiencies.
|
||||
|
||||
**Changes**
|
||||
- Added dynamic path re-balancing
|
||||
- Added `set_max_request_size` to `Destination` API
|
||||
- Added `max_response_size` to request API
|
||||
@@ -56,6 +104,7 @@ This release significantly improves path convergence and stability with the new
|
||||
- Fixed various memory inefficiencies
|
||||
- Fixed loglevel `LOG_EXTREME` not being usable in some cases
|
||||
- Fixed historical interface discoveries not being cleaned according to blackholed identities
|
||||
|
||||
### 2026-07-20: RNS 1.4.0
|
||||
|
||||
This release focuses on performance, stability and reliability improvements, particularly with resource-constrained systems in mind. It also fixes several bugs, reduces logging noise, and makes information about blocked `BackboneInterface` clients available in `ifstats`.
|
||||
|
||||
@@ -239,7 +239,7 @@ def link_established(link):
|
||||
RNS.log("Link established with server, sending...")
|
||||
rd = os.urandom(link.mdu)
|
||||
started = time.time()
|
||||
while link.status == RNS.Link.ACTIVE and data_sent < data_cap*1.25:
|
||||
while link.status != RNS.Link.CLOSED and data_sent < data_cap*1.25:
|
||||
RNS.Packet(server_link, rd, create_receipt=False).send()
|
||||
data_sent += len(rd)
|
||||
|
||||
|
||||
+5
-4
@@ -53,7 +53,8 @@ class StreamDataMessage(MessageBase):
|
||||
The stream id is limited to 2 bytes - 2 bit
|
||||
"""
|
||||
|
||||
OVERHEAD = 2 + 6 # 2 for stream data message header, 6 for channel envelope
|
||||
HEADER_LEN = 2 # 2 for stream data message header
|
||||
OVERHEAD = HEADER_LEN + 6 # 6 for channel envelope
|
||||
MAX_DATA_LEN = RNS.Link.MDU - OVERHEAD
|
||||
"""
|
||||
When the Buffer package is imported, this value is
|
||||
@@ -226,7 +227,7 @@ class RawChannelWriter(RawIOBase, AbstractContextManager):
|
||||
self._stream_id = stream_id
|
||||
self._channel = channel
|
||||
self._eof = False
|
||||
self._mdu = channel.mdu - StreamDataMessage.OVERHEAD
|
||||
self._mdu = channel.mdu - StreamDataMessage.HEADER_LEN
|
||||
|
||||
def write(self, __b: bytes) -> int | None:
|
||||
try:
|
||||
@@ -242,7 +243,7 @@ class RawChannelWriter(RawIOBase, AbstractContextManager):
|
||||
chunk_segment_length = int(chunk_len/comp_try)
|
||||
compressed_chunk = bz2.compress(__b[:chunk_segment_length])
|
||||
compressed_length = len(compressed_chunk)
|
||||
if compressed_length < StreamDataMessage.MAX_DATA_LEN and compressed_length < chunk_segment_length:
|
||||
if compressed_length < self._mdu and compressed_length < chunk_segment_length:
|
||||
comp_success = True
|
||||
break
|
||||
else:
|
||||
@@ -252,7 +253,7 @@ class RawChannelWriter(RawIOBase, AbstractContextManager):
|
||||
chunk = compressed_chunk
|
||||
processed_length = chunk_segment_length
|
||||
else:
|
||||
chunk = bytes(__b[:StreamDataMessage.MAX_DATA_LEN])
|
||||
chunk = bytes(__b[:self._mdu])
|
||||
processed_length = len(chunk)
|
||||
|
||||
message = StreamDataMessage(self._stream_id, chunk, self._eof, comp_success)
|
||||
|
||||
@@ -180,4 +180,9 @@ def digest(key, msg, digest):
|
||||
outer.update(key.translate(trans_5C))
|
||||
inner.update(msg)
|
||||
outer.update(inner.digest())
|
||||
return outer.digest()
|
||||
return outer.digest()
|
||||
|
||||
def _cd_internal(a, b): return a == b
|
||||
try: from hmac import compare_digest as _cd
|
||||
except ImportError: _cd = _cd_internal
|
||||
compare_digest = _cd
|
||||
@@ -80,7 +80,7 @@ class Token():
|
||||
received_hmac = token[-32:]
|
||||
expected_hmac = HMAC.new(self._signing_key, token[:-32]).digest()
|
||||
|
||||
if received_hmac == expected_hmac: return True
|
||||
if HMAC.compare_digest(received_hmac, expected_hmac): return True
|
||||
else: return False
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -206,7 +206,7 @@ class Destination:
|
||||
def _clean_ratchets(self):
|
||||
if self.ratchets != None:
|
||||
if len (self.ratchets) > self.retained_ratchets:
|
||||
self.ratchets = self.ratchets[:Destination.RATCHET_COUNT]
|
||||
self.ratchets = self.ratchets[:self.retained_ratchets]
|
||||
|
||||
def _persist_ratchets(self):
|
||||
try:
|
||||
|
||||
+29
-3
@@ -27,6 +27,7 @@ SPREADINGFACTOR = 0x0B
|
||||
CODINGRATE = 0x0C
|
||||
MODULATION = 0x0D
|
||||
CHANNEL = 0x0E
|
||||
OP_ADDR = 0xF0
|
||||
|
||||
APP_NAME = "rnstransport"
|
||||
|
||||
@@ -123,7 +124,7 @@ class InterfaceAnnouncer():
|
||||
interface.discovery_height = dhgt
|
||||
|
||||
except Exception as e:
|
||||
RNS.log(f"Error while getting reachable_on from executable at {interface.reachable_on}: {e}", RNS.LOG_ERROR)
|
||||
RNS.log(f"Error while getting discovery location from executable at {interface.reachable_on}: {e}", RNS.LOG_ERROR)
|
||||
RNS.log(f"Aborting discovery announce", RNS.LOG_ERROR)
|
||||
return None
|
||||
|
||||
@@ -136,11 +137,14 @@ class InterfaceAnnouncer():
|
||||
LONGITUDE: interface.discovery_longitude,
|
||||
HEIGHT: interface.discovery_height}
|
||||
|
||||
if interface.discovery_lxmf_address: info[OP_ADDR] = interface.discovery_lxmf_address
|
||||
|
||||
if interface_type == "TCPClientInterface" and not interface.kiss_framing:
|
||||
RNS.log(f"Invalid interface discovery configuration for {interface}, aborting discovery announce", RNS.LOG_ERROR)
|
||||
return None
|
||||
|
||||
if interface_type in ["BackboneInterface", "TCPServerInterface"]:
|
||||
if not interface.reachable_on: return None
|
||||
reachable_on = self.sanitize(interface.reachable_on)
|
||||
|
||||
if not RNS.vendor.platformutils.is_windows():
|
||||
@@ -410,6 +414,11 @@ class InterfaceAnnounceHandler:
|
||||
discovery_hash_material = info["transport_id"]+info["name"]
|
||||
info["discovery_hash"] = RNS.Identity.full_hash(discovery_hash_material.encode("utf-8"))
|
||||
|
||||
if info and OP_ADDR in unpacked:
|
||||
if type(unpacked[OP_ADDR]) not in [type(None), bytes]: raise ValueError("Invalid data in operator LXMF address field of announce")
|
||||
if unpacked[OP_ADDR] and len(unpacked[OP_ADDR]) == RNS.Identity.TRUNCATED_HASHLENGTH//8:
|
||||
info["operator_lxmf_address"] = RNS.hexrep(unpacked[OP_ADDR], delimit=False)
|
||||
|
||||
if self.callback and callable(self.callback): self.callback(info)
|
||||
|
||||
except Exception as e:
|
||||
@@ -713,14 +722,22 @@ class InterfaceDiscovery():
|
||||
return
|
||||
|
||||
if interface_type == "I2PInterface":
|
||||
RNS.log(f"Auto-connecting discovered I2P interfaces is not yet implemented, aborting auto-connect", RNS.LOG_WARNING)
|
||||
RNS.log(f"You can obtain the configuration entry and add this interface manually instead using rnstatus -D", RNS.LOG_WARNING)
|
||||
RNS.log(f"Auto-connecting discovered I2P interfaces is not yet implemented, aborting auto-connect", RNS.LOG_DEBUG)
|
||||
RNS.log(f"You can obtain the configuration entry and add this interface manually instead using rnstatus -D", RNS.LOG_DEBUG)
|
||||
return
|
||||
|
||||
if is_ygg_ipv6(info["reachable_on"]):
|
||||
# TODO: Somehow detect if yggdrasil is enabled on the system
|
||||
return
|
||||
|
||||
if is_onion_address(info["reachable_on"]):
|
||||
# TODO: Somehow detect if TOR is enabled on the system
|
||||
return
|
||||
|
||||
if is_ip_address(info["reachable_on"]) and is_invalid_ip_address(info["reachable_on"]):
|
||||
RNS.log(f"Not auto-connecting discovered interface with invalid IP address: {info['reachable_on']}", RNS.LOG_DEBUG)
|
||||
return
|
||||
|
||||
interface_name = info["name"]
|
||||
config_entry = info["config_entry"]
|
||||
interface_config = {}
|
||||
@@ -851,6 +868,15 @@ def is_ygg_ipv6(address_string):
|
||||
try: return ipaddress.ip_address(address_string) in ipaddress.IPv6Network("200::/7")
|
||||
except: return False
|
||||
|
||||
def is_onion_address(address_string):
|
||||
try: return address_string.lower().endswith(".onion")
|
||||
except: return False
|
||||
|
||||
INVALID_IP_ADDRESSES = ["127.0.0.1", "0.0.0.0"]
|
||||
def is_invalid_ip_address(address_string):
|
||||
if not address_string in INVALID_IP_ADDRESSES: return False
|
||||
else: return True
|
||||
|
||||
def is_hostname(hostname):
|
||||
if hostname[-1] == ".": hostname = hostname[:-1]
|
||||
if len(hostname) > 253: return False
|
||||
|
||||
+3
-2
@@ -508,7 +508,7 @@ class Identity:
|
||||
return None
|
||||
|
||||
@staticmethod
|
||||
def validate_announce(packet, only_validate_signature=False):
|
||||
def validate_announce(packet, only_validate_signature=False, signal_blackholed=False):
|
||||
try:
|
||||
if packet.packet_type == RNS.Packet.ANNOUNCE:
|
||||
keysize = Identity.KEYSIZE//8
|
||||
@@ -553,7 +553,8 @@ class Identity:
|
||||
if len(RNS.Transport.blackholed_identities) > 0:
|
||||
if announced_identity.hash in RNS.Transport.blackholed_identities:
|
||||
RNS.log(f"Invalidated and dropped announce from blackholed identity {RNS.prettyhexrep(announced_identity.hash)}", RNS.LOG_EXTREME) if RNS.sl(RNS.LOG_EXTREME) else None
|
||||
return False
|
||||
if signal_blackholed: return "blackholed"
|
||||
else: return False
|
||||
|
||||
if announced_identity.pub != None and announced_identity.validate(signature, signed_data):
|
||||
if only_validate_signature:
|
||||
|
||||
@@ -1742,7 +1742,7 @@ class BLEConnection(BluetoothDispatcher):
|
||||
ble_devices = self.find_target_devices()
|
||||
|
||||
if len(ble_devices) > 0: self.ble_device = ble_devices.pop()
|
||||
else: self.ble_device == None
|
||||
else: self.ble_device = None
|
||||
|
||||
if self.ble_device != None:
|
||||
if self.was_connected:
|
||||
|
||||
@@ -169,13 +169,34 @@ class BackboneInterface(Interface):
|
||||
else:
|
||||
raise SystemError("Insufficient parameters to create listener")
|
||||
|
||||
__ic_burst_stats_throttle = 0.95
|
||||
__last_ic_burst_count_check = 0
|
||||
__last_ic_burst_count_state = 0
|
||||
@property
|
||||
def ic_burst_count(self):
|
||||
if time.time() > self.__last_ic_burst_count_check + self.__ic_burst_stats_throttle:
|
||||
self.__last_ic_burst_count_state = len([i.ic_burst_active for i in self.spawned_interfaces if i.ic_burst_active])
|
||||
self.__last_ic_burst_count_check = time.time()
|
||||
|
||||
return self.__last_ic_burst_count_state
|
||||
|
||||
__last_ic_pr_burst_count_check = 0
|
||||
__last_ic_pr_burst_count_state = 0
|
||||
@property
|
||||
def ic_pr_burst_count(self):
|
||||
if time.time() > self.__last_ic_pr_burst_count_check + self.__ic_burst_stats_throttle:
|
||||
self.__last_ic_pr_burst_count_state = len([i.ic_pr_burst_active for i in self.spawned_interfaces if i.ic_pr_burst_active])
|
||||
self.__last_ic_pr_burst_count_check = time.time()
|
||||
|
||||
return self.__last_ic_pr_burst_count_state
|
||||
|
||||
__last_ic_burst_check = 0
|
||||
__last_ic_burst_state = False
|
||||
@property
|
||||
def ic_burst_active(self):
|
||||
if time.time() > self.__last_ic_burst_check + 2:
|
||||
if time.time() > self.__last_ic_burst_check + self.__ic_burst_stats_throttle:
|
||||
self.__last_ic_burst_state = any(i.ic_burst_active for i in self.spawned_interfaces)
|
||||
self.__last_ic_burst_check = time.time()
|
||||
|
||||
return self.__last_ic_burst_state
|
||||
|
||||
@@ -186,9 +207,10 @@ class BackboneInterface(Interface):
|
||||
__ic_burst_activated = 0
|
||||
@property
|
||||
def ic_burst_activated(self):
|
||||
if time.time() > self.__ic_burst_activated_check + 2:
|
||||
if time.time() > self.__ic_burst_activated_check + self.__ic_burst_stats_throttle:
|
||||
activated = [i.ic_burst_activated for i in self.spawned_interfaces if i.ic_burst_active]
|
||||
if activated: self.__ic_burst_activated = min(activated)
|
||||
self.__ic_burst_activated_check = time.time()
|
||||
|
||||
return self.__ic_burst_activated
|
||||
|
||||
@@ -200,8 +222,9 @@ class BackboneInterface(Interface):
|
||||
__last_ic_pr_burst_state = False
|
||||
@property
|
||||
def ic_pr_burst_active(self):
|
||||
if time.time() > self.__last_ic_pr_burst_check + 2:
|
||||
if time.time() > self.__last_ic_pr_burst_check + self.__ic_burst_stats_throttle:
|
||||
self.__last_ic_pr_burst_state = any(i.ic_pr_burst_active for i in self.spawned_interfaces)
|
||||
self.__last_ic_pr_burst_check = time.time()
|
||||
|
||||
return self.__last_ic_pr_burst_state
|
||||
|
||||
@@ -212,9 +235,10 @@ class BackboneInterface(Interface):
|
||||
__ic_pr_burst_activated = 0
|
||||
@property
|
||||
def ic_pr_burst_activated(self):
|
||||
if time.time() > self.__ic_pr_burst_activated_check + 2:
|
||||
if time.time() > self.__ic_pr_burst_activated_check + self.__ic_burst_stats_throttle:
|
||||
activated = [i.ic_pr_burst_activated for i in self.spawned_interfaces if i.ic_pr_burst_active]
|
||||
if activated: self.__ic_pr_burst_activated = min(activated)
|
||||
self.__ic_pr_burst_activated_check = time.time()
|
||||
|
||||
return self.__ic_pr_burst_activated
|
||||
|
||||
@@ -266,7 +290,7 @@ class BackboneInterface(Interface):
|
||||
|
||||
try: BackboneInterface.epoll.register(fileno, select.EPOLLIN)
|
||||
except Exception as e:
|
||||
RNS.log(f"An error occurred while registering EPOLL_IN for file descriptor {fileno}: {e}", RNS.LOG_WARNING)
|
||||
RNS.log(f"An error occurred while registering EPOLLIN for file descriptor {fileno}: {e}", RNS.LOG_WARNING)
|
||||
|
||||
@staticmethod
|
||||
def deregister_fileno(fileno):
|
||||
@@ -295,7 +319,7 @@ class BackboneInterface(Interface):
|
||||
if interface.socket:
|
||||
fileno = interface.socket.fileno()
|
||||
if fileno in BackboneInterface.spawned_interface_filenos:
|
||||
try: BackboneInterface.epoll.modify(fileno, select.EPOLLOUT)
|
||||
try: BackboneInterface.epoll.modify(fileno, select.EPOLLIN | select.EPOLLOUT)
|
||||
except Exception as e:
|
||||
if str(e).endswith("No such file or directory"): pass
|
||||
elif str(e).endswith("Bad file descriptor"): pass
|
||||
@@ -311,12 +335,12 @@ class BackboneInterface(Interface):
|
||||
BackboneInterface.ensure_epoll()
|
||||
try:
|
||||
while True:
|
||||
events = BackboneInterface.epoll.poll(1)
|
||||
for fileno, event in BackboneInterface.epoll.poll(1):
|
||||
if fileno in BackboneInterface.spawned_interface_filenos:
|
||||
spawned_interface = BackboneInterface.spawned_interface_filenos[fileno]
|
||||
client_socket = spawned_interface.socket
|
||||
if client_socket and fileno == client_socket.fileno() and (event & select.EPOLLIN):
|
||||
socket_valid = client_socket and fileno == client_socket.fileno()
|
||||
if socket_valid and (event & select.EPOLLIN):
|
||||
try: received_bytes = client_socket.recv(spawned_interface.HW_MTU)
|
||||
except Exception as e:
|
||||
RNS.log(f"Error while reading from {spawned_interface}: {e}", RNS.LOG_PATHING) if RNS.sl(RNS.LOG_PATHING) else None
|
||||
@@ -337,8 +361,9 @@ class BackboneInterface(Interface):
|
||||
except Exception as e: RNS.log(f"Error while removing spawned interface from {pif}: {e}", RNS.LOG_ERROR)
|
||||
|
||||
spawned_interface.receive(received_bytes)
|
||||
|
||||
elif client_socket and fileno == client_socket.fileno() and (event & select.EPOLLOUT):
|
||||
|
||||
socket_valid_after_read = socket_valid and fileno in BackboneInterface.spawned_interface_filenos
|
||||
if socket_valid_after_read and (event & select.EPOLLOUT):
|
||||
try: written = client_socket.send(spawned_interface.transmit_buffer)
|
||||
except Exception as e:
|
||||
written = 0
|
||||
@@ -375,7 +400,7 @@ class BackboneInterface(Interface):
|
||||
spawned_interface.txb += written
|
||||
if spawned_interface.parent_interface: spawned_interface.parent_interface.txb += written
|
||||
|
||||
elif client_socket and fileno == client_socket.fileno() and event & (select.EPOLLHUP):
|
||||
elif socket_valid_after_read and (event & select.EPOLLHUP):
|
||||
BackboneInterface.deregister_fileno(fileno)
|
||||
try:
|
||||
if fileno in BackboneInterface.spawned_interface_filenos: BackboneInterface.spawned_interface_filenos.pop(fileno)
|
||||
@@ -498,17 +523,25 @@ class BackboneInterface(Interface):
|
||||
|
||||
return True
|
||||
|
||||
def received_announce(self, from_spawned=False):
|
||||
if from_spawned: self.ia_freq_deque.append(time.time())
|
||||
def received_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ia_freq_deque.append(time.time())
|
||||
self.arxb += size
|
||||
|
||||
def sent_announce(self, from_spawned=False):
|
||||
if from_spawned: self.oa_freq_deque.append(time.time())
|
||||
def sent_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.oa_freq_deque.append(time.time())
|
||||
self.atxb += size
|
||||
|
||||
def received_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.ip_freq_deque.append(time.time())
|
||||
def received_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ip_freq_deque.append(time.time())
|
||||
self.prxb += size
|
||||
|
||||
def sent_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.op_freq_deque.append(time.time())
|
||||
def sent_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.op_freq_deque.append(time.time())
|
||||
self.ptxb += size
|
||||
|
||||
def process_outgoing(self, data):
|
||||
pass
|
||||
|
||||
@@ -871,17 +871,25 @@ class I2PInterface(Interface):
|
||||
def process_outgoing(self, data):
|
||||
pass
|
||||
|
||||
def received_announce(self, from_spawned=False):
|
||||
if from_spawned: self.ia_freq_deque.append(time.time())
|
||||
def received_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ia_freq_deque.append(time.time())
|
||||
self.arxb += size
|
||||
|
||||
def sent_announce(self, from_spawned=False):
|
||||
if from_spawned: self.oa_freq_deque.append(time.time())
|
||||
def sent_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.oa_freq_deque.append(time.time())
|
||||
self.atxb += size
|
||||
|
||||
def received_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.ip_freq_deque.append(time.time())
|
||||
def received_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ip_freq_deque.append(time.time())
|
||||
self.prxb += size
|
||||
|
||||
def sent_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.op_freq_deque.append(time.time())
|
||||
def sent_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.op_freq_deque.append(time.time())
|
||||
self.ptxb += size
|
||||
|
||||
def detach(self):
|
||||
RNS.log("Detaching "+str(self), RNS.LOG_DEBUG)
|
||||
|
||||
+70
-20
@@ -82,7 +82,7 @@ class Interface:
|
||||
IC_BURST_PENALTY = 15
|
||||
IC_HELD_RELEASE_INTERVAL = 5
|
||||
IC_DEQUE_MIN_SAMPLE = 2
|
||||
IC_BURST_MIN_SAMPLES = 6
|
||||
EC_BURST_MIN_SAMPLES = 2
|
||||
EC_PR_FREQ = 5
|
||||
EGRESS_CONTROL = False
|
||||
|
||||
@@ -93,10 +93,19 @@ class Interface:
|
||||
|
||||
AUTOCONFIGURE_MTU = False
|
||||
FIXED_MTU = False
|
||||
DEFAULT_IFAC_SIZE = 16
|
||||
|
||||
def __init__(self):
|
||||
self.rxb = 0
|
||||
self.txb = 0
|
||||
self.arxb = 0
|
||||
self.atxb = 0
|
||||
self.arxc = 0
|
||||
self.atxc = 0
|
||||
self.prxb = 0
|
||||
self.ptxb = 0
|
||||
self.prxc = 0
|
||||
self.ptxc = 0
|
||||
self.gravity = 0
|
||||
self.created = time.time()
|
||||
self.detached = False
|
||||
@@ -120,8 +129,11 @@ class Interface:
|
||||
|
||||
self.ic_burst_active = False
|
||||
self.ic_burst_activated = 0
|
||||
self.ic_burst_sustained = 0
|
||||
self.ic_pr_burst_active = False
|
||||
self.ic_pr_burst_activated = 0
|
||||
self.ic_pr_burst_sustained = 0
|
||||
self.ic_pr_burst_cooldown = 0
|
||||
self.ic_held_release = 0
|
||||
self.ic_max_held_announces = RNS.Reticulum.get_instance()._default_ic_max_held_announces()
|
||||
self.ic_burst_hold = RNS.Reticulum.get_instance()._default_ic_burst_hold()
|
||||
@@ -141,6 +153,10 @@ class Interface:
|
||||
self.ip_freq_deque = deque(maxlen=Interface.IA_FREQ_SAMPLES)
|
||||
self.op_freq_deque = deque(maxlen=Interface.OA_FREQ_SAMPLES)
|
||||
|
||||
self.protocol_violations = 0
|
||||
self.ifac_violations = 0
|
||||
self.packet_filter_hits = 0
|
||||
|
||||
def get_hash(self):
|
||||
if not self.__hash: self.__hash = RNS.Identity.full_hash(str(self).encode("utf-8"))
|
||||
return self.__hash
|
||||
@@ -155,8 +171,10 @@ class Interface:
|
||||
ia_freq = self.incoming_announce_frequency()
|
||||
|
||||
if self.ic_burst_active:
|
||||
if ia_freq < freq_threshold and time.time() > self.ic_burst_activated+self.ic_burst_hold:
|
||||
if ia_freq < freq_threshold and time.time() > self.ic_burst_activated+self.ic_burst_hold and time.time() > self.ic_burst_sustained+self.ic_burst_hold:
|
||||
if len(self.ia_freq_deque) >= self.IC_DEQUE_MIN_SAMPLE: self.ic_burst_active = False
|
||||
else:
|
||||
if ia_freq >= freq_threshold: self.ic_burst_sustained = time.time()
|
||||
|
||||
return True
|
||||
|
||||
@@ -164,6 +182,7 @@ class Interface:
|
||||
if ia_freq > freq_threshold:
|
||||
self.ic_burst_active = True
|
||||
self.ic_burst_activated = time.time()
|
||||
self.ic_burst_sustained = time.time()
|
||||
self.ic_held_release = time.time() + self.ic_burst_penalty
|
||||
return True
|
||||
|
||||
@@ -177,8 +196,12 @@ class Interface:
|
||||
ip_freq = self.incoming_pr_frequency()
|
||||
|
||||
if self.ic_pr_burst_active:
|
||||
if ip_freq < freq_threshold and time.time() > self.ic_pr_burst_activated+self.ic_burst_hold:
|
||||
self.ic_pr_burst_active = False
|
||||
if ip_freq < freq_threshold and time.time() > self.ic_pr_burst_activated+self.ic_burst_hold and time.time() > self.ic_pr_burst_sustained+self.ic_burst_hold:
|
||||
if self.ic_pr_burst_cooldown <= 0: self.ic_pr_burst_active = False
|
||||
else: self.ic_pr_burst_cooldown -= 1
|
||||
else:
|
||||
self.ic_pr_burst_cooldown = 3
|
||||
if ip_freq >= freq_threshold: self.ic_pr_burst_sustained = time.time()
|
||||
|
||||
return True
|
||||
|
||||
@@ -186,6 +209,8 @@ class Interface:
|
||||
if ip_freq > freq_threshold:
|
||||
self.ic_pr_burst_active = True
|
||||
self.ic_pr_burst_activated = time.time()
|
||||
self.ic_pr_burst_sustained = time.time()
|
||||
self.ic_pr_burst_cooldown = 3
|
||||
return True
|
||||
|
||||
else: return False
|
||||
@@ -195,10 +220,10 @@ class Interface:
|
||||
def should_egress_limit_pr(self):
|
||||
if self.egress_control:
|
||||
freq_threshold = self.ec_pr_freq
|
||||
op_freq = self.outgoing_pr_frequency()
|
||||
op_freq = self.outgoing_pr_frequency(preemptive=True)
|
||||
|
||||
if op_freq > freq_threshold:
|
||||
if len(self.op_freq_deque) >= self.IC_BURST_MIN_SAMPLES: return True
|
||||
if len(self.op_freq_deque) >= self.EC_BURST_MIN_SAMPLES: return True
|
||||
|
||||
return False
|
||||
|
||||
@@ -247,32 +272,56 @@ class Interface:
|
||||
RNS.log("Releasing held announce packet "+str(selected_announce_packet)+" from "+str(self), RNS.LOG_EXTREME)
|
||||
self.ic_held_release = time.time() + self.ic_held_release_interval
|
||||
self.held_announces.pop(selected_announce_packet.destination_hash)
|
||||
def release(): RNS.Transport.inbound(selected_announce_packet.raw, selected_announce_packet.receiving_interface)
|
||||
def release(): RNS.Transport.inbound(selected_announce_packet.raw, selected_announce_packet.receiving_interface, tc=RNS.Transport.TC_INGRESS_LIMITED, ifac_handled=True)
|
||||
threading.Thread(target=release, daemon=True).start()
|
||||
|
||||
except Exception as e:
|
||||
RNS.log("An error occurred while processing held announces for "+str(self), RNS.LOG_ERROR)
|
||||
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||
|
||||
def received_announce(self, from_spawned=False):
|
||||
def received_announce(self, size=0, from_spawned=False):
|
||||
self.arxc += 1; self.arxb += size
|
||||
self.ia_freq_deque.append(time.time())
|
||||
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
||||
self.parent_interface.received_announce(from_spawned=True)
|
||||
self.parent_interface.received_announce(size=size, from_spawned=True)
|
||||
|
||||
def sent_announce(self, from_spawned=False):
|
||||
def sent_announce(self, size=0, from_spawned=False):
|
||||
self.atxc += 1; self.atxb += size
|
||||
self.oa_freq_deque.append(time.time())
|
||||
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
||||
self.parent_interface.sent_announce(from_spawned=True)
|
||||
self.parent_interface.sent_announce(size=size, from_spawned=True)
|
||||
|
||||
def received_path_request(self, from_spawned=False):
|
||||
def received_path_request(self, size=0, from_spawned=False):
|
||||
self.prxc += 1; self.prxb += size
|
||||
self.ip_freq_deque.append(time.time())
|
||||
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
||||
self.parent_interface.received_path_request(from_spawned=True)
|
||||
self.parent_interface.received_path_request(size=size, from_spawned=True)
|
||||
|
||||
def sent_path_request(self, from_spawned=False):
|
||||
def sent_path_request(self, size=0, from_spawned=False):
|
||||
self.ptxc += 1; self.ptxb += size
|
||||
self.op_freq_deque.append(time.time())
|
||||
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
||||
self.parent_interface.sent_path_request(from_spawned=True)
|
||||
self.parent_interface.sent_path_request(size=size, from_spawned=True)
|
||||
|
||||
def protocol_violation(self, description=None):
|
||||
self.protocol_violations += 1
|
||||
RNS.log(f"Protocol violation on {self}: {description}", RNS.LOG_DEBUG) if RNS.sl(RNS.LOG_DEBUG) else None
|
||||
return None
|
||||
|
||||
def ifac_violation(self, description=None):
|
||||
self.ifac_violations += 1
|
||||
RNS.log(f"IFAC violation on {self}: {description}", RNS.LOG_DEBUG) if RNS.sl(RNS.LOG_DEBUG) else None
|
||||
return None
|
||||
|
||||
def packet_filter_hit(self):
|
||||
self.packet_filter_hits += 1
|
||||
return None
|
||||
|
||||
@property
|
||||
def ic_burst_count(self): return None
|
||||
|
||||
@property
|
||||
def ic_pr_burst_count(self): return None
|
||||
|
||||
def incoming_announce_frequency(self):
|
||||
n = len(self.ia_freq_deque)
|
||||
@@ -307,8 +356,8 @@ class Interface:
|
||||
hz = n / span
|
||||
return hz
|
||||
|
||||
def outgoing_pr_frequency(self):
|
||||
n = len(self.op_freq_deque)
|
||||
def outgoing_pr_frequency(self, preemptive=False):
|
||||
n = len(self.op_freq_deque)+(1 if preemptive else 0)
|
||||
if not len(self.op_freq_deque) > 1: return 0
|
||||
else:
|
||||
oldest = self.op_freq_deque[0]
|
||||
@@ -341,12 +390,13 @@ class Interface:
|
||||
selected = entries[0]
|
||||
|
||||
now = time.time()
|
||||
tx_time = (len(selected["raw"])*8) / self.bitrate
|
||||
tx_size = len(selected["raw"])
|
||||
tx_time = (tx_size*8) / self.bitrate
|
||||
wait_time = (tx_time / self.announce_cap)
|
||||
self.announce_allowed_at = now + wait_time
|
||||
|
||||
self.process_outgoing(selected["raw"])
|
||||
self.sent_announce()
|
||||
RNS.Transport.transmit(self, selected["raw"])
|
||||
self.sent_announce(tx_size)
|
||||
|
||||
if selected in self.announce_queue:
|
||||
self.announce_queue.remove(selected)
|
||||
|
||||
@@ -70,6 +70,7 @@ class LocalClientInterface(Interface):
|
||||
self.epoll_backend = False
|
||||
self.HW_MTU = 262144
|
||||
self.online = False
|
||||
self.ifac_size = self.DEFAULT_IFAC_SIZE
|
||||
|
||||
if socket_path != None and RNS.Reticulum.get_instance().use_af_unix: self.socket_path = f"\0rns/{socket_path}"
|
||||
else: self.socket_path = None
|
||||
@@ -382,6 +383,7 @@ class LocalServerInterface(Interface):
|
||||
self.epoll_backend = False
|
||||
self.online = False
|
||||
self.clients = 0
|
||||
self.ifac_size = self.DEFAULT_IFAC_SIZE
|
||||
|
||||
if socket_path != None and RNS.Reticulum.get_instance().use_af_unix: self.socket_path = f"\0rns/{socket_path}"
|
||||
else: self.socket_path = None
|
||||
@@ -481,17 +483,25 @@ class LocalServerInterface(Interface):
|
||||
def process_outgoing(self, data):
|
||||
pass
|
||||
|
||||
def received_announce(self, from_spawned=False):
|
||||
if from_spawned: self.ia_freq_deque.append(time.time())
|
||||
def received_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ia_freq_deque.append(time.time())
|
||||
self.arxb += size
|
||||
|
||||
def sent_announce(self, from_spawned=False):
|
||||
if from_spawned: self.oa_freq_deque.append(time.time())
|
||||
def sent_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.oa_freq_deque.append(time.time())
|
||||
self.atxb += size
|
||||
|
||||
def received_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.ip_freq_deque.append(time.time())
|
||||
def received_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ip_freq_deque.append(time.time())
|
||||
self.prxb += size
|
||||
|
||||
def sent_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.op_freq_deque.append(time.time())
|
||||
def sent_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.op_freq_deque.append(time.time())
|
||||
self.ptxb += size
|
||||
|
||||
def __str__(self):
|
||||
if self.socket_path: return "Shared Instance["+str(self.socket_path.replace("\0", ""))+"]"
|
||||
|
||||
@@ -543,17 +543,25 @@ class RNodeMultiInterface(Interface):
|
||||
if written != len(frame):
|
||||
raise IOError("Serial interface only wrote "+str(written)+" bytes of "+str(len(data)))
|
||||
|
||||
def received_announce(self, from_spawned=False):
|
||||
if from_spawned: self.ia_freq_deque.append(time.time())
|
||||
def received_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ia_freq_deque.append(time.time())
|
||||
self.arxb += size
|
||||
|
||||
def sent_announce(self, from_spawned=False):
|
||||
if from_spawned: self.oa_freq_deque.append(time.time())
|
||||
def sent_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.oa_freq_deque.append(time.time())
|
||||
self.atxb += size
|
||||
|
||||
def received_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.ip_freq_deque.append(time.time())
|
||||
def received_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ip_freq_deque.append(time.time())
|
||||
self.prxb += size
|
||||
|
||||
def sent_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.op_freq_deque.append(time.time())
|
||||
def sent_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.op_freq_deque.append(time.time())
|
||||
self.ptxb += size
|
||||
|
||||
def readLoop(self):
|
||||
try:
|
||||
|
||||
@@ -646,17 +646,25 @@ class TCPServerInterface(Interface):
|
||||
self.spawned_interfaces.append(spawned_interface)
|
||||
spawned_interface.read_loop()
|
||||
|
||||
def received_announce(self, from_spawned=False):
|
||||
if from_spawned: self.ia_freq_deque.append(time.time())
|
||||
def received_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ia_freq_deque.append(time.time())
|
||||
self.arxb += size
|
||||
|
||||
def sent_announce(self, from_spawned=False):
|
||||
if from_spawned: self.oa_freq_deque.append(time.time())
|
||||
def sent_announce(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.oa_freq_deque.append(time.time())
|
||||
self.atxb += size
|
||||
|
||||
def received_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.ip_freq_deque.append(time.time())
|
||||
def received_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.ip_freq_deque.append(time.time())
|
||||
self.prxb += size
|
||||
|
||||
def sent_path_request(self, from_spawned=False):
|
||||
if from_spawned: self.op_freq_deque.append(time.time())
|
||||
def sent_path_request(self, size=0, from_spawned=False):
|
||||
if from_spawned:
|
||||
self.op_freq_deque.append(time.time())
|
||||
self.ptxb += size
|
||||
|
||||
def process_outgoing(self, data):
|
||||
pass
|
||||
|
||||
+10
-5
@@ -191,7 +191,7 @@ class Link:
|
||||
|
||||
if len(data) == Link.ECPUBSIZE+Link.LINK_MTU_SIZE:
|
||||
RNS.log("Link request includes MTU signalling", RNS.LOG_EXTREME) if RNS.sl(RNS.LOG_EXTREME) else None
|
||||
try: link.mtu = Link.mtu_from_lr_packet(packet) or Reticulum.MTU
|
||||
try: link.mtu = Link.mtu_from_lr_packet(packet) or RNS.Reticulum.MTU
|
||||
except Exception as e:
|
||||
RNS.trace_exception(e)
|
||||
link.mtu = RNS.Reticulum.MTU
|
||||
@@ -683,8 +683,8 @@ class Link:
|
||||
except Exception as e: pass
|
||||
|
||||
def link_closed(self):
|
||||
for resource in self.incoming_resources: resource.cancel()
|
||||
for resource in self.outgoing_resources: resource.cancel()
|
||||
for resource in self.incoming_resources.copy(): resource.cancel()
|
||||
for resource in self.outgoing_resources.copy(): resource.cancel()
|
||||
if self._channel: self._channel._shutdown()
|
||||
|
||||
self.prv = None
|
||||
@@ -928,6 +928,13 @@ class Link:
|
||||
|
||||
def receive(self, packet):
|
||||
self.watchdog_lock = True
|
||||
try: self.__receive(packet)
|
||||
except Exception as e:
|
||||
RNS.log(f"Error on {self} while receiving packet: {e}", RNS.LOG_ERROR)
|
||||
RNS.trace_exception(e)
|
||||
finally: self.watchdog_lock = False
|
||||
|
||||
def __receive(self, packet):
|
||||
if not self.status == Link.CLOSED and not (self.initiator and packet.context == RNS.Packet.KEEPALIVE and packet.data == bytes([0xFF])):
|
||||
if packet.receiving_interface != self.attached_interface:
|
||||
RNS.log(f"Link-associated packet received on unexpected interface {packet.receiving_interface} instead of {self.attached_interface}! Someone might be trying to manipulate your communication!", RNS.LOG_ERROR)
|
||||
@@ -1156,8 +1163,6 @@ class Link:
|
||||
threading.Thread(target=job, daemon=True).start()
|
||||
self.__update_phy_stats(packet, query_shared=True)
|
||||
|
||||
self.watchdog_lock = False
|
||||
|
||||
def encrypt(self, plaintext):
|
||||
try:
|
||||
if not self.token:
|
||||
|
||||
+10
-5
@@ -117,7 +117,7 @@ class Packet:
|
||||
__slots__ = "hops", "header", "header_type", "packet_type", "transport_type", "context", "context_flag", "destination"
|
||||
__slots__ += "transport_id", "data", "flags", "raw", "packed", "sent", "create_receipt", "receipt", "fromPacked", "MTU"
|
||||
__slots__ += "sent_at", "packet_hash", "ratchet_id", "attached_interface", "receiving_interface", "rssi", "snr", "q"
|
||||
__slots__ += "ciphertext", "plaintext", "destination_hash", "destination_type", "link", "map_hash", "is_outbound_pr"
|
||||
__slots__ += "ciphertext", "plaintext", "destination_hash", "destination_type", "link", "map_hash", "is_outbound_pr", "traffic_class"
|
||||
|
||||
def __init__(self, destination, data, packet_type = DATA, context = NONE, transport_type = RNS.Transport.BROADCAST,
|
||||
header_type = HEADER_1, transport_id = None, attached_interface = None, create_receipt = True, context_flag=FLAG_UNSET):
|
||||
@@ -159,6 +159,7 @@ class Packet:
|
||||
self.packet_hash = None
|
||||
self.ratchet_id = None
|
||||
|
||||
self.traffic_class = None
|
||||
self.attached_interface = attached_interface
|
||||
self.receiving_interface = None
|
||||
self.is_outbound_pr = False
|
||||
@@ -260,11 +261,14 @@ class Packet:
|
||||
self.destination_hash = self.raw[DST_LEN+2:2*DST_LEN+2]
|
||||
self.context = ord(self.raw[2*DST_LEN+2:2*DST_LEN+3])
|
||||
self.data = self.raw[2*DST_LEN+3:]
|
||||
if len(self.transport_id) != DST_LEN: raise ValueError("Malformed Transport ID field")
|
||||
if len(self.destination_hash) != DST_LEN: raise ValueError("Malformed destination hash field")
|
||||
else:
|
||||
self.transport_id = None
|
||||
self.destination_hash = self.raw[2:DST_LEN+2]
|
||||
self.context = ord(self.raw[DST_LEN+2:DST_LEN+3])
|
||||
self.data = self.raw[DST_LEN+3:]
|
||||
if len(self.destination_hash) != DST_LEN: raise ValueError("Malformed destination hash field")
|
||||
|
||||
self.packed = False
|
||||
self.update_hash()
|
||||
@@ -281,6 +285,7 @@ class Packet:
|
||||
:returns: A :ref:`RNS.PacketReceipt<api-packetreceipt>` instance if *create_receipt* was set to *True* when the packet was instantiated, if not returns *None*. If the packet could not be sent *False* is returned.
|
||||
"""
|
||||
if not self.sent:
|
||||
if self.hops >= RNS.Transport.PATHFINDER_M: return False
|
||||
if not self.packed: self.pack()
|
||||
if self.destination.type == RNS.Destination.LINK:
|
||||
if self.destination.status == RNS.Link.CLOSED:
|
||||
@@ -296,7 +301,7 @@ class Packet:
|
||||
|
||||
if RNS.Transport.outbound(self): return self.receipt
|
||||
else:
|
||||
RNS.log("No interfaces could process the outbound packet", RNS.LOG_DEBUG) if RNS.sl(RNS.LOG_DEBUG) else None
|
||||
RNS.log(f"No interfaces could process the outbound {self.hops} hop, type {self.packet_type} packet for {self.destination}", RNS.LOG_DEBUG) if RNS.sl(RNS.LOG_DEBUG) else None
|
||||
self.sent = False
|
||||
self.receipt = None
|
||||
return False
|
||||
@@ -357,21 +362,21 @@ class Packet:
|
||||
:returns: The physical layer *Received Signal Strength Indication* if available, otherwise ``None``.
|
||||
"""
|
||||
if self.rssi != None: return self.rssi
|
||||
else: return reticulum.get_packet_rssi(self.packet_hash)
|
||||
else: return RNS.Reticulum.get_instance().get_packet_rssi(self.packet_hash)
|
||||
|
||||
def get_snr(self):
|
||||
"""
|
||||
:returns: The physical layer *Signal-to-Noise Ratio* if available, otherwise ``None``.
|
||||
"""
|
||||
if self.snr != None: return self.snr
|
||||
else: return reticulum.get_packet_snr(self.packet_hash)
|
||||
else: return RNS.Reticulum.get_instance().get_packet_snr(self.packet_hash)
|
||||
|
||||
def get_q(self):
|
||||
"""
|
||||
:returns: The physical layer *Link Quality* if available, otherwise ``None``.
|
||||
"""
|
||||
if self.q != None: return self.q
|
||||
else: return reticulum.get_packet_q(self.packet_hash)
|
||||
else: return RNS.Reticulum.get_instance().get_packet_q(self.packet_hash)
|
||||
|
||||
class ProofDestination:
|
||||
def __init__(self, packet):
|
||||
|
||||
+6
-9
@@ -447,8 +447,8 @@ class Resource:
|
||||
self.hashmap = b""
|
||||
collision_guard_list = []
|
||||
for i in range(0,hashmap_entries):
|
||||
data = self.data[i*self.sdu:(i+1)*self.sdu]
|
||||
map_hash = self.get_map_hash(data)
|
||||
part_data = self.data[i*self.sdu:(i+1)*self.sdu]
|
||||
map_hash = self.get_map_hash(part_data)
|
||||
|
||||
if map_hash in collision_guard_list:
|
||||
RNS.log("Found hash collision in resource map, remapping...", RNS.LOG_DEBUG) if RNS.sl(RNS.LOG_DEBUG) else None
|
||||
@@ -460,7 +460,7 @@ class Resource:
|
||||
if len(collision_guard_list) > ResourceAdvertisement.COLLISION_GUARD_SIZE:
|
||||
collision_guard_list.pop(0)
|
||||
|
||||
part = RNS.Packet(link, data, context=RNS.Packet.RESOURCE)
|
||||
part = RNS.Packet(link, part_data, context=RNS.Packet.RESOURCE)
|
||||
part.pack()
|
||||
part.map_hash = map_hash
|
||||
|
||||
@@ -865,9 +865,9 @@ class Resource:
|
||||
part_data = packet.data
|
||||
part_hash = self.get_map_hash(part_data)
|
||||
|
||||
consecutive_index = self.consecutive_completed_height if self.consecutive_completed_height >= 0 else 0
|
||||
i = consecutive_index
|
||||
for map_hash in self.hashmap[consecutive_index:consecutive_index+self.window]:
|
||||
search_start = self.consecutive_completed_height+1
|
||||
i = search_start
|
||||
for map_hash in self.hashmap[search_start:search_start+self.window]:
|
||||
if map_hash == part_hash:
|
||||
if self.parts[i] == None:
|
||||
|
||||
@@ -878,9 +878,6 @@ class Resource:
|
||||
self.outstanding_parts -= 1
|
||||
|
||||
# Update consecutive completed pointer
|
||||
if i == self.consecutive_completed_height + 1:
|
||||
self.consecutive_completed_height = i
|
||||
|
||||
cp = self.consecutive_completed_height + 1
|
||||
while cp < len(self.parts) and self.parts[cp] != None:
|
||||
self.consecutive_completed_height = cp
|
||||
|
||||
+197
-20
@@ -140,6 +140,9 @@ class Reticulum:
|
||||
# TODO: Let Reticulum somehow continously build a map of per-hop
|
||||
# latencies and use this map for global timeout calculation.
|
||||
DEFAULT_PER_HOP_TIMEOUT = 6
|
||||
"""
|
||||
The default per-hop timeout value used in various timeout calculations.
|
||||
"""
|
||||
|
||||
# Length of truncated hashes in bits.
|
||||
TRUNCATED_HASHLENGTH = 128
|
||||
@@ -207,7 +210,7 @@ class Reticulum:
|
||||
@staticmethod
|
||||
def get_instance():
|
||||
"""
|
||||
Return the currently running Reticulum instance
|
||||
Returns the currently running Reticulum instance.
|
||||
"""
|
||||
return Reticulum.__instance
|
||||
|
||||
@@ -284,6 +287,10 @@ class Reticulum:
|
||||
Reticulum.__ic_held_release_interval = None
|
||||
Reticulum.__ec_pr_freq = None
|
||||
Reticulum.__egress_control = None
|
||||
Reticulum.__inbound_data_queue_length = None
|
||||
Reticulum.__inbound_announce_queue_length = None
|
||||
Reticulum.__inbound_pr_queue_length = None
|
||||
Reticulum.__inbound_il_queue_length = None
|
||||
|
||||
Reticulum.panic_on_interface_error = False
|
||||
|
||||
@@ -536,7 +543,8 @@ class Reticulum:
|
||||
|
||||
if option == "link_mtu_discovery":
|
||||
v = self.config["reticulum"].as_bool(option)
|
||||
if v == True: Reticulum.__link_mtu_discovery = True
|
||||
if v == True: Reticulum.__link_mtu_discovery = True
|
||||
elif v == False: Reticulum.__link_mtu_discovery = False
|
||||
|
||||
if option == "enable_remote_management":
|
||||
v = self.config["reticulum"].as_bool(option)
|
||||
@@ -696,6 +704,22 @@ class Reticulum:
|
||||
v = self.config["reticulum"].as_float(option)
|
||||
if v >= 0: Reticulum.__ic_held_release_interval = v
|
||||
|
||||
if option == "qlen_in_data":
|
||||
v = self.config["reticulum"].as_int(option)
|
||||
if v > 0: Reticulum.__inbound_data_queue_length = v
|
||||
|
||||
if option == "qlen_in_announce":
|
||||
v = self.config["reticulum"].as_int(option)
|
||||
if v > 0: Reticulum.__inbound_announce_queue_length = v
|
||||
|
||||
if option == "qlen_in_pr":
|
||||
v = self.config["reticulum"].as_int(option)
|
||||
if v > 0: Reticulum.__inbound_pr_queue_length = v
|
||||
|
||||
if option == "qlen_in_il":
|
||||
v = self.config["reticulum"].as_int(option)
|
||||
if v > 0: Reticulum.__inbound_il_queue_length = v
|
||||
|
||||
|
||||
if RNS.compiled: RNS.log("Reticulum running in compiled mode", RNS.LOG_DEBUG)
|
||||
else: RNS.log("Reticulum running in interpreted mode", RNS.LOG_DEBUG)
|
||||
@@ -860,6 +884,7 @@ class Reticulum:
|
||||
discovery_announce_interval = None
|
||||
discovery_stamp_value = None
|
||||
discovery_name = None
|
||||
discovery_lxmf_address = None
|
||||
discovery_encrypt = False
|
||||
reachable_on = None
|
||||
publish_ifac = False
|
||||
@@ -891,6 +916,11 @@ class Reticulum:
|
||||
if "discovery_frequency" in c: discovery_frequency = c.as_int("discovery_frequency")
|
||||
if "discovery_bandwidth" in c: discovery_bandwidth = c.as_int("discovery_bandwidth")
|
||||
if "discovery_modulation" in c: discovery_modulation = c.as_int("discovery_modulation")
|
||||
if "discovery_lxmf_address" in c:
|
||||
if len(c["discovery_lxmf_address"]) == RNS.Identity.TRUNCATED_HASHLENGTH//8*2:
|
||||
try: discovery_lxmf_address = bytes.fromhex(c["discovery_lxmf_address"])
|
||||
except: RNS.log(f"Invalid interface discovery LXMF address: {c['discovery_lxmf_address']}", RNS.LOG_ERROR)
|
||||
else: RNS.log(f"Invalid length for interface discovery LXMF address: {c['discovery_lxmf_address']}", RNS.LOG_ERROR)
|
||||
|
||||
if not interface_mode in [Interface.Interface.MODE_GATEWAY, Interface.Interface.MODE_ACCESS_POINT, Interface.Interface.MODE_INTERNAL]:
|
||||
if not ignore_config_warnings:
|
||||
@@ -922,6 +952,7 @@ class Reticulum:
|
||||
interface.discovery_publish_ifac = publish_ifac
|
||||
interface.reachable_on = reachable_on
|
||||
interface.discovery_name = discovery_name
|
||||
interface.discovery_lxmf_address = discovery_lxmf_address
|
||||
interface.discovery_encrypt = discovery_encrypt
|
||||
interface.discovery_stamp_value = discovery_stamp_value
|
||||
interface.discovery_location = discovery_location
|
||||
@@ -1250,17 +1281,20 @@ class Reticulum:
|
||||
mh = call["max_hops"]
|
||||
self.rpc_return(conn, self.get_path_table(max_hops=mh))
|
||||
|
||||
if path == "interface_stats": self.rpc_return(conn, self.get_interface_stats())
|
||||
if path == "rate_table": self.rpc_return(conn, self.get_rate_table())
|
||||
if path == "next_hop_if_name": self.rpc_return(conn, self.get_next_hop_if_name(call["destination_hash"]))
|
||||
if path == "next_hop": self.rpc_return(conn, self.get_next_hop(call["destination_hash"]))
|
||||
if path == "first_hop_timeout": self.rpc_return(conn, self.get_first_hop_timeout(call["destination_hash"]))
|
||||
if path == "link_count": self.rpc_return(conn, self.get_link_count())
|
||||
if path == "packet_rssi": self.rpc_return(conn, self.get_packet_rssi(call["packet_hash"]))
|
||||
if path == "packet_snr": self.rpc_return(conn, self.get_packet_snr(call["packet_hash"]))
|
||||
if path == "packet_q": self.rpc_return(conn, self.get_packet_q(call["packet_hash"]))
|
||||
if path == "blackholed_identities": self.rpc_return(conn, self.get_blackholed_identities())
|
||||
if path == "is_blackholed": self.rpc_return(conn, self.is_blackholed(call["identity_hash"]))
|
||||
if path == "interface_stats": self.rpc_return(conn, self.get_interface_stats())
|
||||
if path == "rate_table": self.rpc_return(conn, self.get_rate_table())
|
||||
if path == "next_hop_if_name": self.rpc_return(conn, self.get_next_hop_if_name(call["destination_hash"]))
|
||||
if path == "next_hop": self.rpc_return(conn, self.get_next_hop(call["destination_hash"]))
|
||||
if path == "first_hop_timeout": self.rpc_return(conn, self.get_first_hop_timeout(call["destination_hash"]))
|
||||
if path == "lowest_interface_bitrate": self.rpc_return(conn, self.get_lowest_interface_bitrate())
|
||||
if path == "medium_path_timeout": self.rpc_return(conn, self.get_medium_path_timeout())
|
||||
if path == "link_count": self.rpc_return(conn, self.get_link_count())
|
||||
if path == "active_link_count": self.rpc_return(conn, self.get_active_link_count())
|
||||
if path == "packet_rssi": self.rpc_return(conn, self.get_packet_rssi(call["packet_hash"]))
|
||||
if path == "packet_snr": self.rpc_return(conn, self.get_packet_snr(call["packet_hash"]))
|
||||
if path == "packet_q": self.rpc_return(conn, self.get_packet_q(call["packet_hash"]))
|
||||
if path == "blackholed_identities": self.rpc_return(conn, self.get_blackholed_identities())
|
||||
if path == "is_blackholed": self.rpc_return(conn, self.is_blackholed(call["identity_hash"]))
|
||||
|
||||
if "drop" in call:
|
||||
path = call["drop"]
|
||||
@@ -1440,6 +1474,26 @@ class Reticulum:
|
||||
else: ifstats["txs"] = 0
|
||||
else: ifstats["txs"] = 0
|
||||
|
||||
if hasattr(interface, "current_arx_speed"):
|
||||
if interface.current_arx_speed != None: ifstats["arxs"] = interface.current_arx_speed
|
||||
else: ifstats["arxs"] = 0
|
||||
else: ifstats["arxs"] = 0
|
||||
|
||||
if hasattr(interface, "current_atx_speed"):
|
||||
if interface.current_atx_speed != None: ifstats["atxs"] = interface.current_atx_speed
|
||||
else: ifstats["atxs"] = 0
|
||||
else: ifstats["atxs"] = 0
|
||||
|
||||
if hasattr(interface, "current_prx_speed"):
|
||||
if interface.current_prx_speed != None: ifstats["prxs"] = interface.current_prx_speed
|
||||
else: ifstats["prxs"] = 0
|
||||
else: ifstats["prxs"] = 0
|
||||
|
||||
if hasattr(interface, "current_ptx_speed"):
|
||||
if interface.current_ptx_speed != None: ifstats["ptxs"] = interface.current_ptx_speed
|
||||
else: ifstats["ptxs"] = 0
|
||||
else: ifstats["ptxs"] = 0
|
||||
|
||||
if hasattr(interface, "peers"):
|
||||
if interface.peers != None: ifstats["peers"] = len(interface.peers)
|
||||
else: ifstats["peers"] = None
|
||||
@@ -1472,6 +1526,14 @@ class Reticulum:
|
||||
ifstats["type"] = str(type(interface).__name__)
|
||||
ifstats["rxb"] = interface.rxb
|
||||
ifstats["txb"] = interface.txb
|
||||
ifstats["arxb"] = interface.arxb
|
||||
ifstats["atxb"] = interface.atxb
|
||||
ifstats["arxc"] = interface.arxc
|
||||
ifstats["atxc"] = interface.atxc
|
||||
ifstats["prxb"] = interface.prxb
|
||||
ifstats["ptxb"] = interface.ptxb
|
||||
ifstats["prxc"] = interface.prxc
|
||||
ifstats["ptxc"] = interface.ptxc
|
||||
ifstats["incoming_announce_frequency"] = interface.incoming_announce_frequency()
|
||||
ifstats["outgoing_announce_frequency"] = interface.outgoing_announce_frequency()
|
||||
ifstats["incoming_pr_frequency"] = interface.incoming_pr_frequency()
|
||||
@@ -1482,21 +1544,61 @@ class Reticulum:
|
||||
ifstats["held_announces"] = len(interface.held_announces)
|
||||
ifstats["burst_active"] = interface.ic_burst_active
|
||||
ifstats["burst_activated"] = interface.ic_burst_activated
|
||||
ifstats["burst_count"] = interface.ic_burst_count
|
||||
ifstats["pr_burst_active"] = interface.ic_pr_burst_active
|
||||
ifstats["pr_burst_activated"] = interface.ic_pr_burst_activated
|
||||
ifstats["pr_burst_count"] = interface.ic_pr_burst_count
|
||||
ifstats["status"] = interface.online
|
||||
ifstats["mode"] = interface.mode
|
||||
ifstats["gravity"] = interface.gravity
|
||||
ifstats["announces_to_internal"] = interface.announces_to_internal
|
||||
ifstats["protocol_violations"] = interface.protocol_violations
|
||||
ifstats["ifac_violations"] = interface.ifac_violations
|
||||
ifstats["packet_filter_hits"] = interface.packet_filter_hits
|
||||
|
||||
interfaces.append(ifstats)
|
||||
|
||||
stats = {}
|
||||
stats["interfaces"] = interfaces
|
||||
stats["rxb"] = RNS.Transport.traffic_rxb
|
||||
stats["txb"] = RNS.Transport.traffic_txb
|
||||
stats["rxs"] = RNS.Transport.speed_rx
|
||||
stats["txs"] = RNS.Transport.speed_tx
|
||||
qsnapshot = RNS.Transport.inbound_queues.snapshot()
|
||||
dql = RNS.Transport.INBOUND_DA_QUEUE_LENGTH
|
||||
aql = RNS.Transport.INBOUND_AN_QUEUE_LENGTH
|
||||
pql = RNS.Transport.INBOUND_PR_QUEUE_LENGTH
|
||||
ilql = RNS.Transport.INBOUND_IL_QUEUE_LENGTH
|
||||
tql = dql+aql+pql+ilql
|
||||
|
||||
stats = {}
|
||||
stats["interfaces"] = interfaces
|
||||
stats["rxb"] = RNS.Transport.traffic_rxb
|
||||
stats["txb"] = RNS.Transport.traffic_txb
|
||||
stats["rxs"] = RNS.Transport.speed_rx
|
||||
stats["txs"] = RNS.Transport.speed_tx
|
||||
stats["arxb"] = RNS.Transport.announce_rxb
|
||||
stats["atxb"] = RNS.Transport.announce_txb
|
||||
stats["arxs"] = RNS.Transport.announce_speed_rx
|
||||
stats["atxs"] = RNS.Transport.announce_speed_tx
|
||||
stats["arxf"] = RNS.Transport.announce_freq_rx
|
||||
stats["atxf"] = RNS.Transport.announce_freq_tx
|
||||
stats["prxb"] = RNS.Transport.pr_rxb
|
||||
stats["ptxb"] = RNS.Transport.pr_txb
|
||||
stats["prxs"] = RNS.Transport.pr_speed_rx
|
||||
stats["ptxs"] = RNS.Transport.pr_speed_tx
|
||||
stats["prxf"] = RNS.Transport.pr_freq_rx
|
||||
stats["ptxf"] = RNS.Transport.pr_freq_tx
|
||||
stats["rxqt"] = qsnapshot[0]
|
||||
stats["rxqd"] = qsnapshot[1][0]
|
||||
stats["rxqa"] = qsnapshot[1][1]
|
||||
stats["rxqp"] = qsnapshot[1][2]
|
||||
stats["rxqil"] = qsnapshot[1][3]
|
||||
stats["rxqtd"] = qsnapshot[2][0]+qsnapshot[2][1]+qsnapshot[2][2]+qsnapshot[2][3]
|
||||
stats["rxqdd"] = qsnapshot[2][0]
|
||||
stats["rxqad"] = qsnapshot[2][1]
|
||||
stats["rxqpd"] = qsnapshot[2][2]
|
||||
stats["rxqild"] = qsnapshot[2][3]
|
||||
stats["tqpressure"] = qsnapshot[0]/tql if qsnapshot[0] else 0
|
||||
stats["dqpressure"] = qsnapshot[1][0]/dql if qsnapshot[1][0] else 0
|
||||
stats["aqpressure"] = qsnapshot[1][1]/aql if qsnapshot[1][1] else 0
|
||||
stats["pqpressure"] = qsnapshot[1][2]/pql if qsnapshot[1][2] else 0
|
||||
stats["ilqpressure"] = qsnapshot[1][3]/ilql if qsnapshot[1][3] else 0
|
||||
stats["txq"] = None
|
||||
|
||||
if Reticulum.transport_enabled():
|
||||
stats["transport_id"] = RNS.Transport.identity.hash
|
||||
@@ -1602,6 +1704,16 @@ class Reticulum:
|
||||
return str(RNS.Transport.next_hop_interface(destination))
|
||||
|
||||
def get_first_hop_timeout(self, destination):
|
||||
"""
|
||||
Returns a best-effort estimate of a reasonable minimum
|
||||
*first-hop* timeout value for a given destination hash.
|
||||
If a path is known, this calculation takes the next-hop
|
||||
interface's bitrate into account. If no path is currently
|
||||
known, returns ``DEFAULT_PER_HOP_TIMEOUT``.
|
||||
|
||||
:param destination: A destination hash, as *bytes*.
|
||||
:returns: First-hop timeout, in seconds.
|
||||
"""
|
||||
if self.is_connected_to_shared_instance:
|
||||
try:
|
||||
rpc_connection = self.get_rpc_client()
|
||||
@@ -1621,6 +1733,45 @@ class Reticulum:
|
||||
else:
|
||||
return RNS.Transport.first_hop_timeout(destination)
|
||||
|
||||
def get_lowest_interface_bitrate(self):
|
||||
"""
|
||||
Returns the bitrate of the slowest currently online
|
||||
interface, or None if no online interface bitrate
|
||||
|
||||
:returns: Lowest online interface bitrate in bits per second, or ``None``.
|
||||
"""
|
||||
if self.is_connected_to_shared_instance:
|
||||
try:
|
||||
rpc_connection = self.get_rpc_client()
|
||||
rpc_connection.send_bytes(mp.packb({"get": "lowest_interface_bitrate"}))
|
||||
return mp.unpackb(rpc_connection.recv_bytes())
|
||||
except Exception as e:
|
||||
RNS.log("An error occurred while getting lowest interface bitrate from shared instance: "+str(e), RNS.LOG_ERROR)
|
||||
return None
|
||||
|
||||
else:
|
||||
return RNS.Transport.lowest_interface_bitrate
|
||||
|
||||
def get_medium_path_timeout(self):
|
||||
"""
|
||||
Returns an estimate of a reasonable minimum path request timeout covering
|
||||
a full round trip for an MTU on the slowest currently online interface
|
||||
plus per hop grace
|
||||
|
||||
:returns: Timeout in seconds or 0 if it's unknown.
|
||||
"""
|
||||
if self.is_connected_to_shared_instance:
|
||||
try:
|
||||
rpc_connection = self.get_rpc_client()
|
||||
rpc_connection.send_bytes(mp.packb({"get": "medium_path_timeout"}))
|
||||
return mp.unpackb(rpc_connection.recv_bytes())
|
||||
except Exception as e:
|
||||
RNS.log("An error occurred while getting medium path timeout from shared instance: "+str(e), RNS.LOG_ERROR)
|
||||
return 0
|
||||
|
||||
else:
|
||||
return RNS.Transport.medium_path_timeout()
|
||||
|
||||
def get_next_hop(self, destination):
|
||||
if self.is_connected_to_shared_instance:
|
||||
rpc_connection = self.get_rpc_client()
|
||||
@@ -1640,7 +1791,17 @@ class Reticulum:
|
||||
return response
|
||||
|
||||
else:
|
||||
return len(RNS.Transport.link_table)
|
||||
return RNS.Transport.link_count()
|
||||
|
||||
def get_active_link_count(self):
|
||||
if self.is_connected_to_shared_instance:
|
||||
rpc_connection = self.get_rpc_client()
|
||||
rpc_connection.send_bytes(mp.packb({"get": "active_link_count"}))
|
||||
response = mp.unpackb(rpc_connection.recv_bytes())
|
||||
return response
|
||||
|
||||
else:
|
||||
return RNS.Transport.active_link_count()
|
||||
|
||||
def get_packet_rssi(self, packet_hash):
|
||||
if self.is_connected_to_shared_instance:
|
||||
@@ -1873,6 +2034,22 @@ class Reticulum:
|
||||
def local_hops_delta():
|
||||
return Reticulum.__local_hops_delta
|
||||
|
||||
@staticmethod
|
||||
def default_data_queue_length():
|
||||
return Reticulum.__inbound_data_queue_length
|
||||
|
||||
@staticmethod
|
||||
def default_announce_queue_length():
|
||||
return Reticulum.__inbound_announce_queue_length
|
||||
|
||||
@staticmethod
|
||||
def default_pr_queue_length():
|
||||
return Reticulum.__inbound_pr_queue_length
|
||||
|
||||
@staticmethod
|
||||
def default_il_queue_length():
|
||||
return Reticulum.__inbound_il_queue_length
|
||||
|
||||
# Default configuration file:
|
||||
__default_rns_config__ = '''# This is the default Reticulum config file.
|
||||
# You should probably edit it to include any additional,
|
||||
|
||||
+1262
-883
File diff suppressed because it is too large.
Load diff
@@ -401,7 +401,7 @@ def fetch(configdir, identitypath = None, verbosity = 0, quietness = 0, destinat
|
||||
|
||||
i = 0
|
||||
syms = "⢄⢂⢁⡁⡈⡐⡠"
|
||||
estab_timeout = time.time()+timeout
|
||||
estab_timeout = time.time()+max(timeout, reticulum.get_medium_path_timeout())
|
||||
while not RNS.Transport.has_path(destination_hash) and time.time() < estab_timeout:
|
||||
if not silent:
|
||||
time.sleep(0.1)
|
||||
@@ -431,6 +431,7 @@ def fetch(configdir, identitypath = None, verbosity = 0, quietness = 0, destinat
|
||||
)
|
||||
|
||||
link = RNS.Link(listener_destination)
|
||||
estab_timeout = max(estab_timeout, time.time()+link.establishment_timeout)
|
||||
while link.status != RNS.Link.ACTIVE and time.time() < estab_timeout:
|
||||
if not silent:
|
||||
time.sleep(0.1)
|
||||
@@ -656,7 +657,7 @@ def send(configdir, identitypath = None, verbosity = 0, quietness = 0, destinati
|
||||
|
||||
i = 0
|
||||
syms = "⢄⢂⢁⡁⡈⡐⡠"
|
||||
estab_timeout = time.time()+timeout
|
||||
estab_timeout = time.time()+max(timeout, reticulum.get_medium_path_timeout())
|
||||
while not RNS.Transport.has_path(destination_hash) and time.time() < estab_timeout:
|
||||
if not silent:
|
||||
time.sleep(0.1)
|
||||
@@ -686,6 +687,7 @@ def send(configdir, identitypath = None, verbosity = 0, quietness = 0, destinati
|
||||
)
|
||||
|
||||
link = RNS.Link(receiver_destination)
|
||||
estab_timeout = max(estab_timeout, time.time()+link.establishment_timeout)
|
||||
while link.status != RNS.Link.ACTIVE and time.time() < estab_timeout:
|
||||
if not silent:
|
||||
time.sleep(0.1)
|
||||
@@ -878,8 +880,8 @@ def main():
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("")
|
||||
if resource != None:
|
||||
resource.cancel()
|
||||
if current_resource != None:
|
||||
current_resource.cancel()
|
||||
if link != None:
|
||||
link.teardown()
|
||||
RNS.exit()
|
||||
|
||||
@@ -40,6 +40,7 @@ import subprocess
|
||||
|
||||
from RNS._version import __version__
|
||||
from RNS.Utilities.rngit import APP_NAME
|
||||
from RNS.Utilities.rngit.util import medium_path_timeout
|
||||
|
||||
from RNS.vendor.configobj import ConfigObj
|
||||
from tempfile import TemporaryDirectory
|
||||
@@ -223,7 +224,7 @@ class ReticulumGitClient():
|
||||
|
||||
RNS.log(f"Requesting path to {RNS.prettyhexrep(destination_hash)}", RNS.LOG_DEBUG)
|
||||
sys.stderr.write(f"Requesting path..."); sys.stderr.flush()
|
||||
if not RNS.Transport.await_path(destination_hash, timeout=self.path_timeout):
|
||||
if not RNS.Transport.await_path(destination_hash, timeout=medium_path_timeout(self.path_timeout)):
|
||||
sys.stderr.write(f"\n"); sys.stderr.flush()
|
||||
self.abort(f"Could not resolve path to {RNS.prettyhexrep(destination_hash)}")
|
||||
|
||||
@@ -291,6 +292,8 @@ class ReticulumGitClient():
|
||||
|
||||
if hasattr(self.request_response, "read") and callable(self.request_response.read):
|
||||
response_path = self.request_response.name
|
||||
try: self.request_response.close()
|
||||
except Exception as e: RNS.log(f"Could not close resource file descriptor before retain: {e}", RNS.LOG_ERROR)
|
||||
base_name = os.path.basename(response_path)
|
||||
retained_path = os.path.join(self.tmp_dir.name, base_name)
|
||||
shutil.move(response_path, retained_path)
|
||||
@@ -333,10 +336,10 @@ class ReticulumGitClient():
|
||||
try: self.connect_server()
|
||||
except Exception as e: self.abort(str(e))
|
||||
|
||||
timeout = self.link_timeout
|
||||
timeout = max(self.link_timeout, self.link.establishment_timeout)
|
||||
while not self.link_ready and not self.link_failed and timeout > 0:
|
||||
time.sleep(0.5)
|
||||
timeout -= 1
|
||||
timeout -= 0.5
|
||||
|
||||
if not self.link_ready: self.abort("Failed to establish link")
|
||||
|
||||
|
||||
@@ -46,7 +46,7 @@ from datetime import datetime, timezone
|
||||
from RNS._version import __version__
|
||||
from RNS.Utilities.rngit import APP_NAME
|
||||
from RNS.Utilities.rngit.pages import NomadNetworkNode
|
||||
from RNS.Utilities.rngit.util import san_ref, san_refs, san_sha
|
||||
from RNS.Utilities.rngit.util import san_ref, san_refs, san_sha, medium_path_timeout
|
||||
from RNS.vendor.configobj import ConfigObj
|
||||
from RNS.vendor import umsgpack as mp
|
||||
from RNS.Utilities.rnid import create_rsg, validate_rsg, get_rsg_hash
|
||||
@@ -465,7 +465,7 @@ class ReticulumGitClient():
|
||||
def connect_remote(self, remote):
|
||||
destination_hash = self.parse_remote_destination_url(remote)
|
||||
print(f"Requesting path... ", end="")
|
||||
if not RNS.Transport.await_path(destination_hash, timeout=self.path_timeout):
|
||||
if not RNS.Transport.await_path(destination_hash, timeout=medium_path_timeout(self.path_timeout)):
|
||||
print(f"\n", end="")
|
||||
self.abort(f"Could not resolve path to {RNS.prettyhexrep(destination_hash)}")
|
||||
|
||||
@@ -479,6 +479,7 @@ class ReticulumGitClient():
|
||||
self.link = RNS.Link(self.destination)
|
||||
self.link.set_link_established_callback(self.link_established)
|
||||
self.link.set_link_closed_callback(self.link_closed)
|
||||
self.link_timeout = max(self.link_timeout, self.link.establishment_timeout)
|
||||
|
||||
def link_established(self, link):
|
||||
print(f"\rLink established ", end="")
|
||||
|
||||
@@ -814,3 +814,6 @@ class MarkdownToMicron:
|
||||
def convert_markdown_to_micron(text):
|
||||
converter = MarkdownToMicron()
|
||||
return converter.format_block(text)
|
||||
|
||||
def medium_path_timeout(default_timeout):
|
||||
return max(default_timeout, RNS.Reticulum.get_instance().get_medium_path_timeout())
|
||||
@@ -3766,8 +3766,8 @@ def main():
|
||||
print("\nDevice configuration:")
|
||||
if ec_bt == 0x73: print(f" Bluetooth : Enabled")
|
||||
else: print(f" Bluetooth : Disabled")
|
||||
if ec_wifi == 0x01: print(f" WiFi : Enabled (Station)")
|
||||
if ec_wifi == 0x02: print(f" WiFi : Enabled (AP)")
|
||||
if ec_wifi == 0x01: print(f" WiFi : Enabled (Station)")
|
||||
elif ec_wifi == 0x02: print(f" WiFi : Enabled (AP)")
|
||||
else: print(f" WiFi : Disabled")
|
||||
if ec_wifi == 0x01 or ec_wifi == 0x02:
|
||||
if not ec_wchn: print(f" Channel : Unknown")
|
||||
|
||||
@@ -42,6 +42,7 @@ remote_link = None
|
||||
output_rst_str = "\r \r"
|
||||
def connect_remote(destination_hash, auth_identity, timeout, no_output = False, purpose="management"):
|
||||
global remote_link, reticulum
|
||||
timeout = max(timeout, reticulum.get_medium_path_timeout())
|
||||
if not RNS.Transport.has_path(destination_hash):
|
||||
if not no_output:
|
||||
print("Path to "+RNS.prettyhexrep(destination_hash)+" requested", end=" ")
|
||||
@@ -451,7 +452,7 @@ def program_setup(configdir, table, rates, drop, destination_hexhash, verbosity,
|
||||
|
||||
i = 0
|
||||
syms = "⢄⢂⢁⡁⡈⡐⡠"
|
||||
limit = time.time()+timeout
|
||||
limit = time.time()+max(timeout, reticulum.get_medium_path_timeout())
|
||||
while not RNS.Transport.has_path(destination_hash) and time.time()<limit:
|
||||
time.sleep(0.1)
|
||||
print(("\b\b"+syms[i]+" "), end="")
|
||||
|
||||
@@ -81,7 +81,7 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
||||
print("Path to "+RNS.prettyhexrep(destination_hash)+" requested ", end=" ")
|
||||
sys.stdout.flush()
|
||||
|
||||
_timeout = time.time() + (timeout or DEFAULT_TIMEOUT+reticulum.get_first_hop_timeout(destination_hash))
|
||||
_timeout = time.time() + (timeout or max(DEFAULT_TIMEOUT+reticulum.get_first_hop_timeout(destination_hash), reticulum.get_medium_path_timeout()))
|
||||
i = 0
|
||||
syms = "⢄⢂⢁⡁⡈⡐⡠"
|
||||
while not RNS.Transport.has_path(destination_hash) and not time.time() > _timeout:
|
||||
@@ -131,7 +131,7 @@ def program_setup(configdir, destination_hexhash, size=None, full_name = None, v
|
||||
|
||||
print("\rSent probe "+str(sent)+" ("+str(size)+" bytes) to "+RNS.prettyhexrep(destination_hash)+more+" ", end=" ")
|
||||
|
||||
_timeout = time.time() + (timeout or DEFAULT_TIMEOUT+reticulum.get_first_hop_timeout(destination_hash))
|
||||
_timeout = time.time() + (timeout or max(DEFAULT_TIMEOUT+reticulum.get_first_hop_timeout(destination_hash), reticulum.get_medium_path_timeout()))
|
||||
i = 0
|
||||
while receipt.status == RNS.PacketReceipt.SENT and not time.time() > _timeout:
|
||||
time.sleep(0.1)
|
||||
|
||||
@@ -405,7 +405,7 @@ async def initiate(configdir: str, rnsconfigdir:str, identitypath: str, logfile:
|
||||
chunk_segment = None
|
||||
|
||||
chunk_segment = None
|
||||
max_data_len = channel.mdu - protocol.StreamDataMessage.OVERHEAD
|
||||
max_data_len = channel.mdu - protocol.StreamDataMessage.HEADER_LEN
|
||||
while chunk_len > 32 and comp_try < comp_tries:
|
||||
chunk_segment_length = int(chunk_len/comp_try)
|
||||
compressed_chunk = bz2.compress(buf[:chunk_segment_length])
|
||||
|
||||
@@ -235,7 +235,7 @@ class ListenerSession:
|
||||
chunk_segment = None
|
||||
|
||||
chunk_segment = None
|
||||
max_data_len = self.channel.mdu - protocol.StreamDataMessage.OVERHEAD
|
||||
max_data_len = self.channel.mdu - protocol.StreamDataMessage.HEADER_LEN
|
||||
while chunk_len > 32 and comp_try < comp_tries:
|
||||
chunk_segment_length = int(chunk_len/comp_try)
|
||||
compressed_chunk = bz2.compress(buf[:chunk_segment_length])
|
||||
|
||||
+154
-21
@@ -152,9 +152,10 @@ def get_remote_status(destination_hash, include_lstats, identity, no_output=Fals
|
||||
|
||||
return request_result
|
||||
|
||||
def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=False, astats=False, pstats=False, lstats=False, sorting=None,
|
||||
sort_reverse=False, remote=None, management_identity=None, remote_timeout=RNS.Transport.PATH_REQUEST_TIMEOUT, must_exit=True,
|
||||
rns_instance=None, traffic_totals=False, discovered_interfaces=False, config_entries=False, burst_filter=False):
|
||||
def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=False, astats=False, pstats=False, lstats=False,
|
||||
sorting=None, sort_reverse=False, remote=None, management_identity=None, must_exit=True, rns_instance=None,
|
||||
traffic_totals=False, discovered_interfaces=False, config_entries=False, burst_filter=False, blocked_ips=False,
|
||||
queue_stats=False, remote_timeout=RNS.Transport.PATH_REQUEST_TIMEOUT):
|
||||
|
||||
if remote: require_shared = False
|
||||
else: require_shared = True
|
||||
@@ -172,6 +173,7 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
else: return
|
||||
|
||||
link_count = None
|
||||
active_link_count = None
|
||||
stats = None
|
||||
|
||||
details = False
|
||||
@@ -225,15 +227,18 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
location = f"{lat}, {lon}{height}"
|
||||
else: location = "Unknown"
|
||||
|
||||
lxmf_addr = None
|
||||
transport_id = None
|
||||
network = None
|
||||
network = None
|
||||
if "operator_lxmf_address" in i: lxmf_addr = i['operator_lxmf_address']
|
||||
if "transport_id" in i: transport_id = i["transport_id"]
|
||||
if "transport_id" in i and "network_id" in i and i["transport_id"] != i["network_id"]:
|
||||
network = i["network_id"]
|
||||
|
||||
if idx > 0: print("\n"+"="*32+"\n")
|
||||
if idx > 0: print("\n"+"="*47+"\n")
|
||||
if network: print(f"Network ID : {network}")
|
||||
if transport_id: print(f"Transport ID : {transport_id}")
|
||||
if lxmf_addr: print(f"LXMF address : {lxmf_addr}")
|
||||
|
||||
print(f"Name : {name}")
|
||||
print(f"Type : {if_type}")
|
||||
@@ -258,8 +263,7 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
config_lines = i["config_entry"].split('\n')
|
||||
for line in config_lines: print(f" {line}")
|
||||
|
||||
except Exception as e:
|
||||
pass
|
||||
except Exception as e: pass
|
||||
|
||||
else:
|
||||
print(f"{'Name':<25} {'Type':<12} {'Status':<12} {'Last Heard':<12} {'Value':<8} {'Location':<15}")
|
||||
@@ -336,6 +340,8 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
if lstats:
|
||||
try: link_count = reticulum.get_link_count()
|
||||
except Exception as e: pass
|
||||
try: active_link_count = reticulum.get_active_link_count()
|
||||
except Exception as e: pass
|
||||
|
||||
try: stats = reticulum.get_interface_stats()
|
||||
except Exception as e: pass
|
||||
@@ -379,16 +385,30 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
interfaces.sort(key=lambda i: i["incoming_announce_frequency"], reverse=not sort_reverse)
|
||||
if sorting == "atx":
|
||||
interfaces.sort(key=lambda i: i["outgoing_announce_frequency"], reverse=not sort_reverse)
|
||||
if sorting == "arxc":
|
||||
interfaces.sort(key=lambda i: i["arxc"], reverse=not sort_reverse)
|
||||
if sorting == "atxc":
|
||||
interfaces.sort(key=lambda i: i["atxc"], reverse=not sort_reverse)
|
||||
if sorting == "prx":
|
||||
interfaces.sort(key=lambda i: i["incoming_pr_frequency"], reverse=not sort_reverse)
|
||||
if sorting == "ptx":
|
||||
interfaces.sort(key=lambda i: i["outgoing_pr_frequency"], reverse=not sort_reverse)
|
||||
if sorting == "prxc":
|
||||
interfaces.sort(key=lambda i: i["prxc"], reverse=not sort_reverse)
|
||||
if sorting == "ptxc":
|
||||
interfaces.sort(key=lambda i: i["ptxc"], reverse=not sort_reverse)
|
||||
if sorting == "held":
|
||||
interfaces.sort(key=lambda i: i["held_announces"], reverse=not sort_reverse)
|
||||
if sorting == "pvs":
|
||||
interfaces.sort(key=lambda i: i["protocol_violations"], reverse=not sort_reverse)
|
||||
if sorting == "ivs":
|
||||
interfaces.sort(key=lambda i: i["ifac_violations"], reverse=not sort_reverse)
|
||||
if sorting == "flt":
|
||||
interfaces.sort(key=lambda i: i["packet_filter_hits"], reverse=not sort_reverse)
|
||||
if sorting == "gravity" or sorting == "g":
|
||||
interfaces.sort(key=lambda i: i["gravity"], reverse=not sort_reverse)
|
||||
|
||||
|
||||
|
||||
for ifstat in interfaces:
|
||||
name = ifstat["name"]
|
||||
|
||||
@@ -458,6 +478,9 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
p = ifstat["blocked_ips"] > 0
|
||||
if p: clients_string += "\n Blocked : "+str(ifstat["blocked_ips"])+" IP"+"s" if p else ""
|
||||
|
||||
if blocked_ips and "blocked_ip_list" in ifstat and len(ifstat["blocked_ip_list"]) > 0:
|
||||
for bip in ifstat["blocked_ip_list"]: clients_string += f"\n {bip}"
|
||||
|
||||
else:
|
||||
clients = None
|
||||
|
||||
@@ -572,13 +595,17 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
|
||||
burst_str = ""
|
||||
if "burst_active" in ifstat and ifstat["burst_active"]:
|
||||
if "burst_count" in ifstat and ifstat["burst_count"]: bcstr = f"on {ifstat['burst_count']} "
|
||||
else: bcstr = ""
|
||||
for_str = RNS.prettytime(time.time()-ifstat["burst_activated"])
|
||||
burst_str = f" burst for {for_str}"
|
||||
burst_str = f" burst {bcstr}for {for_str}"
|
||||
|
||||
pburst_str = ""
|
||||
if "pr_burst_active" in ifstat and ifstat["pr_burst_active"]:
|
||||
if "pr_burst_count" in ifstat and ifstat["pr_burst_count"]: prbcstr = f"on {ifstat['pr_burst_count']} "
|
||||
else: prbcstr = ""
|
||||
for_str = RNS.prettytime(time.time()-ifstat["pr_burst_activated"])
|
||||
pburst_str = f"burst for {for_str}"
|
||||
pburst_str = f"burst {prbcstr}for {for_str}"
|
||||
|
||||
rxb_str = "↓"+RNS.prettysize(ifstat["rxb"])
|
||||
txb_str = "↑"+RNS.prettysize(ifstat["txb"])
|
||||
@@ -593,8 +620,16 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
|
||||
cspec = "c"
|
||||
if clients == None and "peers" in ifstat and ifstat["peers"]: clients = ifstat["peers"]; cspec = "p"
|
||||
if clients != None and clients > 0: pc_str = f"{RNS.prettyfrequency(ifstat['outgoing_announce_frequency']/clients, d=1, lpf=True)}/{cspec}"
|
||||
if clients != None and clients > 0: pc_str = f" {RNS.prettyfrequency(ifstat['outgoing_announce_frequency']/clients, d=1, lpf=True)}/{cspec}"
|
||||
else: pc_str = ""
|
||||
|
||||
if "prxs" in ifstat and "rxs" in ifstat and "ptxs" in ifstat and "txs" in ifstat:
|
||||
arxspct = min(100.0, (ifstat["arxs"] / ifstat["rxs"])*100.0) if ifstat["rxs"] and ifstat["arxs"] else 0.0
|
||||
atxspct = min(100.0, (ifstat["atxs"] / ifstat["txs"])*100.0) if ifstat["txs"] and ifstat["atxs"] else 0.0
|
||||
apctstr = f"(↓{int(arxspct)}% / ↑{int(atxspct)}% of flow)"
|
||||
if pc_str: pc_str = f"{pc_str} {apctstr}"
|
||||
else: pc_str = f"{apctstr}"
|
||||
|
||||
asr = True
|
||||
|
||||
psr = False
|
||||
@@ -610,8 +645,16 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
ipf = RNS.prettyfrequency(ipn,d=1, lpf=True)+"↓"
|
||||
cspec = "c"
|
||||
if clients == None and "peers" in ifstat and ifstat["peers"]: clients = ifstat["peers"]; cspec = "p"
|
||||
if clients != None and clients > 0: rpc_str = f"{RNS.prettyfrequency(ifstat['outgoing_pr_frequency']/clients, d=1, lpf=True)}/{cspec}"
|
||||
if clients != None and clients > 0: rpc_str = f" {RNS.prettyfrequency(ifstat['outgoing_pr_frequency']/clients, d=1, lpf=True)}/{cspec}"
|
||||
else: rpc_str = ""
|
||||
|
||||
if "prxs" in ifstat and "rxs" in ifstat and "ptxs" in ifstat and "txs" in ifstat:
|
||||
prxspct = min(100.0, (ifstat["prxs"] / ifstat["rxs"])*100.0) if ifstat["rxs"] and ifstat["prxs"] else 0.0
|
||||
ptxspct = min(100.0, (ifstat["ptxs"] / ifstat["txs"])*100.0) if ifstat["txs"] and ifstat["ptxs"] else 0.0
|
||||
ppctstr = f"(↓{int(prxspct)}% / ↑{int(ptxspct)}% of flow)"
|
||||
if rpc_str: rpc_str = f"{rpc_str} {ppctstr}"
|
||||
else: rpc_str = f"{ppctstr}"
|
||||
|
||||
psr = True
|
||||
|
||||
if not asr: iaf = ""; oaf = ""
|
||||
@@ -627,12 +670,30 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
rxb_str += (mlen-len(rxb_str))*" "
|
||||
txb_str += (mlen-len(txb_str))*" "
|
||||
|
||||
if "protocol_violations" in ifstat and "ifac_violations" in ifstat:
|
||||
pv = ifstat["protocol_violations"]; iv = ifstat["ifac_violations"]
|
||||
if pv or iv:
|
||||
pvstr = f"{pv} protocol{', ' if iv else ''}"
|
||||
ivstr = f"{iv} IFAC" if iv else ""
|
||||
print(f" Violatns. : {pvstr}{ivstr}")
|
||||
|
||||
if "packet_filter_hits" in ifstat and ifstat["packet_filter_hits"]:
|
||||
print(f" Flt. Hits : {ifstat['packet_filter_hits']}")
|
||||
|
||||
if psr:
|
||||
print(f" Path Rqs. : {opf} {rpc_str}")
|
||||
if ifstat["prxc"] and ifstat["ptxc"]:
|
||||
print(f" Path Rqs. : {ifstat['prxc']}↓ {ifstat['ptxc']}↑ total")
|
||||
print(f" {opf} {rpc_str}")
|
||||
else:
|
||||
print(f" Path Rqs. : {opf} {rpc_str}")
|
||||
print(f" {ipf} {pburst_str}")
|
||||
|
||||
if asr:
|
||||
print(f" Announces : {oaf} {pc_str}")
|
||||
if ifstat["arxc"] and ifstat["atxc"]:
|
||||
print(f" Announces : {ifstat['arxc']}↓ {ifstat['atxc']}↑ total")
|
||||
print(f" {oaf} {pc_str}")
|
||||
else:
|
||||
print(f" Announces : {oaf} {pc_str}")
|
||||
print(f" {iaf} {art_str}{burst_str}")
|
||||
|
||||
rxstat = rxb_str
|
||||
@@ -651,19 +712,87 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None, json=
|
||||
else:
|
||||
lstr = f" {link_count} entr{ms} in link table"
|
||||
|
||||
if active_link_count: lstr = f"{lstr} ({active_link_count} active)"
|
||||
|
||||
if traffic_totals:
|
||||
rxb_str = "↓"+RNS.prettysize(stats["rxb"])
|
||||
txb_str = "↑"+RNS.prettysize(stats["txb"])
|
||||
strdiff = len(rxb_str)-len(txb_str)
|
||||
if strdiff > 0:
|
||||
txb_str += " "*strdiff
|
||||
elif strdiff < 0:
|
||||
rxb_str += " "*-strdiff
|
||||
if strdiff > 0: txb_str += " "*strdiff
|
||||
elif strdiff < 0: rxb_str += " "*-strdiff
|
||||
|
||||
rxstat = rxb_str+" "+RNS.prettyspeed(stats["rxs"])
|
||||
txstat = txb_str+" "+RNS.prettyspeed(stats["txs"])
|
||||
|
||||
if pstats or astats:
|
||||
if "prxs" in stats and "ptxs" in stats and "arxs" in stats and "atxs" in stats:
|
||||
parxs = stats["prxs"]+stats["arxs"]
|
||||
patxs = stats["ptxs"]+stats["atxs"]
|
||||
drxpct = 100.0-min(100.0, (parxs / stats["rxs"])*100.0) if stats["rxs"] else 100.0
|
||||
dtxpct = 100.0-min(100.0, (patxs / stats["txs"])*100.0) if stats["txs"] else 100.0
|
||||
drxs = stats["rxs"]*(drxpct/100.0)
|
||||
dtxs = stats["txs"]*(dtxpct/100.0)
|
||||
|
||||
if stats["rxs"] > 0: rxstat = f"{rxstat}, {int(drxpct)}% data ({RNS.prettyspeed(drxs)})"
|
||||
if stats["txs"] > 0: txstat = f"{txstat}, {int(dtxpct)}% data ({RNS.prettyspeed(dtxs)})"
|
||||
|
||||
print(f"\n Totals : {txstat}\n {rxstat}")
|
||||
|
||||
if pstats:
|
||||
if "prxb" in stats and "ptxb" in stats and "prxs" in stats and "ptxs" in stats:
|
||||
prxb_str = "↓"+RNS.prettysize(stats["prxb"])
|
||||
ptxb_str = "↑"+RNS.prettysize(stats["ptxb"])
|
||||
strdiff = len(prxb_str)-len(ptxb_str)
|
||||
if strdiff > 0: ptxb_str += " "*strdiff
|
||||
elif strdiff < 0: prxb_str += " "*-strdiff
|
||||
|
||||
prxspct = min(100.0, (stats["prxs"] / stats["rxs"])*100.0) if stats["rxs"] and stats["prxs"] else 0.0
|
||||
ptxspct = min(100.0, (stats["ptxs"] / stats["txs"])*100.0) if stats["txs"] and stats["ptxs"] else 0.0
|
||||
|
||||
prxfstr = RNS.prettyfrequency(stats["prxf"])
|
||||
ptxfstr = RNS.prettyfrequency(stats["ptxf"])
|
||||
|
||||
prxstat = prxb_str+" "+RNS.prettyspeed(stats["prxs"])+f", {int(prxspct)}% of flow, {prxfstr}"
|
||||
ptxstat = ptxb_str+" "+RNS.prettyspeed(stats["ptxs"])+f", {int(ptxspct)}% of flow, {ptxfstr}"
|
||||
print(f"\n Path Rqs. : {ptxstat}\n {prxstat}")
|
||||
|
||||
if astats:
|
||||
if "arxb" in stats and "atxb" in stats and "arxs" in stats and "atxs" in stats:
|
||||
arxb_str = "↓"+RNS.prettysize(stats["arxb"])
|
||||
atxb_str = "↑"+RNS.prettysize(stats["atxb"])
|
||||
strdiff = len(arxb_str)-len(atxb_str)
|
||||
if strdiff > 0: atxb_str += " "*strdiff
|
||||
elif strdiff < 0: arxb_str += " "*-strdiff
|
||||
|
||||
arxspct = min(100.0, (stats["arxs"] / stats["rxs"])*100.0) if stats["rxs"] and stats["arxs"] else 0.0
|
||||
atxspct = min(100.0, (stats["atxs"] / stats["txs"])*100.0) if stats["txs"] and stats["atxs"] else 0.0
|
||||
|
||||
arxfstr = RNS.prettyfrequency(stats["arxf"])
|
||||
atxfstr = RNS.prettyfrequency(stats["atxf"])
|
||||
|
||||
arxstat = arxb_str+" "+RNS.prettyspeed(stats["arxs"])+f", {int(arxspct)}% of flow, {arxfstr}"
|
||||
atxstat = atxb_str+" "+RNS.prettyspeed(stats["atxs"])+f", {int(atxspct)}% of flow, {atxfstr}"
|
||||
print(f"\n Announces : {atxstat}\n {arxstat}")
|
||||
|
||||
|
||||
if queue_stats:
|
||||
tqdp = f", {stats['rxqtd']} dropped" if stats['rxqtd'] else ""
|
||||
dqdp = f", {stats['rxqdd']} dropped" if stats['rxqdd'] else ""
|
||||
aqdp = f", {stats['rxqad']} dropped" if stats['rxqad'] else ""
|
||||
pqdp = f", {stats['rxqpd']} dropped" if stats['rxqpd'] else ""
|
||||
ilqdp = f", {stats['rxqild']} dropped" if stats['rxqild'] else ""
|
||||
tqpress = f"{round(stats['tqpressure']*100.0, 1)}% total, {stats['rxqt']} pkts{tqdp}"
|
||||
dqpress = f"{round(stats['dqpressure']*100.0, 1)}% data, {stats['rxqd']} pkts{dqdp}"
|
||||
aqpress = f"{round(stats['aqpressure']*100.0, 1)}% announce, {stats['rxqa']} pkts{aqdp}"
|
||||
pqpress = f"{round(stats['pqpressure']*100.0, 1)}% path request, {stats['rxqp']} pkts{pqdp}"
|
||||
ilpress = f"{round(stats['ilqpressure']*100.0, 1)}% ingress limiter, {stats['rxqil']} pkts{ilqdp}"
|
||||
|
||||
print(f"\n Qu. Pressure : {tqpress}")
|
||||
print(f" {dqpress}")
|
||||
print(f" {aqpress}")
|
||||
print(f" {pqpress}")
|
||||
print(f" {ilpress}")
|
||||
|
||||
if "transport_id" in stats and stats["transport_id"] != None:
|
||||
print("\n Transport Instance "+RNS.prettyhexrep(stats["transport_id"])+" running")
|
||||
if "network_id" in stats and stats["network_id"] != None:
|
||||
@@ -699,8 +828,10 @@ def main(must_exit=True, rns_instance=None):
|
||||
parser.add_argument("-P", "--pr-stats", action="store_true", help="show path request stats", default=False)
|
||||
parser.add_argument("-l", "--link-stats", action="store_true", help="show link stats", default=False)
|
||||
parser.add_argument("-B", "--burst", action="store_true", help="only show interfaces with active bursts", default=False)
|
||||
parser.add_argument("-b", "--blocked-ips", action="store_true", help="show blocked IPs per interface", default=False)
|
||||
parser.add_argument("-t", "--totals", action="store_true", help="display traffic totals", default=False)
|
||||
parser.add_argument("-s", "--sort", action="store", help="sort interfaces by [rate, traffic, rx, tx, rxs, txs, announces, arx, atx, prx, ptx, held]", default=None, type=str)
|
||||
parser.add_argument("-q", "--queues", action="store_true", help="display queue stats", default=False)
|
||||
parser.add_argument("-s", "--sort", action="store", help="sort interfaces by [rate, traffic, rx, tx, rxs, txs, announces, arx, atx, arxc, atxc, held, prx, ptx, prxc, ptxc, pvs, ivs, flt]", default=None, type=str)
|
||||
parser.add_argument("-r", "--reverse", action="store_true", help="reverse sorting", default=False)
|
||||
parser.add_argument("-j", "--json", action="store_true", help="output in JSON format", default=False)
|
||||
parser.add_argument("-R", action="store", metavar="hash", help="transport identity hash of remote instance to get status from", default=None, type=str)
|
||||
@@ -737,7 +868,8 @@ def main(must_exit=True, rns_instance=None):
|
||||
program_setup(configdir = configarg, dispall = args.all, verbosity=args.verbose, name_filter=args.filter, json=args.json,
|
||||
astats=args.announce_stats, pstats=args.pr_stats, lstats=args.link_stats, sorting=args.sort, sort_reverse=args.reverse,
|
||||
remote=args.R, management_identity=args.i, remote_timeout=args.w, must_exit=False, rns_instance=reticulum,
|
||||
traffic_totals=args.totals, discovered_interfaces=args.discovered, config_entries=args.D, burst_filter=args.burst)
|
||||
traffic_totals=args.totals, discovered_interfaces=args.discovered, config_entries=args.D, burst_filter=args.burst,
|
||||
blocked_ips=args.blocked_ips, queue_stats=args.queues)
|
||||
|
||||
finally:
|
||||
sys.stdout = old_stdout
|
||||
@@ -754,7 +886,8 @@ def main(must_exit=True, rns_instance=None):
|
||||
program_setup(configdir = configarg, dispall = args.all, verbosity=args.verbose, name_filter=args.filter, json=args.json,
|
||||
astats=args.announce_stats, pstats=args.pr_stats, lstats=args.link_stats, sorting=args.sort, sort_reverse=args.reverse,
|
||||
remote=args.R, management_identity=args.i, remote_timeout=args.w, must_exit=must_exit, rns_instance=rns_instance,
|
||||
traffic_totals=args.totals, discovered_interfaces=args.discovered, config_entries=args.D, burst_filter=args.burst)
|
||||
traffic_totals=args.totals, discovered_interfaces=args.discovered, config_entries=args.D, burst_filter=args.burst,
|
||||
blocked_ips=args.blocked_ips, queue_stats=args.queues)
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("")
|
||||
|
||||
@@ -347,7 +347,7 @@ def execute(configdir, identitypath = None, verbosity = 0, quietness = 0, detail
|
||||
|
||||
if not RNS.Transport.has_path(destination_hash):
|
||||
RNS.Transport.request_path(destination_hash)
|
||||
if not spin(until=lambda: RNS.Transport.has_path(destination_hash), msg="Path to "+RNS.prettyhexrep(destination_hash)+" requested", timeout=timeout):
|
||||
if not spin(until=lambda: RNS.Transport.has_path(destination_hash), msg="Path to "+RNS.prettyhexrep(destination_hash)+" requested", timeout=max(timeout, reticulum.get_medium_path_timeout())):
|
||||
print("Path not found")
|
||||
exit(242)
|
||||
|
||||
@@ -365,7 +365,7 @@ def execute(configdir, identitypath = None, verbosity = 0, quietness = 0, detail
|
||||
link = RNS.Link(listener_destination)
|
||||
link.did_identify = False
|
||||
|
||||
if not spin(until=lambda: link.status == RNS.Link.ACTIVE, msg="Establishing link with "+RNS.prettyhexrep(destination_hash), timeout=timeout):
|
||||
if not spin(until=lambda: link.status == RNS.Link.ACTIVE, msg="Establishing link with "+RNS.prettyhexrep(destination_hash), timeout=max(timeout, link.establishment_timeout)):
|
||||
print("Could not establish link with "+RNS.prettyhexrep(destination_hash))
|
||||
exit(243)
|
||||
|
||||
|
||||
+1
-1
@@ -1 +1 @@
|
||||
__version__ = "1.4.2"
|
||||
__version__ = "1.5.0"
|
||||
@@ -1,4 +1,4 @@
|
||||
# Sphinx build info version 1
|
||||
# This file records the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||
config: 4e2f0f7390586c35b5c4b57cd1fc8b5b
|
||||
config: e9bf292f6fd8e17bc5dda6fda8e6c07e
|
||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||
@@ -998,6 +998,9 @@ When ``discoverable`` is enabled, a variety of additional options become availab
|
||||
``discovery_name``
|
||||
A human-readable name for the interface. This name will be displayed to users on remote systems when they list discovered interfaces. If not specified, the interface name (the section header) will be used.
|
||||
|
||||
``discovery_lxmf_address``
|
||||
An optional LXMF address for contacting the operator of this interface. The address will be displayed to users on remote systems when they view details for discovered interfaces. Useful for getting in touch with other operators to interconnect networks with and coordinating network coverage.
|
||||
|
||||
``announce_interval``
|
||||
The interval in minutes between successive discovery announces for this interface. Default is 360 minutes (6 hours). For stable, long-running infrastructure, higher intervals (12 to 22 hours) are usually sufficient and reduce network load. Minimum allowed value is 5 minutes (but expect to have your announces throttled if using intervals below one hour).
|
||||
|
||||
@@ -1567,4 +1570,34 @@ but all the parameters are exposed for configuration if needed.
|
||||
|
||||
All of the above settings can be configured both as instance-wide defaults
|
||||
under the ``[reticulum]`` section of the configuration file, or on a per-
|
||||
interface basis under the relevant interface configuration section.
|
||||
interface basis under the relevant interface configuration section.
|
||||
|
||||
|
||||
Tuning Ingress Queues
|
||||
=====================
|
||||
|
||||
Reticulum uses separate, prioritized queues for processing inbound packets. The default four queues are drained in the following order:
|
||||
|
||||
1. Data and general traffic
|
||||
|
||||
2. Announces
|
||||
|
||||
3. Path requests
|
||||
|
||||
4. Ingress-limited traffic
|
||||
|
||||
You can tune the queue sizes from the defaults, for example if you're running a setup where you want to simply drop most traffic from ingress-limited interfaces. The queue sizes are configured in the ``[reticulum]`` section of the config
|
||||
|
||||
* | The ``qlen_in_data`` option sets the maximum size of the data
|
||||
queue. Defaults to ``4096``.
|
||||
|
||||
* | The ``qlen_in_announce`` option sets the maximum size of the announce
|
||||
queue. Defaults to ``256``.
|
||||
|
||||
* | The ``qlen_in_pr`` option sets the maximum size of the path request
|
||||
queue. Defaults to ``256``.
|
||||
|
||||
* | The ``qlen_in_il`` option sets the maximum size of the ingress limiter
|
||||
queue. Defaults to ``128``.
|
||||
|
||||
If an inbound packet arrives and its target queue is full, the packet is dropped. Reticulum will always completely drain higher-priority queues before starting to drain a lower-priority one. As an example, the ingress limiter queue will only start draining once all other queues are empty.
|
||||
@@ -337,8 +337,8 @@ Filter output to only show some interfaces:
|
||||
|
||||
.. code:: text
|
||||
|
||||
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A]
|
||||
[-l] [-t] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A] [-P] [-l]
|
||||
[-B] [-b] [-t] [-q] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
[-w seconds] [-d] [-D] [-m] [-I seconds] [-v] [filter]
|
||||
|
||||
Reticulum Network Stack Status
|
||||
@@ -352,10 +352,14 @@ Filter output to only show some interfaces:
|
||||
--version show program's version number and exit
|
||||
-a, --all show all interfaces
|
||||
-A, --announce-stats show announce stats
|
||||
-P, --pr-stats show path request stats
|
||||
-l, --link-stats show link stats
|
||||
-B, --burst only show interfaces with active bursts
|
||||
-b, --blocked-ips show blocked IPs per interface
|
||||
-t, --totals display traffic totals
|
||||
-q, --queues display queue stats
|
||||
-s, --sort SORT sort interfaces by [rate, traffic, rx, tx, rxs, txs,
|
||||
announces, arx, atx, held]
|
||||
announces, arx, atx, prx, ptx, held]
|
||||
-r, --reverse reverse sorting
|
||||
-j, --json output in JSON format
|
||||
-R hash transport identity hash of remote instance to get status from
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
const DOCUMENTATION_OPTIONS = {
|
||||
VERSION: '1.4.2',
|
||||
VERSION: '1.5.0',
|
||||
LANGUAGE: 'en',
|
||||
COLLAPSE_INDEX: false,
|
||||
BUILDER: 'html',
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Distributed Development - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Distributed Development - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -431,7 +431,7 @@
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Code Examples - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Code Examples - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -3648,7 +3648,7 @@
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>An Explanation of Reticulum for Human Beings - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>An Explanation of Reticulum for Human Beings - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -296,7 +296,7 @@
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="#"><link rel="search" title="Search" href="search.html">
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 --><title>Index - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 --><title>Index - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -178,7 +178,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -202,7 +202,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -365,10 +365,12 @@
|
||||
<li><a href="reference.html#RNS.Identity.decrypt">(RNS.Identity method)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="reference.html#RNS.Transport.deregister_announce_handler">deregister_announce_handler() (RNS.Transport static method)</a>
|
||||
<li><a href="reference.html#RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT">DEFAULT_PER_HOP_TIMEOUT (RNS.Reticulum attribute)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="reference.html#RNS.Transport.deregister_announce_handler">deregister_announce_handler() (RNS.Transport static method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Destination.deregister_request_handler">deregister_request_handler() (RNS.Destination method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Destination">Destination (class in RNS)</a>
|
||||
@@ -434,12 +436,18 @@
|
||||
<li><a href="reference.html#RNS.Link.get_establishment_rate">get_establishment_rate() (RNS.Link method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Link.get_expected_rate">get_expected_rate() (RNS.Link method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Reticulum.get_first_hop_timeout">get_first_hop_timeout() (RNS.Reticulum method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Resource.get_hash">get_hash() (RNS.Resource method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Reticulum.get_instance">get_instance() (RNS.Reticulum static method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Reticulum.get_lowest_interface_bitrate">get_lowest_interface_bitrate() (RNS.Reticulum method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Link.get_mdu">get_mdu() (RNS.Link method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Reticulum.get_medium_path_timeout">get_medium_path_timeout() (RNS.Reticulum method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Link.get_mode">get_mode() (RNS.Link method)</a>
|
||||
</li>
|
||||
@@ -459,10 +467,10 @@
|
||||
<li><a href="reference.html#RNS.Resource.get_progress">(RNS.Resource method)</a>
|
||||
</li>
|
||||
</ul></li>
|
||||
<li><a href="reference.html#RNS.Identity.get_public_key">get_public_key() (RNS.Identity method)</a>
|
||||
</li>
|
||||
</ul></td>
|
||||
<td style="width: 33%; vertical-align: top;"><ul>
|
||||
<li><a href="reference.html#RNS.Identity.get_public_key">get_public_key() (RNS.Identity method)</a>
|
||||
</li>
|
||||
<li><a href="reference.html#RNS.Link.get_q">get_q() (RNS.Link method)</a>
|
||||
|
||||
<ul>
|
||||
@@ -848,7 +856,7 @@
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Getting Started Fast - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Getting Started Fast - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -776,7 +776,7 @@ section of this manual.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Git Over Reticulum - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Git Over Reticulum - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -1594,7 +1594,7 @@ done
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Communications Hardware - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Communications Hardware - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -676,7 +676,7 @@ can be used with Reticulum. This includes virtual software modems such as
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="#"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="#"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -512,6 +512,7 @@ to participate in the development of Reticulum itself.</p>
|
||||
<li class="toctree-l2"><a class="reference internal" href="interfaces.html#announce-rate-control">Announce Rate Control</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="interfaces.html#new-destination-rate-limiting">New Destination Rate Limiting</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="interfaces.html#path-request-burst-control">Path Request Burst Control</a></li>
|
||||
<li class="toctree-l2"><a class="reference internal" href="interfaces.html#tuning-ingress-queues">Tuning Ingress Queues</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a><ul>
|
||||
@@ -720,7 +721,7 @@ to participate in the development of Reticulum itself.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Configuring Interfaces - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Configuring Interfaces - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -1151,6 +1151,8 @@ relevant regulation for your location, and to make decisions accordingly.</p>
|
||||
<dl class="simple">
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">discovery_name</span></code></dt><dd><p>A human-readable name for the interface. This name will be displayed to users on remote systems when they list discovered interfaces. If not specified, the interface name (the section header) will be used.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">discovery_lxmf_address</span></code></dt><dd><p>An optional LXMF address for contacting the operator of this interface. The address will be displayed to users on remote systems when they view details for discovered interfaces. Useful for getting in touch with other operators to interconnect networks with and coordinating network coverage.</p>
|
||||
</dd>
|
||||
<dt><code class="docutils literal notranslate"><span class="pre">announce_interval</span></code></dt><dd><p>The interval in minutes between successive discovery announces for this interface. Default is 360 minutes (6 hours). For stable, long-running infrastructure, higher intervals (12 to 22 hours) are usually sufficient and reduce network load. Minimum allowed value is 5 minutes (but expect to have your announces throttled if using intervals below one hour).</p>
|
||||
</dd>
|
||||
</dl>
|
||||
@@ -1768,6 +1770,44 @@ per second on a given interface.</div>
|
||||
under the <code class="docutils literal notranslate"><span class="pre">[reticulum]</span></code> section of the configuration file, or on a per-
|
||||
interface basis under the relevant interface configuration section.</p>
|
||||
</section>
|
||||
<section id="tuning-ingress-queues">
|
||||
<h2>Tuning Ingress Queues<a class="headerlink" href="#tuning-ingress-queues" title="Link to this heading">¶</a></h2>
|
||||
<p>Reticulum uses separate, prioritized queues for processing inbound packets. The default four queues are drained in the following order:</p>
|
||||
<blockquote>
|
||||
<div><ol class="arabic simple">
|
||||
<li><p>Data and general traffic</p></li>
|
||||
<li><p>Announces</p></li>
|
||||
<li><p>Path requests</p></li>
|
||||
<li><p>Ingress-limited traffic</p></li>
|
||||
</ol>
|
||||
</div></blockquote>
|
||||
<p>You can tune the queue sizes from the defaults, for example if you’re running a setup where you want to simply drop most traffic from ingress-limited interfaces. The queue sizes are configured in the <code class="docutils literal notranslate"><span class="pre">[reticulum]</span></code> section of the config</p>
|
||||
<blockquote>
|
||||
<div><ul>
|
||||
<li><div class="line-block">
|
||||
<div class="line">The <code class="docutils literal notranslate"><span class="pre">qlen_in_data</span></code> option sets the maximum size of the data
|
||||
queue. Defaults to <code class="docutils literal notranslate"><span class="pre">4096</span></code>.</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><div class="line-block">
|
||||
<div class="line">The <code class="docutils literal notranslate"><span class="pre">qlen_in_announce</span></code> option sets the maximum size of the announce
|
||||
queue. Defaults to <code class="docutils literal notranslate"><span class="pre">256</span></code>.</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><div class="line-block">
|
||||
<div class="line">The <code class="docutils literal notranslate"><span class="pre">qlen_in_pr</span></code> option sets the maximum size of the path request
|
||||
queue. Defaults to <code class="docutils literal notranslate"><span class="pre">256</span></code>.</div>
|
||||
</div>
|
||||
</li>
|
||||
<li><div class="line-block">
|
||||
<div class="line">The <code class="docutils literal notranslate"><span class="pre">qlen_in_il</span></code> option sets the maximum size of the ingress limiter
|
||||
queue. Defaults to <code class="docutils literal notranslate"><span class="pre">128</span></code>.</div>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div></blockquote>
|
||||
<p>If an inbound packet arrives and its target queue is full, the packet is dropped. Reticulum will always completely drain higher-priority queues before starting to drain a lower-priority one. As an example, the ingress limiter queue will only start draining once all other queues are empty.</p>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</article>
|
||||
@@ -1856,6 +1896,7 @@ interface basis under the relevant interface configuration section.</p>
|
||||
<li><a class="reference internal" href="#announce-rate-control">Announce Rate Control</a></li>
|
||||
<li><a class="reference internal" href="#new-destination-rate-limiting">New Destination Rate Limiting</a></li>
|
||||
<li><a class="reference internal" href="#path-request-burst-control">Path Request Burst Control</a></li>
|
||||
<li><a class="reference internal" href="#tuning-ingress-queues">Tuning Ingress Queues</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -1867,7 +1908,7 @@ interface basis under the relevant interface configuration section.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Reticulum License - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Reticulum License - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -345,7 +345,7 @@ SOFTWARE.
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Building Networks - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Building Networks - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -664,7 +664,7 @@ differently than a mobile device roaming between radio cells.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
Binary file not shown.
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>API Reference - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>API Reference - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -335,10 +335,59 @@ alterations should be made on a per-interface basis instead.</p>
|
||||
to successfully establish links. Currently 5 bits per second.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py attribute">
|
||||
<dt class="sig sig-object py" id="RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT">
|
||||
<span class="sig-name descname"><span class="pre">DEFAULT_PER_HOP_TIMEOUT</span></span><em class="property"><span class="w"> </span><span class="p"><span class="pre">=</span></span><span class="w"> </span><span class="pre">6</span></em><a class="headerlink" href="#RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>The default per-hop timeout value used in various timeout calculations.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="RNS.Reticulum.get_instance">
|
||||
<em class="property"><span class="k"><span class="pre">static</span></span><span class="w"> </span></em><span class="sig-name descname"><span class="pre">get_instance</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Reticulum.get_instance" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Return the currently running Reticulum instance</p>
|
||||
<dd><p>Returns the currently running Reticulum instance.</p>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="RNS.Reticulum.get_first_hop_timeout">
|
||||
<span class="sig-name descname"><span class="pre">get_first_hop_timeout</span></span><span class="sig-paren">(</span><em class="sig-param"><span class="n"><span class="pre">destination</span></span></em><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Reticulum.get_first_hop_timeout" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns a best-effort estimate of a reasonable minimum
|
||||
<em>first-hop</em> timeout value for a given destination hash.
|
||||
If a path is known, this calculation takes the next-hop
|
||||
interface’s bitrate into account. If no path is currently
|
||||
known, returns <code class="docutils literal notranslate"><span class="pre">DEFAULT_PER_HOP_TIMEOUT</span></code>.</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Parameters<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p><strong>destination</strong> – A destination hash, as <em>bytes</em>.</p>
|
||||
</dd>
|
||||
<dt class="field-even">Returns<span class="colon">:</span></dt>
|
||||
<dd class="field-even"><p>First-hop timeout, in seconds.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="RNS.Reticulum.get_lowest_interface_bitrate">
|
||||
<span class="sig-name descname"><span class="pre">get_lowest_interface_bitrate</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Reticulum.get_lowest_interface_bitrate" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns the bitrate of the slowest currently online
|
||||
interface, or None if no online interface bitrate</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p>Lowest online interface bitrate in bits per second, or <code class="docutils literal notranslate"><span class="pre">None</span></code>.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
<dt class="sig sig-object py" id="RNS.Reticulum.get_medium_path_timeout">
|
||||
<span class="sig-name descname"><span class="pre">get_medium_path_timeout</span></span><span class="sig-paren">(</span><span class="sig-paren">)</span><a class="headerlink" href="#RNS.Reticulum.get_medium_path_timeout" title="Link to this definition">¶</a></dt>
|
||||
<dd><p>Returns an estimate of a reasonable minimum path request timeout covering
|
||||
a full round trip for an MTU on the slowest currently online interface
|
||||
plus per hop grace</p>
|
||||
<dl class="field-list simple">
|
||||
<dt class="field-odd">Returns<span class="colon">:</span></dt>
|
||||
<dd class="field-odd"><p>Timeout in seconds or 0 if it’s unknown.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
</dd></dl>
|
||||
|
||||
<dl class="py method">
|
||||
@@ -2337,7 +2386,11 @@ will announce it.</p>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.LINK_MTU_DISCOVERY"><code class="docutils literal notranslate"><span class="pre">LINK_MTU_DISCOVERY</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.ANNOUNCE_CAP"><code class="docutils literal notranslate"><span class="pre">ANNOUNCE_CAP</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.MINIMUM_BITRATE"><code class="docutils literal notranslate"><span class="pre">MINIMUM_BITRATE</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.DEFAULT_PER_HOP_TIMEOUT"><code class="docutils literal notranslate"><span class="pre">DEFAULT_PER_HOP_TIMEOUT</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.get_instance"><code class="docutils literal notranslate"><span class="pre">get_instance()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.get_first_hop_timeout"><code class="docutils literal notranslate"><span class="pre">get_first_hop_timeout()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.get_lowest_interface_bitrate"><code class="docutils literal notranslate"><span class="pre">get_lowest_interface_bitrate()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.get_medium_path_timeout"><code class="docutils literal notranslate"><span class="pre">get_medium_path_timeout()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.should_use_implicit_proof"><code class="docutils literal notranslate"><span class="pre">should_use_implicit_proof()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.transport_enabled"><code class="docutils literal notranslate"><span class="pre">transport_enabled()</span></code></a></li>
|
||||
<li><a class="reference internal" href="#RNS.Reticulum.link_mtu_discovery"><code class="docutils literal notranslate"><span class="pre">link_mtu_discovery()</span></code></a></li>
|
||||
@@ -2535,7 +2588,7 @@ will announce it.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<meta name="robots" content="noindex" />
|
||||
<title>Search - Reticulum Network Stack 1.4.2 documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<title>Search - Reticulum Network Stack 1.5.0 documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?v=8dab3a3b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="#" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -304,7 +304,7 @@
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -1 +1 @@
|
||||
Search.setIndex({"alltitles":{"A Carrier-Grade Fallacy":[[16,"a-carrier-grade-fallacy"]],"API Reference":[[10,null]],"ARM64":[[3,"arm64"]],"AX.25 KISS Interface":[[7,"ax-25-kiss-interface"]],"Accessing Repository Pages":[[4,"accessing-repository-pages"]],"Adding Radio Interfaces":[[3,"adding-radio-interfaces"]],"An Explanation of Reticulum for Human Beings":[[2,null]],"Anchor In The Flow":[[16,"anchor-in-the-flow"]],"Android":[[3,"android"]],"Announce":[[1,"announce"]],"Announce Propagation Rules":[[13,"announce-propagation-rules"]],"Announce Rate Control":[[7,"announce-rate-control"]],"Announcing Presence":[[16,"announcing-presence"]],"Artifact-Centered Workflows":[[0,"artifact-centered-workflows"]],"Author Identity Binding":[[4,"author-identity-binding"]],"Auto Interface":[[7,"auto-interface"]],"Automated Blocking":[[7,"automated-blocking"]],"Automated List Sourcing":[[14,"automated-list-sourcing"]],"Automatic Mirror Synchronization":[[4,"automatic-mirror-synchronization"]],"Backbone Interface":[[7,"backbone-interface"]],"Blackhole Management":[[14,"blackhole-management"]],"Bootstrapping Connectivity":[[3,"bootstrapping-connectivity"]],"Broadcast":[[1,"broadcast"]],"Buffer":[[1,"buffer"]],"Build Personal Infrastructure":[[3,"build-personal-infrastructure"]],"Building Networks":[[9,null]],"Channel":[[1,"channel"]],"Code Examples":[[1,null]],"Combining Hardware Types":[[5,"combining-hardware-types"]],"Command-Line Interaction":[[4,"command-line-interaction"]],"Commit Signing":[[4,"commit-signing"]],"Common Interface Options":[[7,"common-interface-options"]],"Communications Hardware":[[5,null]],"Composable Primitives":[[0,"composable-primitives"]],"Concepts & Overview":[[9,"concepts-overview"]],"Conceptual Overview":[[13,"conceptual-overview"]],"Configuration":[[4,"configuration"],[4,"id1"]],"Configuration & Data":[[14,"configuration-data"]],"Configuration Example":[[4,"configuration-example"]],"Configuration Methods":[[4,"configuration-methods"]],"Configuring Interfaces":[[7,null]],"Connect to the Distributed Backbone":[[3,"connect-to-the-distributed-backbone"]],"Connecting Remotes":[[7,"connecting-remotes"]],"Connecting Reticulum Instances Over the Internet":[[3,"connecting-reticulum-instances-over-the-internet"]],"Contributing to the Global Ret":[[3,"contributing-to-the-global-ret"]],"Cost Of A Byte":[[16,"cost-of-a-byte"]],"Creating Empty Repositories":[[4,"creating-empty-repositories"]],"Creating RNodes":[[5,"creating-rnodes"]],"Creating Signed Releases":[[4,"creating-signed-releases"]],"Creating a Network With Reticulum":[[3,"creating-a-network-with-reticulum"]],"Creating and Using Custom Interfaces":[[3,"creating-and-using-custom-interfaces"]],"Creating and Using a Network Identity":[[13,"creating-and-using-a-network-identity"]],"Creator Permissions":[[4,"creator-permissions"]],"Cryptographic Attribution":[[4,"cryptographic-attribution"]],"Cryptographic Primitives":[[13,"cryptographic-primitives"]],"Current Status":[[15,"current-status"]],"Current Usage":[[13,"current-usage"]],"Custom Interfaces":[[1,"custom-interfaces"],[7,"custom-interfaces"]],"Customizing Templates":[[4,"customizing-templates"]],"Death To The Address":[[16,"death-to-the-address"]],"Debian Bookworm":[[3,"debian-bookworm"]],"Decentralization Or Uncentralizability?":[[16,"decentralization-or-uncentralizability"]],"Design Patterns For Post-IP Systems":[[16,"design-patterns-for-post-ip-systems"]],"Destination Naming":[[13,"destination-naming"]],"Destinations":[[13,"destinations"]],"Destinations, Not Addresses":[[9,"destinations-not-addresses"]],"Develop a Program with Reticulum":[[3,"develop-a-program-with-reticulum"]],"Discoverable Interfaces":[[7,"discoverable-interfaces"]],"Discovering Interfaces":[[14,"discovering-interfaces"]],"Discovery Parameters":[[7,"discovery-parameters"]],"Distributed Development":[[0,null]],"Distribution Without Intermediaries":[[0,"distribution-without-intermediaries"]],"Donations":[[12,"donations"]],"Echo":[[1,"echo"]],"Emergent Patterns":[[16,"emergent-patterns"]],"Enabling Discovery":[[7,"enabling-discovery"]],"Enabling the Git Page Node":[[4,"enabling-the-git-page-node"]],"Encryption Is Not A Feature":[[16,"encryption-is-not-a-feature"]],"Ethernet-based Hardware":[[5,"ethernet-based-hardware"]],"Ethics Of The Tool":[[16,"ethics-of-the-tool"]],"Example Configuration":[[7,"example-configuration"]],"Fabric Of The Independent":[[16,"fabric-of-the-independent"]],"Fallacy Of The Cloud":[[16,"fallacy-of-the-cloud"]],"Filetransfer":[[1,"filetransfer"]],"Finding Your Way":[[3,"finding-your-way"]],"Fixed Serial Port Names":[[14,"fixed-serial-port-names"]],"Flow & Time":[[16,"flow-time"]],"Forking Repositories":[[4,"forking-repositories"]],"Formatting & Syntax Highlighting":[[4,"formatting-syntax-highlighting"]],"Future Implications":[[13,"future-implications"]],"Getting Further":[[13,"getting-further"]],"Getting Started Fast":[[3,null]],"Git Configuration Parameters":[[4,"git-configuration-parameters"]],"Git OveLine truncated
|
||||
Search.setIndex({"alltitles":{"A Carrier-Grade Fallacy":[[16,"a-carrier-grade-fallacy"]],"API Reference":[[10,null]],"ARM64":[[3,"arm64"]],"AX.25 KISS Interface":[[7,"ax-25-kiss-interface"]],"Accessing Repository Pages":[[4,"accessing-repository-pages"]],"Adding Radio Interfaces":[[3,"adding-radio-interfaces"]],"An Explanation of Reticulum for Human Beings":[[2,null]],"Anchor In The Flow":[[16,"anchor-in-the-flow"]],"Android":[[3,"android"]],"Announce":[[1,"announce"]],"Announce Propagation Rules":[[13,"announce-propagation-rules"]],"Announce Rate Control":[[7,"announce-rate-control"]],"Announcing Presence":[[16,"announcing-presence"]],"Artifact-Centered Workflows":[[0,"artifact-centered-workflows"]],"Author Identity Binding":[[4,"author-identity-binding"]],"Auto Interface":[[7,"auto-interface"]],"Automated Blocking":[[7,"automated-blocking"]],"Automated List Sourcing":[[14,"automated-list-sourcing"]],"Automatic Mirror Synchronization":[[4,"automatic-mirror-synchronization"]],"Backbone Interface":[[7,"backbone-interface"]],"Blackhole Management":[[14,"blackhole-management"]],"Bootstrapping Connectivity":[[3,"bootstrapping-connectivity"]],"Broadcast":[[1,"broadcast"]],"Buffer":[[1,"buffer"]],"Build Personal Infrastructure":[[3,"build-personal-infrastructure"]],"Building Networks":[[9,null]],"Channel":[[1,"channel"]],"Code Examples":[[1,null]],"Combining Hardware Types":[[5,"combining-hardware-types"]],"Command-Line Interaction":[[4,"command-line-interaction"]],"Commit Signing":[[4,"commit-signing"]],"Common Interface Options":[[7,"common-interface-options"]],"Communications Hardware":[[5,null]],"Composable Primitives":[[0,"composable-primitives"]],"Concepts & Overview":[[9,"concepts-overview"]],"Conceptual Overview":[[13,"conceptual-overview"]],"Configuration":[[4,"configuration"],[4,"id1"]],"Configuration & Data":[[14,"configuration-data"]],"Configuration Example":[[4,"configuration-example"]],"Configuration Methods":[[4,"configuration-methods"]],"Configuring Interfaces":[[7,null]],"Connect to the Distributed Backbone":[[3,"connect-to-the-distributed-backbone"]],"Connecting Remotes":[[7,"connecting-remotes"]],"Connecting Reticulum Instances Over the Internet":[[3,"connecting-reticulum-instances-over-the-internet"]],"Contributing to the Global Ret":[[3,"contributing-to-the-global-ret"]],"Cost Of A Byte":[[16,"cost-of-a-byte"]],"Creating Empty Repositories":[[4,"creating-empty-repositories"]],"Creating RNodes":[[5,"creating-rnodes"]],"Creating Signed Releases":[[4,"creating-signed-releases"]],"Creating a Network With Reticulum":[[3,"creating-a-network-with-reticulum"]],"Creating and Using Custom Interfaces":[[3,"creating-and-using-custom-interfaces"]],"Creating and Using a Network Identity":[[13,"creating-and-using-a-network-identity"]],"Creator Permissions":[[4,"creator-permissions"]],"Cryptographic Attribution":[[4,"cryptographic-attribution"]],"Cryptographic Primitives":[[13,"cryptographic-primitives"]],"Current Status":[[15,"current-status"]],"Current Usage":[[13,"current-usage"]],"Custom Interfaces":[[1,"custom-interfaces"],[7,"custom-interfaces"]],"Customizing Templates":[[4,"customizing-templates"]],"Death To The Address":[[16,"death-to-the-address"]],"Debian Bookworm":[[3,"debian-bookworm"]],"Decentralization Or Uncentralizability?":[[16,"decentralization-or-uncentralizability"]],"Design Patterns For Post-IP Systems":[[16,"design-patterns-for-post-ip-systems"]],"Destination Naming":[[13,"destination-naming"]],"Destinations":[[13,"destinations"]],"Destinations, Not Addresses":[[9,"destinations-not-addresses"]],"Develop a Program with Reticulum":[[3,"develop-a-program-with-reticulum"]],"Discoverable Interfaces":[[7,"discoverable-interfaces"]],"Discovering Interfaces":[[14,"discovering-interfaces"]],"Discovery Parameters":[[7,"discovery-parameters"]],"Distributed Development":[[0,null]],"Distribution Without Intermediaries":[[0,"distribution-without-intermediaries"]],"Donations":[[12,"donations"]],"Echo":[[1,"echo"]],"Emergent Patterns":[[16,"emergent-patterns"]],"Enabling Discovery":[[7,"enabling-discovery"]],"Enabling the Git Page Node":[[4,"enabling-the-git-page-node"]],"Encryption Is Not A Feature":[[16,"encryption-is-not-a-feature"]],"Ethernet-based Hardware":[[5,"ethernet-based-hardware"]],"Ethics Of The Tool":[[16,"ethics-of-the-tool"]],"Example Configuration":[[7,"example-configuration"]],"Fabric Of The Independent":[[16,"fabric-of-the-independent"]],"Fallacy Of The Cloud":[[16,"fallacy-of-the-cloud"]],"Filetransfer":[[1,"filetransfer"]],"Finding Your Way":[[3,"finding-your-way"]],"Fixed Serial Port Names":[[14,"fixed-serial-port-names"]],"Flow & Time":[[16,"flow-time"]],"Forking Repositories":[[4,"forking-repositories"]],"Formatting & Syntax Highlighting":[[4,"formatting-syntax-highlighting"]],"Future Implications":[[13,"future-implications"]],"Getting Further":[[13,"getting-further"]],"Getting Started Fast":[[3,null]],"Git Configuration Parameters":[[4,"git-configuration-parameters"]],"Git OveLine truncated
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Programs Using Reticulum - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Programs Using Reticulum - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -513,7 +513,7 @@ plugin system for expandability.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Support Reticulum - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Support Reticulum - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -383,7 +383,7 @@ circumstances, so we rely on old-fashioned human feedback.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Understanding Reticulum - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Understanding Reticulum - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -1119,7 +1119,7 @@ those risks are acceptable to you.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
+11
-7
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Using Reticulum on Your System - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Using Reticulum on Your System - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -558,8 +558,8 @@ Reticulum Transport Instance <5245a8efe1788c6a1cd36144a270e13b> running
|
||||
</pre></div>
|
||||
</div>
|
||||
<p><strong>All Command-Line Options</strong></p>
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A]
|
||||
[-l] [-t] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A] [-P] [-l]
|
||||
[-B] [-b] [-t] [-q] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
[-w seconds] [-d] [-D] [-m] [-I seconds] [-v] [filter]
|
||||
|
||||
Reticulum Network Stack Status
|
||||
@@ -573,10 +573,14 @@ options:
|
||||
--version show program's version number and exit
|
||||
-a, --all show all interfaces
|
||||
-A, --announce-stats show announce stats
|
||||
-P, --pr-stats show path request stats
|
||||
-l, --link-stats show link stats
|
||||
-B, --burst only show interfaces with active bursts
|
||||
-b, --blocked-ips show blocked IPs per interface
|
||||
-t, --totals display traffic totals
|
||||
-q, --queues display queue stats
|
||||
-s, --sort SORT sort interfaces by [rate, traffic, rx, tx, rxs, txs,
|
||||
announces, arx, atx, held]
|
||||
announces, arx, atx, prx, ptx, held]
|
||||
-r, --reverse reverse sorting
|
||||
-j, --json output in JSON format
|
||||
-R hash transport identity hash of remote instance to get status from
|
||||
@@ -1640,7 +1644,7 @@ systemctl --user enable rnsd.service
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>What is Reticulum? - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>What is Reticulum? - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -505,7 +505,7 @@ network, and vice versa.</p>
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
<link rel="prefetch" href="_static/rns_logo_512.png" as="image">
|
||||
|
||||
<!-- Generated with Sphinx 8.2.3 and Furo 2025.09.25.dev1 -->
|
||||
<title>Zen of Reticulum - Reticulum Network Stack 1.4.2 documentation</title>
|
||||
<title>Zen of Reticulum - Reticulum Network Stack 1.5.0 documentation</title>
|
||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css?v=d111a655" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?v=580074bf" />
|
||||
<link rel="stylesheet" type="text/css" href="_static/copybutton.css?v=76b2166b" />
|
||||
@@ -180,7 +180,7 @@
|
||||
</label>
|
||||
</div>
|
||||
<div class="header-center">
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.4.2 documentation</div></a>
|
||||
<a href="index.html"><div class="brand">Reticulum Network Stack 1.5.0 documentation</div></a>
|
||||
</div>
|
||||
<div class="header-right">
|
||||
<div class="theme-toggle-container theme-toggle-header">
|
||||
@@ -204,7 +204,7 @@
|
||||
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||
</div>
|
||||
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.4.2 documentation</span>
|
||||
<span class="sidebar-brand-text">Reticulum Network Stack 1.5.0 documentation</span>
|
||||
|
||||
</a><form class="sidebar-search-container" method="get" action="search.html" role="search">
|
||||
<input class="sidebar-search" placeholder="Search" name="q" aria-label="Search">
|
||||
@@ -677,7 +677,7 @@ Imagine a messaging app. You write it once. It works on a laptop connected to fi
|
||||
|
||||
</aside>
|
||||
</div>
|
||||
</div><script src="_static/documentation_options.js?v=02f2166e"></script>
|
||||
</div><script src="_static/documentation_options.js?v=e0a75244"></script>
|
||||
<script src="_static/doctools.js?v=9bcbadda"></script>
|
||||
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
|
||||
<script src="_static/scripts/furo.js?v=46bd48cc"></script>
|
||||
|
||||
@@ -183,6 +183,7 @@ to participate in the development of Reticulum itself.
|
||||
* [Announce Rate Control](interfaces.md#announce-rate-control)
|
||||
* [New Destination Rate Limiting](interfaces.md#new-destination-rate-limiting)
|
||||
* [Path Request Burst Control](interfaces.md#path-request-burst-control)
|
||||
* [Tuning Ingress Queues](interfaces.md#tuning-ingress-queues)
|
||||
* [Building Networks](networks.md)
|
||||
* [Concepts & Overview](networks.md#concepts-overview)
|
||||
* [Introductory Considerations](networks.md#introductory-considerations)
|
||||
|
||||
@@ -939,6 +939,9 @@ When `discoverable` is enabled, a variety of additional options become available
|
||||
`discovery_name`
|
||||
: A human-readable name for the interface. This name will be displayed to users on remote systems when they list discovered interfaces. If not specified, the interface name (the section header) will be used.
|
||||
|
||||
`discovery_lxmf_address`
|
||||
: An optional LXMF address for contacting the operator of this interface. The address will be displayed to users on remote systems when they view details for discovered interfaces. Useful for getting in touch with other operators to interconnect networks with and coordinating network coverage.
|
||||
|
||||
`announce_interval`
|
||||
: The interval in minutes between successive discovery announces for this interface. Default is 360 minutes (6 hours). For stable, long-running infrastructure, higher intervals (12 to 22 hours) are usually sufficient and reduce network load. Minimum allowed value is 5 minutes (but expect to have your announces throttled if using intervals below one hour).
|
||||
|
||||
@@ -1484,4 +1487,30 @@ but all the parameters are exposed for configuration if needed.
|
||||
|
||||
All of the above settings can be configured both as instance-wide defaults
|
||||
under the `[reticulum]` section of the configuration file, or on a per-
|
||||
interface basis under the relevant interface configuration section.
|
||||
interface basis under the relevant interface configuration section.
|
||||
|
||||
## Tuning Ingress Queues
|
||||
|
||||
Reticulum uses separate, prioritized queues for processing inbound packets. The default four queues are drained in the following order:
|
||||
|
||||
> 1. Data and general traffic
|
||||
> 2. Announces
|
||||
> 3. Path requests
|
||||
> 4. Ingress-limited traffic
|
||||
|
||||
You can tune the queue sizes from the defaults, for example if you’re running a setup where you want to simply drop most traffic from ingress-limited interfaces. The queue sizes are configured in the `[reticulum]` section of the config
|
||||
|
||||
> * The `qlen_in_data` option sets the maximum size of the data
|
||||
> queue. Defaults to `4096`.
|
||||
>
|
||||
> * The `qlen_in_announce` option sets the maximum size of the announce
|
||||
> queue. Defaults to `256`.
|
||||
>
|
||||
> * The `qlen_in_pr` option sets the maximum size of the path request
|
||||
> queue. Defaults to `256`.
|
||||
>
|
||||
> * The `qlen_in_il` option sets the maximum size of the ingress limiter
|
||||
> queue. Defaults to `128`.
|
||||
>
|
||||
|
||||
If an inbound packet arrives and its target queue is full, the packet is dropped. Reticulum will always completely drain higher-priority queues before starting to drain a lower-priority one. As an example, the ingress limiter queue will only start draining once all other queues are empty.
|
||||
@@ -69,9 +69,44 @@ alterations should be made on a per-interface basis instead.
|
||||
Minimum bitrate required across a medium for Reticulum to be able
|
||||
to successfully establish links. Currently 5 bits per second.
|
||||
|
||||
#### `DEFAULT_PER_HOP_TIMEOUT = 6`
|
||||
|
||||
The default per-hop timeout value used in various timeout calculations.
|
||||
|
||||
#### `static get_instance()`
|
||||
|
||||
Return the currently running Reticulum instance
|
||||
Returns the currently running Reticulum instance.
|
||||
|
||||
#### `get_first_hop_timeout(destination)`
|
||||
|
||||
Returns a best-effort estimate of a reasonable minimum
|
||||
*first-hop* timeout value for a given destination hash.
|
||||
If a path is known, this calculation takes the next-hop
|
||||
interface’s bitrate into account. If no path is currently
|
||||
known, returns `DEFAULT_PER_HOP_TIMEOUT`.
|
||||
|
||||
* **Parameters:**
|
||||
**destination** – A destination hash, as *bytes*.
|
||||
|
||||
* **Returns:**
|
||||
First-hop timeout, in seconds.
|
||||
|
||||
#### `get_lowest_interface_bitrate()`
|
||||
|
||||
Returns the bitrate of the slowest currently online
|
||||
interface, or None if no online interface bitrate
|
||||
|
||||
* **Returns:**
|
||||
Lowest online interface bitrate in bits per second, or `None`.
|
||||
|
||||
#### `get_medium_path_timeout()`
|
||||
|
||||
Returns an estimate of a reasonable minimum path request timeout covering
|
||||
a full round trip for an MTU on the slowest currently online interface
|
||||
plus per hop grace
|
||||
|
||||
* **Returns:**
|
||||
Timeout in seconds or 0 if it’s unknown.
|
||||
|
||||
#### `static should_use_implicit_proof()`
|
||||
|
||||
|
||||
@@ -318,8 +318,8 @@ Reticulum Transport Instance <5245a8efe1788c6a1cd36144a270e13b> running
|
||||
**All Command-Line Options**
|
||||
|
||||
```text
|
||||
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A]
|
||||
[-l] [-t] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A] [-P] [-l]
|
||||
[-B] [-b] [-t] [-q] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
[-w seconds] [-d] [-D] [-m] [-I seconds] [-v] [filter]
|
||||
|
||||
Reticulum Network Stack Status
|
||||
@@ -333,10 +333,14 @@ options:
|
||||
--version show program's version number and exit
|
||||
-a, --all show all interfaces
|
||||
-A, --announce-stats show announce stats
|
||||
-P, --pr-stats show path request stats
|
||||
-l, --link-stats show link stats
|
||||
-B, --burst only show interfaces with active bursts
|
||||
-b, --blocked-ips show blocked IPs per interface
|
||||
-t, --totals display traffic totals
|
||||
-q, --queues display queue stats
|
||||
-s, --sort SORT sort interfaces by [rate, traffic, rx, tx, rxs, txs,
|
||||
announces, arx, atx, held]
|
||||
announces, arx, atx, prx, ptx, held]
|
||||
-r, --reverse reverse sorting
|
||||
-j, --json output in JSON format
|
||||
-R hash transport identity hash of remote instance to get status from
|
||||
|
||||
@@ -998,6 +998,9 @@ When ``discoverable`` is enabled, a variety of additional options become availab
|
||||
``discovery_name``
|
||||
A human-readable name for the interface. This name will be displayed to users on remote systems when they list discovered interfaces. If not specified, the interface name (the section header) will be used.
|
||||
|
||||
``discovery_lxmf_address``
|
||||
An optional LXMF address for contacting the operator of this interface. The address will be displayed to users on remote systems when they view details for discovered interfaces. Useful for getting in touch with other operators to interconnect networks with and coordinating network coverage.
|
||||
|
||||
``announce_interval``
|
||||
The interval in minutes between successive discovery announces for this interface. Default is 360 minutes (6 hours). For stable, long-running infrastructure, higher intervals (12 to 22 hours) are usually sufficient and reduce network load. Minimum allowed value is 5 minutes (but expect to have your announces throttled if using intervals below one hour).
|
||||
|
||||
@@ -1567,4 +1570,34 @@ but all the parameters are exposed for configuration if needed.
|
||||
|
||||
All of the above settings can be configured both as instance-wide defaults
|
||||
under the ``[reticulum]`` section of the configuration file, or on a per-
|
||||
interface basis under the relevant interface configuration section.
|
||||
interface basis under the relevant interface configuration section.
|
||||
|
||||
|
||||
Tuning Ingress Queues
|
||||
=====================
|
||||
|
||||
Reticulum uses separate, prioritized queues for processing inbound packets. The default four queues are drained in the following order:
|
||||
|
||||
1. Data and general traffic
|
||||
|
||||
2. Announces
|
||||
|
||||
3. Path requests
|
||||
|
||||
4. Ingress-limited traffic
|
||||
|
||||
You can tune the queue sizes from the defaults, for example if you're running a setup where you want to simply drop most traffic from ingress-limited interfaces. The queue sizes are configured in the ``[reticulum]`` section of the config
|
||||
|
||||
* | The ``qlen_in_data`` option sets the maximum size of the data
|
||||
queue. Defaults to ``4096``.
|
||||
|
||||
* | The ``qlen_in_announce`` option sets the maximum size of the announce
|
||||
queue. Defaults to ``256``.
|
||||
|
||||
* | The ``qlen_in_pr`` option sets the maximum size of the path request
|
||||
queue. Defaults to ``256``.
|
||||
|
||||
* | The ``qlen_in_il`` option sets the maximum size of the ingress limiter
|
||||
queue. Defaults to ``128``.
|
||||
|
||||
If an inbound packet arrives and its target queue is full, the packet is dropped. Reticulum will always completely drain higher-priority queues before starting to drain a lower-priority one. As an example, the ingress limiter queue will only start draining once all other queues are empty.
|
||||
@@ -337,8 +337,8 @@ Filter output to only show some interfaces:
|
||||
|
||||
.. code:: text
|
||||
|
||||
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A]
|
||||
[-l] [-t] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A] [-P] [-l]
|
||||
[-B] [-b] [-t] [-q] [-s SORT] [-r] [-j] [-R hash] [-i path]
|
||||
[-w seconds] [-d] [-D] [-m] [-I seconds] [-v] [filter]
|
||||
|
||||
Reticulum Network Stack Status
|
||||
@@ -352,10 +352,14 @@ Filter output to only show some interfaces:
|
||||
--version show program's version number and exit
|
||||
-a, --all show all interfaces
|
||||
-A, --announce-stats show announce stats
|
||||
-P, --pr-stats show path request stats
|
||||
-l, --link-stats show link stats
|
||||
-B, --burst only show interfaces with active bursts
|
||||
-b, --blocked-ips show blocked IPs per interface
|
||||
-t, --totals display traffic totals
|
||||
-q, --queues display queue stats
|
||||
-s, --sort SORT sort interfaces by [rate, traffic, rx, tx, rxs, txs,
|
||||
announces, arx, atx, held]
|
||||
announces, arx, atx, prx, ptx, held]
|
||||
-r, --reverse reverse sorting
|
||||
-j, --json output in JSON format
|
||||
-R hash transport identity hash of remote instance to get status from
|
||||
|
||||
@@ -145,6 +145,34 @@ class TestIdentity(unittest.TestCase):
|
||||
print("Sign/validate 16KB chunks: "+self.size_str(b/t, "b")+"ps")
|
||||
|
||||
|
||||
def test_3_timings(self):
|
||||
import random
|
||||
random.seed(618736)
|
||||
print("")
|
||||
blobs = []
|
||||
times = []
|
||||
t = RNS.Cryptography.Token(key=random.randbytes(64))
|
||||
for n in range(0, 1000): blobs.append(random.randbytes(64))
|
||||
|
||||
for a in blobs:
|
||||
for b in blobs:
|
||||
st = time.time()
|
||||
res = t.verify_hmac(b)
|
||||
d = time.time()-st
|
||||
times.append(d)
|
||||
|
||||
import statistics
|
||||
tmin = min(times)*1000000
|
||||
tmax = max(times)*1000000
|
||||
tmean = (sum(times)/len(times))*1000000
|
||||
tmed = statistics.median(times)*1000000
|
||||
tmdev = tmax - tmin
|
||||
mpct = (tmax/tmed)*100
|
||||
print(" HMAC timings:")
|
||||
print(" µs min/avg/med/max/mdev: "+str(round(tmin, 3))+"/"+str(round(tmean, 3))+"/"+str(round(tmed, 3))+"/"+str(round(tmax, 3))+"/"+str(round(tmdev, 3)))
|
||||
print(" Max deviation from median: "+str(round(mpct, 1))+"%")
|
||||
print()
|
||||
|
||||
def test_2_encrypt(self):
|
||||
print("")
|
||||
|
||||
|
||||
+22
-25
@@ -13,7 +13,6 @@ import RNS
|
||||
import os
|
||||
from tests.channel import MessageTest
|
||||
from RNS.Channel import MessageBase
|
||||
from RNS.Buffer import StreamDataMessage
|
||||
from RNS.Interfaces.LocalInterface import LocalClientInterface
|
||||
from math import ceil
|
||||
|
||||
@@ -27,7 +26,9 @@ fixed_keys = [
|
||||
("08bb35f92b06a0832991165a0d9b4fd91af7b7765ce4572aa6222070b11b767092b61b0fd18b3a59cae6deb9db6d4bfb1c7fcfe076cfd66eea7ddd5f877543b9", "d13712efc45ef87674fb5ac26c37c912"),
|
||||
]
|
||||
|
||||
BUFFER_TEST_TARGET = 32000
|
||||
BUFFER_TEST_TARGET = 256000
|
||||
BUFFER_TEST_TARGET_SLOW = 1800
|
||||
SLOW_TEST_MARKER = b"@SLOW_TEST_MARKER"
|
||||
LINK_UP_WAIT = 0.050
|
||||
|
||||
def targets_job(caller):
|
||||
@@ -734,23 +735,16 @@ class TestLink(unittest.TestCase):
|
||||
# 1000))
|
||||
|
||||
if local_interface.bitrate < 1000:
|
||||
target_bytes = 3000
|
||||
target_bytes = BUFFER_TEST_TARGET_SLOW-len(SLOW_TEST_MARKER)
|
||||
message = SLOW_TEST_MARKER
|
||||
else:
|
||||
target_bytes = BUFFER_TEST_TARGET
|
||||
message = b""
|
||||
|
||||
random.seed(154889)
|
||||
message = random.randbytes(target_bytes)
|
||||
message += random.randbytes(target_bytes)
|
||||
buffer_read_target = len(message)
|
||||
|
||||
# the return message will have an appendage string " back at you"
|
||||
# for every StreamDataMessage that arrives. To verify, we need
|
||||
# to insert that string every MAX_DATA_LEN and also at the end.
|
||||
expected_rx_message = b""
|
||||
for i in range(0, len(message)):
|
||||
if i > 0 and (i % StreamDataMessage.MAX_DATA_LEN) == 0:
|
||||
expected_rx_message += " back at you".encode("utf-8")
|
||||
expected_rx_message += bytes([message[i]])
|
||||
expected_rx_message += " back at you".encode("utf-8")
|
||||
expected_rx_message = message + " back at you".encode("utf-8")
|
||||
|
||||
# since the segments will be received at max length for a
|
||||
# StreamDataMessage, the appended text will end up in a
|
||||
@@ -760,7 +754,7 @@ class TestLink(unittest.TestCase):
|
||||
buffer.write(message)
|
||||
buffer.flush()
|
||||
|
||||
timeout = time.time() + 4
|
||||
timeout = time.time() + 2.5
|
||||
while not time.time() > timeout:
|
||||
time.sleep(1)
|
||||
print(f"Received {len(received)} chunks so far")
|
||||
@@ -864,28 +858,31 @@ def targets(yp=False):
|
||||
|
||||
response_data = []
|
||||
def handle_buffer(ready_bytes: int):
|
||||
global buffer_read_len, BUFFER_TEST_TARGET
|
||||
global buffer_read_len, BUFFER_TEST_TARGET, BUFFER_TEST_TARGET_SLOW
|
||||
data = buffer.read(ready_bytes)
|
||||
buffer_read_len += len(data)
|
||||
response_data.append(data)
|
||||
|
||||
if SLOW_TEST_MARKER in data:
|
||||
BUFFER_TEST_TARGET = BUFFER_TEST_TARGET_SLOW
|
||||
|
||||
if data == "Hi there".encode("utf-8"):
|
||||
RNS.log("Sending response")
|
||||
for data in response_data:
|
||||
buffer.write(data + " back at you".encode("utf-8"))
|
||||
buffer.flush()
|
||||
buffer_read_len = 0
|
||||
buffer.write(b"".join(response_data) + " back at you".encode("utf-8"))
|
||||
buffer.flush()
|
||||
response_data.clear()
|
||||
buffer_read_len = 0
|
||||
|
||||
if buffer_read_len == BUFFER_TEST_TARGET:
|
||||
RNS.log("Sending response")
|
||||
for data in response_data:
|
||||
buffer.write(data + " back at you".encode("utf-8"))
|
||||
buffer.flush()
|
||||
buffer_read_len = 0
|
||||
buffer.write(b"".join(response_data) + " back at you".encode("utf-8"))
|
||||
buffer.flush()
|
||||
response_data.clear()
|
||||
buffer_read_len = 0
|
||||
|
||||
buffer = RNS.Buffer.create_bidirectional_buffer(0, 0, channel, handle_buffer)
|
||||
|
||||
m_rns = RNS.Reticulum("./tests/rnsconfig", logdest=RNS.LOG_FILE, loglevel=RNS.LOG_EXTREME)
|
||||
m_rns = RNS.Reticulum("./tests/rnsconfig", logdest=RNS.LOG_FILE)
|
||||
id1 = RNS.Identity.from_bytes(bytes.fromhex(fixed_keys[0][0]))
|
||||
d1 = RNS.Destination(id1, RNS.Destination.IN, RNS.Destination.SINGLE, APP_NAME, "link", "establish")
|
||||
d1.set_proof_strategy(RNS.Destination.PROVE_ALL)
|
||||
|
||||
Reference in new issue
Block a user