Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e28dbd4afa | ||
|
|
8626dcd69f | ||
|
|
e34f21f4dc | ||
|
|
f692e81b8e | ||
|
|
28e43b52f9 | ||
|
|
680d17fb98 | ||
|
|
1e477c976c | ||
|
|
ab301cdb79 | ||
|
|
cecb4b3acb | ||
|
|
de53a105a4 | ||
|
|
9e4ae3c6fe | ||
|
|
3482d84bc0 | ||
|
|
51c5c85fcd | ||
|
|
57aeab43a2 | ||
|
|
92cccddaab | ||
|
|
3de182192a | ||
|
|
aca6b0c110 | ||
|
|
3d6e7a9597 | ||
|
|
21da55dd39 | ||
|
|
9e664af1c6 | ||
|
|
7736ed589e | ||
|
|
f22504d080 | ||
|
|
f22e5cc200 | ||
|
|
87b73b6c67 | ||
|
|
36906f6567 | ||
|
|
52edb54d21 | ||
|
|
88b88b9b64 | ||
|
|
76fcad0b53 | ||
|
|
01e520b082 | ||
|
|
1d2a0fe4c8 | ||
|
|
0f19ced9d3 | ||
|
|
4ca32c039d | ||
|
|
81ec701240 | ||
|
|
b16d614495 | ||
|
|
5f7e37187f | ||
|
|
622fd6cf46 | ||
|
|
b9d73518dd | ||
|
|
17bdf45ac1 | ||
|
|
36052e2c61 | ||
|
|
06d232f889 | ||
|
|
f9b3c749e0 | ||
|
|
63a59753af | ||
|
|
20696e7827 | ||
|
|
127c9862da | ||
|
|
fee9473cac | ||
|
|
5337b72853 | ||
|
|
9bc5d91106 | ||
|
|
45ae66e9bf | ||
|
|
f03cf34370 | ||
|
|
47db2a3bd5 | ||
|
|
40cd961eab | ||
|
|
34cdd4bf0f | ||
|
|
b0ef58e5ca | ||
|
|
b6020b5ea8 | ||
|
|
ee544fcf31 | ||
|
|
886b0ac0ca | ||
|
|
ed4070a3d1 | ||
|
|
6d6568852a | ||
|
|
b479e14ca5 | ||
|
|
8fec5cedbe | ||
|
|
9852a3534b | ||
|
|
81fc920bdf | ||
|
|
5b1b18e84a | ||
|
|
9c8c143c62 | ||
|
|
db9858d75f | ||
|
|
874405cbdd | ||
|
|
2a3f2b8bdc | ||
|
|
9aae06c694 | ||
|
|
70ffc38c49 | ||
|
|
73071b0755 | ||
|
|
ab697dc583 | ||
|
|
ecc78fa45f | ||
|
|
e5309caf48 | ||
|
|
094d2f2079 | ||
|
|
5a917c9dac | ||
|
|
1df0eea0b7 | ||
|
|
718c3577db | ||
|
|
5111c32854 | ||
|
|
63d4e9a399 | ||
|
|
60773ceb16 | ||
|
|
5d6c3dd891 | ||
|
|
a564dd2b2d | ||
|
|
16cf1ab1ba | ||
|
|
47e326c8a9 | ||
|
|
9a7585cbef | ||
|
|
902f7af64d | ||
|
|
004bf27526 | ||
|
|
9cad90266e | ||
|
|
e9de01e10e | ||
|
|
372bedcd85 | ||
|
|
1141a3034d | ||
|
|
3f3276ca45 | ||
|
|
6e742f7267 | ||
|
|
d3525943c2 | ||
|
|
cb55189e5c | ||
|
|
0b98a9bff4 | ||
|
|
a8d6e1780a | ||
|
|
cb9840250a | ||
|
|
16f8725906 | ||
|
|
2656157462 | ||
|
|
c9c7469b32 | ||
|
|
0f429e2385 | ||
|
|
89d8342ce5 | ||
|
|
c18997bf5b | ||
|
|
1e4dd9d6f0 | ||
|
|
b296c10541 | ||
|
|
9065de5fb4 | ||
|
|
7997fd104e | ||
|
|
11667504b2 | ||
|
|
7744c4ffe6 | ||
|
|
8a61d2c8d5 | ||
|
|
1380016995 | ||
|
|
f2aff3fbd5 | ||
|
|
b859984ebe | ||
|
|
9593b1c295 | ||
|
|
3d6455fb37 | ||
|
|
b085127d6e | ||
|
|
80ffa5ebc3 | ||
|
|
76fb73f46c | ||
|
|
e51b0077c7 | ||
|
|
c18806c912 | ||
|
|
683881d6cd | ||
|
|
f62d9946ac | ||
|
|
893a463663 | ||
|
|
39b788867d | ||
|
|
2abd8a1aae | ||
|
|
7940ac0812 | ||
|
|
3f2075da6f | ||
|
|
e90b2866b4 | ||
|
|
8886ed5794 | ||
|
|
32ee4216fd | ||
|
|
571ad2c8fb | ||
|
|
0c47ff1ccc | ||
|
|
18f450c58b | ||
|
|
b3d85b583f | ||
|
|
03695565ba | ||
|
|
3e380a8fc7 | ||
|
|
fd35451927 | ||
|
|
921987c999 | ||
|
|
81e0989070 | ||
|
|
3fa7698438 | ||
|
|
75e32af1c5 | ||
|
|
9775893840 | ||
|
|
e5c0ee4153 | ||
|
|
4042dd6ef7 | ||
|
|
af538e0489 | ||
|
|
8f4cf433ba | ||
|
|
c55e1e9628 | ||
|
|
be02586133 | ||
|
|
6db742ade7 | ||
|
|
6a53298aa2 | ||
|
|
f00b6a6fdb | ||
|
|
dc0a0735db | ||
|
|
b230edd21d | ||
|
|
30e75b1bfb | ||
|
|
7f70ffdc21 | ||
|
|
6e6b49dcd2 | ||
|
|
383f96d82a | ||
|
|
ebef2da7a8 | ||
|
|
4946d9f2eb | ||
|
|
fcb61e3ebf | ||
|
|
eae788957a | ||
|
|
045a9d8451 | ||
|
|
da644d33ea | ||
|
|
e03fc38920 | ||
|
|
c36c0368ef | ||
|
|
3d979e2d65 | ||
|
|
5158613501 | ||
|
|
b53185779a | ||
|
|
5b63f84491 |
No files matched your search
@@ -130,10 +130,11 @@ class ExampleAnnounceHandler:
|
|||||||
RNS.prettyhexrep(destination_hash)
|
RNS.prettyhexrep(destination_hash)
|
||||||
)
|
)
|
||||||
|
|
||||||
RNS.log(
|
if app_data:
|
||||||
"The announce contained the following app data: "+
|
RNS.log(
|
||||||
app_data.decode("utf-8")
|
"The announce contained the following app data: "+
|
||||||
)
|
app_data.decode("utf-8")
|
||||||
|
)
|
||||||
|
|
||||||
##########################################################
|
##########################################################
|
||||||
#### Program Startup #####################################
|
#### Program Startup #####################################
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ clean:
|
|||||||
@-rm -rf ./tests/__pycache__
|
@-rm -rf ./tests/__pycache__
|
||||||
@-rm -rf ./tests/rnsconfig/storage
|
@-rm -rf ./tests/rnsconfig/storage
|
||||||
@-rm -rf ./*.egg-info
|
@-rm -rf ./*.egg-info
|
||||||
|
@make -C docs clean
|
||||||
@echo Done
|
@echo Done
|
||||||
|
|
||||||
remove_symlinks:
|
remove_symlinks:
|
||||||
@@ -50,6 +51,8 @@ manual:
|
|||||||
|
|
||||||
release: test remove_symlinks build_wheel build_pure_wheel documentation manual create_symlinks
|
release: test remove_symlinks build_wheel build_pure_wheel documentation manual create_symlinks
|
||||||
|
|
||||||
|
debug: remove_symlinks build_wheel build_pure_wheel create_symlinks
|
||||||
|
|
||||||
upload:
|
upload:
|
||||||
@echo Ready to publish release, hit enter to continue
|
@echo Ready to publish release, hit enter to continue
|
||||||
@read VOID
|
@read VOID
|
||||||
|
|||||||
@@ -1,17 +1,36 @@
|
|||||||
Reticulum Network Stack β
|
Reticulum Network Stack β <img align="right" src="https://static.pepy.tech/personalized-badge/rns?period=total&units=international_system&left_color=grey&right_color=blue&left_text=Installs"/>
|
||||||
==========
|
==========
|
||||||
|
|
||||||
<p align="center"><img width="200" src="https://unsigned.io/wp-content/uploads/2022/03/reticulum_logo_512.png"></p>
|
<p align="center"><img width="200" src="https://raw.githubusercontent.com/markqvist/Reticulum/master/docs/source/graphics/rns_logo_512.png"></p>
|
||||||
|
|
||||||
Reticulum is the cryptography-based networking stack for wide-area networks built on readily available hardware. It can operate even with very high latency and extremely low bandwidth. Reticulum allows you to build wide-area networks with off-the-shelf tools, and offers end-to-end encryption and connectivity, initiator anonymity, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable delivery acknowledgements and more.
|
Reticulum is the cryptography-based networking stack for building local and wide-area
|
||||||
|
networks with readily available hardware. It can operate even with very high latency
|
||||||
|
and extremely low bandwidth. Reticulum allows you to build wide-area networks
|
||||||
|
with off-the-shelf tools, and offers end-to-end encryption and connectivity,
|
||||||
|
initiator anonymity, autoconfiguring cryptographically backed multi-hop
|
||||||
|
transport, efficient addressing, unforgeable delivery acknowledgements and
|
||||||
|
more.
|
||||||
|
|
||||||
The vision of Reticulum is to allow anyone to be their own network operator, and to make it cheap and easy to cover vast areas with a myriad of independent, inter-connectable and autonomous networks. Reticulum **is not** *one* network. It is **a tool** for building *thousands of networks*. Networks without kill-switches, surveillance, censorship and control. Networks that can freely interoperate, associate and disassociate with each other, and require no central oversight. Networks for human beings. *Networks for the people*.
|
The vision of Reticulum is to allow anyone to be their own network operator,
|
||||||
|
and to make it cheap and easy to cover vast areas with a myriad of independent,
|
||||||
|
inter-connectable and autonomous networks. Reticulum **is not** *one* network.
|
||||||
|
It is **a tool** for building *thousands of networks*. Networks without
|
||||||
|
kill-switches, surveillance, censorship and control. Networks that can freely
|
||||||
|
interoperate, associate and disassociate with each other, and require no
|
||||||
|
central oversight. Networks for human beings. *Networks for the people*.
|
||||||
|
|
||||||
Reticulum is a complete networking stack, and does not rely on IP or higher layers, but it is possible to use IP as the underlying carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the Internet or private IP networks.
|
Reticulum is a complete networking stack, and does not rely on IP or higher
|
||||||
|
layers, but it is possible to use IP as the underlying carrier for Reticulum.
|
||||||
|
It is therefore trivial to tunnel Reticulum over the Internet or private IP
|
||||||
|
networks.
|
||||||
|
|
||||||
Having no dependencies on traditional networking stacks frees up overhead that has been used to implement a networking stack built directly on cryptographic principles, allowing resilience and stable functionality, even in open and trustless networks.
|
Having no dependencies on traditional networking stacks frees up overhead that
|
||||||
|
has been used to implement a networking stack built directly on cryptographic
|
||||||
|
principles, allowing resilience and stable functionality, even in open and
|
||||||
|
trustless networks.
|
||||||
|
|
||||||
No kernel modules or drivers are required. Reticulum runs completely in userland, and can run on practically any system that runs Python 3.
|
No kernel modules or drivers are required. Reticulum runs completely in
|
||||||
|
userland, and can run on practically any system that runs Python 3.
|
||||||
|
|
||||||
## Read The Manual
|
## Read The Manual
|
||||||
The full documentation for Reticulum is available at [markqvist.github.io/Reticulum/manual/](https://markqvist.github.io/Reticulum/manual/).
|
The full documentation for Reticulum is available at [markqvist.github.io/Reticulum/manual/](https://markqvist.github.io/Reticulum/manual/).
|
||||||
@@ -23,7 +42,7 @@ For more info, see [unsigned.io/projects/reticulum](https://unsigned.io/projects
|
|||||||
## Notable Features
|
## Notable Features
|
||||||
- Coordination-less globally unique addressing and identification
|
- Coordination-less globally unique addressing and identification
|
||||||
- Fully self-configuring multi-hop routing
|
- Fully self-configuring multi-hop routing
|
||||||
- Complete initiator anonymity, communicate without revealing your identity
|
- Initiator anonymity, communicate without revealing your identity
|
||||||
- Asymmetric X25519 encryption and Ed25519 signatures as a basis for all communication
|
- Asymmetric X25519 encryption and Ed25519 signatures as a basis for all communication
|
||||||
- Forward Secrecy with ephemeral Elliptic Curve Diffie-Hellman keys on Curve25519
|
- Forward Secrecy with ephemeral Elliptic Curve Diffie-Hellman keys on Curve25519
|
||||||
- Reticulum uses the [Fernet](https://github.com/fernet/spec/blob/master/Spec.md) specification for on-the-wire / over-the-air encryption
|
- Reticulum uses the [Fernet](https://github.com/fernet/spec/blob/master/Spec.md) specification for on-the-wire / over-the-air encryption
|
||||||
@@ -40,60 +59,103 @@ For more info, see [unsigned.io/projects/reticulum](https://unsigned.io/projects
|
|||||||
- The API is very easy to use, and provides transfer progress
|
- The API is very easy to use, and provides transfer progress
|
||||||
- Lightweight, flexible and expandable Request/Response mechanism
|
- Lightweight, flexible and expandable Request/Response mechanism
|
||||||
- Efficient link establishment
|
- Efficient link establishment
|
||||||
- Total bandwidth cost of setting up an encrypted link is 3 packets totaling 265 bytes
|
- Total bandwidth cost of setting up an encrypted link is 3 packets totaling 297 bytes
|
||||||
- Low cost of keeping links open at only 0.44 bits per second
|
- Low cost of keeping links open at only 0.44 bits per second
|
||||||
|
|
||||||
|
## Development Roadmap
|
||||||
|
While Reticulum is already a fully featured and functional networking stack, many improvements and additions are planned for the future.
|
||||||
|
|
||||||
|
To learn more about the direction and future of Reticulum, please see the [Development Roadmap](./Roadmap.md).
|
||||||
|
|
||||||
## Examples of Reticulum Applications
|
## Examples of Reticulum Applications
|
||||||
If you want to quickly get an idea of what Reticulum can do, take a look at the following resources.
|
If you want to quickly get an idea of what Reticulum can do, take a look at the
|
||||||
|
following resources.
|
||||||
|
|
||||||
- [LXMF](https://github.com/markqvist/lxmf) is a distributed, delay and disruption tolerant message transfer protocol built on Reticulum
|
|
||||||
- For an off-grid, encrypted and resilient mesh communications platform, see [Nomad Network](https://github.com/markqvist/NomadNet)
|
- For an off-grid, encrypted and resilient mesh communications platform, see [Nomad Network](https://github.com/markqvist/NomadNet)
|
||||||
- The Android, Linux and macOS app [Sideband](https://unsigned.io/sideband) has a graphical interface and focuses on ease of use.
|
- The Android, Linux and macOS app [Sideband](https://github.com/markqvist/Sideband) has a graphical interface and focuses on ease of use.
|
||||||
|
- [LXMF](https://github.com/markqvist/lxmf) is a distributed, delay and disruption tolerant message transfer protocol built on Reticulum
|
||||||
|
|
||||||
## Where can Reticulum be used?
|
## Where can Reticulum be used?
|
||||||
Over practically any medium that can support at least a half-duplex channel with 500 bits per second throughput, and an MTU of 500 bytes. Data radios, modems, LoRa radios, serial lines, AX.25 TNCs, amateur radio digital modes, WiFi and Ethernet devices, free-space optical links, and similar systems are all examples of the types of physical devices Reticulum can use.
|
Over practically any medium that can support at least a half-duplex channel
|
||||||
|
with 500 bits per second throughput, and an MTU of 500 bytes. Data radios,
|
||||||
|
modems, LoRa radios, serial lines, AX.25 TNCs, amateur radio digital modes,
|
||||||
|
WiFi and Ethernet devices, free-space optical links, and similar systems are
|
||||||
|
all examples of the types of physical devices Reticulum can use.
|
||||||
|
|
||||||
An open-source LoRa-based interface called [RNode](https://markqvist.github.io/Reticulum/manual/hardware.html#rnode) has been designed specifically for use with Reticulum. It is possible to build yourself, or it can be purchased as a complete transceiver that just needs a USB connection to the host.
|
An open-source LoRa-based interface called
|
||||||
|
[RNode](https://markqvist.github.io/Reticulum/manual/hardware.html#rnode) has
|
||||||
|
been designed specifically for use with Reticulum. It is possible to build
|
||||||
|
yourself, or it can be purchased as a complete transceiver that just needs a
|
||||||
|
USB connection to the host.
|
||||||
|
|
||||||
Reticulum can also be encapsulated over existing IP networks, so there's nothing stopping you from using it over wired ethernet, your local WiFi network or the Internet, where it'll work just as well. In fact, one of the strengths of Reticulum is how easily it allows you to connect different mediums into a self-configuring, resilient and encrypted mesh, using any available mixture of available infrastructure.
|
Reticulum can also be encapsulated over existing IP networks, so there's
|
||||||
|
nothing stopping you from using it over wired Ethernet, your local WiFi network
|
||||||
|
or the Internet, where it'll work just as well. In fact, one of the strengths
|
||||||
|
of Reticulum is how easily it allows you to connect different mediums into a
|
||||||
|
self-configuring, resilient and encrypted mesh, using any available mixture of
|
||||||
|
available infrastructure.
|
||||||
|
|
||||||
As an example, it's possible to set up a Raspberry Pi connected to both a LoRa radio, a packet radio TNC and a WiFi network. Once the interfaces are configured, Reticulum will take care of the rest, and any device on the WiFi network can communicate with nodes on the LoRa and packet radio sides of the network, and vice versa.
|
As an example, it's possible to set up a Raspberry Pi connected to both a LoRa
|
||||||
|
radio, a packet radio TNC and a WiFi network. Once the interfaces are
|
||||||
|
configured, Reticulum will take care of the rest, and any device on the WiFi
|
||||||
|
network can communicate with nodes on the LoRa and packet radio sides of the
|
||||||
|
network, and vice versa.
|
||||||
|
|
||||||
## How do I get started?
|
## How do I get started?
|
||||||
The best way to get started with the Reticulum Network Stack depends on what
|
The best way to get started with the Reticulum Network Stack depends on what
|
||||||
you want to do. For full details and examples, have a look at the [Getting Started Fast](https://markqvist.github.io/Reticulum/manual/gettingstartedfast.html) section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).
|
you want to do. For full details and examples, have a look at the
|
||||||
|
[Getting Started Fast](https://markqvist.github.io/Reticulum/manual/gettingstartedfast.html)
|
||||||
|
section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).
|
||||||
|
|
||||||
To simply install Reticulum and related utilities on your system, the easiest way is via pip:
|
To simply install Reticulum and related utilities on your system, the easiest way is via pip:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip3 install rns
|
pip install rns
|
||||||
```
|
```
|
||||||
|
|
||||||
You can then start any program that uses Reticulum, or start Reticulum as a system service with [the rnsd utility](https://markqvist.github.io/Reticulum/manual/using.html#the-rnsd-utility).
|
You can then start any program that uses Reticulum, or start Reticulum as a
|
||||||
|
system service with [the rnsd utility](https://markqvist.github.io/Reticulum/manual/using.html#the-rnsd-utility).
|
||||||
|
|
||||||
When first started, Reticulum will create a default configuration file, providing basic connectivity to other Reticulum peers that might be locally reachable. The default config file contains a few examples, and references for creating a more complex configuration.
|
When first started, Reticulum will create a default configuration file,
|
||||||
|
providing basic connectivity to other Reticulum peers that might be locally
|
||||||
|
reachable. The default config file contains a few examples, and references for
|
||||||
|
creating a more complex configuration.
|
||||||
|
|
||||||
For more detailed examples on how to expand communication over many mediums such as packet radio or LoRa, serial ports, or over fast IP links and the Internet using the UDP and TCP interfaces, take a look at the [Supported Interfaces](https://markqvist.github.io/Reticulum/manual/interfaces.html) section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).
|
If you have an old version of `pip` on your system, you may need to upgrade it first with `pip install pip --upgrade`. If you no not already have `pip` installed, you can install it using the package manager of your system with `sudo apt install python3-pip` or similar.
|
||||||
|
|
||||||
|
For more detailed examples on how to expand communication over many mediums such
|
||||||
|
as packet radio or LoRa, serial ports, or over fast IP links and the Internet using
|
||||||
|
the UDP and TCP interfaces, take a look at the [Supported Interfaces](https://markqvist.github.io/Reticulum/manual/interfaces.html)
|
||||||
|
section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).
|
||||||
|
|
||||||
## Included Utilities
|
## Included Utilities
|
||||||
Reticulum includes a range of useful utilities for managing your networks, viewing status and information, and other tasks. You can read more about these programs in the [Included Utility Programs](https://markqvist.github.io/Reticulum/manual/using.html#included-utility-programs) section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).
|
Reticulum includes a range of useful utilities for managing your networks,
|
||||||
|
viewing status and information, and other tasks. You can read more about these
|
||||||
|
programs in the [Included Utility Programs](https://markqvist.github.io/Reticulum/manual/using.html#included-utility-programs)
|
||||||
|
section of the [Reticulum Manual](https://markqvist.github.io/Reticulum/manual/).
|
||||||
|
|
||||||
- The system daemon `rnsd` for running Reticulum as an always-available service
|
- The system daemon `rnsd` for running Reticulum as an always-available service
|
||||||
- An interface status utility called `rnstatus`, that displays information about interfaces
|
- An interface status utility called `rnstatus`, that displays information about interfaces
|
||||||
- The path lookup and management tool `rnpath` letting you view and modify path tables
|
- The path lookup and management tool `rnpath` letting you view and modify path tables
|
||||||
- A diagnostics tool called `rnprobe` for checking connectivity to destinations
|
- A diagnostics tool called `rnprobe` for checking connectivity to destinations
|
||||||
- A simple file transfer program called `rncp` making it easy to copy files to remote systems
|
- A simple file transfer program called `rncp` making it easy to copy files to remote systems
|
||||||
- The remote command execution program `rnx` let's you run commands and programs and retrieve output from remote systems
|
- The remote command execution program `rnx` let's you run commands and
|
||||||
|
programs and retrieve output from remote systems
|
||||||
|
|
||||||
All tools, including `rnx` and `rncp`, work reliably and well even over very low-bandwidth links like LoRa or Packet Radio.
|
All tools, including `rnx` and `rncp`, work reliably and well even over very
|
||||||
|
low-bandwidth links like LoRa or Packet Radio.
|
||||||
|
|
||||||
## Supported interface types and devices
|
## Supported interface types and devices
|
||||||
|
|
||||||
Reticulum implements a range of generalised interface types that covers most of the communications hardware that Reticulum can run over. If your hardware is not supported, it's relatively simple to implement an interface class. I will gratefully accept pull requests for custom interfaces if they are generally useful.
|
Reticulum implements a range of generalised interface types that covers most of
|
||||||
|
the communications hardware that Reticulum can run over. If your hardware is
|
||||||
|
not supported, it's relatively simple to implement an interface class. I will
|
||||||
|
gratefully accept pull requests for custom interfaces if they are generally
|
||||||
|
useful.
|
||||||
|
|
||||||
Currently, the following interfaces are supported:
|
Currently, the following interfaces are supported:
|
||||||
|
|
||||||
- Any ethernet device
|
- Any Ethernet device
|
||||||
- LoRa using [RNode](https://unsigned.io/projects/rnode/)
|
- LoRa using [RNode](https://unsigned.io/projects/rnode/)
|
||||||
- Packet Radio TNCs (with or without AX.25)
|
- Packet Radio TNCs (with or without AX.25)
|
||||||
- KISS-compatible hardware and software modems
|
- KISS-compatible hardware and software modems
|
||||||
@@ -104,89 +166,92 @@ Currently, the following interfaces are supported:
|
|||||||
- Custom hardware via stdio or pipes
|
- Custom hardware via stdio or pipes
|
||||||
|
|
||||||
## Performance
|
## Performance
|
||||||
Reticulum targets a *very* wide usable performance envelope, but prioritises functionality and performance over low-bandwidth mediums. The goal is to provide a dynamic performance envelope from 250 bits per second, to 1 gigabit per second on normal hardware.
|
Reticulum targets a *very* wide usable performance envelope, but prioritises
|
||||||
|
functionality and performance on low-bandwidth mediums. The goal is to
|
||||||
|
provide a dynamic performance envelope from 250 bits per second, to 1 gigabit
|
||||||
|
per second on normal hardware.
|
||||||
|
|
||||||
Currently, the usable performance envelope is approximately 500 bits per second to 20 megabits per second, with physical mediums faster than that not being saturated. Performance beyond the current level is intended for future upgrades, but not highly prioritised at this point in time.
|
Currently, the usable performance envelope is approximately 500 bits per second
|
||||||
|
to 20 megabits per second, with physical mediums faster than that not being
|
||||||
|
saturated. Performance beyond the current level is intended for future
|
||||||
|
upgrades, but not highly prioritised at this point in time.
|
||||||
|
|
||||||
## Current Status
|
## Current Status
|
||||||
Reticulum should currently be considered beta software. All core protocol features are implemented and functioning, but additions will probably occur as real-world use is explored. There will be bugs. The API and wire-format can be considered relatively stable at the moment, but could change if warranted.
|
Reticulum should currently be considered beta software. All core protocol
|
||||||
|
features are implemented and functioning, but additions will probably occur as
|
||||||
## Development Roadmap
|
real-world use is explored. There will be bugs. The API and wire-format can be
|
||||||
- Version 0.4.0
|
considered relatively stable at the moment, but could change if warranted.
|
||||||
- Improving [the manual](https://markqvist.github.io/Reticulum/manual/) with sections specifically for beginners
|
|
||||||
- Performance and memory optimisations
|
|
||||||
- Utilities for managing identities, signing and encryption
|
|
||||||
- User friendly interface configuration tool
|
|
||||||
- Support for radio and modem interfaces on Android
|
|
||||||
- More interface types for even broader compatibility
|
|
||||||
- Plain ESP32 devices (ESP-Now, WiFi, Bluetooth, etc.)
|
|
||||||
- More LoRa transceivers
|
|
||||||
- IR Transceivers
|
|
||||||
- Planned, but not yet scheduled
|
|
||||||
- Distributed Destination Naming System
|
|
||||||
- Network-wide path balancing
|
|
||||||
- Globally routable multicast
|
|
||||||
- Bindings for other programming languages
|
|
||||||
- A portable Reticulum implementation in C, see [#21](https://github.com/markqvist/Reticulum/discussions/21)
|
|
||||||
- Easy way to share interface configurations, see [#19](https://github.com/markqvist/Reticulum/discussions/19)
|
|
||||||
- More interface types
|
|
||||||
- AT-compatible modems
|
|
||||||
- AWDL / OWL
|
|
||||||
- HF Modems
|
|
||||||
- CAN-bus
|
|
||||||
- ZeroMQ
|
|
||||||
- MQTT
|
|
||||||
- SPI
|
|
||||||
- i²c
|
|
||||||
- Tor
|
|
||||||
|
|
||||||
## Dependencies
|
## Dependencies
|
||||||
The installation of the default `rns` package requires the dependencies listed below. Almost all systems and distributions have readily available packages for these dependencies, and when the `rns` package is installed with `pip`, they will be downloaded and installed as well.
|
The installation of the default `rns` package requires the dependencies listed
|
||||||
|
below. Almost all systems and distributions have readily available packages for
|
||||||
|
these dependencies, and when the `rns` package is installed with `pip`, they
|
||||||
|
will be downloaded and installed as well.
|
||||||
|
|
||||||
- [PyCA/cryptography](https://github.com/pyca/cryptography)
|
- [PyCA/cryptography](https://github.com/pyca/cryptography)
|
||||||
- [netifaces](https://github.com/al45tair/netifaces)
|
- [netifaces](https://github.com/al45tair/netifaces)
|
||||||
- [pyserial](https://github.com/pyserial/pyserial)
|
- [pyserial](https://github.com/pyserial/pyserial)
|
||||||
|
|
||||||
On more unusual systems, and in some rare cases, it might not be possible to install or even compile one or more of the above modules. In such situations, you can use the `rnspure` package instead, which require no external dependencies for installation. Please note that the contents of the `rns` and `rnspure` packages are *identical*. The only difference is that the `rnspure` package lists no dependencies required for installation.
|
On more unusual systems, and in some rare cases, it might not be possible to
|
||||||
|
install or even compile one or more of the above modules. In such situations,
|
||||||
|
you can use the `rnspure` package instead, which require no external
|
||||||
|
dependencies for installation. Please note that the contents of the `rns` and
|
||||||
|
`rnspure` packages are *identical*. The only difference is that the `rnspure`
|
||||||
|
package lists no dependencies required for installation.
|
||||||
|
|
||||||
No matter how Reticulum is installed and started, it will load external dependencies only if they are *needed* and *available*. If for example you want to use Reticulum on a system that cannot support [pyserial](https://github.com/pyserial/pyserial), it is perfectly possible to do so using the `rnspure` package, but Reticulum will not be able to use serial-based interfaces. All other available modules will still be loaded when needed.
|
No matter how Reticulum is installed and started, it will load external
|
||||||
|
dependencies only if they are *needed* and *available*. If for example you want
|
||||||
|
to use Reticulum on a system that cannot support
|
||||||
|
[pyserial](https://github.com/pyserial/pyserial), it is perfectly possible to
|
||||||
|
do so using the `rnspure` package, but Reticulum will not be able to use
|
||||||
|
serial-based interfaces. All other available modules will still be loaded when
|
||||||
|
needed.
|
||||||
|
|
||||||
**Please Note!** If you use the `rnspure` package to run Reticulum on systems that do not support [PyCA/cryptography](https://github.com/pyca/cryptography), it is important that you read and understand the [Cryptographic Primitives](#cryptographic-primitives) section of this document.
|
**Please Note!** If you use the `rnspure` package to run Reticulum on systems
|
||||||
|
that do not support [PyCA/cryptography](https://github.com/pyca/cryptography),
|
||||||
|
it is important that you read and understand the [Cryptographic
|
||||||
|
Primitives](#cryptographic-primitives) section of this document.
|
||||||
|
|
||||||
## Public Testnet
|
## Public Testnet
|
||||||
If you just want to get started experimenting without building any physical networks, you are welcome to join the Unsigned.io RNS Testnet. The testnet is just that, an informal network for testing and experimenting. It will be up most of the time, and anyone can join, but it also means that there's no guarantees for service availability.
|
If you just want to get started experimenting without building any physical
|
||||||
|
networks, you are welcome to join the Unsigned.io RNS Testnet. The testnet is
|
||||||
|
just that, an informal network for testing and experimenting. It will be up
|
||||||
|
most of the time, and anyone can join, but it also means that there's no
|
||||||
|
guarantees for service availability.
|
||||||
|
|
||||||
The testnet runs the very latest version of Reticulum (often even a short while before it is publicly released). Sometimes experimental versions of Reticulum might be deployed to nodes on the testnet, which means strange behaviour might occur. If none of that scares you, you can join the testnet via either TCP or I2P. Just add one of the following interfaces to your Reticulum configuration file:
|
The testnet runs the very latest version of Reticulum (often even a short while
|
||||||
|
before it is publicly released). Sometimes experimental versions of Reticulum
|
||||||
|
might be deployed to nodes on the testnet, which means strange behaviour might
|
||||||
|
occur. If none of that scares you, you can join the testnet via either TCP or
|
||||||
|
I2P. Just add one of the following interfaces to your Reticulum configuration
|
||||||
|
file:
|
||||||
|
|
||||||
```
|
```
|
||||||
# For connecting over TCP/IP on v0.3.8:
|
# TCP/IP interface to the Dublin Hub
|
||||||
[[RNS Testnet Frankfurt]]
|
|
||||||
type = TCPClientInterface
|
|
||||||
interface_enabled = yes
|
|
||||||
outgoing = True
|
|
||||||
target_host = frankfurt.rns.unsigned.io
|
|
||||||
target_port = 4965
|
|
||||||
|
|
||||||
|
|
||||||
# For connecting over I2P on v0.3.8:
|
|
||||||
[[RNS Testnet I2P Node A]]
|
|
||||||
type = I2PInterface
|
|
||||||
interface_enabled = yes
|
|
||||||
peers = ykzlw5ujbaqc2xkec4cpvgyxj257wcrmmgkuxqmqcur7cq3w3lha.b32.i2p
|
|
||||||
|
|
||||||
# For connecting over TCP/IP on v0.3.9+:
|
|
||||||
[[RNS Testnet Dublin]]
|
[[RNS Testnet Dublin]]
|
||||||
type = TCPClientInterface
|
type = TCPClientInterface
|
||||||
enabled = yes
|
enabled = yes
|
||||||
target_host = dublin.connect.reticulum.network
|
target_host = dublin.connect.reticulum.network
|
||||||
target_port = 4965
|
target_port = 4965
|
||||||
|
|
||||||
|
# TCP/IP interface to the Frankfurt Hub
|
||||||
|
[[RNS Testnet Frankfurt]]
|
||||||
|
type = TCPClientInterface
|
||||||
|
enabled = yes
|
||||||
|
target_host = frankfurt.connect.reticulum.network
|
||||||
|
target_port = 5377
|
||||||
|
|
||||||
# For connecting over I2P on v0.3.9+:
|
# Interface to I2P Hub A
|
||||||
[[RNS Testnet I2P Hub A]]
|
[[RNS Testnet I2P Hub A]]
|
||||||
type = I2PInterface
|
type = I2PInterface
|
||||||
enabled = yes
|
enabled = yes
|
||||||
peers = uxg5kubabakh3jtnvsipingbr5574dle7bubvip7llfvwx2tgrua.b32.i2p
|
peers = pmlm3l5rpympihoy2o5ago43kluei2jjjzsalcuiuylbve3mwi2a.b32.i2p
|
||||||
|
|
||||||
|
# Interface to I2P Hub B
|
||||||
|
[[RNS Testnet I2P Hub B]]
|
||||||
|
type = I2PInterface
|
||||||
|
enabled = yes
|
||||||
|
peers = iwoqtz22dsr73aemwpw7guocplsjjoamyl7sogj33qtcd6ds4mza.b32.i2p
|
||||||
```
|
```
|
||||||
|
|
||||||
The testnet also contains a number of [Nomad Network](https://github.com/markqvist/nomadnet) nodes, and LXMF propagation nodes.
|
The testnet also contains a number of [Nomad Network](https://github.com/markqvist/nomadnet) nodes, and LXMF propagation nodes.
|
||||||
@@ -195,10 +260,8 @@ The testnet also contains a number of [Nomad Network](https://github.com/markqvi
|
|||||||
You can help support the continued development of open, free and private communications systems by donating via one of the following channels:
|
You can help support the continued development of open, free and private communications systems by donating via one of the following channels:
|
||||||
|
|
||||||
- Monero:
|
- Monero:
|
||||||
```
|
```
|
||||||
84FpY1QbxHcgdseePYNmhTHcrgMX4nFf
|
84FpY1QbxHcgdseePYNmhTHcrgMX4nFfBYtz2GKYToqHVVhJp8Eaw1Z1EedRnKD19b3B8NiLCGVxzKV17UMmmeEsCrPyA5w
|
||||||
BYtz2GKYToqHVVhJp8Eaw1Z1EedRnKD1
|
|
||||||
9b3B8NiLCGVxzKV17UMmmeEsCrPyA5w
|
|
||||||
```
|
```
|
||||||
- Ethereum
|
- Ethereum
|
||||||
```
|
```
|
||||||
@@ -210,10 +273,13 @@ You can help support the continued development of open, free and private communi
|
|||||||
```
|
```
|
||||||
- Ko-Fi: https://ko-fi.com/markqvist
|
- Ko-Fi: https://ko-fi.com/markqvist
|
||||||
|
|
||||||
Are certain features in the development roadmap are important to you or your organisation? Make them a reality quickly by sponsoring their implementation.
|
Are certain features in the development roadmap are important to you or your
|
||||||
|
organisation? Make them a reality quickly by sponsoring their implementation.
|
||||||
|
|
||||||
## Cryptographic Primitives
|
## Cryptographic Primitives
|
||||||
Reticulum uses a simple suite of efficient, strong and modern cryptographic primitives, with widely available implementations that can be used both on general-purpose CPUs and on microcontrollers. The necessary primitives are:
|
Reticulum uses a simple suite of efficient, strong and modern cryptographic
|
||||||
|
primitives, with widely available implementations that can be used both on
|
||||||
|
general-purpose CPUs and on microcontrollers. The necessary primitives are:
|
||||||
|
|
||||||
- Ed25519 for signatures
|
- Ed25519 for signatures
|
||||||
- X22519 for ECDH key exchanges
|
- X22519 for ECDH key exchanges
|
||||||
@@ -225,7 +291,13 @@ Reticulum uses a simple suite of efficient, strong and modern cryptographic prim
|
|||||||
- SHA-256
|
- SHA-256
|
||||||
- SHA-512
|
- SHA-512
|
||||||
|
|
||||||
In the default installation configuration, the `X25519`, `Ed25519` and `AES-128-CBC` primitives are provided by [OpenSSL](https://www.openssl.org/) (via the [PyCA/cryptography](https://github.com/pyca/cryptography) package). The hashing functions `SHA-256` and `SHA-512` are provided by the standard Python [hashlib](https://docs.python.org/3/library/hashlib.html). The `HKDF`, `HMAC`, `Fernet` primitives, and the `PKCS7` padding function are always provided by the following internal implementations:
|
In the default installation configuration, the `X25519`, `Ed25519` and
|
||||||
|
`AES-128-CBC` primitives are provided by [OpenSSL](https://www.openssl.org/)
|
||||||
|
(via the [PyCA/cryptography](https://github.com/pyca/cryptography) package).
|
||||||
|
The hashing functions `SHA-256` and `SHA-512` are provided by the standard
|
||||||
|
Python [hashlib](https://docs.python.org/3/library/hashlib.html). The `HKDF`,
|
||||||
|
`HMAC`, `Fernet` primitives, and the `PKCS7` padding function are always
|
||||||
|
provided by the following internal implementations:
|
||||||
|
|
||||||
- [HKDF.py](RNS/Cryptography/HKDF.py)
|
- [HKDF.py](RNS/Cryptography/HKDF.py)
|
||||||
- [HMAC.py](RNS/Cryptography/HMAC.py)
|
- [HMAC.py](RNS/Cryptography/HMAC.py)
|
||||||
@@ -233,16 +305,33 @@ In the default installation configuration, the `X25519`, `Ed25519` and `AES-128-
|
|||||||
- [PKCS7.py](RNS/Cryptography/PKCS7.py)
|
- [PKCS7.py](RNS/Cryptography/PKCS7.py)
|
||||||
|
|
||||||
|
|
||||||
Reticulum also includes a complete implementation of all necessary primitives in pure Python. If OpenSSL & PyCA are not available on the system when Reticulum is started, Reticulum will instead use the internal pure-python primitives. A trivial consequence of this is performance, with the OpenSSL backend being *much* faster. The most important consequence however, is the potential loss of security by using primitives that has not seen the same amount of scrutiny, testing and review as those from OpenSSL.
|
Reticulum also includes a complete implementation of all necessary primitives
|
||||||
|
in pure Python. If OpenSSL & PyCA are not available on the system when
|
||||||
|
Reticulum is started, Reticulum will instead use the internal pure-python
|
||||||
|
primitives. A trivial consequence of this is performance, with the OpenSSL
|
||||||
|
backend being *much* faster. The most important consequence however, is the
|
||||||
|
potential loss of security by using primitives that has not seen the same
|
||||||
|
amount of scrutiny, testing and review as those from OpenSSL.
|
||||||
|
|
||||||
If you want to use the internal pure-python primitives, it is **highly advisable** that you have a good understanding of the risks that this pose, and make an informed decision on whether those risks are acceptable to you.
|
If you want to use the internal pure-python primitives, it is **highly
|
||||||
|
advisable** that you have a good understanding of the risks that this pose, and
|
||||||
|
make an informed decision on whether those risks are acceptable to you.
|
||||||
|
|
||||||
Reticulum is relatively young software, and should be considered as such. While it has been built with cryptography best-practices very foremost in mind, it _has not_ been externally security audited, and there could very well be privacy or security breaking bugs. If you want to help out, or help sponsor an audit, please do get in touch.
|
Reticulum is relatively young software, and should be considered as such. While
|
||||||
|
it has been built with cryptography best-practices very foremost in mind, it
|
||||||
|
_has not_ been externally security audited, and there could very well be
|
||||||
|
privacy or security breaking bugs. If you want to help out, or help sponsor an
|
||||||
|
audit, please do get in touch.
|
||||||
|
|
||||||
## Acknowledgements & Credits
|
## Acknowledgements & Credits
|
||||||
Reticulum can only exist because of the mountain of Open Source work it was built on top of, the contributions of everyone involved, and everyone that has supported the project through the years. To everyone who has helped, thank you so much.
|
Reticulum can only exist because of the mountain of Open Source work it was
|
||||||
|
built on top of, the contributions of everyone involved, and everyone that has
|
||||||
|
supported the project through the years. To everyone who has helped, thank you
|
||||||
|
so much.
|
||||||
|
|
||||||
A number of other modules and projects are either part of, or used by Reticulum. Sincere thanks to the authors and contributors of the following projects:
|
A number of other modules and projects are either part of, or used by
|
||||||
|
Reticulum. Sincere thanks to the authors and contributors of the following
|
||||||
|
projects:
|
||||||
|
|
||||||
- [PyCA/cryptography](https://github.com/pyca/cryptography), *BSD License*
|
- [PyCA/cryptography](https://github.com/pyca/cryptography), *BSD License*
|
||||||
- [Pure-25519](https://github.com/warner/python-pure25519) by [Brian Warner](https://github.com/warner), *MIT License*
|
- [Pure-25519](https://github.com/warner/python-pure25519) by [Brian Warner](https://github.com/warner), *MIT License*
|
||||||
|
|||||||
@@ -21,6 +21,7 @@
|
|||||||
# SOFTWARE.
|
# SOFTWARE.
|
||||||
|
|
||||||
import RNS.Cryptography.Provider as cp
|
import RNS.Cryptography.Provider as cp
|
||||||
|
import RNS.vendor.platformutils as pu
|
||||||
|
|
||||||
if cp.PROVIDER == cp.PROVIDER_INTERNAL:
|
if cp.PROVIDER == cp.PROVIDER_INTERNAL:
|
||||||
from .aes import AES
|
from .aes import AES
|
||||||
@@ -28,6 +29,9 @@ if cp.PROVIDER == cp.PROVIDER_INTERNAL:
|
|||||||
elif cp.PROVIDER == cp.PROVIDER_PYCA:
|
elif cp.PROVIDER == cp.PROVIDER_PYCA:
|
||||||
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
from cryptography.hazmat.primitives.ciphers import Cipher, algorithms, modes
|
||||||
|
|
||||||
|
if pu.cryptography_old_api():
|
||||||
|
from cryptography.hazmat.backends import default_backend
|
||||||
|
|
||||||
|
|
||||||
class AES_128_CBC:
|
class AES_128_CBC:
|
||||||
|
|
||||||
@@ -38,7 +42,11 @@ class AES_128_CBC:
|
|||||||
return cipher.encrypt(plaintext, iv)
|
return cipher.encrypt(plaintext, iv)
|
||||||
|
|
||||||
elif cp.PROVIDER == cp.PROVIDER_PYCA:
|
elif cp.PROVIDER == cp.PROVIDER_PYCA:
|
||||||
cipher = Cipher(algorithms.AES(key), modes.CBC(iv))
|
if not pu.cryptography_old_api():
|
||||||
|
cipher = Cipher(algorithms.AES(key), modes.CBC(iv))
|
||||||
|
else:
|
||||||
|
cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend())
|
||||||
|
|
||||||
encryptor = cipher.encryptor()
|
encryptor = cipher.encryptor()
|
||||||
ciphertext = encryptor.update(plaintext) + encryptor.finalize()
|
ciphertext = encryptor.update(plaintext) + encryptor.finalize()
|
||||||
return ciphertext
|
return ciphertext
|
||||||
@@ -50,7 +58,11 @@ class AES_128_CBC:
|
|||||||
return cipher.decrypt(ciphertext, iv)
|
return cipher.decrypt(ciphertext, iv)
|
||||||
|
|
||||||
elif cp.PROVIDER == cp.PROVIDER_PYCA:
|
elif cp.PROVIDER == cp.PROVIDER_PYCA:
|
||||||
cipher = Cipher(algorithms.AES(key), modes.CBC(iv))
|
if not pu.cryptography_old_api():
|
||||||
|
cipher = Cipher(algorithms.AES(key), modes.CBC(iv))
|
||||||
|
else:
|
||||||
|
cipher = Cipher(algorithms.AES(key), modes.CBC(iv), backend=default_backend())
|
||||||
|
|
||||||
decryptor = cipher.decryptor()
|
decryptor = cipher.decryptor()
|
||||||
plaintext = decryptor.update(ciphertext) + decryptor.finalize()
|
plaintext = decryptor.update(ciphertext) + decryptor.finalize()
|
||||||
return plaintext
|
return plaintext
|
||||||
@@ -70,7 +70,7 @@ class Destination:
|
|||||||
directions = [IN, OUT]
|
directions = [IN, OUT]
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def full_name(app_name, *aspects):
|
def expand_name(identity, app_name, *aspects):
|
||||||
"""
|
"""
|
||||||
:returns: A string containing the full human-readable name of the destination, for an app_name and a number of aspects.
|
:returns: A string containing the full human-readable name of the destination, for an app_name and a number of aspects.
|
||||||
"""
|
"""
|
||||||
@@ -81,20 +81,25 @@ class Destination:
|
|||||||
name = app_name
|
name = app_name
|
||||||
for aspect in aspects:
|
for aspect in aspects:
|
||||||
if "." in aspect: raise ValueError("Dots can't be used in aspects")
|
if "." in aspect: raise ValueError("Dots can't be used in aspects")
|
||||||
name = name + "." + aspect
|
name += "." + aspect
|
||||||
|
|
||||||
|
if identity != None:
|
||||||
|
name += "." + identity.hexhash
|
||||||
|
|
||||||
return name
|
return name
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def hash(app_name, *aspects):
|
def hash(identity, app_name, *aspects):
|
||||||
"""
|
"""
|
||||||
:returns: A destination name in adressable hash form, for an app_name and a number of aspects.
|
:returns: A destination name in adressable hash form, for an app_name and a number of aspects.
|
||||||
"""
|
"""
|
||||||
name = Destination.full_name(app_name, *aspects)
|
name_hash = RNS.Identity.full_hash(Destination.expand_name(None, app_name, *aspects).encode("utf-8"))[:(RNS.Identity.NAME_HASH_LENGTH//8)]
|
||||||
|
addr_hash_material = name_hash
|
||||||
|
if identity != None:
|
||||||
|
addr_hash_material += identity.hash
|
||||||
|
|
||||||
# Create a digest for the destination
|
return RNS.Identity.full_hash(addr_hash_material)[:RNS.Reticulum.TRUNCATED_HASHLENGTH//8]
|
||||||
return RNS.Identity.full_hash(name.encode("utf-8"))[:RNS.Reticulum.TRUNCATED_HASHLENGTH//8]
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def app_and_aspects_from_name(full_name):
|
def app_and_aspects_from_name(full_name):
|
||||||
@@ -110,8 +115,8 @@ class Destination:
|
|||||||
:returns: A destination name in adressable hash form, for a full name string and Identity instance.
|
:returns: A destination name in adressable hash form, for a full name string and Identity instance.
|
||||||
"""
|
"""
|
||||||
app_name, aspects = Destination.app_and_aspects_from_name(full_name)
|
app_name, aspects = Destination.app_and_aspects_from_name(full_name)
|
||||||
aspects.append(identity.hexhash)
|
|
||||||
return Destination.hash(app_name, *aspects)
|
return Destination.hash(identity, app_name, *aspects)
|
||||||
|
|
||||||
def __init__(self, identity, direction, type, app_name, *aspects):
|
def __init__(self, identity, direction, type, app_name, *aspects):
|
||||||
# Check input values and build name string
|
# Check input values and build name string
|
||||||
@@ -129,9 +134,6 @@ class Destination:
|
|||||||
|
|
||||||
self.links = []
|
self.links = []
|
||||||
|
|
||||||
if identity != None and type == Destination.SINGLE:
|
|
||||||
aspects = aspects+(identity.hexhash,)
|
|
||||||
|
|
||||||
if identity == None and direction == Destination.IN and self.type != Destination.PLAIN:
|
if identity == None and direction == Destination.IN and self.type != Destination.PLAIN:
|
||||||
identity = RNS.Identity()
|
identity = RNS.Identity()
|
||||||
aspects = aspects+(identity.hexhash,)
|
aspects = aspects+(identity.hexhash,)
|
||||||
@@ -140,12 +142,14 @@ class Destination:
|
|||||||
raise TypeError("Selected destination type PLAIN cannot hold an identity")
|
raise TypeError("Selected destination type PLAIN cannot hold an identity")
|
||||||
|
|
||||||
self.identity = identity
|
self.identity = identity
|
||||||
|
self.name = Destination.expand_name(identity, app_name, *aspects)
|
||||||
|
|
||||||
self.name = Destination.full_name(app_name, *aspects)
|
# Generate the destination address hash
|
||||||
self.hash = Destination.hash(app_name, *aspects)
|
self.hash = Destination.hash(self.identity, app_name, *aspects)
|
||||||
|
self.name_hash = RNS.Identity.full_hash(self.expand_name(None, app_name, *aspects).encode("utf-8"))[:(RNS.Identity.NAME_HASH_LENGTH//8)]
|
||||||
self.hexhash = self.hash.hex()
|
self.hexhash = self.hash.hex()
|
||||||
self.default_app_data = None
|
|
||||||
|
|
||||||
|
self.default_app_data = None
|
||||||
self.callback = None
|
self.callback = None
|
||||||
self.proofcallback = None
|
self.proofcallback = None
|
||||||
|
|
||||||
@@ -159,7 +163,7 @@ class Destination:
|
|||||||
return "<"+self.name+"/"+self.hexhash+">"
|
return "<"+self.name+"/"+self.hexhash+">"
|
||||||
|
|
||||||
|
|
||||||
def announce(self, app_data=None, path_response=False):
|
def announce(self, app_data=None, path_response=False, send=True):
|
||||||
"""
|
"""
|
||||||
Creates an announce packet for this destination and broadcasts it on all
|
Creates an announce packet for this destination and broadcasts it on all
|
||||||
relevant interfaces. Application specific data can be added to the announce.
|
relevant interfaces. Application specific data can be added to the announce.
|
||||||
@@ -181,13 +185,13 @@ class Destination:
|
|||||||
if isinstance(returned_app_data, bytes):
|
if isinstance(returned_app_data, bytes):
|
||||||
app_data = returned_app_data
|
app_data = returned_app_data
|
||||||
|
|
||||||
signed_data = self.hash+self.identity.get_public_key()+random_hash
|
signed_data = self.hash+self.identity.get_public_key()+self.name_hash+random_hash
|
||||||
if app_data != None:
|
if app_data != None:
|
||||||
signed_data += app_data
|
signed_data += app_data
|
||||||
|
|
||||||
signature = self.identity.sign(signed_data)
|
signature = self.identity.sign(signed_data)
|
||||||
|
|
||||||
announce_data = self.identity.get_public_key()+random_hash+signature
|
announce_data = self.identity.get_public_key()+self.name_hash+random_hash+signature
|
||||||
|
|
||||||
if app_data != None:
|
if app_data != None:
|
||||||
announce_data += app_data
|
announce_data += app_data
|
||||||
@@ -197,7 +201,12 @@ class Destination:
|
|||||||
else:
|
else:
|
||||||
announce_context = RNS.Packet.NONE
|
announce_context = RNS.Packet.NONE
|
||||||
|
|
||||||
RNS.Packet(self, announce_data, RNS.Packet.ANNOUNCE, context = announce_context).send()
|
announce_packet = RNS.Packet(self, announce_data, RNS.Packet.ANNOUNCE, context = announce_context)
|
||||||
|
|
||||||
|
if send:
|
||||||
|
announce_packet.send()
|
||||||
|
else:
|
||||||
|
return announce_packet
|
||||||
|
|
||||||
def accepts_links(self, accepts = None):
|
def accepts_links(self, accepts = None):
|
||||||
"""
|
"""
|
||||||
|
|||||||
@@ -58,6 +58,7 @@ class Identity:
|
|||||||
HASHLENGTH = 256 # In bits
|
HASHLENGTH = 256 # In bits
|
||||||
SIGLENGTH = KEYSIZE # In bits
|
SIGLENGTH = KEYSIZE # In bits
|
||||||
|
|
||||||
|
NAME_HASH_LENGTH = 80
|
||||||
TRUNCATED_HASHLENGTH = RNS.Reticulum.TRUNCATED_HASHLENGTH
|
TRUNCATED_HASHLENGTH = RNS.Reticulum.TRUNCATED_HASHLENGTH
|
||||||
"""
|
"""
|
||||||
Constant specifying the truncated hash length (in bits) used by Reticulum
|
Constant specifying the truncated hash length (in bits) used by Reticulum
|
||||||
@@ -90,6 +91,13 @@ class Identity:
|
|||||||
identity.app_data = identity_data[3]
|
identity.app_data = identity_data[3]
|
||||||
return identity
|
return identity
|
||||||
else:
|
else:
|
||||||
|
for registered_destination in RNS.Transport.destinations:
|
||||||
|
if destination_hash == registered_destination.hash:
|
||||||
|
identity = Identity(create_keys=False)
|
||||||
|
identity.load_public_key(registered_destination.identity.get_public_key())
|
||||||
|
identity.app_data = None
|
||||||
|
return identity
|
||||||
|
|
||||||
return None
|
return None
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -108,7 +116,26 @@ class Identity:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def save_known_destinations():
|
def save_known_destinations():
|
||||||
|
# TODO: Improve the storage method so we don't have to
|
||||||
|
# deserialize and serialize the entire table on every
|
||||||
|
# save, but the only changes. It might be possible to
|
||||||
|
# simply overwrite on exit now that every local client
|
||||||
|
# disconnect triggers a data persist.
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
if hasattr(Identity, "saving_known_destinations"):
|
||||||
|
wait_interval = 0.2
|
||||||
|
wait_timeout = 5
|
||||||
|
wait_start = time.time()
|
||||||
|
while Identity.saving_known_destinations:
|
||||||
|
time.sleep(wait_interval)
|
||||||
|
if time.time() > wait_start+wait_timeout:
|
||||||
|
RNS.log("Could not save known destinations to storage, waiting for previous save operation timed out.", RNS.LOG_ERROR)
|
||||||
|
return False
|
||||||
|
|
||||||
|
Identity.saving_known_destinations = True
|
||||||
|
save_start = time.time()
|
||||||
|
|
||||||
storage_known_destinations = {}
|
storage_known_destinations = {}
|
||||||
if os.path.isfile(RNS.Reticulum.storagepath+"/known_destinations"):
|
if os.path.isfile(RNS.Reticulum.storagepath+"/known_destinations"):
|
||||||
try:
|
try:
|
||||||
@@ -122,14 +149,24 @@ class Identity:
|
|||||||
if not destination_hash in Identity.known_destinations:
|
if not destination_hash in Identity.known_destinations:
|
||||||
Identity.known_destinations[destination_hash] = storage_known_destinations[destination_hash]
|
Identity.known_destinations[destination_hash] = storage_known_destinations[destination_hash]
|
||||||
|
|
||||||
RNS.log("Saving known destinations to storage...", RNS.LOG_VERBOSE)
|
RNS.log("Saving "+str(len(Identity.known_destinations))+" known destinations to storage...", RNS.LOG_DEBUG)
|
||||||
file = open(RNS.Reticulum.storagepath+"/known_destinations","wb")
|
file = open(RNS.Reticulum.storagepath+"/known_destinations","wb")
|
||||||
umsgpack.dump(Identity.known_destinations, file)
|
umsgpack.dump(Identity.known_destinations, file)
|
||||||
file.close()
|
file.close()
|
||||||
RNS.log("Done saving known destinations to storage", RNS.LOG_VERBOSE)
|
|
||||||
|
save_time = time.time() - save_start
|
||||||
|
if save_time < 1:
|
||||||
|
time_str = str(round(save_time*1000,2))+"ms"
|
||||||
|
else:
|
||||||
|
time_str = str(round(save_time,2))+"s"
|
||||||
|
|
||||||
|
RNS.log("Saved known destinations to storage in "+time_str, RNS.LOG_DEBUG)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while saving known destinations to disk, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Error while saving known destinations to disk, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
Identity.saving_known_destinations = False
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def load_known_destinations():
|
def load_known_destinations():
|
||||||
if os.path.isfile(RNS.Reticulum.storagepath+"/known_destinations"):
|
if os.path.isfile(RNS.Reticulum.storagepath+"/known_destinations"):
|
||||||
@@ -185,33 +222,52 @@ class Identity:
|
|||||||
if packet.packet_type == RNS.Packet.ANNOUNCE:
|
if packet.packet_type == RNS.Packet.ANNOUNCE:
|
||||||
destination_hash = packet.destination_hash
|
destination_hash = packet.destination_hash
|
||||||
public_key = packet.data[:Identity.KEYSIZE//8]
|
public_key = packet.data[:Identity.KEYSIZE//8]
|
||||||
random_hash = packet.data[Identity.KEYSIZE//8:Identity.KEYSIZE//8+10]
|
name_hash = packet.data[Identity.KEYSIZE//8:Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8]
|
||||||
signature = packet.data[Identity.KEYSIZE//8+10:Identity.KEYSIZE//8+10+Identity.KEYSIZE//8]
|
random_hash = packet.data[Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8:Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8+10]
|
||||||
|
signature = packet.data[Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8+10:Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8+10+Identity.SIGLENGTH//8]
|
||||||
app_data = b""
|
app_data = b""
|
||||||
if len(packet.data) > Identity.KEYSIZE//8+10+Identity.KEYSIZE//8:
|
if len(packet.data) > Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8+10+Identity.SIGLENGTH//8:
|
||||||
app_data = packet.data[Identity.KEYSIZE//8+10+Identity.KEYSIZE//8:]
|
app_data = packet.data[Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8+10+Identity.SIGLENGTH//8:]
|
||||||
|
|
||||||
signed_data = destination_hash+public_key+random_hash+app_data
|
signed_data = destination_hash+public_key+name_hash+random_hash+app_data
|
||||||
|
|
||||||
if not len(packet.data) > Identity.KEYSIZE//8+10+Identity.KEYSIZE//8:
|
if not len(packet.data) > Identity.KEYSIZE//8+Identity.NAME_HASH_LENGTH//8+10+Identity.SIGLENGTH//8:
|
||||||
app_data = None
|
app_data = None
|
||||||
|
|
||||||
announced_identity = Identity(create_keys=False)
|
announced_identity = Identity(create_keys=False)
|
||||||
announced_identity.load_public_key(public_key)
|
announced_identity.load_public_key(public_key)
|
||||||
|
|
||||||
if announced_identity.pub != None and announced_identity.validate(signature, signed_data):
|
if announced_identity.pub != None and announced_identity.validate(signature, signed_data):
|
||||||
RNS.Identity.remember(packet.get_hash(), destination_hash, public_key, app_data)
|
hash_material = name_hash+announced_identity.hash
|
||||||
del announced_identity
|
expected_hash = RNS.Identity.full_hash(hash_material)[:RNS.Reticulum.TRUNCATED_HASHLENGTH//8]
|
||||||
|
|
||||||
|
if destination_hash == expected_hash:
|
||||||
|
# Check if we already have a public key for this destination
|
||||||
|
# and make sure the public key is not different.
|
||||||
|
if destination_hash in Identity.known_destinations:
|
||||||
|
if public_key != Identity.known_destinations[destination_hash][2]:
|
||||||
|
# In reality, this should never occur, but in the odd case
|
||||||
|
# that someone manages a hash collision, we reject the announce.
|
||||||
|
RNS.log("Received announce with valid signature and destination hash, but announced public key does not match already known public key.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("This may indicate an attempt to modify network paths, or a random hash collision. The announce was rejected.", RNS.LOG_CRITICAL)
|
||||||
|
return False
|
||||||
|
|
||||||
|
RNS.Identity.remember(packet.get_hash(), destination_hash, public_key, app_data)
|
||||||
|
del announced_identity
|
||||||
|
|
||||||
|
if hasattr(packet, "transport_id") and packet.transport_id != None:
|
||||||
|
RNS.log("Valid announce for "+RNS.prettyhexrep(destination_hash)+" "+str(packet.hops)+" hops away, received via "+RNS.prettyhexrep(packet.transport_id)+" on "+str(packet.receiving_interface), RNS.LOG_EXTREME)
|
||||||
|
else:
|
||||||
|
RNS.log("Valid announce for "+RNS.prettyhexrep(destination_hash)+" "+str(packet.hops)+" hops away, received on "+str(packet.receiving_interface), RNS.LOG_EXTREME)
|
||||||
|
|
||||||
|
return True
|
||||||
|
|
||||||
if hasattr(packet, "transport_id") and packet.transport_id != None:
|
|
||||||
RNS.log("Valid announce for "+RNS.prettyhexrep(destination_hash)+" "+str(packet.hops)+" hops away, received via "+RNS.prettyhexrep(packet.transport_id)+" on "+str(packet.receiving_interface), RNS.LOG_EXTREME)
|
|
||||||
else:
|
else:
|
||||||
RNS.log("Valid announce for "+RNS.prettyhexrep(destination_hash)+" "+str(packet.hops)+" hops away, received on "+str(packet.receiving_interface), RNS.LOG_EXTREME)
|
RNS.log("Received invalid announce for "+RNS.prettyhexrep(destination_hash)+": Destination mismatch.", RNS.LOG_DEBUG)
|
||||||
|
return False
|
||||||
return True
|
|
||||||
|
|
||||||
else:
|
else:
|
||||||
RNS.log("Received invalid announce for "+RNS.prettyhexrep(destination_hash), RNS.LOG_DEBUG)
|
RNS.log("Received invalid announce for "+RNS.prettyhexrep(destination_hash)+": Invalid signature.", RNS.LOG_DEBUG)
|
||||||
del announced_identity
|
del announced_identity
|
||||||
return False
|
return False
|
||||||
|
|
||||||
@@ -219,9 +275,14 @@ class Identity:
|
|||||||
RNS.log("Error occurred while validating announce. The contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Error occurred while validating announce. The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def persist_data():
|
||||||
|
if not RNS.Transport.owner.is_connected_to_shared_instance:
|
||||||
|
Identity.save_known_destinations()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def exit_handler():
|
def exit_handler():
|
||||||
Identity.save_known_destinations()
|
Identity.persist_data()
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ class AX25KISSInterface(Interface):
|
|||||||
# Allow time for interface to initialise before config
|
# Allow time for interface to initialise before config
|
||||||
sleep(2.0)
|
sleep(2.0)
|
||||||
thread = threading.Thread(target=self.readLoop)
|
thread = threading.Thread(target=self.readLoop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
self.online = True
|
self.online = True
|
||||||
RNS.log("Serial port "+self.port+" is now open")
|
RNS.log("Serial port "+self.port+" is now open")
|
||||||
|
|||||||
@@ -0,0 +1,407 @@
|
|||||||
|
# MIT License
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016-2022 Mark Qvist / unsigned.io
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
|
# copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
from RNS.Interfaces.Interface import Interface
|
||||||
|
from time import sleep
|
||||||
|
import sys
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
import RNS
|
||||||
|
|
||||||
|
class KISS():
|
||||||
|
FEND = 0xC0
|
||||||
|
FESC = 0xDB
|
||||||
|
TFEND = 0xDC
|
||||||
|
TFESC = 0xDD
|
||||||
|
CMD_UNKNOWN = 0xFE
|
||||||
|
CMD_DATA = 0x00
|
||||||
|
CMD_TXDELAY = 0x01
|
||||||
|
CMD_P = 0x02
|
||||||
|
CMD_SLOTTIME = 0x03
|
||||||
|
CMD_TXTAIL = 0x04
|
||||||
|
CMD_FULLDUPLEX = 0x05
|
||||||
|
CMD_SETHARDWARE = 0x06
|
||||||
|
CMD_READY = 0x0F
|
||||||
|
CMD_RETURN = 0xFF
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def escape(data):
|
||||||
|
data = data.replace(bytes([0xdb]), bytes([0xdb, 0xdd]))
|
||||||
|
data = data.replace(bytes([0xc0]), bytes([0xdb, 0xdc]))
|
||||||
|
return data
|
||||||
|
|
||||||
|
class KISSInterface(Interface):
|
||||||
|
MAX_CHUNK = 32768
|
||||||
|
BITRATE_GUESS = 1200
|
||||||
|
|
||||||
|
owner = None
|
||||||
|
port = None
|
||||||
|
speed = None
|
||||||
|
databits = None
|
||||||
|
parity = None
|
||||||
|
stopbits = None
|
||||||
|
serial = None
|
||||||
|
|
||||||
|
def __init__(self, owner, name, port, speed, databits, parity, stopbits, preamble, txtail, persistence, slottime, flow_control, beacon_interval, beacon_data):
|
||||||
|
import importlib
|
||||||
|
if RNS.vendor.platformutils.is_android():
|
||||||
|
self.on_android = True
|
||||||
|
if importlib.util.find_spec('usbserial4a') != None:
|
||||||
|
if importlib.util.find_spec('jnius') == None:
|
||||||
|
RNS.log("Could not load jnius API wrapper for Android, KISS interface cannot be created.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("This probably means you are trying to use an USB-based interface from within Termux or similar.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("This is currently not possible, due to this environment limiting access to the native Android APIs.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.panic()
|
||||||
|
|
||||||
|
from usbserial4a import serial4a as serial
|
||||||
|
self.parity = "N"
|
||||||
|
|
||||||
|
else:
|
||||||
|
RNS.log("Could not load USB serial module for Android, KISS interface cannot be created.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("You can install this module by issuing: pip install usbserial4a", RNS.LOG_CRITICAL)
|
||||||
|
RNS.panic()
|
||||||
|
else:
|
||||||
|
raise SystemError("Android-specific interface was used on non-Android OS")
|
||||||
|
|
||||||
|
self.rxb = 0
|
||||||
|
self.txb = 0
|
||||||
|
|
||||||
|
self.HW_MTU = 564
|
||||||
|
|
||||||
|
if beacon_data == None:
|
||||||
|
beacon_data = ""
|
||||||
|
|
||||||
|
self.pyserial = serial
|
||||||
|
self.serial = None
|
||||||
|
self.owner = owner
|
||||||
|
self.name = name
|
||||||
|
self.port = port
|
||||||
|
self.speed = speed
|
||||||
|
self.databits = databits
|
||||||
|
self.parity = "N"
|
||||||
|
self.stopbits = stopbits
|
||||||
|
self.timeout = 100
|
||||||
|
self.online = False
|
||||||
|
self.beacon_i = beacon_interval
|
||||||
|
self.beacon_d = beacon_data.encode("utf-8")
|
||||||
|
self.first_tx = None
|
||||||
|
self.bitrate = KISSInterface.BITRATE_GUESS
|
||||||
|
|
||||||
|
self.packet_queue = []
|
||||||
|
self.flow_control = flow_control
|
||||||
|
self.interface_ready = False
|
||||||
|
self.flow_control_timeout = 5
|
||||||
|
self.flow_control_locked = time.time()
|
||||||
|
|
||||||
|
self.preamble = preamble if preamble != None else 350;
|
||||||
|
self.txtail = txtail if txtail != None else 20;
|
||||||
|
self.persistence = persistence if persistence != None else 64;
|
||||||
|
self.slottime = slottime if slottime != None else 20;
|
||||||
|
|
||||||
|
if parity.lower() == "e" or parity.lower() == "even":
|
||||||
|
self.parity = "E"
|
||||||
|
|
||||||
|
if parity.lower() == "o" or parity.lower() == "odd":
|
||||||
|
self.parity = "O"
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.open_port()
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Could not open serial port "+self.port, RNS.LOG_ERROR)
|
||||||
|
raise e
|
||||||
|
|
||||||
|
if self.serial.is_open:
|
||||||
|
self.configure_device()
|
||||||
|
else:
|
||||||
|
raise IOError("Could not open serial port")
|
||||||
|
|
||||||
|
|
||||||
|
def open_port(self):
|
||||||
|
RNS.log("Opening serial port "+self.port+"...")
|
||||||
|
# Get device parameters
|
||||||
|
from usb4a import usb
|
||||||
|
device = usb.get_usb_device(self.port)
|
||||||
|
if device:
|
||||||
|
vid = device.getVendorId()
|
||||||
|
pid = device.getProductId()
|
||||||
|
|
||||||
|
# Driver overrides for speficic chips
|
||||||
|
proxy = self.pyserial.get_serial_port
|
||||||
|
if vid == 0x1A86 and pid == 0x55D4:
|
||||||
|
# Force CDC driver for Qinheng CH34x
|
||||||
|
RNS.log(str(self)+" using CDC driver for "+RNS.hexrep(vid)+":"+RNS.hexrep(pid), RNS.LOG_DEBUG)
|
||||||
|
from usbserial4a.cdcacmserial4a import CdcAcmSerial
|
||||||
|
proxy = CdcAcmSerial
|
||||||
|
|
||||||
|
self.serial = proxy(
|
||||||
|
self.port,
|
||||||
|
baudrate = self.speed,
|
||||||
|
bytesize = self.databits,
|
||||||
|
parity = self.parity,
|
||||||
|
stopbits = self.stopbits,
|
||||||
|
xonxoff = False,
|
||||||
|
rtscts = False,
|
||||||
|
timeout = None,
|
||||||
|
inter_byte_timeout = None,
|
||||||
|
# write_timeout = wtimeout,
|
||||||
|
dsrdtr = False,
|
||||||
|
)
|
||||||
|
|
||||||
|
if vid == 0x0403:
|
||||||
|
# Hardware parameters for FTDI devices @ 115200 baud
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 16 * 1024
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 100
|
||||||
|
self.serial.timeout = 0.1
|
||||||
|
elif vid == 0x10C4:
|
||||||
|
# Hardware parameters for SiLabs CP210x @ 115200 baud
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 64
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 12
|
||||||
|
self.serial.timeout = 0.012
|
||||||
|
elif vid == 0x1A86 and pid == 0x55D4:
|
||||||
|
# Hardware parameters for Qinheng CH34x @ 115200 baud
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 64
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 12
|
||||||
|
self.serial.timeout = 0.1
|
||||||
|
else:
|
||||||
|
# Default values
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 1 * 1024
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 100
|
||||||
|
self.serial.timeout = 0.1
|
||||||
|
|
||||||
|
RNS.log(str(self)+" USB read buffer size set to "+RNS.prettysize(self.serial.DEFAULT_READ_BUFFER_SIZE), RNS.LOG_DEBUG)
|
||||||
|
RNS.log(str(self)+" USB read timeout set to "+str(self.serial.USB_READ_TIMEOUT_MILLIS)+"ms", RNS.LOG_DEBUG)
|
||||||
|
RNS.log(str(self)+" USB write timeout set to "+str(self.serial.USB_WRITE_TIMEOUT_MILLIS)+"ms", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
def configure_device(self):
|
||||||
|
# Allow time for interface to initialise before config
|
||||||
|
sleep(2.0)
|
||||||
|
thread = threading.Thread(target=self.readLoop)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
self.online = True
|
||||||
|
RNS.log("Serial port "+self.port+" is now open")
|
||||||
|
RNS.log("Configuring KISS interface parameters...")
|
||||||
|
self.setPreamble(self.preamble)
|
||||||
|
self.setTxTail(self.txtail)
|
||||||
|
self.setPersistence(self.persistence)
|
||||||
|
self.setSlotTime(self.slottime)
|
||||||
|
self.setFlowControl(self.flow_control)
|
||||||
|
self.interface_ready = True
|
||||||
|
RNS.log("KISS interface configured")
|
||||||
|
|
||||||
|
def setPreamble(self, preamble):
|
||||||
|
preamble_ms = preamble
|
||||||
|
preamble = int(preamble_ms / 10)
|
||||||
|
if preamble < 0:
|
||||||
|
preamble = 0
|
||||||
|
if preamble > 255:
|
||||||
|
preamble = 255
|
||||||
|
|
||||||
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_TXDELAY])+bytes([preamble])+bytes([KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("Could not configure KISS interface preamble to "+str(preamble_ms)+" (command value "+str(preamble)+")")
|
||||||
|
|
||||||
|
def setTxTail(self, txtail):
|
||||||
|
txtail_ms = txtail
|
||||||
|
txtail = int(txtail_ms / 10)
|
||||||
|
if txtail < 0:
|
||||||
|
txtail = 0
|
||||||
|
if txtail > 255:
|
||||||
|
txtail = 255
|
||||||
|
|
||||||
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_TXTAIL])+bytes([txtail])+bytes([KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("Could not configure KISS interface TX tail to "+str(txtail_ms)+" (command value "+str(txtail)+")")
|
||||||
|
|
||||||
|
def setPersistence(self, persistence):
|
||||||
|
if persistence < 0:
|
||||||
|
persistence = 0
|
||||||
|
if persistence > 255:
|
||||||
|
persistence = 255
|
||||||
|
|
||||||
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_P])+bytes([persistence])+bytes([KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("Could not configure KISS interface persistence to "+str(persistence))
|
||||||
|
|
||||||
|
def setSlotTime(self, slottime):
|
||||||
|
slottime_ms = slottime
|
||||||
|
slottime = int(slottime_ms / 10)
|
||||||
|
if slottime < 0:
|
||||||
|
slottime = 0
|
||||||
|
if slottime > 255:
|
||||||
|
slottime = 255
|
||||||
|
|
||||||
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_SLOTTIME])+bytes([slottime])+bytes([KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("Could not configure KISS interface slot time to "+str(slottime_ms)+" (command value "+str(slottime)+")")
|
||||||
|
|
||||||
|
def setFlowControl(self, flow_control):
|
||||||
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_READY])+bytes([0x01])+bytes([KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
if (flow_control):
|
||||||
|
raise IOError("Could not enable KISS interface flow control")
|
||||||
|
else:
|
||||||
|
raise IOError("Could not enable KISS interface flow control")
|
||||||
|
|
||||||
|
|
||||||
|
def processIncoming(self, data):
|
||||||
|
self.rxb += len(data)
|
||||||
|
def af():
|
||||||
|
self.owner.inbound(data, self)
|
||||||
|
threading.Thread(target=af, daemon=True).start()
|
||||||
|
|
||||||
|
def processOutgoing(self,data):
|
||||||
|
datalen = len(data)
|
||||||
|
if self.online:
|
||||||
|
if self.interface_ready:
|
||||||
|
if self.flow_control:
|
||||||
|
self.interface_ready = False
|
||||||
|
self.flow_control_locked = time.time()
|
||||||
|
|
||||||
|
data = data.replace(bytes([0xdb]), bytes([0xdb])+bytes([0xdd]))
|
||||||
|
data = data.replace(bytes([0xc0]), bytes([0xdb])+bytes([0xdc]))
|
||||||
|
frame = bytes([KISS.FEND])+bytes([0x00])+data+bytes([KISS.FEND])
|
||||||
|
|
||||||
|
written = self.serial.write(frame)
|
||||||
|
self.txb += datalen
|
||||||
|
|
||||||
|
if data == self.beacon_d:
|
||||||
|
self.first_tx = None
|
||||||
|
else:
|
||||||
|
if self.first_tx == None:
|
||||||
|
self.first_tx = time.time()
|
||||||
|
|
||||||
|
if written != len(frame):
|
||||||
|
raise IOError("Serial interface only wrote "+str(written)+" bytes of "+str(len(data)))
|
||||||
|
|
||||||
|
else:
|
||||||
|
self.queue(data)
|
||||||
|
|
||||||
|
def queue(self, data):
|
||||||
|
self.packet_queue.append(data)
|
||||||
|
|
||||||
|
def process_queue(self):
|
||||||
|
if len(self.packet_queue) > 0:
|
||||||
|
data = self.packet_queue.pop(0)
|
||||||
|
self.interface_ready = True
|
||||||
|
self.processOutgoing(data)
|
||||||
|
elif len(self.packet_queue) == 0:
|
||||||
|
self.interface_ready = True
|
||||||
|
|
||||||
|
def readLoop(self):
|
||||||
|
try:
|
||||||
|
in_frame = False
|
||||||
|
escape = False
|
||||||
|
command = KISS.CMD_UNKNOWN
|
||||||
|
data_buffer = b""
|
||||||
|
last_read_ms = int(time.time()*1000)
|
||||||
|
|
||||||
|
while self.serial.is_open:
|
||||||
|
serial_bytes = self.serial.read()
|
||||||
|
got = len(serial_bytes)
|
||||||
|
|
||||||
|
for byte in serial_bytes:
|
||||||
|
last_read_ms = int(time.time()*1000)
|
||||||
|
|
||||||
|
if (in_frame and byte == KISS.FEND and command == KISS.CMD_DATA):
|
||||||
|
in_frame = False
|
||||||
|
self.processIncoming(data_buffer)
|
||||||
|
elif (byte == KISS.FEND):
|
||||||
|
in_frame = True
|
||||||
|
command = KISS.CMD_UNKNOWN
|
||||||
|
data_buffer = b""
|
||||||
|
elif (in_frame and len(data_buffer) < self.HW_MTU):
|
||||||
|
if (len(data_buffer) == 0 and command == KISS.CMD_UNKNOWN):
|
||||||
|
# We only support one HDLC port for now, so
|
||||||
|
# strip off the port nibble
|
||||||
|
byte = byte & 0x0F
|
||||||
|
command = byte
|
||||||
|
elif (command == KISS.CMD_DATA):
|
||||||
|
if (byte == KISS.FESC):
|
||||||
|
escape = True
|
||||||
|
else:
|
||||||
|
if (escape):
|
||||||
|
if (byte == KISS.TFEND):
|
||||||
|
byte = KISS.FEND
|
||||||
|
if (byte == KISS.TFESC):
|
||||||
|
byte = KISS.FESC
|
||||||
|
escape = False
|
||||||
|
data_buffer = data_buffer+bytes([byte])
|
||||||
|
elif (command == KISS.CMD_READY):
|
||||||
|
self.process_queue()
|
||||||
|
|
||||||
|
if got == 0:
|
||||||
|
time_since_last = int(time.time()*1000) - last_read_ms
|
||||||
|
if len(data_buffer) > 0 and time_since_last > self.timeout:
|
||||||
|
data_buffer = b""
|
||||||
|
in_frame = False
|
||||||
|
command = KISS.CMD_UNKNOWN
|
||||||
|
escape = False
|
||||||
|
sleep(0.05)
|
||||||
|
|
||||||
|
if self.flow_control:
|
||||||
|
if not self.interface_ready:
|
||||||
|
if time.time() > self.flow_control_locked + self.flow_control_timeout:
|
||||||
|
RNS.log("Interface "+str(self)+" is unlocking flow control due to time-out. This should not happen. Your hardware might have missed a flow-control READY command, or maybe it does not support flow-control.", RNS.LOG_WARNING)
|
||||||
|
self.process_queue()
|
||||||
|
|
||||||
|
if self.beacon_i != None and self.beacon_d != None:
|
||||||
|
if self.first_tx != None:
|
||||||
|
if time.time() > self.first_tx + self.beacon_i:
|
||||||
|
RNS.log("Interface "+str(self)+" is transmitting beacon data: "+str(self.beacon_d.decode("utf-8")), RNS.LOG_DEBUG)
|
||||||
|
self.first_tx = None
|
||||||
|
self.processOutgoing(self.beacon_d)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
self.online = False
|
||||||
|
RNS.log("A serial port error occurred, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
RNS.log("The interface "+str(self)+" experienced an unrecoverable error and is now offline.", RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
if RNS.Reticulum.panic_on_interface_error:
|
||||||
|
RNS.panic()
|
||||||
|
|
||||||
|
RNS.log("Reticulum will attempt to reconnect the interface periodically.", RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
self.online = False
|
||||||
|
self.serial.close()
|
||||||
|
self.reconnect_port()
|
||||||
|
|
||||||
|
def reconnect_port(self):
|
||||||
|
while not self.online:
|
||||||
|
try:
|
||||||
|
time.sleep(5)
|
||||||
|
RNS.log("Attempting to reconnect serial port "+str(self.port)+" for "+str(self)+"...", RNS.LOG_VERBOSE)
|
||||||
|
self.open_port()
|
||||||
|
if self.serial.is_open:
|
||||||
|
self.configure_device()
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while reconnecting port, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
RNS.log("Reconnected serial port for "+str(self))
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "KISSInterface["+self.name+"]"
|
||||||
@@ -0,0 +1,258 @@
|
|||||||
|
# MIT License
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016-2022 Mark Qvist / unsigned.io
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
|
# copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
from RNS.Interfaces.Interface import Interface
|
||||||
|
from time import sleep
|
||||||
|
import sys
|
||||||
|
import threading
|
||||||
|
import time
|
||||||
|
import RNS
|
||||||
|
|
||||||
|
class HDLC():
|
||||||
|
# The Serial Interface packetizes data using
|
||||||
|
# simplified HDLC framing, similar to PPP
|
||||||
|
FLAG = 0x7E
|
||||||
|
ESC = 0x7D
|
||||||
|
ESC_MASK = 0x20
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def escape(data):
|
||||||
|
data = data.replace(bytes([HDLC.ESC]), bytes([HDLC.ESC, HDLC.ESC^HDLC.ESC_MASK]))
|
||||||
|
data = data.replace(bytes([HDLC.FLAG]), bytes([HDLC.ESC, HDLC.FLAG^HDLC.ESC_MASK]))
|
||||||
|
return data
|
||||||
|
|
||||||
|
class SerialInterface(Interface):
|
||||||
|
MAX_CHUNK = 32768
|
||||||
|
|
||||||
|
owner = None
|
||||||
|
port = None
|
||||||
|
speed = None
|
||||||
|
databits = None
|
||||||
|
parity = None
|
||||||
|
stopbits = None
|
||||||
|
serial = None
|
||||||
|
|
||||||
|
def __init__(self, owner, name, port, speed, databits, parity, stopbits):
|
||||||
|
import importlib
|
||||||
|
if RNS.vendor.platformutils.is_android():
|
||||||
|
self.on_android = True
|
||||||
|
if importlib.util.find_spec('usbserial4a') != None:
|
||||||
|
if importlib.util.find_spec('jnius') == None:
|
||||||
|
RNS.log("Could not load jnius API wrapper for Android, Serial interface cannot be created.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("This probably means you are trying to use an USB-based interface from within Termux or similar.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("This is currently not possible, due to this environment limiting access to the native Android APIs.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.panic()
|
||||||
|
|
||||||
|
from usbserial4a import serial4a as serial
|
||||||
|
self.parity = "N"
|
||||||
|
|
||||||
|
else:
|
||||||
|
RNS.log("Could not load USB serial module for Android, Serial interface cannot be created.", RNS.LOG_CRITICAL)
|
||||||
|
RNS.log("You can install this module by issuing: pip install usbserial4a", RNS.LOG_CRITICAL)
|
||||||
|
RNS.panic()
|
||||||
|
else:
|
||||||
|
raise SystemError("Android-specific interface was used on non-Android OS")
|
||||||
|
|
||||||
|
self.rxb = 0
|
||||||
|
self.txb = 0
|
||||||
|
|
||||||
|
self.HW_MTU = 564
|
||||||
|
|
||||||
|
self.pyserial = serial
|
||||||
|
self.serial = None
|
||||||
|
self.owner = owner
|
||||||
|
self.name = name
|
||||||
|
self.port = port
|
||||||
|
self.speed = speed
|
||||||
|
self.databits = databits
|
||||||
|
self.parity = "N"
|
||||||
|
self.stopbits = stopbits
|
||||||
|
self.timeout = 100
|
||||||
|
self.online = False
|
||||||
|
self.bitrate = self.speed
|
||||||
|
|
||||||
|
if parity.lower() == "e" or parity.lower() == "even":
|
||||||
|
self.parity = "E"
|
||||||
|
|
||||||
|
if parity.lower() == "o" or parity.lower() == "odd":
|
||||||
|
self.parity = "O"
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.open_port()
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Could not open serial port for interface "+str(self), RNS.LOG_ERROR)
|
||||||
|
raise e
|
||||||
|
|
||||||
|
if self.serial.is_open:
|
||||||
|
self.configure_device()
|
||||||
|
else:
|
||||||
|
raise IOError("Could not open serial port")
|
||||||
|
|
||||||
|
|
||||||
|
def open_port(self):
|
||||||
|
RNS.log("Opening serial port "+self.port+"...")
|
||||||
|
# Get device parameters
|
||||||
|
from usb4a import usb
|
||||||
|
device = usb.get_usb_device(self.port)
|
||||||
|
if device:
|
||||||
|
vid = device.getVendorId()
|
||||||
|
pid = device.getProductId()
|
||||||
|
|
||||||
|
# Driver overrides for speficic chips
|
||||||
|
proxy = self.pyserial.get_serial_port
|
||||||
|
if vid == 0x1A86 and pid == 0x55D4:
|
||||||
|
# Force CDC driver for Qinheng CH34x
|
||||||
|
RNS.log(str(self)+" using CDC driver for "+RNS.hexrep(vid)+":"+RNS.hexrep(pid), RNS.LOG_DEBUG)
|
||||||
|
from usbserial4a.cdcacmserial4a import CdcAcmSerial
|
||||||
|
proxy = CdcAcmSerial
|
||||||
|
|
||||||
|
self.serial = proxy(
|
||||||
|
self.port,
|
||||||
|
baudrate = self.speed,
|
||||||
|
bytesize = self.databits,
|
||||||
|
parity = self.parity,
|
||||||
|
stopbits = self.stopbits,
|
||||||
|
xonxoff = False,
|
||||||
|
rtscts = False,
|
||||||
|
timeout = None,
|
||||||
|
inter_byte_timeout = None,
|
||||||
|
# write_timeout = wtimeout,
|
||||||
|
dsrdtr = False,
|
||||||
|
)
|
||||||
|
|
||||||
|
if vid == 0x0403:
|
||||||
|
# Hardware parameters for FTDI devices @ 115200 baud
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 16 * 1024
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 100
|
||||||
|
self.serial.timeout = 0.1
|
||||||
|
elif vid == 0x10C4:
|
||||||
|
# Hardware parameters for SiLabs CP210x @ 115200 baud
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 64
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 12
|
||||||
|
self.serial.timeout = 0.012
|
||||||
|
elif vid == 0x1A86 and pid == 0x55D4:
|
||||||
|
# Hardware parameters for Qinheng CH34x @ 115200 baud
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 64
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 12
|
||||||
|
self.serial.timeout = 0.1
|
||||||
|
else:
|
||||||
|
# Default values
|
||||||
|
self.serial.DEFAULT_READ_BUFFER_SIZE = 1 * 1024
|
||||||
|
self.serial.USB_READ_TIMEOUT_MILLIS = 100
|
||||||
|
self.serial.timeout = 0.1
|
||||||
|
|
||||||
|
RNS.log(str(self)+" USB read buffer size set to "+RNS.prettysize(self.serial.DEFAULT_READ_BUFFER_SIZE), RNS.LOG_DEBUG)
|
||||||
|
RNS.log(str(self)+" USB read timeout set to "+str(self.serial.USB_READ_TIMEOUT_MILLIS)+"ms", RNS.LOG_DEBUG)
|
||||||
|
RNS.log(str(self)+" USB write timeout set to "+str(self.serial.USB_WRITE_TIMEOUT_MILLIS)+"ms", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
def configure_device(self):
|
||||||
|
sleep(0.5)
|
||||||
|
thread = threading.Thread(target=self.readLoop)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
self.online = True
|
||||||
|
RNS.log("Serial port "+self.port+" is now open", RNS.LOG_VERBOSE)
|
||||||
|
|
||||||
|
|
||||||
|
def processIncoming(self, data):
|
||||||
|
self.rxb += len(data)
|
||||||
|
def af():
|
||||||
|
self.owner.inbound(data, self)
|
||||||
|
threading.Thread(target=af, daemon=True).start()
|
||||||
|
|
||||||
|
def processOutgoing(self,data):
|
||||||
|
if self.online:
|
||||||
|
data = bytes([HDLC.FLAG])+HDLC.escape(data)+bytes([HDLC.FLAG])
|
||||||
|
written = self.serial.write(data)
|
||||||
|
self.txb += len(data)
|
||||||
|
if written != len(data):
|
||||||
|
raise IOError("Serial interface only wrote "+str(written)+" bytes of "+str(len(data)))
|
||||||
|
|
||||||
|
def readLoop(self):
|
||||||
|
try:
|
||||||
|
in_frame = False
|
||||||
|
escape = False
|
||||||
|
data_buffer = b""
|
||||||
|
last_read_ms = int(time.time()*1000)
|
||||||
|
|
||||||
|
while self.serial.is_open:
|
||||||
|
serial_bytes = self.serial.read()
|
||||||
|
got = len(serial_bytes)
|
||||||
|
|
||||||
|
for byte in serial_bytes:
|
||||||
|
last_read_ms = int(time.time()*1000)
|
||||||
|
|
||||||
|
if (in_frame and byte == HDLC.FLAG):
|
||||||
|
in_frame = False
|
||||||
|
self.processIncoming(data_buffer)
|
||||||
|
elif (byte == HDLC.FLAG):
|
||||||
|
in_frame = True
|
||||||
|
data_buffer = b""
|
||||||
|
elif (in_frame and len(data_buffer) < self.HW_MTU):
|
||||||
|
if (byte == HDLC.ESC):
|
||||||
|
escape = True
|
||||||
|
else:
|
||||||
|
if (escape):
|
||||||
|
if (byte == HDLC.FLAG ^ HDLC.ESC_MASK):
|
||||||
|
byte = HDLC.FLAG
|
||||||
|
if (byte == HDLC.ESC ^ HDLC.ESC_MASK):
|
||||||
|
byte = HDLC.ESC
|
||||||
|
escape = False
|
||||||
|
data_buffer = data_buffer+bytes([byte])
|
||||||
|
|
||||||
|
if got == 0:
|
||||||
|
time_since_last = int(time.time()*1000) - last_read_ms
|
||||||
|
if len(data_buffer) > 0 and time_since_last > self.timeout:
|
||||||
|
data_buffer = b""
|
||||||
|
in_frame = False
|
||||||
|
escape = False
|
||||||
|
# sleep(0.08)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
self.online = False
|
||||||
|
RNS.log("A serial port error occurred, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
RNS.log("The interface "+str(self)+" experienced an unrecoverable error and is now offline.", RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
if RNS.Reticulum.panic_on_interface_error:
|
||||||
|
RNS.panic()
|
||||||
|
|
||||||
|
RNS.log("Reticulum will attempt to reconnect the interface periodically.", RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
self.online = False
|
||||||
|
self.serial.close()
|
||||||
|
self.reconnect_port()
|
||||||
|
|
||||||
|
def reconnect_port(self):
|
||||||
|
while not self.online:
|
||||||
|
try:
|
||||||
|
time.sleep(5)
|
||||||
|
RNS.log("Attempting to reconnect serial port "+str(self.port)+" for "+str(self)+"...", RNS.LOG_VERBOSE)
|
||||||
|
self.open_port()
|
||||||
|
if self.serial.is_open:
|
||||||
|
self.configure_device()
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while reconnecting port, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
RNS.log("Reconnected serial port for "+str(self))
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "SerialInterface["+self.name+"]"
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
# MIT License
|
||||||
|
#
|
||||||
|
# Copyright (c) 2016-2022 Mark Qvist / unsigned.io
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in all
|
||||||
|
# copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
# SOFTWARE.
|
||||||
|
|
||||||
|
import os
|
||||||
|
import glob
|
||||||
|
|
||||||
|
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||||
|
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||||
@@ -48,6 +48,11 @@ class AutoInterface(Interface):
|
|||||||
|
|
||||||
BITRATE_GUESS = 10*1000*1000
|
BITRATE_GUESS = 10*1000*1000
|
||||||
|
|
||||||
|
def handler_factory(self, callback):
|
||||||
|
def create_handler(*args, **keys):
|
||||||
|
return AutoInterfaceHandler(callback, *args, **keys)
|
||||||
|
return create_handler
|
||||||
|
|
||||||
def __init__(self, owner, name, group_id=None, discovery_scope=None, discovery_port=None, data_port=None, allowed_interfaces=None, ignored_interfaces=None, configured_bitrate=None):
|
def __init__(self, owner, name, group_id=None, discovery_scope=None, discovery_port=None, data_port=None, allowed_interfaces=None, ignored_interfaces=None, configured_bitrate=None):
|
||||||
import importlib
|
import importlib
|
||||||
if importlib.util.find_spec('netifaces') != None:
|
if importlib.util.find_spec('netifaces') != None:
|
||||||
@@ -70,11 +75,13 @@ class AutoInterface(Interface):
|
|||||||
self.peers = {}
|
self.peers = {}
|
||||||
self.link_local_addresses = []
|
self.link_local_addresses = []
|
||||||
self.adopted_interfaces = {}
|
self.adopted_interfaces = {}
|
||||||
|
self.interface_servers = {}
|
||||||
self.multicast_echoes = {}
|
self.multicast_echoes = {}
|
||||||
self.timed_out_interfaces = {}
|
self.timed_out_interfaces = {}
|
||||||
|
|
||||||
self.outbound_udp_socket = None
|
self.outbound_udp_socket = None
|
||||||
|
|
||||||
|
self.announce_rate_target = None
|
||||||
self.announce_interval = AutoInterface.PEERING_TIMEOUT/6.0
|
self.announce_interval = AutoInterface.PEERING_TIMEOUT/6.0
|
||||||
self.peer_job_interval = AutoInterface.PEERING_TIMEOUT*1.1
|
self.peer_job_interval = AutoInterface.PEERING_TIMEOUT*1.1
|
||||||
self.peering_timeout = AutoInterface.PEERING_TIMEOUT
|
self.peering_timeout = AutoInterface.PEERING_TIMEOUT
|
||||||
@@ -185,7 +192,7 @@ class AutoInterface(Interface):
|
|||||||
self.discovery_handler(discovery_socket, ifname)
|
self.discovery_handler(discovery_socket, ifname)
|
||||||
|
|
||||||
thread = threading.Thread(target=discovery_loop)
|
thread = threading.Thread(target=discovery_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
suitable_interfaces += 1
|
suitable_interfaces += 1
|
||||||
@@ -198,11 +205,6 @@ class AutoInterface(Interface):
|
|||||||
peering_wait = self.announce_interval*1.2
|
peering_wait = self.announce_interval*1.2
|
||||||
RNS.log(str(self)+" discovering peers for "+str(round(peering_wait, 2))+" seconds...", RNS.LOG_VERBOSE)
|
RNS.log(str(self)+" discovering peers for "+str(round(peering_wait, 2))+" seconds...", RNS.LOG_VERBOSE)
|
||||||
|
|
||||||
def handlerFactory(callback):
|
|
||||||
def createHandler(*args, **keys):
|
|
||||||
return AutoInterfaceHandler(callback, *args, **keys)
|
|
||||||
return createHandler
|
|
||||||
|
|
||||||
self.owner = owner
|
self.owner = owner
|
||||||
socketserver.UDPServer.address_family = socket.AF_INET6
|
socketserver.UDPServer.address_family = socket.AF_INET6
|
||||||
|
|
||||||
@@ -211,14 +213,15 @@ class AutoInterface(Interface):
|
|||||||
addr_info = socket.getaddrinfo(local_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
|
addr_info = socket.getaddrinfo(local_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
|
||||||
address = addr_info[0][4]
|
address = addr_info[0][4]
|
||||||
|
|
||||||
self.server = socketserver.UDPServer(address, handlerFactory(self.processIncoming))
|
udp_server = socketserver.UDPServer(address, self.handler_factory(self.processIncoming))
|
||||||
|
self.interface_servers[ifname] = udp_server
|
||||||
|
|
||||||
thread = threading.Thread(target=self.server.serve_forever)
|
thread = threading.Thread(target=udp_server.serve_forever)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
job_thread = threading.Thread(target=self.peer_jobs)
|
job_thread = threading.Thread(target=self.peer_jobs)
|
||||||
job_thread.setDaemon(True)
|
job_thread.daemon = True
|
||||||
job_thread.start()
|
job_thread.start()
|
||||||
|
|
||||||
time.sleep(peering_wait)
|
time.sleep(peering_wait)
|
||||||
@@ -236,7 +239,7 @@ class AutoInterface(Interface):
|
|||||||
self.announce_handler(ifname)
|
self.announce_handler(ifname)
|
||||||
|
|
||||||
thread = threading.Thread(target=announce_loop)
|
thread = threading.Thread(target=announce_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
@@ -266,6 +269,46 @@ class AutoInterface(Interface):
|
|||||||
RNS.log(str(self)+" removed peer "+str(peer_addr)+" on "+str(removed_peer[0]), RNS.LOG_DEBUG)
|
RNS.log(str(self)+" removed peer "+str(peer_addr)+" on "+str(removed_peer[0]), RNS.LOG_DEBUG)
|
||||||
|
|
||||||
for ifname in self.adopted_interfaces:
|
for ifname in self.adopted_interfaces:
|
||||||
|
# Check that the link-local address has not changed
|
||||||
|
try:
|
||||||
|
addresses = self.netifaces.ifaddresses(ifname)
|
||||||
|
if self.netifaces.AF_INET6 in addresses:
|
||||||
|
link_local_addr = None
|
||||||
|
for address in addresses[self.netifaces.AF_INET6]:
|
||||||
|
if "addr" in address:
|
||||||
|
if address["addr"].startswith("fe80:"):
|
||||||
|
link_local_addr = address["addr"].split("%")[0]
|
||||||
|
if link_local_addr != self.adopted_interfaces[ifname]:
|
||||||
|
# TODO: Remove
|
||||||
|
# RNS.log("Replacing link-local address for "+str(ifname), RNS.LOG_DEBUG)
|
||||||
|
self.adopted_interfaces[ifname] = link_local_addr
|
||||||
|
|
||||||
|
local_addr = link_local_addr+"%"+ifname
|
||||||
|
addr_info = socket.getaddrinfo(local_addr, self.data_port, socket.AF_INET6, socket.SOCK_DGRAM)
|
||||||
|
listen_address = addr_info[0][4]
|
||||||
|
|
||||||
|
if ifname in self.interface_servers:
|
||||||
|
# TODO: Remove
|
||||||
|
# RNS.log("Shutting down previous UDP socket server for "+str(ifname), RNS.LOG_DEBUG)
|
||||||
|
previous_server = self.interface_servers[ifname]
|
||||||
|
def shutdown_server():
|
||||||
|
previous_server.shutdown()
|
||||||
|
threading.Thread(target=shutdown_server, daemon=True).start()
|
||||||
|
|
||||||
|
# TODO: Remove
|
||||||
|
# RNS.log("Starting new UDP socket server for "+str(ifname), RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
udp_server = socketserver.UDPServer(listen_address, self.handler_factory(self.processIncoming))
|
||||||
|
self.interface_servers[ifname] = udp_server
|
||||||
|
|
||||||
|
thread = threading.Thread(target=udp_server.serve_forever)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Could not get device information while updating link-local addresses for "+str(self)+". The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
# Check multicast echo timeouts
|
||||||
last_multicast_echo = 0
|
last_multicast_echo = 0
|
||||||
if ifname in self.multicast_echoes:
|
if ifname in self.multicast_echoes:
|
||||||
last_multicast_echo = self.multicast_echoes[ifname]
|
last_multicast_echo = self.multicast_echoes[ifname]
|
||||||
|
|||||||
@@ -161,8 +161,6 @@ class I2PController:
|
|||||||
raise tn.status["exception"]
|
raise tn.status["exception"]
|
||||||
|
|
||||||
else:
|
else:
|
||||||
self.client_tunnels[i2p_destination] = True
|
|
||||||
owner.awaiting_i2p_tunnel = False
|
|
||||||
if owner.socket != None:
|
if owner.socket != None:
|
||||||
if hasattr(owner.socket, "close"):
|
if hasattr(owner.socket, "close"):
|
||||||
if callable(owner.socket.close):
|
if callable(owner.socket.close):
|
||||||
@@ -175,6 +173,8 @@ class I2PController:
|
|||||||
owner.socket.close()
|
owner.socket.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while closing socket for "+str(owner)+": "+str(e))
|
RNS.log("Error while closing socket for "+str(owner)+": "+str(e))
|
||||||
|
self.client_tunnels[i2p_destination] = True
|
||||||
|
owner.awaiting_i2p_tunnel = False
|
||||||
|
|
||||||
RNS.log(str(owner)+" tunnel setup complete", RNS.LOG_VERBOSE)
|
RNS.log(str(owner)+" tunnel setup complete", RNS.LOG_VERBOSE)
|
||||||
|
|
||||||
@@ -383,6 +383,11 @@ class I2PInterfacePeer(Interface):
|
|||||||
I2P_PROBE_AFTER = 10
|
I2P_PROBE_AFTER = 10
|
||||||
I2P_PROBE_INTERVAL = 9
|
I2P_PROBE_INTERVAL = 9
|
||||||
I2P_PROBES = 5
|
I2P_PROBES = 5
|
||||||
|
I2P_READ_TIMEOUT = (I2P_PROBE_INTERVAL * I2P_PROBES + I2P_PROBE_AFTER)*2
|
||||||
|
|
||||||
|
TUNNEL_STATE_INIT = 0x00
|
||||||
|
TUNNEL_STATE_ACTIVE = 0x01
|
||||||
|
TUNNEL_STATE_STALE = 0x02
|
||||||
|
|
||||||
def __init__(self, parent_interface, owner, name, target_i2p_dest=None, connected_socket=None, max_reconnect_tries=None):
|
def __init__(self, parent_interface, owner, name, target_i2p_dest=None, connected_socket=None, max_reconnect_tries=None):
|
||||||
self.rxb = 0
|
self.rxb = 0
|
||||||
@@ -409,6 +414,30 @@ class I2PInterfacePeer(Interface):
|
|||||||
self.i2p_tunnel_ready = False
|
self.i2p_tunnel_ready = False
|
||||||
self.mode = RNS.Interfaces.Interface.Interface.MODE_FULL
|
self.mode = RNS.Interfaces.Interface.Interface.MODE_FULL
|
||||||
self.bitrate = I2PInterface.BITRATE_GUESS
|
self.bitrate = I2PInterface.BITRATE_GUESS
|
||||||
|
self.last_read = 0
|
||||||
|
self.last_write = 0
|
||||||
|
self.wd_reset = False
|
||||||
|
self.i2p_tunnel_state = I2PInterfacePeer.TUNNEL_STATE_INIT
|
||||||
|
|
||||||
|
self.ifac_size = self.parent_interface.ifac_size
|
||||||
|
self.ifac_netname = self.parent_interface.ifac_netname
|
||||||
|
self.ifac_netkey = self.parent_interface.ifac_netkey
|
||||||
|
if self.ifac_netname != None or self.ifac_netkey != None:
|
||||||
|
ifac_origin = b""
|
||||||
|
if self.ifac_netname != None:
|
||||||
|
ifac_origin += RNS.Identity.full_hash(self.ifac_netname.encode("utf-8"))
|
||||||
|
if self.ifac_netkey != None:
|
||||||
|
ifac_origin += RNS.Identity.full_hash(self.ifac_netkey.encode("utf-8"))
|
||||||
|
|
||||||
|
ifac_origin_hash = RNS.Identity.full_hash(ifac_origin)
|
||||||
|
self.ifac_key = RNS.Cryptography.hkdf(
|
||||||
|
length=64,
|
||||||
|
derive_from=ifac_origin_hash,
|
||||||
|
salt=RNS.Reticulum.IFAC_SALT,
|
||||||
|
context=None
|
||||||
|
)
|
||||||
|
self.ifac_identity = RNS.Identity.from_bytes(self.ifac_key)
|
||||||
|
self.ifac_signature = self.ifac_identity.sign(RNS.Identity.full_hash(self.ifac_key))
|
||||||
|
|
||||||
self.announce_rate_target = None
|
self.announce_rate_target = None
|
||||||
self.announce_rate_grace = None
|
self.announce_rate_grace = None
|
||||||
@@ -454,46 +483,40 @@ class I2PInterfacePeer(Interface):
|
|||||||
RNS.log("Error while while configuring "+str(self)+": "+str(e), RNS.LOG_ERROR)
|
RNS.log("Error while while configuring "+str(self)+": "+str(e), RNS.LOG_ERROR)
|
||||||
RNS.log("Check that I2P is installed and running, and that SAM is enabled. Retrying tunnel setup later.", RNS.LOG_ERROR)
|
RNS.log("Check that I2P is installed and running, and that SAM is enabled. Retrying tunnel setup later.", RNS.LOG_ERROR)
|
||||||
|
|
||||||
time.sleep(15)
|
time.sleep(8)
|
||||||
|
|
||||||
thread = threading.Thread(target=tunnel_job)
|
thread = threading.Thread(target=tunnel_job)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
def wait_job():
|
def wait_job():
|
||||||
while self.awaiting_i2p_tunnel:
|
while self.awaiting_i2p_tunnel:
|
||||||
time.sleep(0.25)
|
time.sleep(0.25)
|
||||||
|
time.sleep(2)
|
||||||
|
|
||||||
if not self.kiss_framing:
|
if not self.kiss_framing:
|
||||||
self.wants_tunnel = True
|
self.wants_tunnel = True
|
||||||
|
|
||||||
if not self.connect(initial=True):
|
if not self.connect(initial=True):
|
||||||
thread = threading.Thread(target=self.reconnect)
|
thread = threading.Thread(target=self.reconnect)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
else:
|
else:
|
||||||
thread = threading.Thread(target=self.read_loop)
|
thread = threading.Thread(target=self.read_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
thread = threading.Thread(target=wait_job)
|
thread = threading.Thread(target=wait_job)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
|
|
||||||
def set_timeouts_linux(self):
|
def set_timeouts_linux(self):
|
||||||
if not self.i2p_tunneled:
|
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_USER_TIMEOUT, int(I2PInterfacePeer.I2P_USER_TIMEOUT * 1000))
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_USER_TIMEOUT, int(I2PInterfacePeer.TCP_USER_TIMEOUT * 1000))
|
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, int(I2PInterfacePeer.I2P_PROBE_AFTER))
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, int(I2PInterfacePeer.TCP_PROBE_AFTER))
|
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, int(I2PInterfacePeer.I2P_PROBE_INTERVAL))
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, int(I2PInterfacePeer.TCP_PROBE_INTERVAL))
|
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, int(I2PInterfacePeer.I2P_PROBES))
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, int(I2PInterfacePeer.TCP_PROBES))
|
|
||||||
else:
|
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_USER_TIMEOUT, int(I2PInterfacePeer.I2P_USER_TIMEOUT * 1000))
|
|
||||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPIDLE, int(I2PInterfacePeer.I2P_PROBE_AFTER))
|
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPINTVL, int(I2PInterfacePeer.I2P_PROBE_INTERVAL))
|
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, socket.TCP_KEEPCNT, int(I2PInterfacePeer.I2P_PROBES))
|
|
||||||
|
|
||||||
def set_timeouts_osx(self):
|
def set_timeouts_osx(self):
|
||||||
if hasattr(socket, "TCP_KEEPALIVE"):
|
if hasattr(socket, "TCP_KEEPALIVE"):
|
||||||
@@ -502,22 +525,19 @@ class I2PInterfacePeer(Interface):
|
|||||||
TCP_KEEPIDLE = 0x10
|
TCP_KEEPIDLE = 0x10
|
||||||
|
|
||||||
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
|
||||||
|
self.socket.setsockopt(socket.IPPROTO_TCP, TCP_KEEPIDLE, int(I2PInterfacePeer.I2P_PROBE_AFTER))
|
||||||
if not self.i2p_tunneled:
|
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, TCP_KEEPIDLE, int(I2PInterfacePeer.TCP_PROBE_AFTER))
|
|
||||||
else:
|
|
||||||
self.socket.setsockopt(socket.IPPROTO_TCP, TCP_KEEPIDLE, int(I2PInterfacePeer.I2P_PROBE_AFTER))
|
|
||||||
|
|
||||||
def shutdown_socket(self, socket):
|
def shutdown_socket(self, target_socket):
|
||||||
if callable(socket.close):
|
if callable(target_socket.close):
|
||||||
|
|
||||||
try:
|
try:
|
||||||
socket.shutdown(socket.SHUT_RDWR)
|
if socket != None:
|
||||||
|
target_socket.shutdown(socket.SHUT_RDWR)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while shutting down socket for "+str(self)+": "+str(e))
|
RNS.log("Error while shutting down socket for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
try:
|
try:
|
||||||
socket.close()
|
if socket != None:
|
||||||
|
target_socket.close()
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while closing socket for "+str(self)+": "+str(e))
|
RNS.log("Error while closing socket for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
@@ -571,7 +591,6 @@ class I2PInterfacePeer(Interface):
|
|||||||
|
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|
||||||
def reconnect(self):
|
def reconnect(self):
|
||||||
if self.initiator:
|
if self.initiator:
|
||||||
if not self.reconnecting:
|
if not self.reconnecting:
|
||||||
@@ -600,7 +619,7 @@ class I2PInterfacePeer(Interface):
|
|||||||
|
|
||||||
self.reconnecting = False
|
self.reconnecting = False
|
||||||
thread = threading.Thread(target=self.read_loop)
|
thread = threading.Thread(target=self.read_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
if not self.kiss_framing:
|
if not self.kiss_framing:
|
||||||
RNS.Transport.synthesize_tunnel(self)
|
RNS.Transport.synthesize_tunnel(self)
|
||||||
@@ -632,6 +651,7 @@ class I2PInterfacePeer(Interface):
|
|||||||
self.socket.sendall(data)
|
self.socket.sendall(data)
|
||||||
self.writing = False
|
self.writing = False
|
||||||
self.txb += len(data)
|
self.txb += len(data)
|
||||||
|
self.last_write = time.time()
|
||||||
|
|
||||||
if hasattr(self, "parent_interface") and self.parent_interface != None and self.parent_count:
|
if hasattr(self, "parent_interface") and self.parent_interface != None and self.parent_count:
|
||||||
self.parent_interface.txb += len(data)
|
self.parent_interface.txb += len(data)
|
||||||
@@ -642,8 +662,59 @@ class I2PInterfacePeer(Interface):
|
|||||||
self.teardown()
|
self.teardown()
|
||||||
|
|
||||||
|
|
||||||
|
def read_watchdog(self):
|
||||||
|
while self.wd_reset:
|
||||||
|
time.sleep(0.25)
|
||||||
|
|
||||||
|
should_run = True
|
||||||
|
try:
|
||||||
|
while should_run and not self.wd_reset:
|
||||||
|
time.sleep(1)
|
||||||
|
|
||||||
|
if (time.time()-self.last_read > I2PInterfacePeer.I2P_PROBE_AFTER*2):
|
||||||
|
if self.i2p_tunnel_state != I2PInterfacePeer.TUNNEL_STATE_STALE:
|
||||||
|
RNS.log("I2P tunnel became unresponsive", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
self.i2p_tunnel_state = I2PInterfacePeer.TUNNEL_STATE_STALE
|
||||||
|
else:
|
||||||
|
self.i2p_tunnel_state = I2PInterfacePeer.TUNNEL_STATE_ACTIVE
|
||||||
|
|
||||||
|
if (time.time()-self.last_write > I2PInterfacePeer.I2P_PROBE_AFTER*1):
|
||||||
|
try:
|
||||||
|
if self.socket != None:
|
||||||
|
self.socket.sendall(bytes([HDLC.FLAG, HDLC.FLAG]))
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("An error ocurred while sending I2P keepalive. The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
self.shutdown_socket(self.socket)
|
||||||
|
should_run = False
|
||||||
|
|
||||||
|
if (time.time()-self.last_read > I2PInterfacePeer.I2P_READ_TIMEOUT):
|
||||||
|
RNS.log("I2P socket is unresponsive, restarting...", RNS.LOG_WARNING)
|
||||||
|
if self.socket != None:
|
||||||
|
try:
|
||||||
|
self.socket.shutdown(socket.SHUT_RDWR)
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while shutting down socket for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
|
try:
|
||||||
|
self.socket.close()
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while closing socket for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
|
should_run = False
|
||||||
|
|
||||||
|
self.wd_reset = False
|
||||||
|
|
||||||
|
finally:
|
||||||
|
self.wd_reset = False
|
||||||
|
|
||||||
def read_loop(self):
|
def read_loop(self):
|
||||||
try:
|
try:
|
||||||
|
self.last_read = time.time()
|
||||||
|
self.last_write = time.time()
|
||||||
|
|
||||||
|
wd_thread = threading.Thread(target=self.read_watchdog, daemon=True).start()
|
||||||
|
|
||||||
in_frame = False
|
in_frame = False
|
||||||
escape = False
|
escape = False
|
||||||
data_buffer = b""
|
data_buffer = b""
|
||||||
@@ -653,6 +724,7 @@ class I2PInterfacePeer(Interface):
|
|||||||
data_in = self.socket.recv(4096)
|
data_in = self.socket.recv(4096)
|
||||||
if len(data_in) > 0:
|
if len(data_in) > 0:
|
||||||
pointer = 0
|
pointer = 0
|
||||||
|
self.last_read = time.time()
|
||||||
while pointer < len(data_in):
|
while pointer < len(data_in):
|
||||||
byte = data_in[pointer]
|
byte = data_in[pointer]
|
||||||
pointer += 1
|
pointer += 1
|
||||||
@@ -705,6 +777,11 @@ class I2PInterfacePeer(Interface):
|
|||||||
data_buffer = data_buffer+bytes([byte])
|
data_buffer = data_buffer+bytes([byte])
|
||||||
else:
|
else:
|
||||||
self.online = False
|
self.online = False
|
||||||
|
|
||||||
|
self.wd_reset = True
|
||||||
|
time.sleep(2)
|
||||||
|
self.wd_reset = False
|
||||||
|
|
||||||
if self.initiator and not self.detached:
|
if self.initiator and not self.detached:
|
||||||
RNS.log("Socket for "+str(self)+" was closed, attempting to reconnect...", RNS.LOG_WARNING)
|
RNS.log("Socket for "+str(self)+" was closed, attempting to reconnect...", RNS.LOG_WARNING)
|
||||||
self.reconnect()
|
self.reconnect()
|
||||||
@@ -754,7 +831,7 @@ class I2PInterfacePeer(Interface):
|
|||||||
class I2PInterface(Interface):
|
class I2PInterface(Interface):
|
||||||
BITRATE_GUESS = 256*1000
|
BITRATE_GUESS = 256*1000
|
||||||
|
|
||||||
def __init__(self, owner, name, rns_storagepath, peers, connectable = False):
|
def __init__(self, owner, name, rns_storagepath, peers, connectable = False, ifac_size = 16, ifac_netname = None, ifac_netkey = None):
|
||||||
self.rxb = 0
|
self.rxb = 0
|
||||||
self.txb = 0
|
self.txb = 0
|
||||||
|
|
||||||
@@ -780,11 +857,14 @@ class I2PInterface(Interface):
|
|||||||
self.bind_port = self.i2p.get_free_port()
|
self.bind_port = self.i2p.get_free_port()
|
||||||
self.address = (self.bind_ip, self.bind_port)
|
self.address = (self.bind_ip, self.bind_port)
|
||||||
self.bitrate = I2PInterface.BITRATE_GUESS
|
self.bitrate = I2PInterface.BITRATE_GUESS
|
||||||
|
self.ifac_size = ifac_size
|
||||||
|
self.ifac_netname = ifac_netname
|
||||||
|
self.ifac_netkey = ifac_netkey
|
||||||
|
|
||||||
self.online = False
|
self.online = False
|
||||||
|
|
||||||
i2p_thread = threading.Thread(target=self.i2p.start)
|
i2p_thread = threading.Thread(target=self.i2p.start)
|
||||||
i2p_thread.setDaemon(True)
|
i2p_thread.daemon = True
|
||||||
i2p_thread.start()
|
i2p_thread.start()
|
||||||
|
|
||||||
i2p_notready_warning = False
|
i2p_notready_warning = False
|
||||||
@@ -809,7 +889,7 @@ class I2PInterface(Interface):
|
|||||||
self.server = ThreadingI2PServer(self.address, handlerFactory(self.incoming_connection))
|
self.server = ThreadingI2PServer(self.address, handlerFactory(self.incoming_connection))
|
||||||
|
|
||||||
thread = threading.Thread(target=self.server.serve_forever)
|
thread = threading.Thread(target=self.server.serve_forever)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
if self.connectable:
|
if self.connectable:
|
||||||
@@ -828,7 +908,7 @@ class I2PInterface(Interface):
|
|||||||
|
|
||||||
|
|
||||||
thread = threading.Thread(target=tunnel_job)
|
thread = threading.Thread(target=tunnel_job)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
if peers != None:
|
if peers != None:
|
||||||
@@ -850,9 +930,27 @@ class I2PInterface(Interface):
|
|||||||
spawned_interface.parent_interface = self
|
spawned_interface.parent_interface = self
|
||||||
spawned_interface.online = True
|
spawned_interface.online = True
|
||||||
spawned_interface.bitrate = self.bitrate
|
spawned_interface.bitrate = self.bitrate
|
||||||
|
|
||||||
spawned_interface.ifac_size = self.ifac_size
|
spawned_interface.ifac_size = self.ifac_size
|
||||||
spawned_interface.ifac_netname = self.ifac_netname
|
spawned_interface.ifac_netname = self.ifac_netname
|
||||||
spawned_interface.ifac_netkey = self.ifac_netkey
|
spawned_interface.ifac_netkey = self.ifac_netkey
|
||||||
|
if spawned_interface.ifac_netname != None or spawned_interface.ifac_netkey != None:
|
||||||
|
ifac_origin = b""
|
||||||
|
if spawned_interface.ifac_netname != None:
|
||||||
|
ifac_origin += RNS.Identity.full_hash(spawned_interface.ifac_netname.encode("utf-8"))
|
||||||
|
if spawned_interface.ifac_netkey != None:
|
||||||
|
ifac_origin += RNS.Identity.full_hash(spawned_interface.ifac_netkey.encode("utf-8"))
|
||||||
|
|
||||||
|
ifac_origin_hash = RNS.Identity.full_hash(ifac_origin)
|
||||||
|
spawned_interface.ifac_key = RNS.Cryptography.hkdf(
|
||||||
|
length=64,
|
||||||
|
derive_from=ifac_origin_hash,
|
||||||
|
salt=RNS.Reticulum.IFAC_SALT,
|
||||||
|
context=None
|
||||||
|
)
|
||||||
|
spawned_interface.ifac_identity = RNS.Identity.from_bytes(spawned_interface.ifac_key)
|
||||||
|
spawned_interface.ifac_signature = spawned_interface.ifac_identity.sign(RNS.Identity.full_hash(spawned_interface.ifac_key))
|
||||||
|
|
||||||
spawned_interface.announce_rate_target = self.announce_rate_target
|
spawned_interface.announce_rate_target = self.announce_rate_target
|
||||||
spawned_interface.announce_rate_grace = self.announce_rate_grace
|
spawned_interface.announce_rate_grace = self.announce_rate_grace
|
||||||
spawned_interface.announce_rate_penalty = self.announce_rate_penalty
|
spawned_interface.announce_rate_penalty = self.announce_rate_penalty
|
||||||
|
|||||||
@@ -144,7 +144,7 @@ class KISSInterface(Interface):
|
|||||||
# Allow time for interface to initialise before config
|
# Allow time for interface to initialise before config
|
||||||
sleep(2.0)
|
sleep(2.0)
|
||||||
thread = threading.Thread(target=self.readLoop)
|
thread = threading.Thread(target=self.readLoop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
self.online = True
|
self.online = True
|
||||||
RNS.log("Serial port "+self.port+" is now open")
|
RNS.log("Serial port "+self.port+" is now open")
|
||||||
|
|||||||
@@ -92,7 +92,7 @@ class LocalClientInterface(Interface):
|
|||||||
|
|
||||||
if connected_socket == None:
|
if connected_socket == None:
|
||||||
thread = threading.Thread(target=self.read_loop)
|
thread = threading.Thread(target=self.read_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
def connect(self):
|
def connect(self):
|
||||||
@@ -127,7 +127,7 @@ class LocalClientInterface(Interface):
|
|||||||
|
|
||||||
self.reconnecting = False
|
self.reconnecting = False
|
||||||
thread = threading.Thread(target=self.read_loop)
|
thread = threading.Thread(target=self.read_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
RNS.Transport.shared_connection_reappeared()
|
RNS.Transport.shared_connection_reappeared()
|
||||||
|
|
||||||
@@ -246,6 +246,7 @@ class LocalClientInterface(Interface):
|
|||||||
RNS.Transport.local_client_interfaces.remove(self)
|
RNS.Transport.local_client_interfaces.remove(self)
|
||||||
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
if hasattr(self, "parent_interface") and self.parent_interface != None:
|
||||||
self.parent_interface.clients -= 1
|
self.parent_interface.clients -= 1
|
||||||
|
RNS.Transport.owner._should_persist_data()
|
||||||
|
|
||||||
if nowarning == False:
|
if nowarning == False:
|
||||||
RNS.log("The interface "+str(self)+" experienced an unrecoverable error and is being torn down. Restart Reticulum to attempt to open this interface again.", RNS.LOG_ERROR)
|
RNS.log("The interface "+str(self)+" experienced an unrecoverable error and is being torn down. Restart Reticulum to attempt to open this interface again.", RNS.LOG_ERROR)
|
||||||
@@ -295,7 +296,7 @@ class LocalServerInterface(Interface):
|
|||||||
self.server = ThreadingTCPServer(address, handlerFactory(self.incoming_connection))
|
self.server = ThreadingTCPServer(address, handlerFactory(self.incoming_connection))
|
||||||
|
|
||||||
thread = threading.Thread(target=self.server.serve_forever)
|
thread = threading.Thread(target=self.server.serve_forever)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
self.announce_rate_target = None
|
self.announce_rate_target = None
|
||||||
|
|||||||
@@ -96,7 +96,7 @@ class PipeInterface(Interface):
|
|||||||
def configure_pipe(self):
|
def configure_pipe(self):
|
||||||
sleep(0.01)
|
sleep(0.01)
|
||||||
thread = threading.Thread(target=self.readLoop)
|
thread = threading.Thread(target=self.readLoop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
self.online = True
|
self.online = True
|
||||||
RNS.log("Subprocess pipe for "+str(self)+" is now connected", RNS.LOG_VERBOSE)
|
RNS.log("Subprocess pipe for "+str(self)+" is now connected", RNS.LOG_VERBOSE)
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class KISS():
|
|||||||
CMD_RADIO_STATE = 0x06
|
CMD_RADIO_STATE = 0x06
|
||||||
CMD_RADIO_LOCK = 0x07
|
CMD_RADIO_LOCK = 0x07
|
||||||
CMD_DETECT = 0x08
|
CMD_DETECT = 0x08
|
||||||
|
CMD_LEAVE = 0x0A
|
||||||
CMD_READY = 0x0F
|
CMD_READY = 0x0F
|
||||||
CMD_STAT_RX = 0x21
|
CMD_STAT_RX = 0x21
|
||||||
CMD_STAT_TX = 0x22
|
CMD_STAT_TX = 0x22
|
||||||
@@ -51,6 +52,9 @@ class KISS():
|
|||||||
CMD_STAT_SNR = 0x24
|
CMD_STAT_SNR = 0x24
|
||||||
CMD_BLINK = 0x30
|
CMD_BLINK = 0x30
|
||||||
CMD_RANDOM = 0x40
|
CMD_RANDOM = 0x40
|
||||||
|
CMD_FB_EXT = 0x41
|
||||||
|
CMD_FB_READ = 0x42
|
||||||
|
CMD_FB_WRITE = 0x43
|
||||||
CMD_PLATFORM = 0x48
|
CMD_PLATFORM = 0x48
|
||||||
CMD_MCU = 0x49
|
CMD_MCU = 0x49
|
||||||
CMD_FW_VERSION = 0x50
|
CMD_FW_VERSION = 0x50
|
||||||
@@ -82,14 +86,6 @@ class KISS():
|
|||||||
class RNodeInterface(Interface):
|
class RNodeInterface(Interface):
|
||||||
MAX_CHUNK = 32768
|
MAX_CHUNK = 32768
|
||||||
|
|
||||||
owner = None
|
|
||||||
port = None
|
|
||||||
speed = None
|
|
||||||
databits = None
|
|
||||||
parity = None
|
|
||||||
stopbits = None
|
|
||||||
serial = None
|
|
||||||
|
|
||||||
FREQ_MIN = 137000000
|
FREQ_MIN = 137000000
|
||||||
FREQ_MAX = 1020000000
|
FREQ_MAX = 1020000000
|
||||||
|
|
||||||
@@ -98,9 +94,14 @@ class RNodeInterface(Interface):
|
|||||||
CALLSIGN_MAX_LEN = 32
|
CALLSIGN_MAX_LEN = 32
|
||||||
|
|
||||||
REQUIRED_FW_VER_MAJ = 1
|
REQUIRED_FW_VER_MAJ = 1
|
||||||
REQUIRED_FW_VER_MIN = 26
|
REQUIRED_FW_VER_MIN = 52
|
||||||
|
|
||||||
|
RECONNECT_WAIT = 5
|
||||||
|
|
||||||
def __init__(self, owner, name, port, frequency = None, bandwidth = None, txpower = None, sf = None, cr = None, flow_control = False, id_interval = None, id_callsign = None):
|
def __init__(self, owner, name, port, frequency = None, bandwidth = None, txpower = None, sf = None, cr = None, flow_control = False, id_interval = None, id_callsign = None):
|
||||||
|
if RNS.vendor.platformutils.is_android():
|
||||||
|
raise SystemError("Invlaid interface type. The Android-specific RNode interface must be used on Android")
|
||||||
|
|
||||||
import importlib
|
import importlib
|
||||||
if importlib.util.find_spec('serial') != None:
|
if importlib.util.find_spec('serial') != None:
|
||||||
import serial
|
import serial
|
||||||
@@ -121,7 +122,6 @@ class RNodeInterface(Interface):
|
|||||||
self.port = port
|
self.port = port
|
||||||
self.speed = 115200
|
self.speed = 115200
|
||||||
self.databits = 8
|
self.databits = 8
|
||||||
self.parity = serial.PARITY_NONE
|
|
||||||
self.stopbits = 1
|
self.stopbits = 1
|
||||||
self.timeout = 100
|
self.timeout = 100
|
||||||
self.online = False
|
self.online = False
|
||||||
@@ -134,6 +134,7 @@ class RNodeInterface(Interface):
|
|||||||
self.state = KISS.RADIO_STATE_OFF
|
self.state = KISS.RADIO_STATE_OFF
|
||||||
self.bitrate = 0
|
self.bitrate = 0
|
||||||
self.platform = None
|
self.platform = None
|
||||||
|
self.display = None
|
||||||
self.mcu = None
|
self.mcu = None
|
||||||
self.detected = False
|
self.detected = False
|
||||||
self.firmware_ok = False
|
self.firmware_ok = False
|
||||||
@@ -142,6 +143,7 @@ class RNodeInterface(Interface):
|
|||||||
|
|
||||||
self.last_id = 0
|
self.last_id = 0
|
||||||
self.first_tx = None
|
self.first_tx = None
|
||||||
|
self.reconnect_w = RNodeInterface.RECONNECT_WAIT
|
||||||
|
|
||||||
self.r_frequency = None
|
self.r_frequency = None
|
||||||
self.r_bandwidth = None
|
self.r_bandwidth = None
|
||||||
@@ -158,6 +160,7 @@ class RNodeInterface(Interface):
|
|||||||
self.packet_queue = []
|
self.packet_queue = []
|
||||||
self.flow_control = flow_control
|
self.flow_control = flow_control
|
||||||
self.interface_ready = False
|
self.interface_ready = False
|
||||||
|
self.announce_rate_target = None
|
||||||
|
|
||||||
self.validcfg = True
|
self.validcfg = True
|
||||||
if (self.frequency < RNodeInterface.FREQ_MIN or self.frequency > RNodeInterface.FREQ_MAX):
|
if (self.frequency < RNodeInterface.FREQ_MIN or self.frequency > RNodeInterface.FREQ_MAX):
|
||||||
@@ -197,14 +200,20 @@ class RNodeInterface(Interface):
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
self.open_port()
|
self.open_port()
|
||||||
|
|
||||||
|
if self.serial.is_open:
|
||||||
|
self.configure_device()
|
||||||
|
else:
|
||||||
|
raise IOError("Could not open serial port")
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Could not open serial port for interface "+str(self), RNS.LOG_ERROR)
|
RNS.log("Could not open serial port for interface "+str(self), RNS.LOG_ERROR)
|
||||||
raise e
|
RNS.log("The contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
RNS.log("Reticulum will attempt to bring up this interface periodically", RNS.LOG_ERROR)
|
||||||
|
thread = threading.Thread(target=self.reconnect_port)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
|
||||||
if self.serial.is_open:
|
|
||||||
self.configure_device()
|
|
||||||
else:
|
|
||||||
raise IOError("Could not open serial port")
|
|
||||||
|
|
||||||
def open_port(self):
|
def open_port(self):
|
||||||
RNS.log("Opening serial port "+self.port+"...")
|
RNS.log("Opening serial port "+self.port+"...")
|
||||||
@@ -212,7 +221,7 @@ class RNodeInterface(Interface):
|
|||||||
port = self.port,
|
port = self.port,
|
||||||
baudrate = self.speed,
|
baudrate = self.speed,
|
||||||
bytesize = self.databits,
|
bytesize = self.databits,
|
||||||
parity = self.parity,
|
parity = self.pyserial.PARITY_NONE,
|
||||||
stopbits = self.stopbits,
|
stopbits = self.stopbits,
|
||||||
xonxoff = False,
|
xonxoff = False,
|
||||||
rtscts = False,
|
rtscts = False,
|
||||||
@@ -226,27 +235,26 @@ class RNodeInterface(Interface):
|
|||||||
def configure_device(self):
|
def configure_device(self):
|
||||||
sleep(2.0)
|
sleep(2.0)
|
||||||
thread = threading.Thread(target=self.readLoop)
|
thread = threading.Thread(target=self.readLoop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
self.detect()
|
self.detect()
|
||||||
sleep(0.1)
|
sleep(0.2)
|
||||||
|
|
||||||
if not self.detected:
|
if not self.detected:
|
||||||
raise IOError("Could not detect device")
|
raise IOError("Could not detect device")
|
||||||
else:
|
else:
|
||||||
if self.platform == KISS.PLATFORM_ESP32:
|
if self.platform == KISS.PLATFORM_ESP32:
|
||||||
RNS.log("Resetting ESP32-based device before configuration...", RNS.LOG_VERBOSE)
|
self.display = True
|
||||||
self.hard_reset()
|
|
||||||
|
|
||||||
self.online = True
|
|
||||||
RNS.log("Serial port "+self.port+" is now open")
|
RNS.log("Serial port "+self.port+" is now open")
|
||||||
RNS.log("Configuring RNode interface...", RNS.LOG_VERBOSE)
|
RNS.log("Configuring RNode interface...", RNS.LOG_VERBOSE)
|
||||||
self.initRadio()
|
self.initRadio()
|
||||||
if (self.validateRadioState()):
|
if (self.validateRadioState()):
|
||||||
self.interface_ready = True
|
self.interface_ready = True
|
||||||
RNS.log(str(self)+" is configured and powered up")
|
RNS.log(str(self)+" is configured and powered up")
|
||||||
sleep(1.0)
|
sleep(0.3)
|
||||||
|
self.online = True
|
||||||
else:
|
else:
|
||||||
RNS.log("After configuring "+str(self)+", the reported radio parameters did not match your configuration.", RNS.LOG_ERROR)
|
RNS.log("After configuring "+str(self)+", the reported radio parameters did not match your configuration.", RNS.LOG_ERROR)
|
||||||
RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR)
|
RNS.log("Make sure that your hardware actually supports the parameters specified in the configuration", RNS.LOG_ERROR)
|
||||||
@@ -267,7 +275,51 @@ class RNodeInterface(Interface):
|
|||||||
kiss_command = bytes([KISS.FEND, KISS.CMD_DETECT, KISS.DETECT_REQ, KISS.FEND, KISS.CMD_FW_VERSION, 0x00, KISS.FEND, KISS.CMD_PLATFORM, 0x00, KISS.FEND, KISS.CMD_MCU, 0x00, KISS.FEND])
|
kiss_command = bytes([KISS.FEND, KISS.CMD_DETECT, KISS.DETECT_REQ, KISS.FEND, KISS.CMD_FW_VERSION, 0x00, KISS.FEND, KISS.CMD_PLATFORM, 0x00, KISS.FEND, KISS.CMD_MCU, 0x00, KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while detecting hardware for "+self(str))
|
raise IOError("An IO error occurred while detecting hardware for "+str(self))
|
||||||
|
|
||||||
|
def leave(self):
|
||||||
|
kiss_command = bytes([KISS.FEND, KISS.CMD_LEAVE, 0xFF, KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("An IO error occurred while sending host left command to device")
|
||||||
|
|
||||||
|
def enable_external_framebuffer(self):
|
||||||
|
if self.display != None:
|
||||||
|
kiss_command = bytes([KISS.FEND, KISS.CMD_FB_EXT, 0x01, KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("An IO error occurred while enabling external framebuffer on device")
|
||||||
|
|
||||||
|
def disable_external_framebuffer(self):
|
||||||
|
if self.display != None:
|
||||||
|
kiss_command = bytes([KISS.FEND, KISS.CMD_FB_EXT, 0x00, KISS.FEND])
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("An IO error occurred while disabling external framebuffer on device")
|
||||||
|
|
||||||
|
FB_PIXEL_WIDTH = 64
|
||||||
|
FB_BITS_PER_PIXEL = 1
|
||||||
|
FB_PIXELS_PER_BYTE = 8//FB_BITS_PER_PIXEL
|
||||||
|
FB_BYTES_PER_LINE = FB_PIXEL_WIDTH//FB_PIXELS_PER_BYTE
|
||||||
|
def display_image(self, imagedata):
|
||||||
|
if self.display != None:
|
||||||
|
lines = len(imagedata)//8
|
||||||
|
for line in range(lines):
|
||||||
|
line_start = line*RNodeInterface.FB_BYTES_PER_LINE
|
||||||
|
line_end = line_start+RNodeInterface.FB_BYTES_PER_LINE
|
||||||
|
line_data = bytes(imagedata[line_start:line_end])
|
||||||
|
self.write_framebuffer(line, line_data)
|
||||||
|
|
||||||
|
def write_framebuffer(self, line, line_data):
|
||||||
|
if self.display != None:
|
||||||
|
line_byte = line.to_bytes(1, byteorder="big", signed=False)
|
||||||
|
data = line_byte+line_data
|
||||||
|
escaped_data = KISS.escape(data)
|
||||||
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_FB_WRITE])+escaped_data+bytes([KISS.FEND])
|
||||||
|
|
||||||
|
written = self.serial.write(kiss_command)
|
||||||
|
if written != len(kiss_command):
|
||||||
|
raise IOError("An IO error occurred while writing framebuffer data device")
|
||||||
|
|
||||||
def hard_reset(self):
|
def hard_reset(self):
|
||||||
kiss_command = bytes([KISS.FEND, KISS.CMD_RESET, 0xf8, KISS.FEND])
|
kiss_command = bytes([KISS.FEND, KISS.CMD_RESET, 0xf8, KISS.FEND])
|
||||||
@@ -286,7 +338,7 @@ class RNodeInterface(Interface):
|
|||||||
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_FREQUENCY])+data+bytes([KISS.FEND])
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_FREQUENCY])+data+bytes([KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while configuring frequency for "+self(str))
|
raise IOError("An IO error occurred while configuring frequency for "+str(self))
|
||||||
|
|
||||||
def setBandwidth(self):
|
def setBandwidth(self):
|
||||||
c1 = self.bandwidth >> 24
|
c1 = self.bandwidth >> 24
|
||||||
@@ -298,35 +350,35 @@ class RNodeInterface(Interface):
|
|||||||
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_BANDWIDTH])+data+bytes([KISS.FEND])
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_BANDWIDTH])+data+bytes([KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while configuring bandwidth for "+self(str))
|
raise IOError("An IO error occurred while configuring bandwidth for "+str(self))
|
||||||
|
|
||||||
def setTXPower(self):
|
def setTXPower(self):
|
||||||
txp = bytes([self.txpower])
|
txp = bytes([self.txpower])
|
||||||
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_TXPOWER])+txp+bytes([KISS.FEND])
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_TXPOWER])+txp+bytes([KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while configuring TX power for "+self(str))
|
raise IOError("An IO error occurred while configuring TX power for "+str(self))
|
||||||
|
|
||||||
def setSpreadingFactor(self):
|
def setSpreadingFactor(self):
|
||||||
sf = bytes([self.sf])
|
sf = bytes([self.sf])
|
||||||
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_SF])+sf+bytes([KISS.FEND])
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_SF])+sf+bytes([KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while configuring spreading factor for "+self(str))
|
raise IOError("An IO error occurred while configuring spreading factor for "+str(self))
|
||||||
|
|
||||||
def setCodingRate(self):
|
def setCodingRate(self):
|
||||||
cr = bytes([self.cr])
|
cr = bytes([self.cr])
|
||||||
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_CR])+cr+bytes([KISS.FEND])
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_CR])+cr+bytes([KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while configuring coding rate for "+self(str))
|
raise IOError("An IO error occurred while configuring coding rate for "+str(self))
|
||||||
|
|
||||||
def setRadioState(self, state):
|
def setRadioState(self, state):
|
||||||
self.state = state
|
self.state = state
|
||||||
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_RADIO_STATE])+bytes([state])+bytes([KISS.FEND])
|
kiss_command = bytes([KISS.FEND])+bytes([KISS.CMD_RADIO_STATE])+bytes([state])+bytes([KISS.FEND])
|
||||||
written = self.serial.write(kiss_command)
|
written = self.serial.write(kiss_command)
|
||||||
if written != len(kiss_command):
|
if written != len(kiss_command):
|
||||||
raise IOError("An IO error occurred while configuring radio state for "+self(str))
|
raise IOError("An IO error occurred while configuring radio state for "+str(self))
|
||||||
|
|
||||||
def validate_firmware(self):
|
def validate_firmware(self):
|
||||||
if (self.maj_version >= RNodeInterface.REQUIRED_FW_VER_MAJ):
|
if (self.maj_version >= RNodeInterface.REQUIRED_FW_VER_MAJ):
|
||||||
@@ -338,14 +390,16 @@ class RNodeInterface(Interface):
|
|||||||
|
|
||||||
RNS.log("The firmware version of the connected RNode is "+str(self.maj_version)+"."+str(self.min_version), RNS.LOG_ERROR)
|
RNS.log("The firmware version of the connected RNode is "+str(self.maj_version)+"."+str(self.min_version), RNS.LOG_ERROR)
|
||||||
RNS.log("This version of Reticulum requires at least version "+str(RNodeInterface.REQUIRED_FW_VER_MAJ)+"."+str(RNodeInterface.REQUIRED_FW_VER_MIN), RNS.LOG_ERROR)
|
RNS.log("This version of Reticulum requires at least version "+str(RNodeInterface.REQUIRED_FW_VER_MAJ)+"."+str(RNodeInterface.REQUIRED_FW_VER_MIN), RNS.LOG_ERROR)
|
||||||
RNS.log("Please update your RNode firmware with rnodeconf (https://github.com/markqvist/rnodeconfigutil/)")
|
RNS.log("Please update your RNode firmware with rnodeconf from https://github.com/markqvist/rnodeconfigutil/")
|
||||||
RNS.panic()
|
RNS.panic()
|
||||||
|
|
||||||
|
|
||||||
def validateRadioState(self):
|
def validateRadioState(self):
|
||||||
RNS.log("Wating for radio configuration validation for "+str(self)+"...", RNS.LOG_VERBOSE)
|
RNS.log("Wating for radio configuration validation for "+str(self)+"...", RNS.LOG_VERBOSE)
|
||||||
sleep(0.25);
|
sleep(0.25);
|
||||||
if (self.frequency != self.r_frequency):
|
|
||||||
|
self.validcfg = True
|
||||||
|
if (self.r_frequency != None and abs(self.frequency - int(self.r_frequency)) > 100):
|
||||||
RNS.log("Frequency mismatch", RNS.LOG_ERROR)
|
RNS.log("Frequency mismatch", RNS.LOG_ERROR)
|
||||||
self.validcfg = False
|
self.validcfg = False
|
||||||
if (self.bandwidth != self.r_bandwidth):
|
if (self.bandwidth != self.r_bandwidth):
|
||||||
@@ -620,7 +674,7 @@ class RNodeInterface(Interface):
|
|||||||
def reconnect_port(self):
|
def reconnect_port(self):
|
||||||
while not self.online:
|
while not self.online:
|
||||||
try:
|
try:
|
||||||
time.sleep(3.5)
|
time.sleep(5)
|
||||||
RNS.log("Attempting to reconnect serial port "+str(self.port)+" for "+str(self)+"...", RNS.LOG_VERBOSE)
|
RNS.log("Attempting to reconnect serial port "+str(self.port)+" for "+str(self)+"...", RNS.LOG_VERBOSE)
|
||||||
self.open_port()
|
self.open_port()
|
||||||
if self.serial.is_open:
|
if self.serial.is_open:
|
||||||
@@ -628,8 +682,13 @@ class RNodeInterface(Interface):
|
|||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Error while reconnecting port, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Error while reconnecting port, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
RNS.log("Reconnected serial port for "+str(self))
|
if self.online:
|
||||||
|
RNS.log("Reconnected serial port for "+str(self))
|
||||||
|
|
||||||
|
def detach(self):
|
||||||
|
self.disable_external_framebuffer()
|
||||||
|
self.setRadioState(KISS.RADIO_STATE_OFF)
|
||||||
|
self.leave()
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "RNodeInterface["+str(self.name)+"]"
|
return "RNodeInterface["+str(self.name)+"]"
|
||||||
|
|
||||||
@@ -116,7 +116,7 @@ class SerialInterface(Interface):
|
|||||||
def configure_device(self):
|
def configure_device(self):
|
||||||
sleep(0.5)
|
sleep(0.5)
|
||||||
thread = threading.Thread(target=self.readLoop)
|
thread = threading.Thread(target=self.readLoop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
self.online = True
|
self.online = True
|
||||||
RNS.log("Serial port "+self.port+" is now open", RNS.LOG_VERBOSE)
|
RNS.log("Serial port "+self.port+" is now open", RNS.LOG_VERBOSE)
|
||||||
|
|||||||
@@ -70,12 +70,15 @@ class TCPClientInterface(Interface):
|
|||||||
TCP_PROBE_INTERVAL = 2
|
TCP_PROBE_INTERVAL = 2
|
||||||
TCP_PROBES = 12
|
TCP_PROBES = 12
|
||||||
|
|
||||||
|
INITIAL_CONNECT_TIMEOUT = 5
|
||||||
|
SYNCHRONOUS_START = True
|
||||||
|
|
||||||
I2P_USER_TIMEOUT = 45
|
I2P_USER_TIMEOUT = 45
|
||||||
I2P_PROBE_AFTER = 10
|
I2P_PROBE_AFTER = 10
|
||||||
I2P_PROBE_INTERVAL = 9
|
I2P_PROBE_INTERVAL = 9
|
||||||
I2P_PROBES = 5
|
I2P_PROBES = 5
|
||||||
|
|
||||||
def __init__(self, owner, name, target_ip=None, target_port=None, connected_socket=None, max_reconnect_tries=None, kiss_framing=False, i2p_tunneled = False):
|
def __init__(self, owner, name, target_ip=None, target_port=None, connected_socket=None, max_reconnect_tries=None, kiss_framing=False, i2p_tunneled = False, connect_timeout = None):
|
||||||
self.rxb = 0
|
self.rxb = 0
|
||||||
self.txb = 0
|
self.txb = 0
|
||||||
|
|
||||||
@@ -119,18 +122,30 @@ class TCPClientInterface(Interface):
|
|||||||
self.target_ip = target_ip
|
self.target_ip = target_ip
|
||||||
self.target_port = target_port
|
self.target_port = target_port
|
||||||
self.initiator = True
|
self.initiator = True
|
||||||
|
|
||||||
if not self.connect(initial=True):
|
|
||||||
thread = threading.Thread(target=self.reconnect)
|
|
||||||
thread.setDaemon(True)
|
|
||||||
thread.start()
|
|
||||||
else:
|
|
||||||
thread = threading.Thread(target=self.read_loop)
|
|
||||||
thread.setDaemon(True)
|
|
||||||
thread.start()
|
|
||||||
if not self.kiss_framing:
|
|
||||||
self.wants_tunnel = True
|
|
||||||
|
|
||||||
|
if connect_timeout != None:
|
||||||
|
self.connect_timeout = connect_timeout
|
||||||
|
else:
|
||||||
|
self.connect_timeout = TCPClientInterface.INITIAL_CONNECT_TIMEOUT
|
||||||
|
|
||||||
|
if TCPClientInterface.SYNCHRONOUS_START:
|
||||||
|
self.initial_connect()
|
||||||
|
else:
|
||||||
|
thread = threading.Thread(target=self.initial_connect)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
|
||||||
|
def initial_connect(self):
|
||||||
|
if not self.connect(initial=True):
|
||||||
|
thread = threading.Thread(target=self.reconnect)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
else:
|
||||||
|
thread = threading.Thread(target=self.read_loop)
|
||||||
|
thread.daemon = True
|
||||||
|
thread.start()
|
||||||
|
if not self.kiss_framing:
|
||||||
|
self.wants_tunnel = True
|
||||||
|
|
||||||
def set_timeouts_linux(self):
|
def set_timeouts_linux(self):
|
||||||
if not self.i2p_tunneled:
|
if not self.i2p_tunneled:
|
||||||
@@ -181,9 +196,17 @@ class TCPClientInterface(Interface):
|
|||||||
|
|
||||||
def connect(self, initial=False):
|
def connect(self, initial=False):
|
||||||
try:
|
try:
|
||||||
|
if initial:
|
||||||
|
RNS.log("Establishing TCP connection for "+str(self)+"...", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||||
|
self.socket.settimeout(TCPClientInterface.INITIAL_CONNECT_TIMEOUT)
|
||||||
self.socket.connect((self.target_ip, self.target_port))
|
self.socket.connect((self.target_ip, self.target_port))
|
||||||
|
self.socket.settimeout(None)
|
||||||
self.online = True
|
self.online = True
|
||||||
|
|
||||||
|
if initial:
|
||||||
|
RNS.log("TCP connection for "+str(self)+" established", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if initial:
|
if initial:
|
||||||
@@ -231,7 +254,7 @@ class TCPClientInterface(Interface):
|
|||||||
|
|
||||||
self.reconnecting = False
|
self.reconnecting = False
|
||||||
thread = threading.Thread(target=self.read_loop)
|
thread = threading.Thread(target=self.read_loop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
if not self.kiss_framing:
|
if not self.kiss_framing:
|
||||||
RNS.Transport.synthesize_tunnel(self)
|
RNS.Transport.synthesize_tunnel(self)
|
||||||
@@ -417,6 +440,7 @@ class TCPServerInterface(Interface):
|
|||||||
self.IN = True
|
self.IN = True
|
||||||
self.OUT = False
|
self.OUT = False
|
||||||
self.name = name
|
self.name = name
|
||||||
|
self.detached = False
|
||||||
|
|
||||||
self.i2p_tunneled = i2p_tunneled
|
self.i2p_tunneled = i2p_tunneled
|
||||||
self.mode = RNS.Interfaces.Interface.Interface.MODE_FULL
|
self.mode = RNS.Interfaces.Interface.Interface.MODE_FULL
|
||||||
@@ -443,7 +467,7 @@ class TCPServerInterface(Interface):
|
|||||||
self.bitrate = TCPServerInterface.BITRATE_GUESS
|
self.bitrate = TCPServerInterface.BITRATE_GUESS
|
||||||
|
|
||||||
thread = threading.Thread(target=self.server.serve_forever)
|
thread = threading.Thread(target=self.server.serve_forever)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
self.online = True
|
self.online = True
|
||||||
@@ -459,9 +483,27 @@ class TCPServerInterface(Interface):
|
|||||||
spawned_interface.target_port = str(handler.client_address[1])
|
spawned_interface.target_port = str(handler.client_address[1])
|
||||||
spawned_interface.parent_interface = self
|
spawned_interface.parent_interface = self
|
||||||
spawned_interface.bitrate = self.bitrate
|
spawned_interface.bitrate = self.bitrate
|
||||||
|
|
||||||
spawned_interface.ifac_size = self.ifac_size
|
spawned_interface.ifac_size = self.ifac_size
|
||||||
spawned_interface.ifac_netname = self.ifac_netname
|
spawned_interface.ifac_netname = self.ifac_netname
|
||||||
spawned_interface.ifac_netkey = self.ifac_netkey
|
spawned_interface.ifac_netkey = self.ifac_netkey
|
||||||
|
if spawned_interface.ifac_netname != None or spawned_interface.ifac_netkey != None:
|
||||||
|
ifac_origin = b""
|
||||||
|
if spawned_interface.ifac_netname != None:
|
||||||
|
ifac_origin += RNS.Identity.full_hash(spawned_interface.ifac_netname.encode("utf-8"))
|
||||||
|
if spawned_interface.ifac_netkey != None:
|
||||||
|
ifac_origin += RNS.Identity.full_hash(spawned_interface.ifac_netkey.encode("utf-8"))
|
||||||
|
|
||||||
|
ifac_origin_hash = RNS.Identity.full_hash(ifac_origin)
|
||||||
|
spawned_interface.ifac_key = RNS.Cryptography.hkdf(
|
||||||
|
length=64,
|
||||||
|
derive_from=ifac_origin_hash,
|
||||||
|
salt=RNS.Reticulum.IFAC_SALT,
|
||||||
|
context=None
|
||||||
|
)
|
||||||
|
spawned_interface.ifac_identity = RNS.Identity.from_bytes(spawned_interface.ifac_key)
|
||||||
|
spawned_interface.ifac_signature = spawned_interface.ifac_identity.sign(RNS.Identity.full_hash(spawned_interface.ifac_key))
|
||||||
|
|
||||||
spawned_interface.announce_rate_target = self.announce_rate_target
|
spawned_interface.announce_rate_target = self.announce_rate_target
|
||||||
spawned_interface.announce_rate_grace = self.announce_rate_grace
|
spawned_interface.announce_rate_grace = self.announce_rate_grace
|
||||||
spawned_interface.announce_rate_penalty = self.announce_rate_penalty
|
spawned_interface.announce_rate_penalty = self.announce_rate_penalty
|
||||||
@@ -476,9 +518,25 @@ class TCPServerInterface(Interface):
|
|||||||
def processOutgoing(self, data):
|
def processOutgoing(self, data):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
def detach(self):
|
||||||
|
if self.server != None:
|
||||||
|
if hasattr(self.server, "shutdown"):
|
||||||
|
if callable(self.server.shutdown):
|
||||||
|
try:
|
||||||
|
RNS.log("Detaching "+str(self), RNS.LOG_DEBUG)
|
||||||
|
self.server.shutdown()
|
||||||
|
self.detached = True
|
||||||
|
self.server = None
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Error while shutting down server for "+str(self)+": "+str(e))
|
||||||
|
|
||||||
|
|
||||||
def __str__(self):
|
def __str__(self):
|
||||||
return "TCPServerInterface["+self.name+"/"+self.bind_ip+":"+str(self.bind_port)+"]"
|
return "TCPServerInterface["+self.name+"/"+self.bind_ip+":"+str(self.bind_port)+"]"
|
||||||
|
|
||||||
|
|
||||||
class TCPInterfaceHandler(socketserver.BaseRequestHandler):
|
class TCPInterfaceHandler(socketserver.BaseRequestHandler):
|
||||||
def __init__(self, callback, *args, **keys):
|
def __init__(self, callback, *args, **keys):
|
||||||
self.callback = callback
|
self.callback = callback
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ class UDPInterface(Interface):
|
|||||||
self.server = socketserver.UDPServer(address, handlerFactory(self.processIncoming))
|
self.server = socketserver.UDPServer(address, handlerFactory(self.processIncoming))
|
||||||
|
|
||||||
thread = threading.Thread(target=self.server.serve_forever)
|
thread = threading.Thread(target=self.server.serve_forever)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
self.online = True
|
self.online = True
|
||||||
|
|||||||
@@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
|
import RNS.Interfaces.Android
|
||||||
|
|
||||||
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
modules = glob.glob(os.path.dirname(__file__)+"/*.py")
|
||||||
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
__all__ = [ os.path.basename(f)[:-3] for f in modules if not f.endswith('__init__.py')]
|
||||||
@@ -45,7 +45,7 @@ class Link:
|
|||||||
"""
|
"""
|
||||||
This class is used to establish and manage links to other peers. When a
|
This class is used to establish and manage links to other peers. When a
|
||||||
link instance is created, Reticulum will attempt to establish verified
|
link instance is created, Reticulum will attempt to establish verified
|
||||||
connectivity with the specified destination.
|
and encrypted connectivity with the specified destination.
|
||||||
|
|
||||||
:param destination: A :ref:`RNS.Destination<api-destination>` instance which to establish a link to.
|
:param destination: A :ref:`RNS.Destination<api-destination>` instance which to establish a link to.
|
||||||
:param established_callback: An optional function or method with the signature *callback(link)* to be called when the link has been established.
|
:param established_callback: An optional function or method with the signature *callback(link)* to be called when the link has been established.
|
||||||
@@ -164,7 +164,7 @@ class Link:
|
|||||||
self.__remote_identity = None
|
self.__remote_identity = None
|
||||||
if self.destination == None:
|
if self.destination == None:
|
||||||
self.initiator = False
|
self.initiator = False
|
||||||
self.prv = self.owner.identity.prv
|
self.prv = X25519PrivateKey.generate()
|
||||||
self.sig_prv = self.owner.identity.sig_prv
|
self.sig_prv = self.owner.identity.sig_prv
|
||||||
else:
|
else:
|
||||||
self.initiator = True
|
self.initiator = True
|
||||||
@@ -193,15 +193,11 @@ class Link:
|
|||||||
self.set_link_closed_callback(closed_callback)
|
self.set_link_closed_callback(closed_callback)
|
||||||
|
|
||||||
if (self.initiator):
|
if (self.initiator):
|
||||||
peer_pub_bytes = self.destination.identity.get_public_key()[:Link.ECPUBSIZE//2]
|
|
||||||
peer_sig_pub_bytes = self.destination.identity.get_public_key()[Link.ECPUBSIZE//2:Link.ECPUBSIZE]
|
|
||||||
self.request_data = self.pub_bytes+self.sig_pub_bytes
|
self.request_data = self.pub_bytes+self.sig_pub_bytes
|
||||||
self.packet = RNS.Packet(destination, self.request_data, packet_type=RNS.Packet.LINKREQUEST)
|
self.packet = RNS.Packet(destination, self.request_data, packet_type=RNS.Packet.LINKREQUEST)
|
||||||
self.packet.pack()
|
self.packet.pack()
|
||||||
self.establishment_cost += len(self.packet.raw)
|
self.establishment_cost += len(self.packet.raw)
|
||||||
self.set_link_id(self.packet)
|
self.set_link_id(self.packet)
|
||||||
self.load_peer(peer_pub_bytes, peer_sig_pub_bytes)
|
|
||||||
self.handshake()
|
|
||||||
RNS.Transport.register_link(self)
|
RNS.Transport.register_link(self)
|
||||||
self.request_time = time.time()
|
self.request_time = time.time()
|
||||||
self.start_watchdog()
|
self.start_watchdog()
|
||||||
@@ -240,7 +236,7 @@ class Link:
|
|||||||
signed_data = self.link_id+self.pub_bytes+self.sig_pub_bytes
|
signed_data = self.link_id+self.pub_bytes+self.sig_pub_bytes
|
||||||
signature = self.owner.identity.sign(signed_data)
|
signature = self.owner.identity.sign(signed_data)
|
||||||
|
|
||||||
proof_data = signature
|
proof_data = signature+self.pub_bytes
|
||||||
proof = RNS.Packet(self, proof_data, packet_type=RNS.Packet.PROOF, context=RNS.Packet.LRPROOF)
|
proof = RNS.Packet(self, proof_data, packet_type=RNS.Packet.PROOF, context=RNS.Packet.LRPROOF)
|
||||||
proof.send()
|
proof.send()
|
||||||
self.establishment_cost += len(proof.raw)
|
self.establishment_cost += len(proof.raw)
|
||||||
@@ -261,8 +257,13 @@ class Link:
|
|||||||
self.had_outbound()
|
self.had_outbound()
|
||||||
|
|
||||||
def validate_proof(self, packet):
|
def validate_proof(self, packet):
|
||||||
if self.status == Link.HANDSHAKE:
|
if self.status == Link.PENDING:
|
||||||
if self.initiator and len(packet.data) == RNS.Identity.SIGLENGTH//8:
|
if self.initiator and len(packet.data) == RNS.Identity.SIGLENGTH//8+Link.ECPUBSIZE//2:
|
||||||
|
peer_pub_bytes = packet.data[RNS.Identity.SIGLENGTH//8:RNS.Identity.SIGLENGTH//8+Link.ECPUBSIZE//2]
|
||||||
|
peer_sig_pub_bytes = self.destination.identity.get_public_key()[Link.ECPUBSIZE//2:Link.ECPUBSIZE]
|
||||||
|
self.load_peer(peer_pub_bytes, peer_sig_pub_bytes)
|
||||||
|
self.handshake()
|
||||||
|
|
||||||
self.establishment_cost += len(packet.raw)
|
self.establishment_cost += len(packet.raw)
|
||||||
signed_data = self.link_id+self.peer_pub_bytes+self.peer_sig_pub_bytes
|
signed_data = self.link_id+self.peer_pub_bytes+self.peer_sig_pub_bytes
|
||||||
signature = packet.data[:RNS.Identity.SIGLENGTH//8]
|
signature = packet.data[:RNS.Identity.SIGLENGTH//8]
|
||||||
@@ -282,7 +283,7 @@ class Link:
|
|||||||
self.activated_at = time.time()
|
self.activated_at = time.time()
|
||||||
if self.callbacks.link_established != None:
|
if self.callbacks.link_established != None:
|
||||||
thread = threading.Thread(target=self.callbacks.link_established, args=(self,))
|
thread = threading.Thread(target=self.callbacks.link_established, args=(self,))
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
else:
|
else:
|
||||||
RNS.log("Invalid link proof signature received by "+str(self)+". Ignoring.", RNS.LOG_DEBUG)
|
RNS.log("Invalid link proof signature received by "+str(self)+". Ignoring.", RNS.LOG_DEBUG)
|
||||||
@@ -408,7 +409,7 @@ class Link:
|
|||||||
|
|
||||||
def get_remote_identity(self):
|
def get_remote_identity(self):
|
||||||
"""
|
"""
|
||||||
:returns: The identity of the remote peer, if it is known
|
:returns: The identity of the remote peer, if it is known. Calling this method will not query the remote initiator to reveal its identity. Returns ``None`` if the link initiator has not already independently called the ``identify(identity)`` method.
|
||||||
"""
|
"""
|
||||||
return self.__remote_identity
|
return self.__remote_identity
|
||||||
|
|
||||||
@@ -470,7 +471,7 @@ class Link:
|
|||||||
|
|
||||||
def start_watchdog(self):
|
def start_watchdog(self):
|
||||||
thread = threading.Thread(target=self.__watchdog_job)
|
thread = threading.Thread(target=self.__watchdog_job)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
def __watchdog_job(self):
|
def __watchdog_job(self):
|
||||||
@@ -640,7 +641,7 @@ class Link:
|
|||||||
plaintext = self.decrypt(packet.data)
|
plaintext = self.decrypt(packet.data)
|
||||||
if self.callbacks.packet != None:
|
if self.callbacks.packet != None:
|
||||||
thread = threading.Thread(target=self.callbacks.packet, args=(plaintext, packet))
|
thread = threading.Thread(target=self.callbacks.packet, args=(plaintext, packet))
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
if self.destination.proof_strategy == RNS.Destination.PROVE_ALL:
|
if self.destination.proof_strategy == RNS.Destination.PROVE_ALL:
|
||||||
@@ -981,7 +982,7 @@ class RequestReceipt():
|
|||||||
self.status = RequestReceipt.DELIVERED
|
self.status = RequestReceipt.DELIVERED
|
||||||
self.__resource_response_timeout = time.time()+self.timeout
|
self.__resource_response_timeout = time.time()+self.timeout
|
||||||
response_timeout_thread = threading.Thread(target=self.__response_timeout_job)
|
response_timeout_thread = threading.Thread(target=self.__response_timeout_job)
|
||||||
response_timeout_thread.setDaemon(True)
|
response_timeout_thread.daemon = True
|
||||||
response_timeout_thread.start()
|
response_timeout_thread.start()
|
||||||
else:
|
else:
|
||||||
RNS.log("Sending request "+RNS.prettyhexrep(self.request_id)+" as resource failed with status: "+RNS.hexrep([resource.status]), RNS.LOG_DEBUG)
|
RNS.log("Sending request "+RNS.prettyhexrep(self.request_id)+" as resource failed with status: "+RNS.hexrep([resource.status]), RNS.LOG_DEBUG)
|
||||||
|
|||||||
@@ -29,15 +29,19 @@ import RNS
|
|||||||
class Packet:
|
class Packet:
|
||||||
"""
|
"""
|
||||||
The Packet class is used to create packet instances that can be sent
|
The Packet class is used to create packet instances that can be sent
|
||||||
over a Reticulum network. Packets to will automatically be encrypted if
|
over a Reticulum network. Packets will automatically be encrypted if
|
||||||
they are adressed to a ``RNS.Destination.SINGLE`` destination,
|
they are adressed to a ``RNS.Destination.SINGLE`` destination,
|
||||||
``RNS.Destination.GROUP`` destination or a :ref:`RNS.Link<api-link>`.
|
``RNS.Destination.GROUP`` destination or a :ref:`RNS.Link<api-link>`.
|
||||||
|
|
||||||
For ``RNS.Destination.GROUP`` destinations, Reticulum will use the
|
For ``RNS.Destination.GROUP`` destinations, Reticulum will use the
|
||||||
pre-shared key configured for the destination.
|
pre-shared key configured for the destination. All packets to group
|
||||||
|
destinations are encrypted with the same AES-128 key.
|
||||||
|
|
||||||
For ``RNS.Destination.SINGLE`` destinations and :ref:`RNS.Link<api-link>`
|
For ``RNS.Destination.SINGLE`` destinations, Reticulum will use a newly
|
||||||
destinations, reticulum will use ephemeral keys, and offers **Forward Secrecy**.
|
derived ephemeral AES-128 key for every packet.
|
||||||
|
|
||||||
|
For :ref:`RNS.Link<api-link>` destinations, Reticulum will use per-link
|
||||||
|
ephemeral keys, and offers **Forward Secrecy**.
|
||||||
|
|
||||||
:param destination: A :ref:`RNS.Destination<api-destination>` instance to which the packet will be sent.
|
:param destination: A :ref:`RNS.Destination<api-destination>` instance to which the packet will be sent.
|
||||||
:param data: The data payload to be included in the packet as *bytes*.
|
:param data: The data payload to be included in the packet as *bytes*.
|
||||||
@@ -490,7 +494,7 @@ class PacketReceipt:
|
|||||||
|
|
||||||
if self.callbacks.timeout:
|
if self.callbacks.timeout:
|
||||||
thread = threading.Thread(target=self.callbacks.timeout, args=(self,))
|
thread = threading.Thread(target=self.callbacks.timeout, args=(self,))
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ class Resource:
|
|||||||
WINDOW_MAX_SLOW = 10
|
WINDOW_MAX_SLOW = 10
|
||||||
|
|
||||||
# The maximum window size for transfers on fast links
|
# The maximum window size for transfers on fast links
|
||||||
WINDOW_MAX_FAST = 76
|
WINDOW_MAX_FAST = 75
|
||||||
|
|
||||||
# For calculating maps and guard segments, this
|
# For calculating maps and guard segments, this
|
||||||
# must be set to the global maximum window.
|
# must be set to the global maximum window.
|
||||||
@@ -393,7 +393,7 @@ class Resource:
|
|||||||
the resource advertisement it will begin transferring.
|
the resource advertisement it will begin transferring.
|
||||||
"""
|
"""
|
||||||
thread = threading.Thread(target=self.__advertise_job)
|
thread = threading.Thread(target=self.__advertise_job)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
def __advertise_job(self):
|
def __advertise_job(self):
|
||||||
@@ -421,7 +421,7 @@ class Resource:
|
|||||||
|
|
||||||
def watchdog_job(self):
|
def watchdog_job(self):
|
||||||
thread = threading.Thread(target=self.__watchdog_job)
|
thread = threading.Thread(target=self.__watchdog_job)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
def __watchdog_job(self):
|
def __watchdog_job(self):
|
||||||
@@ -944,7 +944,7 @@ class Resource:
|
|||||||
|
|
||||||
|
|
||||||
class ResourceAdvertisement:
|
class ResourceAdvertisement:
|
||||||
OVERHEAD = 128
|
OVERHEAD = 134
|
||||||
HASHMAP_MAX_LEN = math.floor((RNS.Link.MDU-OVERHEAD)/Resource.MAPHASH_LEN)
|
HASHMAP_MAX_LEN = math.floor((RNS.Link.MDU-OVERHEAD)/Resource.MAPHASH_LEN)
|
||||||
COLLISION_GUARD_SIZE = 2*Resource.WINDOW_MAX+HASHMAP_MAX_LEN
|
COLLISION_GUARD_SIZE = 2*Resource.WINDOW_MAX+HASHMAP_MAX_LEN
|
||||||
|
|
||||||
|
|||||||
@@ -144,13 +144,14 @@ class Transport:
|
|||||||
RNS.log("Loaded Transport Identity from storage", RNS.LOG_VERBOSE)
|
RNS.log("Loaded Transport Identity from storage", RNS.LOG_VERBOSE)
|
||||||
|
|
||||||
packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist"
|
packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist"
|
||||||
if os.path.isfile(packet_hashlist_path):
|
if not Transport.owner.is_connected_to_shared_instance:
|
||||||
try:
|
if os.path.isfile(packet_hashlist_path):
|
||||||
file = open(packet_hashlist_path, "rb")
|
try:
|
||||||
Transport.packet_hashlist = umsgpack.unpackb(file.read())
|
file = open(packet_hashlist_path, "rb")
|
||||||
file.close()
|
Transport.packet_hashlist = umsgpack.unpackb(file.read())
|
||||||
except Exception as e:
|
file.close()
|
||||||
RNS.log("Could not load packet hashlist from storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
except Exception as e:
|
||||||
|
RNS.log("Could not load packet hashlist from storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
# Create transport-specific destinations
|
# Create transport-specific destinations
|
||||||
Transport.path_request_destination = RNS.Destination(None, RNS.Destination.IN, RNS.Destination.PLAIN, Transport.APP_NAME, "path", "request")
|
Transport.path_request_destination = RNS.Destination(None, RNS.Destination.IN, RNS.Destination.PLAIN, Transport.APP_NAME, "path", "request")
|
||||||
@@ -165,7 +166,7 @@ class Transport:
|
|||||||
|
|
||||||
Transport.jobs_running = False
|
Transport.jobs_running = False
|
||||||
thread = threading.Thread(target=Transport.jobloop)
|
thread = threading.Thread(target=Transport.jobloop)
|
||||||
thread.setDaemon(True)
|
thread.daemon = True
|
||||||
thread.start()
|
thread.start()
|
||||||
|
|
||||||
if RNS.Reticulum.transport_enabled():
|
if RNS.Reticulum.transport_enabled():
|
||||||
@@ -618,27 +619,43 @@ class Transport:
|
|||||||
should_transmit = False
|
should_transmit = False
|
||||||
|
|
||||||
elif interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING:
|
elif interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING:
|
||||||
from_interface = Transport.next_hop_interface(packet.destination_hash)
|
local_destination = next((d for d in Transport.destinations if d.hash == packet.destination_hash), None)
|
||||||
if from_interface == None or not hasattr(from_interface, "mode"):
|
if local_destination != None:
|
||||||
RNS.log("Blocking announce broadcast on "+str(interface)+" since next hop interface is non-existing or has no mode configured", RNS.LOG_EXTREME)
|
# RNS.log("Allowing announce broadcast on roaming-mode interface from instance-local destination", RNS.LOG_EXTREME)
|
||||||
should_transmit = False
|
pass
|
||||||
else:
|
else:
|
||||||
if from_interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING:
|
from_interface = Transport.next_hop_interface(packet.destination_hash)
|
||||||
RNS.log("Blocking announce broadcast on "+str(interface)+" due to roaming-mode next-hop interface", RNS.LOG_EXTREME)
|
if from_interface == None or not hasattr(from_interface, "mode"):
|
||||||
should_transmit = False
|
|
||||||
elif from_interface.mode == RNS.Interfaces.Interface.Interface.MODE_BOUNDARY:
|
|
||||||
RNS.log("Blocking announce broadcast on "+str(interface)+" due to boundary-mode next-hop interface", RNS.LOG_EXTREME)
|
|
||||||
should_transmit = False
|
should_transmit = False
|
||||||
|
if from_interface == None:
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" since next hop interface doesn't exist", RNS.LOG_EXTREME)
|
||||||
|
elif not hasattr(from_interface, "mode"):
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" since next hop interface has no mode configured", RNS.LOG_EXTREME)
|
||||||
|
else:
|
||||||
|
if from_interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING:
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" due to roaming-mode next-hop interface", RNS.LOG_EXTREME)
|
||||||
|
should_transmit = False
|
||||||
|
elif from_interface.mode == RNS.Interfaces.Interface.Interface.MODE_BOUNDARY:
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" due to boundary-mode next-hop interface", RNS.LOG_EXTREME)
|
||||||
|
should_transmit = False
|
||||||
|
|
||||||
elif interface.mode == RNS.Interfaces.Interface.Interface.MODE_BOUNDARY:
|
elif interface.mode == RNS.Interfaces.Interface.Interface.MODE_BOUNDARY:
|
||||||
from_interface = Transport.next_hop_interface(packet.destination_hash)
|
local_destination = next((d for d in Transport.destinations if d.hash == packet.destination_hash), None)
|
||||||
if from_interface == None or not hasattr(from_interface, "mode"):
|
if local_destination != None:
|
||||||
RNS.log("Blocking announce broadcast on "+str(interface)+" since next hop interface is non-existing or has no mode configured", RNS.LOG_EXTREME)
|
# RNS.log("Allowing announce broadcast on boundary-mode interface from instance-local destination", RNS.LOG_EXTREME)
|
||||||
should_transmit = False
|
pass
|
||||||
else:
|
else:
|
||||||
if from_interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING:
|
from_interface = Transport.next_hop_interface(packet.destination_hash)
|
||||||
RNS.log("Blocking announce broadcast on "+str(interface)+" due to roaming-mode next-hop interface", RNS.LOG_EXTREME)
|
if from_interface == None or not hasattr(from_interface, "mode"):
|
||||||
should_transmit = False
|
should_transmit = False
|
||||||
|
if from_interface == None:
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" since next hop interface doesn't exist", RNS.LOG_EXTREME)
|
||||||
|
elif not hasattr(from_interface, "mode"):
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" since next hop interface has no mode configured", RNS.LOG_EXTREME)
|
||||||
|
else:
|
||||||
|
if from_interface.mode == RNS.Interfaces.Interface.Interface.MODE_ROAMING:
|
||||||
|
RNS.log("Blocking announce broadcast on "+str(interface)+" due to roaming-mode next-hop interface", RNS.LOG_EXTREME)
|
||||||
|
should_transmit = False
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# Currently, annouces originating locally are always
|
# Currently, annouces originating locally are always
|
||||||
@@ -699,13 +716,22 @@ class Transport:
|
|||||||
timer = threading.Timer(wait_time, interface.process_announce_queue)
|
timer = threading.Timer(wait_time, interface.process_announce_queue)
|
||||||
timer.start()
|
timer.start()
|
||||||
|
|
||||||
wait_time_str = str(round(wait_time*1000,3))+"ms"
|
if wait_time < 1:
|
||||||
|
wait_time_str = str(round(wait_time*1000,2))+"ms"
|
||||||
|
else:
|
||||||
|
wait_time_str = str(round(wait_time*1,2))+"s"
|
||||||
|
|
||||||
ql_str = str(len(interface.announce_queue))
|
ql_str = str(len(interface.announce_queue))
|
||||||
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME)
|
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
wait_time = max(interface.announce_allowed_at - time.time(), 0)
|
wait_time = max(interface.announce_allowed_at - time.time(), 0)
|
||||||
wait_time_str = str(round(wait_time*1000,3))+"ms"
|
|
||||||
|
if wait_time < 1:
|
||||||
|
wait_time_str = str(round(wait_time*1000,2))+"ms"
|
||||||
|
else:
|
||||||
|
wait_time_str = str(round(wait_time*1,2))+"s"
|
||||||
|
|
||||||
ql_str = str(len(interface.announce_queue))
|
ql_str = str(len(interface.announce_queue))
|
||||||
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME)
|
RNS.log("Added announce to queue (height "+ql_str+") on "+str(interface)+" for processing in "+wait_time_str, RNS.LOG_EXTREME)
|
||||||
|
|
||||||
@@ -808,7 +834,7 @@ class Transport:
|
|||||||
def inbound(raw, interface=None):
|
def inbound(raw, interface=None):
|
||||||
# If interface access codes are enabled,
|
# If interface access codes are enabled,
|
||||||
# we must authenticate each packet.
|
# we must authenticate each packet.
|
||||||
if len(raw) > 1:
|
if len(raw) > 2:
|
||||||
if interface != None and hasattr(interface, "ifac_identity") and interface.ifac_identity != None:
|
if interface != None and hasattr(interface, "ifac_identity") and interface.ifac_identity != None:
|
||||||
# Check that IFAC flag is set
|
# Check that IFAC flag is set
|
||||||
if raw[0] & 0x80 == 0x80:
|
if raw[0] & 0x80 == 0x80:
|
||||||
@@ -846,6 +872,9 @@ class Transport:
|
|||||||
# If the flag is set, drop the packet
|
# If the flag is set, drop the packet
|
||||||
return
|
return
|
||||||
|
|
||||||
|
else:
|
||||||
|
return
|
||||||
|
|
||||||
while (Transport.jobs_running):
|
while (Transport.jobs_running):
|
||||||
sleep(0.0005)
|
sleep(0.0005)
|
||||||
|
|
||||||
@@ -967,8 +996,6 @@ class Transport:
|
|||||||
new_raw += packet.raw[2:]
|
new_raw += packet.raw[2:]
|
||||||
|
|
||||||
outbound_interface = Transport.destination_table[packet.destination_hash][5]
|
outbound_interface = Transport.destination_table[packet.destination_hash][5]
|
||||||
Transport.transmit(outbound_interface, new_raw)
|
|
||||||
Transport.destination_table[packet.destination_hash][0] = time.time()
|
|
||||||
|
|
||||||
if packet.packet_type == RNS.Packet.LINKREQUEST:
|
if packet.packet_type == RNS.Packet.LINKREQUEST:
|
||||||
# Entry format is
|
# Entry format is
|
||||||
@@ -991,6 +1018,9 @@ class Transport:
|
|||||||
|
|
||||||
Transport.reverse_table[packet.getTruncatedHash()] = reverse_entry
|
Transport.reverse_table[packet.getTruncatedHash()] = reverse_entry
|
||||||
|
|
||||||
|
Transport.transmit(outbound_interface, new_raw)
|
||||||
|
Transport.destination_table[packet.destination_hash][0] = time.time()
|
||||||
|
|
||||||
else:
|
else:
|
||||||
# TODO: There should probably be some kind of REJECT
|
# TODO: There should probably be some kind of REJECT
|
||||||
# mechanism here, to signal to the source that their
|
# mechanism here, to signal to the source that their
|
||||||
@@ -1074,7 +1104,7 @@ class Transport:
|
|||||||
if (not any(packet.destination_hash == d.hash for d in Transport.destinations) and packet.hops < Transport.PATHFINDER_M+1):
|
if (not any(packet.destination_hash == d.hash for d in Transport.destinations) and packet.hops < Transport.PATHFINDER_M+1):
|
||||||
announce_emitted = Transport.announce_emitted(packet)
|
announce_emitted = Transport.announce_emitted(packet)
|
||||||
|
|
||||||
random_blob = packet.data[RNS.Identity.KEYSIZE//8:RNS.Identity.KEYSIZE//8+RNS.Reticulum.TRUNCATED_HASHLENGTH//8]
|
random_blob = packet.data[RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8:RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8+10]
|
||||||
random_blobs = []
|
random_blobs = []
|
||||||
if packet.destination_hash in Transport.destination_table:
|
if packet.destination_hash in Transport.destination_table:
|
||||||
random_blobs = Transport.destination_table[packet.destination_hash][4]
|
random_blobs = Transport.destination_table[packet.destination_hash][4]
|
||||||
@@ -1232,7 +1262,6 @@ class Transport:
|
|||||||
attached_interface
|
attached_interface
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
# If we have any local clients connected, we re-
|
# If we have any local clients connected, we re-
|
||||||
# transmit the announce to them immediately
|
# transmit the announce to them immediately
|
||||||
if (len(Transport.local_client_interfaces)):
|
if (len(Transport.local_client_interfaces)):
|
||||||
@@ -1309,7 +1338,6 @@ class Transport:
|
|||||||
new_announce.hops = packet.hops
|
new_announce.hops = packet.hops
|
||||||
new_announce.send()
|
new_announce.send()
|
||||||
|
|
||||||
|
|
||||||
destination_table_entry = [now, received_from, announce_hops, expires, random_blobs, packet.receiving_interface, packet]
|
destination_table_entry = [now, received_from, announce_hops, expires, random_blobs, packet.receiving_interface, packet]
|
||||||
Transport.destination_table[packet.destination_hash] = destination_table_entry
|
Transport.destination_table[packet.destination_hash] = destination_table_entry
|
||||||
RNS.log("Destination "+RNS.prettyhexrep(packet.destination_hash)+" is now "+str(announce_hops)+" hops away via "+RNS.prettyhexrep(received_from)+" on "+str(packet.receiving_interface), RNS.LOG_DEBUG)
|
RNS.log("Destination "+RNS.prettyhexrep(packet.destination_hash)+" is now "+str(announce_hops)+" hops away via "+RNS.prettyhexrep(received_from)+" on "+str(packet.receiving_interface), RNS.LOG_DEBUG)
|
||||||
@@ -1788,14 +1816,12 @@ class Transport:
|
|||||||
|
|
||||||
queued_announces = True if len(on_interface.announce_queue) > 0 else False
|
queued_announces = True if len(on_interface.announce_queue) > 0 else False
|
||||||
if queued_announces:
|
if queued_announces:
|
||||||
# TODO: Reset to extra level, probably
|
RNS.log("Blocking recursive path request on "+str(on_interface)+" due to queued announces", RNS.LOG_EXTREME)
|
||||||
RNS.log("Blocking recursive path request on "+str(on_interface)+" due to queued announces", RNS.LOG_DEBUG)
|
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
now = time.time()
|
now = time.time()
|
||||||
if now < on_interface.announce_allowed_at:
|
if now < on_interface.announce_allowed_at:
|
||||||
# TODO: Reset to extra level, probably
|
RNS.log("Blocking recursive path request on "+str(on_interface)+" due to active announce cap", RNS.LOG_EXTREME)
|
||||||
RNS.log("Blocking recursive path request on "+str(on_interface)+" due to active announce cap", RNS.LOG_DEBUG)
|
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
tx_time = ((len(path_request_data)+RNS.Reticulum.HEADER_MINSIZE)*8) / on_interface.bitrate
|
tx_time = ((len(path_request_data)+RNS.Reticulum.HEADER_MINSIZE)*8) / on_interface.bitrate
|
||||||
@@ -1983,10 +2009,27 @@ class Transport:
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def detach_interfaces():
|
def detach_interfaces():
|
||||||
for interface in Transport.interfaces:
|
detachable_interfaces = []
|
||||||
interface.detach()
|
|
||||||
|
|
||||||
|
for interface in Transport.interfaces:
|
||||||
|
# Currently no rules are being applied
|
||||||
|
# here, and all interfaces will be sent
|
||||||
|
# the detach call on RNS teardown.
|
||||||
|
if True:
|
||||||
|
detachable_interfaces.append(interface)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
for interface in Transport.local_client_interfaces:
|
for interface in Transport.local_client_interfaces:
|
||||||
|
# Currently no rules are being applied
|
||||||
|
# here, and all interfaces will be sent
|
||||||
|
# the detach call on RNS teardown.
|
||||||
|
if True:
|
||||||
|
detachable_interfaces.append(interface)
|
||||||
|
else:
|
||||||
|
pass
|
||||||
|
|
||||||
|
for interface in detachable_interfaces:
|
||||||
interface.detach()
|
interface.detach()
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
@@ -2005,6 +2048,7 @@ class Transport:
|
|||||||
Transport.announce_handlers = []
|
Transport.announce_handlers = []
|
||||||
Transport.tunnels = {}
|
Transport.tunnels = {}
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def shared_connection_reappeared():
|
def shared_connection_reappeared():
|
||||||
if Transport.owner.is_connected_to_shared_instance:
|
if Transport.owner.is_connected_to_shared_instance:
|
||||||
@@ -2012,6 +2056,7 @@ class Transport:
|
|||||||
if registered_destination.type == RNS.Destination.SINGLE:
|
if registered_destination.type == RNS.Destination.SINGLE:
|
||||||
registered_destination.announce(path_response=True)
|
registered_destination.announce(path_response=True)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def drop_announce_queues():
|
def drop_announce_queues():
|
||||||
for interface in Transport.interfaces:
|
for interface in Transport.interfaces:
|
||||||
@@ -2026,32 +2071,73 @@ class Transport:
|
|||||||
interface.announce_queue = []
|
interface.announce_queue = []
|
||||||
RNS.log("Dropped "+na_str+" on "+str(interface), RNS.LOG_VERBOSE)
|
RNS.log("Dropped "+na_str+" on "+str(interface), RNS.LOG_VERBOSE)
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def announce_emitted(packet):
|
def announce_emitted(packet):
|
||||||
random_blob = packet.data[RNS.Identity.KEYSIZE//8:RNS.Identity.KEYSIZE//8+RNS.Reticulum.TRUNCATED_HASHLENGTH//8]
|
random_blob = packet.data[RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8:RNS.Identity.KEYSIZE//8+RNS.Identity.NAME_HASH_LENGTH//8+10]
|
||||||
announce_emitted = int.from_bytes(random_blob[5:10], "big")
|
announce_emitted = int.from_bytes(random_blob[5:10], "big")
|
||||||
|
|
||||||
return announce_emitted
|
return announce_emitted
|
||||||
|
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def exit_handler():
|
def save_packet_hashlist():
|
||||||
try:
|
|
||||||
if not RNS.Reticulum.transport_enabled():
|
|
||||||
Transport.packet_hashlist = []
|
|
||||||
else:
|
|
||||||
RNS.log("Saving packet hashlist to storage...", RNS.LOG_VERBOSE)
|
|
||||||
|
|
||||||
packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist"
|
|
||||||
file = open(packet_hashlist_path, "wb")
|
|
||||||
file.write(umsgpack.packb(Transport.packet_hashlist))
|
|
||||||
file.close()
|
|
||||||
|
|
||||||
except Exception as e:
|
|
||||||
RNS.log("Could not save packet hashlist to storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
|
||||||
|
|
||||||
if not Transport.owner.is_connected_to_shared_instance:
|
if not Transport.owner.is_connected_to_shared_instance:
|
||||||
RNS.log("Saving path table to storage...", RNS.LOG_VERBOSE)
|
if hasattr(Transport, "saving_packet_hashlist"):
|
||||||
|
wait_interval = 0.2
|
||||||
|
wait_timeout = 5
|
||||||
|
wait_start = time.time()
|
||||||
|
while Transport.saving_packet_hashlist:
|
||||||
|
time.sleep(wait_interval)
|
||||||
|
if time.time() > wait_start+wait_timeout:
|
||||||
|
RNS.log("Could not save packet hashlist to storage, waiting for previous save operation timed out.", RNS.LOG_ERROR)
|
||||||
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Transport.saving_packet_hashlist = True
|
||||||
|
save_start = time.time()
|
||||||
|
|
||||||
|
if not RNS.Reticulum.transport_enabled():
|
||||||
|
Transport.packet_hashlist = []
|
||||||
|
else:
|
||||||
|
RNS.log("Saving packet hashlist to storage...", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
packet_hashlist_path = RNS.Reticulum.storagepath+"/packet_hashlist"
|
||||||
|
file = open(packet_hashlist_path, "wb")
|
||||||
|
file.write(umsgpack.packb(Transport.packet_hashlist))
|
||||||
|
file.close()
|
||||||
|
|
||||||
|
save_time = time.time() - save_start
|
||||||
|
if save_time < 1:
|
||||||
|
time_str = str(round(save_time*1000,2))+"ms"
|
||||||
|
else:
|
||||||
|
time_str = str(round(save_time,2))+"s"
|
||||||
|
RNS.log("Saved packet hashlist in "+time_str, RNS.LOG_DEBUG)
|
||||||
|
|
||||||
|
except Exception as e:
|
||||||
|
RNS.log("Could not save packet hashlist to storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
Transport.saving_packet_hashlist = False
|
||||||
|
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def save_path_table():
|
||||||
|
if not Transport.owner.is_connected_to_shared_instance:
|
||||||
|
if hasattr(Transport, "saving_path_table"):
|
||||||
|
wait_interval = 0.2
|
||||||
|
wait_timeout = 5
|
||||||
|
wait_start = time.time()
|
||||||
|
while Transport.saving_path_table:
|
||||||
|
time.sleep(wait_interval)
|
||||||
|
if time.time() > wait_start+wait_timeout:
|
||||||
|
RNS.log("Could not save path table to storage, waiting for previous save operation timed out.", RNS.LOG_ERROR)
|
||||||
|
return False
|
||||||
|
|
||||||
|
try:
|
||||||
|
Transport.saving_path_table = True
|
||||||
|
save_start = time.time()
|
||||||
|
RNS.log("Saving path table to storage...", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
serialised_destinations = []
|
serialised_destinations = []
|
||||||
for destination_hash in Transport.destination_table:
|
for destination_hash in Transport.destination_table:
|
||||||
# Get the destination entry from the destination table
|
# Get the destination entry from the destination table
|
||||||
@@ -2090,12 +2176,38 @@ class Transport:
|
|||||||
file = open(destination_table_path, "wb")
|
file = open(destination_table_path, "wb")
|
||||||
file.write(umsgpack.packb(serialised_destinations))
|
file.write(umsgpack.packb(serialised_destinations))
|
||||||
file.close()
|
file.close()
|
||||||
RNS.log("Done saving "+str(len(serialised_destinations))+" path table entries to storage", RNS.LOG_VERBOSE)
|
|
||||||
|
save_time = time.time() - save_start
|
||||||
|
if save_time < 1:
|
||||||
|
time_str = str(round(save_time*1000,2))+"ms"
|
||||||
|
else:
|
||||||
|
time_str = str(round(save_time,2))+"s"
|
||||||
|
RNS.log("Saved "+str(len(serialised_destinations))+" path table entries in "+time_str, RNS.LOG_DEBUG)
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Could not save path table to storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Could not save path table to storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
RNS.log("Saving tunnel table to storage...", RNS.LOG_VERBOSE)
|
Transport.saving_path_table = False
|
||||||
|
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def save_tunnel_table():
|
||||||
|
if not Transport.owner.is_connected_to_shared_instance:
|
||||||
|
if hasattr(Transport, "saving_tunnel_table"):
|
||||||
|
wait_interval = 0.2
|
||||||
|
wait_timeout = 5
|
||||||
|
wait_start = time.time()
|
||||||
|
while Transport.saving_tunnel_table:
|
||||||
|
time.sleep(wait_interval)
|
||||||
|
if time.time() > wait_start+wait_timeout:
|
||||||
|
RNS.log("Could not save tunnel table to storage, waiting for previous save operation timed out.", RNS.LOG_ERROR)
|
||||||
|
return False
|
||||||
|
|
||||||
try:
|
try:
|
||||||
|
Transport.saving_tunnel_table = True
|
||||||
|
save_start = time.time()
|
||||||
|
RNS.log("Saving tunnel table to storage...", RNS.LOG_DEBUG)
|
||||||
|
|
||||||
serialised_tunnels = []
|
serialised_tunnels = []
|
||||||
for tunnel_id in Transport.tunnels:
|
for tunnel_id in Transport.tunnels:
|
||||||
te = Transport.tunnels[tunnel_id]
|
te = Transport.tunnels[tunnel_id]
|
||||||
@@ -2142,6 +2254,25 @@ class Transport:
|
|||||||
file = open(tunnels_path, "wb")
|
file = open(tunnels_path, "wb")
|
||||||
file.write(umsgpack.packb(serialised_tunnels))
|
file.write(umsgpack.packb(serialised_tunnels))
|
||||||
file.close()
|
file.close()
|
||||||
RNS.log("Done saving "+str(len(serialised_tunnels))+" tunnel table entries to storage", RNS.LOG_VERBOSE)
|
|
||||||
|
save_time = time.time() - save_start
|
||||||
|
if save_time < 1:
|
||||||
|
time_str = str(round(save_time*1000,2))+"ms"
|
||||||
|
else:
|
||||||
|
time_str = str(round(save_time,2))+"s"
|
||||||
|
RNS.log("Saved "+str(len(serialised_tunnels))+" tunnel table entries in "+time_str, RNS.LOG_DEBUG)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
RNS.log("Could not save tunnel table to storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
RNS.log("Could not save tunnel table to storage, the contained exception was: "+str(e), RNS.LOG_ERROR)
|
||||||
|
|
||||||
|
Transport.saving_tunnel_table = False
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def persist_data():
|
||||||
|
Transport.save_packet_hashlist()
|
||||||
|
Transport.save_path_table()
|
||||||
|
Transport.save_tunnel_table()
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def exit_handler():
|
||||||
|
if not Transport.owner.is_connected_to_shared_instance:
|
||||||
|
Transport.persist_data()
|
||||||
@@ -197,7 +197,7 @@ def program_setup(configdir, table, rates, drop, destination_hexhash, verbosity,
|
|||||||
|
|
||||||
print("\rPath found, destination "+RNS.prettyhexrep(destination_hash)+" is "+str(hops)+" hop"+ms+" away via "+next_hop+" on "+next_hop_interface)
|
print("\rPath found, destination "+RNS.prettyhexrep(destination_hash)+" is "+str(hops)+" hop"+ms+" away via "+next_hop+" on "+next_hop_interface)
|
||||||
else:
|
else:
|
||||||
print("\r \rPath not found")
|
print("\r \rPath not found")
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -33,12 +33,17 @@ def program_setup(configdir, verbosity = 0, quietness = 0, service = False):
|
|||||||
targetloglevel = 3+verbosity-quietness
|
targetloglevel = 3+verbosity-quietness
|
||||||
|
|
||||||
if service:
|
if service:
|
||||||
RNS.logdest = RNS.LOG_FILE
|
targetlogdest = RNS.LOG_FILE
|
||||||
RNS.logfile = RNS.Reticulum.configdir+"/logfile"
|
|
||||||
targetloglevel = None
|
targetloglevel = None
|
||||||
|
else:
|
||||||
|
targetlogdest = RNS.LOG_STDOUT
|
||||||
|
|
||||||
|
reticulum = RNS.Reticulum(configdir=configdir, loglevel=targetloglevel, logdest=targetlogdest)
|
||||||
|
if reticulum.is_connected_to_shared_instance:
|
||||||
|
RNS.log("Started rnsd version {version} connected to another shared local instance, this is probably NOT what you want!".format(version=__version__), RNS.LOG_WARNING)
|
||||||
|
else:
|
||||||
|
RNS.log("Started rnsd version {version}".format(version=__version__), RNS.LOG_NOTICE)
|
||||||
|
|
||||||
reticulum = RNS.Reticulum(configdir=configdir, loglevel=targetloglevel)
|
|
||||||
RNS.log("Started rnsd version {version}".format(version=__version__), RNS.LOG_NOTICE)
|
|
||||||
while True:
|
while True:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
|
|
||||||
|
|||||||
@@ -135,6 +135,9 @@ def program_setup(configdir, dispall=False, verbosity=0, name_filter=None):
|
|||||||
if "peers" in ifstat and ifstat["peers"] != None:
|
if "peers" in ifstat and ifstat["peers"] != None:
|
||||||
print(" Peers : {np} reachable".format(np=ifstat["peers"]))
|
print(" Peers : {np} reachable".format(np=ifstat["peers"]))
|
||||||
|
|
||||||
|
if "tunnelstate" in ifstat and ifstat["tunnelstate"] != None:
|
||||||
|
print(" I2P : {ts}".format(ts=ifstat["tunnelstate"]))
|
||||||
|
|
||||||
if "ifac_signature" in ifstat and ifstat["ifac_signature"] != None:
|
if "ifac_signature" in ifstat and ifstat["ifac_signature"] != None:
|
||||||
sigstr = "<…"+RNS.hexrep(ifstat["ifac_signature"][-5:], delimit=False)+">"
|
sigstr = "<…"+RNS.hexrep(ifstat["ifac_signature"][-5:], delimit=False)+">"
|
||||||
print(" Access : {nb}-bit IFAC by {sig}".format(nb=ifstat["ifac_size"]*8, sig=sigstr))
|
print(" Access : {nb}-bit IFAC by {sig}".format(nb=ifstat["ifac_size"]*8, sig=sigstr))
|
||||||
|
|||||||
@@ -538,7 +538,7 @@ def main():
|
|||||||
parser.add_argument("-x", '--interactive', action='store_true', default=False, help="enter interactive mode")
|
parser.add_argument("-x", '--interactive', action='store_true', default=False, help="enter interactive mode")
|
||||||
parser.add_argument("-b", '--no-announce', action='store_true', default=False, help="don't announce at program start")
|
parser.add_argument("-b", '--no-announce', action='store_true', default=False, help="don't announce at program start")
|
||||||
parser.add_argument('-a', metavar="allowed_hash", dest="allowed", action='append', help="accept from this identity", type=str)
|
parser.add_argument('-a', metavar="allowed_hash", dest="allowed", action='append', help="accept from this identity", type=str)
|
||||||
parser.add_argument('-n', '--noauth', action='store_true', default=False, help="accept files from anyone")
|
parser.add_argument('-n', '--noauth', action='store_true', default=False, help="accept commands from anyone")
|
||||||
parser.add_argument('-N', '--noid', action='store_true', default=False, help="don't identify to listener")
|
parser.add_argument('-N', '--noid', action='store_true', default=False, help="don't identify to listener")
|
||||||
parser.add_argument("-d", '--detailed', action='store_true', default=False, help="show detailed result output")
|
parser.add_argument("-d", '--detailed', action='store_true', default=False, help="show detailed result output")
|
||||||
parser.add_argument("-m", action='store_true', dest="mirror", default=False, help="mirror exit code of remote command")
|
parser.add_argument("-m", action='store_true', dest="mirror", default=False, help="mirror exit code of remote command")
|
||||||
|
|||||||
@@ -57,10 +57,11 @@ LOG_FILE = 0x92
|
|||||||
|
|
||||||
LOG_MAXSIZE = 5*1024*1024
|
LOG_MAXSIZE = 5*1024*1024
|
||||||
|
|
||||||
loglevel = LOG_NOTICE
|
loglevel = LOG_NOTICE
|
||||||
logfile = None
|
logfile = None
|
||||||
logdest = LOG_STDOUT
|
logdest = LOG_STDOUT
|
||||||
logtimefmt = "%Y-%m-%d %H:%M:%S"
|
logtimefmt = "%Y-%m-%d %H:%M:%S"
|
||||||
|
compact_log_fmt = False
|
||||||
|
|
||||||
instance_random = random.Random()
|
instance_random = random.Random()
|
||||||
instance_random.seed(os.urandom(10))
|
instance_random.seed(os.urandom(10))
|
||||||
@@ -101,10 +102,14 @@ def timestamp_str(time_s):
|
|||||||
return time.strftime(logtimefmt, timestamp)
|
return time.strftime(logtimefmt, timestamp)
|
||||||
|
|
||||||
def log(msg, level=3, _override_destination = False):
|
def log(msg, level=3, _override_destination = False):
|
||||||
global _always_override_destination
|
global _always_override_destination, compact_log_fmt
|
||||||
|
|
||||||
if loglevel >= level:
|
if loglevel >= level:
|
||||||
logstring = "["+timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg
|
if not compact_log_fmt:
|
||||||
|
logstring = "["+timestamp_str(time.time())+"] ["+loglevelname(level)+"] "+msg
|
||||||
|
else:
|
||||||
|
logstring = "["+timestamp_str(time.time())+"] "+msg
|
||||||
|
|
||||||
logging_lock.acquire()
|
logging_lock.acquire()
|
||||||
|
|
||||||
if (logdest == LOG_STDOUT or _always_override_destination or _override_destination):
|
if (logdest == LOG_STDOUT or _always_override_destination or _override_destination):
|
||||||
@@ -212,7 +217,10 @@ def prettytime(time, verbose=False):
|
|||||||
|
|
||||||
tstr += c
|
tstr += c
|
||||||
|
|
||||||
return tstr
|
if tstr == "":
|
||||||
|
return "0s"
|
||||||
|
else:
|
||||||
|
return tstr
|
||||||
|
|
||||||
def phyparams():
|
def phyparams():
|
||||||
print("Required Physical Layer MTU : "+str(Reticulum.MTU)+" bytes")
|
print("Required Physical Layer MTU : "+str(Reticulum.MTU)+" bytes")
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
__version__ = "0.3.9"
|
__version__ = "0.4.2"
|
||||||
@@ -8,6 +8,12 @@ def get_platform():
|
|||||||
import sys
|
import sys
|
||||||
return sys.platform
|
return sys.platform
|
||||||
|
|
||||||
|
def is_linux():
|
||||||
|
if get_platform() == "linux":
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
def is_darwin():
|
def is_darwin():
|
||||||
if get_platform() == "darwin":
|
if get_platform() == "darwin":
|
||||||
return True
|
return True
|
||||||
@@ -42,4 +48,4 @@ def cryptography_old_api():
|
|||||||
if cryptography.__version__ == "2.8":
|
if cryptography.__version__ == "2.8":
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
return False
|
return False
|
||||||
@@ -0,0 +1,106 @@
|
|||||||
|
# Reticulum Development Roadmap
|
||||||
|
The development path for Reticulum is currently laid out in five distinct areas: *Comprehensibility*, *Universality*, *Functionality*, *Usability & Utility* and *Interfaceability*. Conceptualising the development of Reticulum into these areas serves to advance the implementation and work towards the Foundational Goals & Values of Reticulum.
|
||||||
|
|
||||||
|
## Comprehensibility
|
||||||
|
These efforts are aimed at improving the ease of which Reticulum is understood, and lowering the barrier to entry for people who wish to start building systems on Reticulum.
|
||||||
|
|
||||||
|
- Improving [the manual](https://markqvist.github.io/Reticulum/manual/) with tutorials specifically for beginners
|
||||||
|
- Updating the documentation to reflect recent changes and improvements
|
||||||
|
- Update descriptions of protocol mechanics
|
||||||
|
- Update announce description
|
||||||
|
- Add in-depth explanation of the IFAC system
|
||||||
|
- Software
|
||||||
|
- Update Sideband screenshots
|
||||||
|
- Update Sideband description
|
||||||
|
- Update NomadNet screenshots
|
||||||
|
- Update Sideband screenshots
|
||||||
|
- Installation
|
||||||
|
- Install docs for fedora, needs `python3-netifaces`
|
||||||
|
- Add a *Reticulum On Raspberry Pi* section
|
||||||
|
- Update *Reticulum On Android* section if necessary
|
||||||
|
- Update Android install documentation.
|
||||||
|
- Communications hardware section
|
||||||
|
- Add information about RNode external displays.
|
||||||
|
- Packet radio modems.
|
||||||
|
- Possibly add other relevant types here as well.
|
||||||
|
- Setup *Best Practices For...* / *Installation Examples* section.
|
||||||
|
- Home or office (example)
|
||||||
|
- Vehicles (example)
|
||||||
|
- No-grid/solar/remote sites (example)
|
||||||
|
|
||||||
|
## Universality
|
||||||
|
These efforts seek to broaden the universality of the Reticulum software and hardware ecosystem by continously diversifying platform support, and by improving the overall availability and ease of deployment of the Reticulum stack.
|
||||||
|
|
||||||
|
- Improved roaming support on Android
|
||||||
|
- OpenWRT support
|
||||||
|
- Create a standalone RNS Daemon app for Android
|
||||||
|
- A lightweight and portable C implementation for microcontrollers, µRNS
|
||||||
|
- A portable, high-performance Reticulum implementation in C/C++, see [#21](https://github.com/markqvist/Reticulum/discussions/21)
|
||||||
|
- Performance and memory optimisations of the Python implementation
|
||||||
|
- Bindings for other programming languages
|
||||||
|
|
||||||
|
## Functionality
|
||||||
|
These efforts aim to expand and improve the core functionality and reliability of Reticulum.
|
||||||
|
|
||||||
|
- Improve storage persist call on local client connect/disconnect
|
||||||
|
- Faster path invalidation on physical topography changes
|
||||||
|
- Better path invalidation on roaming interfaces
|
||||||
|
- Network-wide path balancing
|
||||||
|
- Distributed Destination Naming System
|
||||||
|
- Globally routable multicast
|
||||||
|
- Destination proxying: Create a new random destination, and sign it with the original destination to create verifiable ephemeral destinations. This could actually be a very powerful feature for aggregating routes in the network, and it retains destination owners control over how they are routed
|
||||||
|
- [Metric-based path selection and multiple paths](https://github.com/markqvist/Reticulum/discussions/86)
|
||||||
|
|
||||||
|
## Usability & Utility
|
||||||
|
These effors seek to make Reticulum easier to use and operate, and to expand the utility of the stack on deployed systems.
|
||||||
|
|
||||||
|
- Add bluetooth pairing code output to rnodeconf
|
||||||
|
- Easy way to share interface configurations, see [#19](https://github.com/markqvist/Reticulum/discussions/19)
|
||||||
|
- Transit traffic display in rnstatus
|
||||||
|
- JSON output mode for rnstatus
|
||||||
|
- rnid utility
|
||||||
|
- rnsign utility
|
||||||
|
- rncrypt utility
|
||||||
|
- rnsconfig utility
|
||||||
|
- Expand rnx utility to true interactive remote shell
|
||||||
|
|
||||||
|
## Interfaceability
|
||||||
|
These efforts aim to expand the types of physical and virtual interfaces that Reticulum can natively use to transport data.
|
||||||
|
|
||||||
|
- Filesystem interface
|
||||||
|
- Plain ESP32 devices (ESP-Now, WiFi, Bluetooth, etc.)
|
||||||
|
- More LoRa transceivers
|
||||||
|
- AT-compatible modems
|
||||||
|
- Direct SDR Support
|
||||||
|
- Optical mediums
|
||||||
|
- IR Transceivers
|
||||||
|
- AWDL / OWL
|
||||||
|
- HF Modems
|
||||||
|
- GNU Radio
|
||||||
|
- CAN-bus
|
||||||
|
- Raw SPI
|
||||||
|
- Raw i²c
|
||||||
|
- MQTT
|
||||||
|
- XBee
|
||||||
|
- Tor
|
||||||
|
|
||||||
|
## Active Work Areas
|
||||||
|
For each release cycle of Reticulum, improvements and additions from the five areas are selected as active work areas, and can be expected to be included in the upcoming releases within that cycle. While not entirely set in stone for each release cycle, they serve as a pointer of what to expect in the near future.
|
||||||
|
|
||||||
|
- The current `0.4.x` release cycle aims at completing:
|
||||||
|
- [x] Improve storage persist call on local client connect/disconnect
|
||||||
|
- [x] Improved roaming support on Android
|
||||||
|
- [ ] Updating the documentation to reflect recent changes and improvements
|
||||||
|
- [ ] Add bluetooth pairing code output to rnodeconf
|
||||||
|
- [ ] Improve storage persist call on every local client connect/disconnect
|
||||||
|
- [ ] Transit traffic display in rnstatus
|
||||||
|
- [ ] JSON output mode for rnstatus
|
||||||
|
- [ ] Add `rnid` utility
|
||||||
|
- [ ] Add `rnsign` utility
|
||||||
|
- [ ] Add `rncrypt` utility
|
||||||
|
- [ ] Create a standalone RNS Daemon app for Android
|
||||||
|
- Targets for related applications
|
||||||
|
- [x] Add paper offline & paper message transport to LXMF
|
||||||
|
- [x] Implement paper messaging in Nomad Network
|
||||||
|
- [x] Implement paper messaging in Sideband
|
||||||
|
- [x] Expand device support in Sideband to support older Android devices
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
# Sphinx build info version 1
|
# Sphinx build info version 1
|
||||||
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
|
||||||
config: d4963122ff51d6bca74c9598f37a0cc1
|
config: 458f32f98c8ba291b785b017881b2732
|
||||||
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
tags: 645f666f9bcd5a90fca523b33c5a78b7
|
||||||
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 46 KiB |
|
Before Width: | Height: | Size: 124 KiB |
|
Before Width: | Height: | Size: 79 KiB After Width: | Height: | Size: 63 KiB |
@@ -16,7 +16,7 @@ over even extremely low-bandwidth Reticulum networks.
|
|||||||
|
|
||||||
These programs will let you get a feel for how Reticulum works. They have been designed
|
These programs will let you get a feel for how Reticulum works. They have been designed
|
||||||
to run well over networks based on LoRa or packet radio, but can also be used completely
|
to run well over networks based on LoRa or packet radio, but can also be used completely
|
||||||
over local WiFi, wired ethernet, the Internet, or any combination.
|
over local WiFi, wired Ethernet, the Internet, or any combination.
|
||||||
|
|
||||||
As such, it is easy to get started experimenting, without having to set up any radio
|
As such, it is easy to get started experimenting, without having to set up any radio
|
||||||
transceivers or infrastructure just to try it out. Launching the programs on separate
|
transceivers or infrastructure just to try it out. Launching the programs on separate
|
||||||
@@ -62,7 +62,6 @@ a look at `Sideband <https://unsigned.io/sideband>`_, which is available for And
|
|||||||
Linux and macOS.
|
Linux and macOS.
|
||||||
|
|
||||||
.. image:: screenshots/sideband_1.png
|
.. image:: screenshots/sideband_1.png
|
||||||
:width: 400px
|
|
||||||
:align: center
|
:align: center
|
||||||
:target: _images/sideband_1.png
|
:target: _images/sideband_1.png
|
||||||
|
|
||||||
@@ -92,7 +91,7 @@ or use the interactive ``rnsconfig`` utility.
|
|||||||
|
|
||||||
When Reticulum is started for the first time, it will create a default
|
When Reticulum is started for the first time, it will create a default
|
||||||
configuration file, with one active interface. This default interface uses
|
configuration file, with one active interface. This default interface uses
|
||||||
your existing ethernet and WiFi networks (if any), and only allows you to
|
your existing Ethernet and WiFi networks (if any), and only allows you to
|
||||||
communicate with other Reticulum peers within your local broadcast domains.
|
communicate with other Reticulum peers within your local broadcast domains.
|
||||||
|
|
||||||
To communicate further, you will have to add one or more interfaces. The default
|
To communicate further, you will have to add one or more interfaces. The default
|
||||||
@@ -107,7 +106,7 @@ Once Reticulum knows which interfaces it should use, it will automatically
|
|||||||
discover topography and configure transport of data to any destinations it
|
discover topography and configure transport of data to any destinations it
|
||||||
knows about.
|
knows about.
|
||||||
|
|
||||||
In situations where you already have an established WiFi or ethernet network, and
|
In situations where you already have an established WiFi or Ethernet network, and
|
||||||
many devices that want to utilise the same external Reticulum network paths (for example over
|
many devices that want to utilise the same external Reticulum network paths (for example over
|
||||||
LoRa), it will often be sufficient to let one system act as a Reticulum gateway, by
|
LoRa), it will often be sufficient to let one system act as a Reticulum gateway, by
|
||||||
adding any external interfaces to the configuration of this system, and then enabling transport on it. Any
|
adding any external interfaces to the configuration of this system, and then enabling transport on it. Any
|
||||||
@@ -132,7 +131,7 @@ TCP connections reveal the IP address of both your instance and the server to an
|
|||||||
inspect the connection. Someone could use this information to determine your location or identity. Adversaries
|
inspect the connection. Someone could use this information to determine your location or identity. Adversaries
|
||||||
inspecting your packets may be able to record packet metadata like time of transmission and packet size.
|
inspecting your packets may be able to record packet metadata like time of transmission and packet size.
|
||||||
Even though Reticulum encrypts traffic, TCP does not, so an adversary may be able to use
|
Even though Reticulum encrypts traffic, TCP does not, so an adversary may be able to use
|
||||||
packet inspection to learn that a system is running Reticulum, and what other IP adresses connect to it.
|
packet inspection to learn that a system is running Reticulum, and what other IP addresses connect to it.
|
||||||
Hosting a publicly reachable instance over TCP also requires a publicly reachable IP address,
|
Hosting a publicly reachable instance over TCP also requires a publicly reachable IP address,
|
||||||
which most Internet connections don't offer anymore.
|
which most Internet connections don't offer anymore.
|
||||||
|
|
||||||
@@ -146,9 +145,9 @@ will also relay other I2P user's encrypted packets, which will use extra
|
|||||||
bandwidth and compute power, but also makes timing attacks and other forms of
|
bandwidth and compute power, but also makes timing attacks and other forms of
|
||||||
deep-packet-inspection much more difficult.
|
deep-packet-inspection much more difficult.
|
||||||
|
|
||||||
I2P also allows users to host globally available Reticulum instances from non-public IPs and behind firewalls and NAT.
|
I2P also allows users to host globally available Reticulum instances from non-public IP's and behind firewalls and NAT.
|
||||||
|
|
||||||
In general it is recommended to use an I2P node if you want to host a publically accessible
|
In general it is recommended to use an I2P node if you want to host a publicly accessible
|
||||||
instance, while preserving anonymity. If you care more about performance, and a slightly
|
instance, while preserving anonymity. If you care more about performance, and a slightly
|
||||||
easier setup, use TCP.
|
easier setup, use TCP.
|
||||||
|
|
||||||
@@ -279,7 +278,10 @@ don't use pip, but try this recipe:
|
|||||||
python3 Examples/Filetransfer.py -h
|
python3 Examples/Filetransfer.py -h
|
||||||
|
|
||||||
When you have experimented with the basic examples, it's time to go read the
|
When you have experimented with the basic examples, it's time to go read the
|
||||||
:ref:`Understanding Reticulum<understanding-main>` chapter.
|
:ref:`Understanding Reticulum<understanding-main>` chapter. Before submitting
|
||||||
|
your first pull request, it is probably a good idea to introduce yourself on
|
||||||
|
the `disucssion forum on GitHub <https://github.com/markqvist/Reticulum/discussions>`_,
|
||||||
|
or ask one of the developers or maintainers for a good place to start.
|
||||||
|
|
||||||
|
|
||||||
Reticulum on ARM64
|
Reticulum on ARM64
|
||||||
@@ -344,7 +346,7 @@ From within Termux, execute the following:
|
|||||||
|
|
||||||
It is also possible to include Reticulum in apps compiled and distributed as
|
It is also possible to include Reticulum in apps compiled and distributed as
|
||||||
Android APKs. A detailed tutorial and example source code will be included
|
Android APKs. A detailed tutorial and example source code will be included
|
||||||
here at a later point.
|
here at a later point. Until then you can use the `Sideband source code <https://github.com/markqvist/sideband>`_ as an example and startig point.
|
||||||
|
|
||||||
Pure-Python Reticulum
|
Pure-Python Reticulum
|
||||||
==============================================
|
==============================================
|
||||||
@@ -368,4 +370,4 @@ All other available modules will still be loaded when needed.
|
|||||||
**Please Note!** If you use the `rnspure` package to run Reticulum on systems that
|
**Please Note!** If you use the `rnspure` package to run Reticulum on systems that
|
||||||
do not support `PyCA/cryptography <https://github.com/pyca/cryptography>`_, it is
|
do not support `PyCA/cryptography <https://github.com/pyca/cryptography>`_, it is
|
||||||
important that you read and understand the :ref:`Cryptographic Primitives <understanding-primitives>`
|
important that you read and understand the :ref:`Cryptographic Primitives <understanding-primitives>`
|
||||||
section of this manual.
|
section of this manual.
|
||||||
@@ -52,7 +52,7 @@ the discussion to RNodes using *LoRa* modulation in common ISM bands.
|
|||||||
**Avoid Confusion!** RNodes can use LoRa as a *physical-layer modulation*, but it
|
**Avoid Confusion!** RNodes can use LoRa as a *physical-layer modulation*, but it
|
||||||
does not use, and has nothing to do with the *LoRaWAN* protocol and standard, commonly
|
does not use, and has nothing to do with the *LoRaWAN* protocol and standard, commonly
|
||||||
used for centrally controlled IoT devices. RNodes use *raw LoRa modulation*, without
|
used for centrally controlled IoT devices. RNodes use *raw LoRa modulation*, without
|
||||||
any additional protocol overhead. All high-level protocol funcionality is handled
|
any additional protocol overhead. All high-level protocol functionality is handled
|
||||||
directly by Reticulum.
|
directly by Reticulum.
|
||||||
|
|
||||||
.. _rnode-creating:
|
.. _rnode-creating:
|
||||||
@@ -205,8 +205,8 @@ get started with producing RNodes.
|
|||||||
WiFi-based Hardware
|
WiFi-based Hardware
|
||||||
===================
|
===================
|
||||||
|
|
||||||
It is possible to use all kinds of both short- and long-range Wifi-based hardware
|
It is possible to use all kinds of both short- and long-range WiFi-based hardware
|
||||||
with Reticulum. Any kind of hardware that fully supports bridged ethernet over the
|
with Reticulum. Any kind of hardware that fully supports bridged Ethernet over the
|
||||||
WiFi interface will work with the :ref:`AutoInterface<interfaces-auto>` in Reticulum.
|
WiFi interface will work with the :ref:`AutoInterface<interfaces-auto>` in Reticulum.
|
||||||
Most devices will behave like this by default, or allow it via configuration options.
|
Most devices will behave like this by default, or allow it via configuration options.
|
||||||
|
|
||||||
@@ -242,4 +242,4 @@ It is useful to combine different link and hardware types when designing and
|
|||||||
building a network. One useful design pattern is to employ high-capacity point-to-point
|
building a network. One useful design pattern is to employ high-capacity point-to-point
|
||||||
links based on WiFi or millimeter-wave radios (with high-gain directional antennas)
|
links based on WiFi or millimeter-wave radios (with high-gain directional antennas)
|
||||||
for the network backbone, and using LoRa-based RNodes for covering large areas with
|
for the network backbone, and using LoRa-based RNodes for covering large areas with
|
||||||
connectivity for client devices.
|
connectivity for client devices.
|
||||||
@@ -5,6 +5,11 @@ This manual aims to provide you with all the information you need to
|
|||||||
understand Reticulum, build networks or develop programs using it, or
|
understand Reticulum, build networks or develop programs using it, or
|
||||||
to participate in the development of Reticulum itself.
|
to participate in the development of Reticulum itself.
|
||||||
|
|
||||||
|
.. only:: html
|
||||||
|
|
||||||
|
Table Of Contents
|
||||||
|
=================
|
||||||
|
|
||||||
.. toctree::
|
.. toctree::
|
||||||
:maxdepth: 3
|
:maxdepth: 3
|
||||||
|
|
||||||
@@ -15,10 +20,14 @@ to participate in the development of Reticulum itself.
|
|||||||
hardware
|
hardware
|
||||||
interfaces
|
interfaces
|
||||||
networks
|
networks
|
||||||
reference
|
|
||||||
examples
|
examples
|
||||||
support
|
support
|
||||||
|
|
||||||
|
.. toctree::
|
||||||
|
:maxdepth: 2
|
||||||
|
|
||||||
|
reference
|
||||||
|
|
||||||
|
|
||||||
.. only:: html
|
.. only:: html
|
||||||
|
|
||||||
|
|||||||
@@ -98,13 +98,13 @@ and persistent I2P address that your Reticulum instance can be reached
|
|||||||
at.
|
at.
|
||||||
|
|
||||||
To use the I2P interface, you must have an I2P router running
|
To use the I2P interface, you must have an I2P router running
|
||||||
on your system. The easiest way to acheive this is to download and
|
on your system. The easiest way to achieve this is to download and
|
||||||
install the `latest release <https://github.com/PurpleI2P/i2pd/releases/latest>`_
|
install the `latest release <https://github.com/PurpleI2P/i2pd/releases/latest>`_
|
||||||
of the ``i2pd`` package. For more details about I2P, see the
|
of the ``i2pd`` package. For more details about I2P, see the
|
||||||
`geti2p.net website <https://geti2p.net/en/about/intro>`_.
|
`geti2p.net website <https://geti2p.net/en/about/intro>`_.
|
||||||
|
|
||||||
When an I2P router is running on your system, you can simply add
|
When an I2P router is running on your system, you can simply add
|
||||||
an I2P interface to reticulum:
|
an I2P interface to Reticulum:
|
||||||
|
|
||||||
.. code::
|
.. code::
|
||||||
|
|
||||||
@@ -270,7 +270,7 @@ with all other peers on a local area network.
|
|||||||
|
|
||||||
*Please Note!* Using broadcast UDP traffic has performance implications,
|
*Please Note!* Using broadcast UDP traffic has performance implications,
|
||||||
especially on WiFi. If your goal is simply to enable easy communication
|
especially on WiFi. If your goal is simply to enable easy communication
|
||||||
with all peers in your local ethernet broadcast domain, the
|
with all peers in your local Ethernet broadcast domain, the
|
||||||
:ref:`Auto Interface<interfaces-auto>` performs better, and is even
|
:ref:`Auto Interface<interfaces-auto>` performs better, and is even
|
||||||
easier to use.
|
easier to use.
|
||||||
|
|
||||||
@@ -404,7 +404,7 @@ directly over a wire-pair, or for using devices such as data radios and lasers.
|
|||||||
Pipe Interface
|
Pipe Interface
|
||||||
==============
|
==============
|
||||||
|
|
||||||
Using this interface, reticulum can use any program as an interface via `stdin` and
|
Using this interface, Reticulum can use any program as an interface via `stdin` and
|
||||||
`stdout`. This can be used to easily create virtual interfaces, or to interface with
|
`stdout`. This can be used to easily create virtual interfaces, or to interface with
|
||||||
custom hardware or other systems.
|
custom hardware or other systems.
|
||||||
|
|
||||||
@@ -421,7 +421,7 @@ custom hardware or other systems.
|
|||||||
respawn_delay = 5
|
respawn_delay = 5
|
||||||
|
|
||||||
Reticulum will write all packets to `stdin` of the ``command`` option, and will
|
Reticulum will write all packets to `stdin` of the ``command`` option, and will
|
||||||
continously read and scan its `stdout` for Reticulum packets. If ``EOF`` is reached,
|
continuously read and scan its `stdout` for Reticulum packets. If ``EOF`` is reached,
|
||||||
Reticulum will try to respawn the program after waiting for ``respawn_interval`` seconds.
|
Reticulum will try to respawn the program after waiting for ``respawn_interval`` seconds.
|
||||||
|
|
||||||
.. _interfaces-kiss:
|
.. _interfaces-kiss:
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ Reticulum, which can often be easier than using traditional stacks, since you
|
|||||||
don't have to worry about coordinating addresses, subnets and routing for an
|
don't have to worry about coordinating addresses, subnets and routing for an
|
||||||
entire network that you might not know how will evolve in the future. With
|
entire network that you might not know how will evolve in the future. With
|
||||||
Reticulum, you can simply add more segments to your network when it becomes
|
Reticulum, you can simply add more segments to your network when it becomes
|
||||||
necesarry, and Reticulum will handle the convergence of the entire network
|
necessary, and Reticulum will handle the convergence of the entire network
|
||||||
automatically.
|
automatically.
|
||||||
|
|
||||||
Concepts & Overview
|
Concepts & Overview
|
||||||
@@ -18,13 +18,13 @@ Concepts & Overview
|
|||||||
There are important points that need to be kept in mind when building networks
|
There are important points that need to be kept in mind when building networks
|
||||||
with Reticulum:
|
with Reticulum:
|
||||||
|
|
||||||
* | In a Reticulum network, any node can autonomously generate as many adresses
|
* | In a Reticulum network, any node can autonomously generate as many addresses
|
||||||
(called *destinations* in Reticulum terminology) as it needs, which become
|
(called *destinations* in Reticulum terminology) as it needs, which become
|
||||||
globally reachable to the rest of the network. There is no central point of
|
globally reachable to the rest of the network. There is no central point of
|
||||||
control over the adress space.
|
control over the address space.
|
||||||
|
|
||||||
* | Reticulum was designed to handle both very small, and very large networks.
|
* | Reticulum was designed to handle both very small, and very large networks.
|
||||||
While the adress space can support billions of endpoints, Reticulum is
|
While the address space can support billions of endpoints, Reticulum is
|
||||||
also very useful when just a few devices needs to communicate.
|
also very useful when just a few devices needs to communicate.
|
||||||
|
|
||||||
* | Low-bandwidth networks, like LoRa and packet radio, can interoperate and
|
* | Low-bandwidth networks, like LoRa and packet radio, can interoperate and
|
||||||
@@ -113,8 +113,8 @@ WiFi based radios for interconnecting the sites.
|
|||||||
|
|
||||||
At each site, a Raspberry Pi is installed to function as a gateway. A LoRa radio
|
At each site, a Raspberry Pi is installed to function as a gateway. A LoRa radio
|
||||||
is connected to the Pi with a USB cable, and the WiFi radio is connected to the
|
is connected to the Pi with a USB cable, and the WiFi radio is connected to the
|
||||||
ethernet port of the Pi. At site B, two WiFi radios are needed to be able to reach
|
Ethernet port of the Pi. At site B, two WiFi radios are needed to be able to reach
|
||||||
both site A and site C, so an extra ethernet adapter is connected to the Pi in
|
both site A and site C, so an extra Ethernet adapter is connected to the Pi in
|
||||||
this location.
|
this location.
|
||||||
|
|
||||||
Once the hardware has been installed, Reticulum is installed on all the Pis, and at
|
Once the hardware has been installed, Reticulum is installed on all the Pis, and at
|
||||||
|
|||||||
@@ -1,18 +1,23 @@
|
|||||||
|
:tocdepth: 4
|
||||||
|
|
||||||
.. _api-main:
|
.. _api-main:
|
||||||
|
|
||||||
*************
|
*************
|
||||||
API Reference
|
API Reference
|
||||||
*************
|
*************
|
||||||
This reference guide lists and explains all classes exposed by the RNS API.
|
Communication over Reticulum networks is achieved by using a simple set of classes exposed by the RNS API.
|
||||||
|
This chapter lists and explains all classes exposed by the Reticulum Network Stack API, along with their method signatures and usage. It can be used as a reference while writing applications that utilise Reticulum, or it can be read in entirity to gain an understanding of the complete functionality of RNS from a developers perspective.
|
||||||
Classes
|
|
||||||
=========================
|
|
||||||
Communication over a Reticulum network is achieved using a set of classes exposed by RNS.
|
|
||||||
|
|
||||||
.. _api-reticulum:
|
.. _api-reticulum:
|
||||||
|
|
||||||
Reticulum
|
.. only:: html
|
||||||
---------
|
|
||||||
|
|start-h3| Reticulum |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Reticulum
|
||||||
|
---------
|
||||||
|
|
||||||
.. autoclass:: RNS.Reticulum
|
.. autoclass:: RNS.Reticulum
|
||||||
:members:
|
:members:
|
||||||
@@ -20,64 +25,120 @@ Reticulum
|
|||||||
|
|
||||||
.. _api-identity:
|
.. _api-identity:
|
||||||
|
|
||||||
Identity
|
.. only:: html
|
||||||
--------
|
|
||||||
|
|start-h3| Identity |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Identity
|
||||||
|
--------
|
||||||
|
|
||||||
.. autoclass:: RNS.Identity
|
.. autoclass:: RNS.Identity
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-destination:
|
.. _api-destination:
|
||||||
|
|
||||||
Destination
|
.. only:: html
|
||||||
-----------
|
|
||||||
|
|start-h3| Destination |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Destination
|
||||||
|
-----------
|
||||||
|
|
||||||
.. autoclass:: RNS.Destination
|
.. autoclass:: RNS.Destination
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-packet:
|
.. _api-packet:
|
||||||
|
|
||||||
Packet
|
.. only:: html
|
||||||
------
|
|
||||||
|
|start-h3| Packet |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Packet
|
||||||
|
------
|
||||||
|
|
||||||
.. autoclass:: RNS.Packet(destination, data, create_receipt = True)
|
.. autoclass:: RNS.Packet(destination, data, create_receipt = True)
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-packetreceipt:
|
.. _api-packetreceipt:
|
||||||
|
|
||||||
Packet Receipt
|
.. only:: html
|
||||||
--------------
|
|
||||||
|
|start-h3| Packet Receipt |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Packet Receipt
|
||||||
|
--------------
|
||||||
|
|
||||||
.. autoclass:: RNS.PacketReceipt()
|
.. autoclass:: RNS.PacketReceipt()
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-link:
|
.. _api-link:
|
||||||
|
|
||||||
Link
|
.. only:: html
|
||||||
----
|
|
||||||
|
|start-h3| Link |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Link
|
||||||
|
----
|
||||||
|
|
||||||
.. autoclass:: RNS.Link(destination, established_callback=None, closed_callback = None)
|
.. autoclass:: RNS.Link(destination, established_callback=None, closed_callback = None)
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-requestreceipt:
|
.. _api-requestreceipt:
|
||||||
|
|
||||||
Request Receipt
|
.. only:: html
|
||||||
---------------
|
|
||||||
|
|start-h3| Request Receipt |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Request Receipt
|
||||||
|
---------------
|
||||||
|
|
||||||
.. autoclass:: RNS.RequestReceipt()
|
.. autoclass:: RNS.RequestReceipt()
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-resource:
|
.. _api-resource:
|
||||||
|
|
||||||
Resource
|
.. only:: html
|
||||||
--------
|
|
||||||
|
|start-h3| Resource |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Resource
|
||||||
|
--------
|
||||||
|
|
||||||
.. autoclass:: RNS.Resource(data, link, advertise=True, auto_compress=True, callback=None, progress_callback=None, timeout=None)
|
.. autoclass:: RNS.Resource(data, link, advertise=True, auto_compress=True, callback=None, progress_callback=None, timeout=None)
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
.. _api-transport:
|
.. _api-transport:
|
||||||
|
|
||||||
Transport
|
.. only:: html
|
||||||
---------
|
|
||||||
|
|start-h3| Transport |end-h3|
|
||||||
|
|
||||||
|
.. only:: latex
|
||||||
|
|
||||||
|
Transport
|
||||||
|
---------
|
||||||
|
|
||||||
.. autoclass:: RNS.Transport
|
.. autoclass:: RNS.Transport
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
.. |start-h3| raw:: html
|
||||||
|
|
||||||
|
<h3>
|
||||||
|
|
||||||
|
.. |end-h3| raw:: html
|
||||||
|
|
||||||
|
</h3>
|
||||||
@@ -32,11 +32,11 @@ Provide Feedback
|
|||||||
================
|
================
|
||||||
All feedback on the usage, functioning and potential dysfunctioning of any and
|
All feedback on the usage, functioning and potential dysfunctioning of any and
|
||||||
all components of the system is very valuable to the continued development and
|
all components of the system is very valuable to the continued development and
|
||||||
improvement of Reticulum. Absolutely no automated analytics, telemetly, error
|
improvement of Reticulum. Absolutely no automated analytics, telemetry, error
|
||||||
reporting or statistics is collected and reported by Reticulum under any
|
reporting or statistics is collected and reported by Reticulum under any
|
||||||
circumstances, so we rely on old-fashioned human feedback.
|
circumstances, so we rely on old-fashioned human feedback.
|
||||||
|
|
||||||
Contribute Code
|
Contribute Code
|
||||||
===============
|
===============
|
||||||
Join us on `the GitHub repository <https://github.com/markqvist/reticulum>`_ to
|
Join us on `the GitHub repository <https://github.com/markqvist/reticulum>`_ to
|
||||||
report issues, suggest functionality and contribute code to Reticulum.
|
report issues, suggest functionality and contribute code to Reticulum.
|
||||||
@@ -70,7 +70,7 @@ guide the design of Reticulum:
|
|||||||
* **Hardware layer agnosticism**
|
* **Hardware layer agnosticism**
|
||||||
Reticulum must be fully hardware agnostic, and shall be useable over a wide range of
|
Reticulum must be fully hardware agnostic, and shall be useable over a wide range of
|
||||||
physical networking layers, such as data radios, serial lines, modems, handheld transceivers,
|
physical networking layers, such as data radios, serial lines, modems, handheld transceivers,
|
||||||
wired ethernet, wifi, or anything else that can carry a digital data stream. Hardware made for
|
wired Ethernet, WiFi, or anything else that can carry a digital data stream. Hardware made for
|
||||||
dedicated Reticulum use shall be as cheap as possible and use off-the-shelf components, so
|
dedicated Reticulum use shall be as cheap as possible and use off-the-shelf components, so
|
||||||
it can be easily modified and replicated by anyone interested in doing so.
|
it can be easily modified and replicated by anyone interested in doing so.
|
||||||
* **Very low bandwidth requirements**
|
* **Very low bandwidth requirements**
|
||||||
@@ -109,7 +109,7 @@ Introduction & Basic Functionality
|
|||||||
|
|
||||||
Reticulum is a networking stack suited for high-latency, low-bandwidth links. Reticulum is at it’s
|
Reticulum is a networking stack suited for high-latency, low-bandwidth links. Reticulum is at it’s
|
||||||
core a *message oriented* system. It is suited for both local point-to-point or point-to-multipoint
|
core a *message oriented* system. It is suited for both local point-to-point or point-to-multipoint
|
||||||
scenarios where alle nodes are within range of each other, as well as scenarios where packets need
|
scenarios where all nodes are within range of each other, as well as scenarios where packets need
|
||||||
to be transported over multiple hops in a complex network to reach the recipient.
|
to be transported over multiple hops in a complex network to reach the recipient.
|
||||||
|
|
||||||
Reticulum does away with the idea of addresses and ports known from IP, TCP and UDP. Instead
|
Reticulum does away with the idea of addresses and ports known from IP, TCP and UDP. Instead
|
||||||
@@ -121,22 +121,23 @@ All destinations in Reticulum are _represented_ as a 16 byte hash. This hash is
|
|||||||
SHA-256 hash of identifying characteristics of the destination. To users, the destination addresses
|
SHA-256 hash of identifying characteristics of the destination. To users, the destination addresses
|
||||||
will be displayed as 16 hexadecimal bytes, like this example: ``<13425ec15b621c1d928589718000d814>``.
|
will be displayed as 16 hexadecimal bytes, like this example: ``<13425ec15b621c1d928589718000d814>``.
|
||||||
|
|
||||||
The truncation size of 16 bytes (128 bits) for destinations has been choosen as a reasonable tradeoff
|
The truncation size of 16 bytes (128 bits) for destinations has been chosen as a reasonable trade-off
|
||||||
between address space
|
between address space
|
||||||
and packet overhead. The address space accomodated by this size can support many billions of
|
and packet overhead. The address space accommodated by this size can support many billions of
|
||||||
simultaneously active devices on the same network, while keeping packet overhead low, which is
|
simultaneously active devices on the same network, while keeping packet overhead low, which is
|
||||||
essential on low-bandwidth networks. In the very unlikely case that this address space nears
|
essential on low-bandwidth networks. In the very unlikely case that this address space nears
|
||||||
congestion, a one-line code change can upgrade the Reticulum address space all the way up to 256
|
congestion, a one-line code change can upgrade the Reticulum address space all the way up to 256
|
||||||
bits, ensuring the Reticulum address space could potentially support galactic-scale networks.
|
bits, ensuring the Reticulum address space could potentially support galactic-scale networks.
|
||||||
This is obviusly complete and ridiculous over-allocation, and as such, the current 128 bits should
|
This is obviously complete and ridiculous over-allocation, and as such, the current 128 bits should
|
||||||
be sufficient, even far into the future.
|
be sufficient, even far into the future.
|
||||||
|
|
||||||
By default Reticulum encrypts all data using elliptic curve cryptography. Any packet sent to a
|
By default Reticulum encrypts all data using elliptic curve cryptography and AES. Any packet sent to a
|
||||||
destination is encrypted with a derived ephemeral key. Reticulum can also set up an encrypted
|
destination is encrypted with a per-packet derived key. Reticulum can also set up an encrypted
|
||||||
channel to a destination, called a *Link*. Both data sent over Links and single packets offer
|
channel to a destination, called a *Link*. Both data sent over Links and single packets offer
|
||||||
*Forward Secrecy* and *Initiator Anonymity*, by using an Elliptic Curve Diffie Hellman key exchange
|
*Initiator Anonymity*, and links additionally offer *Forward Secrecy* by using an Elliptic Curve
|
||||||
on Curve25519 to derive ephemeral keys. The multi-hop transport, coordination, verification
|
Diffie Hellman key exchange on Curve25519 to derive per-link ephemeral keys. The multi-hop transport,
|
||||||
and reliability layers are fully autonomous and also based on elliptic curve cryptography.
|
coordination, verification and reliability layers are fully autonomous and also based on elliptic
|
||||||
|
curve cryptography.
|
||||||
|
|
||||||
Reticulum also offers symmetric key encryption for group-oriented communications, as well as
|
Reticulum also offers symmetric key encryption for group-oriented communications, as well as
|
||||||
unencrypted packets for local broadcast purposes.
|
unencrypted packets for local broadcast purposes.
|
||||||
@@ -163,7 +164,7 @@ destinations. Reticulum uses three different basic destination types, and one sp
|
|||||||
A *plain* destination type is unencrypted, and suited for traffic that should be broadcast to a
|
A *plain* destination type is unencrypted, and suited for traffic that should be broadcast to a
|
||||||
number of users, or should be readable by anyone. Traffic to a *plain* destination is not encrypted.
|
number of users, or should be readable by anyone. Traffic to a *plain* destination is not encrypted.
|
||||||
Generally, *plain* destinations can be used for broadcast information intended to be public.
|
Generally, *plain* destinations can be used for broadcast information intended to be public.
|
||||||
Plain destinations are only reachable directly, and packets adressed to plain destinations are
|
Plain destinations are only reachable directly, and packets addressed to plain destinations are
|
||||||
never transported over multiple hops in the network. To be transportable over multiple hops in Reticulum, information
|
never transported over multiple hops in the network. To be transportable over multiple hops in Reticulum, information
|
||||||
*must* be encrypted, since Reticulum uses the per-packet encryption to verify routing paths and
|
*must* be encrypted, since Reticulum uses the per-packet encryption to verify routing paths and
|
||||||
keep them alive.
|
keep them alive.
|
||||||
@@ -219,10 +220,10 @@ packet.
|
|||||||
|
|
||||||
In actual use of *single* destination naming, it is advisable not to use any uniquely identifying
|
In actual use of *single* destination naming, it is advisable not to use any uniquely identifying
|
||||||
features in aspect naming. Aspect names should be general terms describing what kind of destination
|
features in aspect naming. Aspect names should be general terms describing what kind of destination
|
||||||
is represented. The uniquely identifying aspect is always acheived by the appending the public key,
|
is represented. The uniquely identifying aspect is always achieved by the appending the public key,
|
||||||
which expands the destination into a uniquely identifyable one. Reticulum does this automatically.
|
which expands the destination into a uniquely identifiable one. Reticulum does this automatically.
|
||||||
|
|
||||||
Any destination on a Reticulum network can be addressed and reached simply by knowning its
|
Any destination on a Reticulum network can be addressed and reached simply by knowing its
|
||||||
destination hash (and public key, but if the public key is not known, it can be requested from the
|
destination hash (and public key, but if the public key is not known, it can be requested from the
|
||||||
network simply by knowing the destination hash). The use of app names and aspects makes it easy to
|
network simply by knowing the destination hash). The use of app names and aspects makes it easy to
|
||||||
structure Reticulum programs and makes it possible to filter what information and data your program
|
structure Reticulum programs and makes it possible to filter what information and data your program
|
||||||
@@ -349,7 +350,7 @@ Node Types
|
|||||||
----------
|
----------
|
||||||
|
|
||||||
Currently, Reticulum distinguishes between two types of network nodes. All nodes on a Reticulum network
|
Currently, Reticulum distinguishes between two types of network nodes. All nodes on a Reticulum network
|
||||||
are *Reticulum Instances*, and some are alo *Transport Nodes*. If a system running Reticulum is fixed in
|
are *Reticulum Instances*, and some are also *Transport Nodes*. If a system running Reticulum is fixed in
|
||||||
one place, and is intended to be kept available most of the time, it is a good contender to be a *Transport Node*.
|
one place, and is intended to be kept available most of the time, it is a good contender to be a *Transport Node*.
|
||||||
|
|
||||||
Any Reticulum Instance can become a Transport Node by enabling it in the configuration.
|
Any Reticulum Instance can become a Transport Node by enabling it in the configuration.
|
||||||
@@ -442,8 +443,7 @@ For exchanges of small amounts of information, Reticulum offers the *Packet* API
|
|||||||
* | When the destination receives the packet, it can itself perform an ECDH key exchange and decrypt the
|
* | When the destination receives the packet, it can itself perform an ECDH key exchange and decrypt the
|
||||||
packet.
|
packet.
|
||||||
|
|
||||||
* | A new ephemeral key is used for every packet sent in this way, and forward secrecy is guaranteed on a
|
* | A new ephemeral key is used for every packet sent in this way.
|
||||||
per packet level.
|
|
||||||
|
|
||||||
* | Once the packet has been received and decrypted by the addressed destination, that destination can opt
|
* | Once the packet has been received and decrypted by the addressed destination, that destination can opt
|
||||||
to *prove* its receipt of the packet. It does this by calculating the SHA-256 hash of the received packet,
|
to *prove* its receipt of the packet. It does this by calculating the SHA-256 hash of the received packet,
|
||||||
@@ -453,7 +453,7 @@ For exchanges of small amounts of information, Reticulum offers the *Packet* API
|
|||||||
|
|
||||||
* | In case the packet is addressed to a *group* destination type, the packet will be encrypted with the
|
* | In case the packet is addressed to a *group* destination type, the packet will be encrypted with the
|
||||||
pre-shared AES-128 key associated with the destination. In case the packet is addressed to a *plain*
|
pre-shared AES-128 key associated with the destination. In case the packet is addressed to a *plain*
|
||||||
destination type, the payload data will not be encrypted. Neither of these two destination types offer
|
destination type, the payload data will not be encrypted. Neither of these two destination types can offer
|
||||||
forward secrecy. In general, it is recommended to always use the *single* destination type, unless it is
|
forward secrecy. In general, it is recommended to always use the *single* destination type, unless it is
|
||||||
strictly necessary to use one of the others.
|
strictly necessary to use one of the others.
|
||||||
|
|
||||||
@@ -485,15 +485,20 @@ For exchanges of larger amounts of data, or when longer sessions of bidirectiona
|
|||||||
the destination using a Reticulum Identity. This authentication is happening inside the encrypted
|
the destination using a Reticulum Identity. This authentication is happening inside the encrypted
|
||||||
link, and is only revealed to the verified destination, and no intermediaries.
|
link, and is only revealed to the verified destination, and no intermediaries.
|
||||||
|
|
||||||
In a moment, we will discuss the details of how this methodology is implemented, but let’s first
|
In a moment, we will discuss the details of how this methodology is
|
||||||
recap what purposes this methodology serves. We first ensure that the node answering our request
|
implemented, but let’s first recap what purposes this methodology serves. We
|
||||||
is actually the one we want to communicate with, and not a malicious actor pretending to be so.
|
first ensure that the node answering our request is actually the one we want to
|
||||||
At the same time we establish an efficient encrypted channel. The setup of this is relatively cheap in
|
communicate with, and not a malicious actor pretending to be so. At the same
|
||||||
terms of bandwidth, so it can be used just for a short exchange, and then recreated as needed, which will
|
time we establish an efficient encrypted channel. The setup of this is
|
||||||
also rotate encryption keys. The link can also be kept alive for longer periods of time, if this is
|
relatively cheap in terms of bandwidth, so it can be used just for a short
|
||||||
more suitable to the application. The procedure also inserts the *link id* , a hash calculated from the link request packet, into the memory of forwarding nodes, which means that the communicating nodes can thereafter reach each other simply by referring to this *link id*.
|
exchange, and then recreated as needed, which will also rotate encryption keys.
|
||||||
|
The link can also be kept alive for longer periods of time, if this is more
|
||||||
|
suitable to the application. The procedure also inserts the *link id* , a hash
|
||||||
|
calculated from the link request packet, into the memory of forwarding nodes,
|
||||||
|
which means that the communicating nodes can thereafter reach each other simply
|
||||||
|
by referring to this *link id*.
|
||||||
|
|
||||||
The combined bandwidth cost of setting up a link is 3 packets totalling 265 bytes (more info in the
|
The combined bandwidth cost of setting up a link is 3 packets totalling 297 bytes (more info in the
|
||||||
:ref:`Binary Packet Format<understanding-packetformat>` section). The amount of bandwidth used on keeping
|
:ref:`Binary Packet Format<understanding-packetformat>` section). The amount of bandwidth used on keeping
|
||||||
a link open is practically negligible, at 0.45 bits per second. Even on a slow 1200 bits per second packet
|
a link open is practically negligible, at 0.45 bits per second. Even on a slow 1200 bits per second packet
|
||||||
radio channel, 100 concurrent links will still leave 96% channel capacity for actual data.
|
radio channel, 100 concurrent links will still leave 96% channel capacity for actual data.
|
||||||
@@ -538,14 +543,16 @@ an arbitrary number of hops, where information will be exchanged between two nod
|
|||||||
|
|
||||||
* | A *link proof* packet is now constructed and transmitted over the network. This packet is
|
* | A *link proof* packet is now constructed and transmitted over the network. This packet is
|
||||||
addressed to the *link id* of the *link*. It contains the following data: The newly generated X25519
|
addressed to the *link id* of the *link*. It contains the following data: The newly generated X25519
|
||||||
public key *LKr* and an Ed25519 signature of the *link id* and *LKr* made by the signing key of
|
public key *LKr* and an Ed25519 signature of the *link id* and *LKr* made by the *original signing key* of
|
||||||
the addressed destination.
|
the addressed destination.
|
||||||
|
|
||||||
* | By verifying this *link proof* packet, all nodes that originally transported the *link request*
|
* | By verifying this *link proof* packet, all nodes that originally transported the *link request*
|
||||||
packet to the destination from the originator can now verify that the intended destination received
|
packet to the destination from the originator can now verify that the intended destination received
|
||||||
the request and accepted it, and that the path they chose for forwarding the request was valid.
|
the request and accepted it, and that the path they chose for forwarding the request was valid.
|
||||||
In sucessfully carrying out this verification, the transporting nodes marks the link as active.
|
In successfully carrying out this verification, the transporting nodes marks the link as active.
|
||||||
An abstract bi-directional communication channel has now been established along a path in the network.
|
An abstract bi-directional communication channel has now been established along a path in the network.
|
||||||
|
Packets can now be exchanged bi-directionally from either end of the link simply by adressing the
|
||||||
|
packets to the *link id* of the link.
|
||||||
|
|
||||||
* | When the source receives the *proof* , it will know unequivocally that a verified path has been
|
* | When the source receives the *proof* , it will know unequivocally that a verified path has been
|
||||||
established to the destination. It can now also use the X25519 public key contained in the
|
established to the destination. It can now also use the X25519 public key contained in the
|
||||||
@@ -764,7 +771,7 @@ Wire Format
|
|||||||
| | | | | | | |
|
| | | | | | | |
|
||||||
00000000 00000111 [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
00000000 00000111 [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
||||||
|| | | | |
|
|| | | | |
|
||||||
|| | | | +-- Hops = 0
|
|| | | | +-- Hops = 7
|
||||||
|| | | +------- Packet Type = DATA
|
|| | | +------- Packet Type = DATA
|
||||||
|| | +--------- Destination Type = SINGLE
|
|| | +--------- Destination Type = SINGLE
|
||||||
|| +----------- Propagation Type = BROADCAST
|
|| +----------- Propagation Type = BROADCAST
|
||||||
@@ -779,7 +786,7 @@ Wire Format
|
|||||||
| | | | | | | | | |
|
| | | | | | | | | |
|
||||||
10000000 00000111 [IFAC, N bytes] [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
10000000 00000111 [IFAC, N bytes] [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
||||||
|| | | | |
|
|| | | | |
|
||||||
|| | | | +-- Hops = 0
|
|| | | | +-- Hops = 7
|
||||||
|| | | +------- Packet Type = DATA
|
|| | | +------- Packet Type = DATA
|
||||||
|| | +--------- Destination Type = SINGLE
|
|| | +--------- Destination Type = SINGLE
|
||||||
|| +----------- Propagation Type = BROADCAST
|
|| +----------- Propagation Type = BROADCAST
|
||||||
@@ -796,9 +803,9 @@ Wire Format
|
|||||||
but excluding any interface access codes.
|
but excluding any interface access codes.
|
||||||
|
|
||||||
- Path Request : 51 bytes
|
- Path Request : 51 bytes
|
||||||
- Announce : 157 bytes
|
- Announce : 167 bytes
|
||||||
- Link Request : 83 bytes
|
- Link Request : 83 bytes
|
||||||
- Link Proof : 83 bytes
|
- Link Proof : 115 bytes
|
||||||
- Link RTT packet : 99 bytes
|
- Link RTT packet : 99 bytes
|
||||||
- Link keepalive : 20 bytes
|
- Link keepalive : 20 bytes
|
||||||
|
|
||||||
@@ -887,4 +894,4 @@ testing and review as those from OpenSSL.
|
|||||||
|
|
||||||
If you want to use the internal pure-python primitives, it is **highly advisable** that you
|
If you want to use the internal pure-python primitives, it is **highly advisable** that you
|
||||||
have a good understanding of the risks that this pose, and make an informed decision on whether
|
have a good understanding of the risks that this pose, and make an informed decision on whether
|
||||||
those risks are acceptable to you.
|
those risks are acceptable to you.
|
||||||
@@ -7,9 +7,11 @@ Using Reticulum on Your System
|
|||||||
Reticulum is not installed as a driver or kernel module, as one might expect
|
Reticulum is not installed as a driver or kernel module, as one might expect
|
||||||
of a networking stack. Instead, Reticulum is distributed as a Python module.
|
of a networking stack. Instead, Reticulum is distributed as a Python module.
|
||||||
This means that no special privileges are required to install or use it. It
|
This means that no special privileges are required to install or use it. It
|
||||||
is also very light-weight, and easy to transfer to and install on new systems.
|
is also very light-weight, and easy to transfer to, and install on new systems.
|
||||||
Any program or application that uses Reticulum will automatically load and
|
|
||||||
initialise Reticulum when it starts.
|
When you have Reticulum installed, any program or application that uses Reticulum
|
||||||
|
will automatically load and initialise Reticulum when it starts, if it is not
|
||||||
|
already running.
|
||||||
|
|
||||||
In many cases, this approach is sufficient. When any program needs to use
|
In many cases, this approach is sufficient. When any program needs to use
|
||||||
Reticulum, it is loaded, initialised, interfaces are brought up, and the
|
Reticulum, it is loaded, initialised, interfaces are brought up, and the
|
||||||
@@ -22,11 +24,22 @@ are other options.
|
|||||||
Configuration & Data
|
Configuration & Data
|
||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
A Reticulum stores all information that it needs to function in a single file-
|
Reticulum stores all information that it needs to function in a single file-system
|
||||||
system directory. By default, this directory is ``~/.reticulum``, but you can
|
directory. When Reticulum is started, it will look for a valid configuration
|
||||||
use any directory you wish. You can also run multiple separate Reticulum
|
directory in the following places:
|
||||||
instances on the same physical system, in complete isolation from each other,
|
|
||||||
or connected together.
|
- ``/etc/reticulum``
|
||||||
|
- ``~/.config/reticulum``
|
||||||
|
- ``~/.reticulum``
|
||||||
|
|
||||||
|
If no existing configuration directory is found, the directory ``~/.reticulum``
|
||||||
|
is created, and the default configuration will be automatically created here.
|
||||||
|
You can move it to one of the other locations if you wish.
|
||||||
|
|
||||||
|
It is also possible to use completely arbitrary configuration directories by
|
||||||
|
specifying the relevant command-line parameters when running Reticulum-based
|
||||||
|
programs. You can also run multiple separate Reticulum instances on the same
|
||||||
|
physical system, either in isolation from each other, or connected together.
|
||||||
|
|
||||||
In most cases, a single physical system will only need to run one Reticulum
|
In most cases, a single physical system will only need to run one Reticulum
|
||||||
instance. This can either be launched at boot, as a system service, or simply
|
instance. This can either be launched at boot, as a system service, or simply
|
||||||
@@ -35,7 +48,7 @@ running on the same system will automatically share the same Reticulum instance,
|
|||||||
if the configuration allows for it, which it does by default.
|
if the configuration allows for it, which it does by default.
|
||||||
|
|
||||||
The entire configuration of Reticulum is found in the ``~/.reticulum/config``
|
The entire configuration of Reticulum is found in the ``~/.reticulum/config``
|
||||||
file. When Reticulum is first started on a new system, a basic, functional
|
file. When Reticulum is first started on a new system, a basic, but fully functional
|
||||||
configuration file is created. The default configuration looks like this:
|
configuration file is created. The default configuration looks like this:
|
||||||
|
|
||||||
.. code::
|
.. code::
|
||||||
|
|||||||
@@ -2,23 +2,48 @@
|
|||||||
What is Reticulum?
|
What is Reticulum?
|
||||||
******************
|
******************
|
||||||
|
|
||||||
Reticulum is a cryptography-based networking stack for building wide-area networks with readily available hardware, that can continue to operate even with extremely low bandwidth and very high latency.
|
Reticulum is a cryptography-based networking stack for building both local and
|
||||||
|
wide-area networks with readily available hardware, that can continue to operate
|
||||||
|
under adverse conditions, such as extremely low bandwidth and very high latency.
|
||||||
|
|
||||||
Reticulum allows you to build wide-area networks with off-the-shelf tools, and offers end-to-end encryption, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable packet acknowledgements and more.
|
Reticulum allows you to build wide-area networks with off-the-shelf tools, and
|
||||||
|
offers end-to-end encryption, forward secrecy, autoconfiguring cryptographically
|
||||||
|
backed multi-hop transport, efficient addressing, unforgeable packet
|
||||||
|
acknowledgements and more.
|
||||||
|
|
||||||
Reticulum is a complete networking stack, and does not need IP or higher layers, although it is easy to utilise IP (with TCP or UDP) as the underlying carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the Internet or private IP networks. Reticulum is built directly on cryptographic principles, allowing resilience and stable functionality in open and trustless networks.
|
From a users perspective, Reticulum allows the creation of applications that
|
||||||
|
respect and empower the autonomy and sovereignty of communities and individuals.
|
||||||
|
Reticulum enables secure digital communication that cannot be subjected to
|
||||||
|
outside control, manipulation or censorship.
|
||||||
|
|
||||||
No kernel modules or drivers are required. Reticulum runs completely in userland, and can run on practically any system that runs Python 3. Reticulum runs well even on small single-board computers like the Pi Zero.
|
Reticulum enables the construction of both small and potentially planetary-scale
|
||||||
|
networks, without any need for hierarchical or beaureucratic structures to control
|
||||||
|
or manage them, while ensuring individuals and communities full sovereignty
|
||||||
|
over their own network segments.
|
||||||
|
|
||||||
|
Reticulum is a complete networking stack, and does not need IP or higher
|
||||||
|
layers, although it is easy to utilise IP (with TCP or UDP) as the underlying
|
||||||
|
carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the
|
||||||
|
Internet or private IP networks. Reticulum is built directly on cryptographic
|
||||||
|
principles, allowing resilience and stable functionality in open and trustless
|
||||||
|
networks.
|
||||||
|
|
||||||
|
No kernel modules or drivers are required. Reticulum runs completely in
|
||||||
|
userland, and can run on practically any system that runs Python 3. Reticulum
|
||||||
|
runs well even on small single-board computers like the Pi Zero.
|
||||||
|
|
||||||
|
|
||||||
Current Status
|
Current Status
|
||||||
==============
|
==============
|
||||||
Reticulum should currently be considered beta software. All core protocol features are implemented and functioning, but additions will probably occur as real-world use is explored. There will be bugs. The API and wire-format can be considered stable at the moment, but could change if absolutely warranted.
|
**Please know!** Reticulum should currently be considered beta software. All core protocol
|
||||||
|
features are implemented and functioning, but additions will probably occur as
|
||||||
|
real-world use is explored. *There will be bugs*. The API and wire-format can be
|
||||||
|
considered stable at the moment, but could change if absolutely warranted.
|
||||||
|
|
||||||
|
|
||||||
What does Reticulum Offer?
|
What does Reticulum Offer?
|
||||||
==========================
|
==========================
|
||||||
* Coordination-less globally unique adressing and identification
|
* Coordination-less globally unique addressing and identification
|
||||||
|
|
||||||
* Fully self-configuring multi-hop routing
|
* Fully self-configuring multi-hop routing
|
||||||
|
|
||||||
@@ -26,7 +51,7 @@ What does Reticulum Offer?
|
|||||||
|
|
||||||
* Asymmetric encryption based on X25519, and Ed25519 signatures as a basis for all communication
|
* Asymmetric encryption based on X25519, and Ed25519 signatures as a basis for all communication
|
||||||
|
|
||||||
* Forward Secrecy by using ephemereal Elliptic Curve Diffie-Hellman keys on Curve25519
|
* Forward Secrecy by using ephemeral Elliptic Curve Diffie-Hellman keys on Curve25519
|
||||||
|
|
||||||
* Reticulum uses the `Fernet <https://github.com/fernet/spec/blob/master/Spec.md>`_ specification for on-the-wire / over-the-air encryption
|
* Reticulum uses the `Fernet <https://github.com/fernet/spec/blob/master/Spec.md>`_ specification for on-the-wire / over-the-air encryption
|
||||||
|
|
||||||
@@ -46,7 +71,7 @@ What does Reticulum Offer?
|
|||||||
|
|
||||||
* Efficient link establishment
|
* Efficient link establishment
|
||||||
|
|
||||||
* Total bandwidth cost of setting up a link is only 3 packets, totalling 265 bytes
|
* Total bandwidth cost of setting up a link is only 3 packets, totalling 297 bytes
|
||||||
|
|
||||||
* Low cost of keeping links open at only 0.44 bits per second
|
* Low cost of keeping links open at only 0.44 bits per second
|
||||||
|
|
||||||
@@ -77,7 +102,7 @@ Reticulum. It is possible to build it yourself, to transform a common LoRa
|
|||||||
development board into one, or it can be purchased as a complete transceiver.
|
development board into one, or it can be purchased as a complete transceiver.
|
||||||
|
|
||||||
Reticulum can also be encapsulated over existing IP networks, so there's
|
Reticulum can also be encapsulated over existing IP networks, so there's
|
||||||
nothing stopping you from using it over wired ethernet or your local WiFi
|
nothing stopping you from using it over wired Ethernet or your local WiFi
|
||||||
network, where it'll work just as well. In fact, one of the strengths of
|
network, where it'll work just as well. In fact, one of the strengths of
|
||||||
Reticulum is how easily it allows you to connect different mediums into a
|
Reticulum is how easily it allows you to connect different mediums into a
|
||||||
self-configuring, resilient and encrypted mesh.
|
self-configuring, resilient and encrypted mesh.
|
||||||
@@ -92,15 +117,15 @@ Interface Types and Devices
|
|||||||
===========================
|
===========================
|
||||||
Reticulum implements a range of generalised interface types that covers the communications hardware that Reticulum can run over. If your hardware is not supported, it's relatively simple to implement an interface class. Currently, Reticulum can use the following devices and communication mediums:
|
Reticulum implements a range of generalised interface types that covers the communications hardware that Reticulum can run over. If your hardware is not supported, it's relatively simple to implement an interface class. Currently, Reticulum can use the following devices and communication mediums:
|
||||||
|
|
||||||
* Any ethernet device
|
* Any Ethernet device
|
||||||
|
|
||||||
* WiFi devices
|
* WiFi devices
|
||||||
|
|
||||||
* Wired ethernet devices
|
* Wired Ethernet devices
|
||||||
|
|
||||||
* Fibre-optic transceivers
|
* Fibre-optic transceivers
|
||||||
|
|
||||||
* Data radios with ethernet ports
|
* Data radios with Ethernet ports
|
||||||
|
|
||||||
* LoRa using `RNode <https://unsigned.io/rnode>`_
|
* LoRa using `RNode <https://unsigned.io/rnode>`_
|
||||||
|
|
||||||
@@ -135,4 +160,9 @@ For a full list and more details, see the :ref:`Supported Interfaces<interfaces-
|
|||||||
|
|
||||||
Caveat Emptor
|
Caveat Emptor
|
||||||
==============
|
==============
|
||||||
Reticulum is an experimental networking stack, and should be considered as such. While it has been built with cryptography best-practices very foremost in mind, it has not been externally security audited, and there could very well be privacy-breaking bugs. To be considered secure, Reticulum needs a thourough security review by independt cryptographers and security researchers. If you want to help out, or help sponsor an audit, please do get in touch.
|
Reticulum is an experimental networking stack, and should be considered as
|
||||||
|
such. While it has been built with cryptography best-practices very foremost in
|
||||||
|
mind, it has not been externally security audited, and there could very well be
|
||||||
|
privacy-breaking bugs. To be considered secure, Reticulum needs a thorough
|
||||||
|
security review by independent cryptographers and security researchers. If you
|
||||||
|
want to help out, or help sponsor an audit, please do get in touch.
|
||||||
@@ -0,0 +1,134 @@
|
|||||||
|
/*
|
||||||
|
* _sphinx_javascript_frameworks_compat.js
|
||||||
|
* ~~~~~~~~~~
|
||||||
|
*
|
||||||
|
* Compatability shim for jQuery and underscores.js.
|
||||||
|
*
|
||||||
|
* WILL BE REMOVED IN Sphinx 6.0
|
||||||
|
* xref RemovedInSphinx60Warning
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* select a different prefix for underscore
|
||||||
|
*/
|
||||||
|
$u = _.noConflict();
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* small helper function to urldecode strings
|
||||||
|
*
|
||||||
|
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
||||||
|
*/
|
||||||
|
jQuery.urldecode = function(x) {
|
||||||
|
if (!x) {
|
||||||
|
return x
|
||||||
|
}
|
||||||
|
return decodeURIComponent(x.replace(/\+/g, ' '));
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* small helper function to urlencode strings
|
||||||
|
*/
|
||||||
|
jQuery.urlencode = encodeURIComponent;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This function returns the parsed url parameters of the
|
||||||
|
* current request. Multiple values per key are supported,
|
||||||
|
* it will always return arrays of strings for the value parts.
|
||||||
|
*/
|
||||||
|
jQuery.getQueryParameters = function(s) {
|
||||||
|
if (typeof s === 'undefined')
|
||||||
|
s = document.location.search;
|
||||||
|
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
||||||
|
var result = {};
|
||||||
|
for (var i = 0; i < parts.length; i++) {
|
||||||
|
var tmp = parts[i].split('=', 2);
|
||||||
|
var key = jQuery.urldecode(tmp[0]);
|
||||||
|
var value = jQuery.urldecode(tmp[1]);
|
||||||
|
if (key in result)
|
||||||
|
result[key].push(value);
|
||||||
|
else
|
||||||
|
result[key] = [value];
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* highlight a given string on a jquery object by wrapping it in
|
||||||
|
* span elements with the given class name.
|
||||||
|
*/
|
||||||
|
jQuery.fn.highlightText = function(text, className) {
|
||||||
|
function highlight(node, addItems) {
|
||||||
|
if (node.nodeType === 3) {
|
||||||
|
var val = node.nodeValue;
|
||||||
|
var pos = val.toLowerCase().indexOf(text);
|
||||||
|
if (pos >= 0 &&
|
||||||
|
!jQuery(node.parentNode).hasClass(className) &&
|
||||||
|
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
||||||
|
var span;
|
||||||
|
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
||||||
|
if (isInSVG) {
|
||||||
|
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||||
|
} else {
|
||||||
|
span = document.createElement("span");
|
||||||
|
span.className = className;
|
||||||
|
}
|
||||||
|
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||||
|
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
||||||
|
document.createTextNode(val.substr(pos + text.length)),
|
||||||
|
node.nextSibling));
|
||||||
|
node.nodeValue = val.substr(0, pos);
|
||||||
|
if (isInSVG) {
|
||||||
|
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
||||||
|
var bbox = node.parentElement.getBBox();
|
||||||
|
rect.x.baseVal.value = bbox.x;
|
||||||
|
rect.y.baseVal.value = bbox.y;
|
||||||
|
rect.width.baseVal.value = bbox.width;
|
||||||
|
rect.height.baseVal.value = bbox.height;
|
||||||
|
rect.setAttribute('class', className);
|
||||||
|
addItems.push({
|
||||||
|
"parent": node.parentNode,
|
||||||
|
"target": rect});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (!jQuery(node).is("button, select, textarea")) {
|
||||||
|
jQuery.each(node.childNodes, function() {
|
||||||
|
highlight(this, addItems);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
var addItems = [];
|
||||||
|
var result = this.each(function() {
|
||||||
|
highlight(this, addItems);
|
||||||
|
});
|
||||||
|
for (var i = 0; i < addItems.length; ++i) {
|
||||||
|
jQuery(addItems[i].parent).before(addItems[i].target);
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* backward compatibility for jQuery.browser
|
||||||
|
* This will be supported until firefox bug is fixed.
|
||||||
|
*/
|
||||||
|
if (!jQuery.browser) {
|
||||||
|
jQuery.uaMatch = function(ua) {
|
||||||
|
ua = ua.toLowerCase();
|
||||||
|
|
||||||
|
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
||||||
|
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
||||||
|
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
||||||
|
/(msie) ([\w.]+)/.exec(ua) ||
|
||||||
|
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
||||||
|
[];
|
||||||
|
|
||||||
|
return {
|
||||||
|
browser: match[ 1 ] || "",
|
||||||
|
version: match[ 2 ] || "0"
|
||||||
|
};
|
||||||
|
};
|
||||||
|
jQuery.browser = {};
|
||||||
|
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
||||||
|
}
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* Sphinx stylesheet -- basic theme.
|
* Sphinx stylesheet -- basic theme.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@@ -222,7 +222,7 @@ table.modindextable td {
|
|||||||
/* -- general body styles --------------------------------------------------- */
|
/* -- general body styles --------------------------------------------------- */
|
||||||
|
|
||||||
div.body {
|
div.body {
|
||||||
min-width: 450px;
|
min-width: 360px;
|
||||||
max-width: 800px;
|
max-width: 800px;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -236,7 +236,6 @@ div.body p, div.body dd, div.body li, div.body blockquote {
|
|||||||
a.headerlink {
|
a.headerlink {
|
||||||
visibility: hidden;
|
visibility: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
a.brackets:before,
|
a.brackets:before,
|
||||||
span.brackets > a:before{
|
span.brackets > a:before{
|
||||||
content: "[";
|
content: "[";
|
||||||
@@ -247,6 +246,7 @@ span.brackets > a:after {
|
|||||||
content: "]";
|
content: "]";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
h1:hover > a.headerlink,
|
h1:hover > a.headerlink,
|
||||||
h2:hover > a.headerlink,
|
h2:hover > a.headerlink,
|
||||||
h3:hover > a.headerlink,
|
h3:hover > a.headerlink,
|
||||||
@@ -334,13 +334,11 @@ aside.sidebar {
|
|||||||
p.sidebar-title {
|
p.sidebar-title {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
div.admonition, div.topic, blockquote {
|
div.admonition, div.topic, blockquote {
|
||||||
clear: left;
|
clear: left;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* -- topics ---------------------------------------------------------------- */
|
/* -- topics ---------------------------------------------------------------- */
|
||||||
|
|
||||||
div.topic {
|
div.topic {
|
||||||
border: 1px solid #ccc;
|
border: 1px solid #ccc;
|
||||||
padding: 7px;
|
padding: 7px;
|
||||||
@@ -428,10 +426,6 @@ table.docutils td, table.docutils th {
|
|||||||
border-bottom: 1px solid #aaa;
|
border-bottom: 1px solid #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
table.footnote td, table.footnote th {
|
|
||||||
border: 0 !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
th {
|
th {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
@@ -614,7 +608,6 @@ ol.simple p,
|
|||||||
ul.simple p {
|
ul.simple p {
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.footnote > dt,
|
dl.footnote > dt,
|
||||||
dl.citation > dt {
|
dl.citation > dt {
|
||||||
float: left;
|
float: left;
|
||||||
@@ -643,11 +636,11 @@ dl.field-list > dt {
|
|||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
padding-right: 5px;
|
padding-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
dl.field-list > dt:after {
|
dl.field-list > dt:after {
|
||||||
content: ":";
|
content: ":";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
dl.field-list > dd {
|
dl.field-list > dd {
|
||||||
padding-left: 0.5em;
|
padding-left: 0.5em;
|
||||||
margin-top: 0em;
|
margin-top: 0em;
|
||||||
@@ -731,8 +724,9 @@ dl.glossary dt {
|
|||||||
|
|
||||||
.classifier:before {
|
.classifier:before {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
margin: 0.5em;
|
margin: 0 0.5em;
|
||||||
content: ":";
|
content: ":";
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
abbr, acronym {
|
abbr, acronym {
|
||||||
@@ -756,6 +750,7 @@ span.pre {
|
|||||||
-ms-hyphens: none;
|
-ms-hyphens: none;
|
||||||
-webkit-hyphens: none;
|
-webkit-hyphens: none;
|
||||||
hyphens: none;
|
hyphens: none;
|
||||||
|
white-space: nowrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
div[class*="highlight-"] {
|
div[class*="highlight-"] {
|
||||||
@@ -819,7 +814,7 @@ div.code-block-caption code {
|
|||||||
|
|
||||||
table.highlighttable td.linenos,
|
table.highlighttable td.linenos,
|
||||||
span.linenos,
|
span.linenos,
|
||||||
div.doctest > div.highlight span.gp { /* gp: Generic.Prompt */
|
div.highlight span.gp { /* gp: Generic.Prompt */
|
||||||
user-select: none;
|
user-select: none;
|
||||||
-webkit-user-select: text; /* Safari fallback only */
|
-webkit-user-select: text; /* Safari fallback only */
|
||||||
-webkit-user-select: none; /* Chrome/Safari */
|
-webkit-user-select: none; /* Chrome/Safari */
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="#22863a" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M5 12l5 5l10 -10" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 313 B |
@@ -1,266 +0,0 @@
|
|||||||
/*
|
|
||||||
* classic.css_t
|
|
||||||
* ~~~~~~~~~~~~~
|
|
||||||
*
|
|
||||||
* Sphinx stylesheet -- classic theme.
|
|
||||||
*
|
|
||||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
|
||||||
* :license: BSD, see LICENSE for details.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
@import url("basic.css");
|
|
||||||
|
|
||||||
/* -- page layout ----------------------------------------------------------- */
|
|
||||||
|
|
||||||
html {
|
|
||||||
/* CSS hack for macOS's scrollbar (see #1125) */
|
|
||||||
background-color: #FFFFFF;
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 100%;
|
|
||||||
background-color: #11303d;
|
|
||||||
color: #000;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.document {
|
|
||||||
background-color: #1c4e63;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.documentwrapper {
|
|
||||||
float: left;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.bodywrapper {
|
|
||||||
margin: 0 0 0 230px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.body {
|
|
||||||
background-color: #ffffff;
|
|
||||||
color: #000000;
|
|
||||||
padding: 0 20px 30px 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.footer {
|
|
||||||
color: #ffffff;
|
|
||||||
width: 100%;
|
|
||||||
padding: 9px 0 9px 0;
|
|
||||||
text-align: center;
|
|
||||||
font-size: 75%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.footer a {
|
|
||||||
color: #ffffff;
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.related {
|
|
||||||
background-color: #133f52;
|
|
||||||
line-height: 30px;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.related a {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar {
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar h3 {
|
|
||||||
font-family: 'Trebuchet MS', sans-serif;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 1.4em;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar h3 a {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar h4 {
|
|
||||||
font-family: 'Trebuchet MS', sans-serif;
|
|
||||||
color: #ffffff;
|
|
||||||
font-size: 1.3em;
|
|
||||||
font-weight: normal;
|
|
||||||
margin: 5px 0 0 0;
|
|
||||||
padding: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar p {
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar p.topless {
|
|
||||||
margin: 5px 10px 10px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar ul {
|
|
||||||
margin: 10px;
|
|
||||||
padding: 0;
|
|
||||||
color: #ffffff;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar a {
|
|
||||||
color: #98dbcc;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.sphinxsidebar input {
|
|
||||||
border: 1px solid #98dbcc;
|
|
||||||
font-family: sans-serif;
|
|
||||||
font-size: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -- hyperlink styles ------------------------------------------------------ */
|
|
||||||
|
|
||||||
a {
|
|
||||||
color: #355f7c;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:visited {
|
|
||||||
color: #355f7c;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover {
|
|
||||||
text-decoration: underline;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* -- body styles ----------------------------------------------------------- */
|
|
||||||
|
|
||||||
div.body h1,
|
|
||||||
div.body h2,
|
|
||||||
div.body h3,
|
|
||||||
div.body h4,
|
|
||||||
div.body h5,
|
|
||||||
div.body h6 {
|
|
||||||
font-family: 'Trebuchet MS', sans-serif;
|
|
||||||
background-color: #f2f2f2;
|
|
||||||
font-weight: normal;
|
|
||||||
color: #20435c;
|
|
||||||
border-bottom: 1px solid #ccc;
|
|
||||||
margin: 20px -20px 10px -20px;
|
|
||||||
padding: 3px 0 3px 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.body h1 { margin-top: 0; font-size: 200%; }
|
|
||||||
div.body h2 { font-size: 160%; }
|
|
||||||
div.body h3 { font-size: 140%; }
|
|
||||||
div.body h4 { font-size: 120%; }
|
|
||||||
div.body h5 { font-size: 110%; }
|
|
||||||
div.body h6 { font-size: 100%; }
|
|
||||||
|
|
||||||
a.headerlink {
|
|
||||||
color: #c60f0f;
|
|
||||||
font-size: 0.8em;
|
|
||||||
padding: 0 4px 0 4px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
a.headerlink:hover {
|
|
||||||
background-color: #c60f0f;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.body p, div.body dd, div.body li, div.body blockquote {
|
|
||||||
text-align: justify;
|
|
||||||
line-height: 130%;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.admonition p.admonition-title + p {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.admonition p {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.admonition pre {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.admonition ul, div.admonition ol {
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.note {
|
|
||||||
background-color: #eee;
|
|
||||||
border: 1px solid #ccc;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.seealso {
|
|
||||||
background-color: #ffc;
|
|
||||||
border: 1px solid #ff6;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.topic {
|
|
||||||
background-color: #eee;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.warning {
|
|
||||||
background-color: #ffe4e4;
|
|
||||||
border: 1px solid #f66;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.admonition-title {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
p.admonition-title:after {
|
|
||||||
content: ":";
|
|
||||||
}
|
|
||||||
|
|
||||||
pre {
|
|
||||||
padding: 5px;
|
|
||||||
background-color: unset;
|
|
||||||
color: unset;
|
|
||||||
line-height: 120%;
|
|
||||||
border: 1px solid #ac9;
|
|
||||||
border-left: none;
|
|
||||||
border-right: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
code {
|
|
||||||
background-color: #ecf0f3;
|
|
||||||
padding: 0 1px 0 1px;
|
|
||||||
font-size: 0.95em;
|
|
||||||
}
|
|
||||||
|
|
||||||
th, dl.field-list > dt {
|
|
||||||
background-color: #ede;
|
|
||||||
}
|
|
||||||
|
|
||||||
.warning code {
|
|
||||||
background: #efc2c2;
|
|
||||||
}
|
|
||||||
|
|
||||||
.note code {
|
|
||||||
background: #d6d6d6;
|
|
||||||
}
|
|
||||||
|
|
||||||
.viewcode-back {
|
|
||||||
font-family: sans-serif;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.viewcode-block:target {
|
|
||||||
background-color: #f4debf;
|
|
||||||
border-top: 1px solid #ac9;
|
|
||||||
border-bottom: 1px solid #ac9;
|
|
||||||
}
|
|
||||||
|
|
||||||
div.code-block-caption {
|
|
||||||
color: #efefef;
|
|
||||||
background-color: #1c4e63;
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* clipboard.js v2.0.8
|
||||||
|
* https://clipboardjs.com/
|
||||||
|
*
|
||||||
|
* Licensed MIT © Zeno Rocha
|
||||||
|
*/
|
||||||
|
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.ClipboardJS=e():t.ClipboardJS=e()}(this,function(){return n={686:function(t,e,n){"use strict";n.d(e,{default:function(){return o}});var e=n(279),i=n.n(e),e=n(370),u=n.n(e),e=n(817),c=n.n(e);function a(t){try{return document.execCommand(t)}catch(t){return}}var f=function(t){t=c()(t);return a("cut"),t};var l=function(t){var e,n,o,r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body},i="";return"string"==typeof t?(e=t,n="rtl"===document.documentElement.getAttribute("dir"),(o=document.createElement("textarea")).style.fontSize="12pt",o.style.border="0",o.style.padding="0",o.style.margin="0",o.style.position="absolute",o.style[n?"right":"left"]="-9999px",n=window.pageYOffset||document.documentElement.scrollTop,o.style.top="".concat(n,"px"),o.setAttribute("readonly",""),o.value=e,o=o,r.container.appendChild(o),i=c()(o),a("copy"),o.remove()):(i=c()(t),a("copy")),i};function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var s=function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},e=t.action,n=void 0===e?"copy":e,o=t.container,e=t.target,t=t.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==e){if(!e||"object"!==r(e)||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return t?l(t,{container:o}):e?"cut"===n?f(e):l(e,{container:o}):void 0};function d(t){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function p(t,e){for(var n=0;n<e.length;n++){var o=e[n];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function y(t,e){return(y=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function h(n){var o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(t){return!1}}();return function(){var t,e=m(n);return t=o?(t=m(this).constructor,Reflect.construct(e,arguments,t)):e.apply(this,arguments),e=this,!(t=t)||"object"!==d(t)&&"function"!=typeof t?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}}function m(t){return(m=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function v(t,e){t="data-clipboard-".concat(t);if(e.hasAttribute(t))return e.getAttribute(t)}var o=function(){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&y(t,e)}(r,i());var t,e,n,o=h(r);function r(t,e){var n;return function(t){if(!(t instanceof r))throw new TypeError("Cannot call a class as a function")}(this),(n=o.call(this)).resolveOptions(e),n.listenClick(t),n}return t=r,n=[{key:"copy",value:function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{container:document.body};return l(t,e)}},{key:"cut",value:function(t){return f(t)}},{key:"isSupported",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof t?[t]:t,e=!!document.queryCommandSupported;return t.forEach(function(t){e=e&&!!document.queryCommandSupported(t)}),e}}],(e=[{key:"resolveOptions",value:function(){var t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof t.action?t.action:this.defaultAction,this.target="function"==typeof t.target?t.target:this.defaultTarget,this.text="function"==typeof t.text?t.text:this.defaultText,this.container="object"===d(t.container)?t.container:document.body}},{key:"listenClick",value:function(t){var e=this;this.listener=u()(t,"click",function(t){return e.onClick(t)})}},{key:"onClick",value:function(t){var e=t.delegateTarget||t.currentTarget,t=s({action:this.action(e),container:this.container,target:this.target(e),text:this.text(e)});this.emit(t?"success":"error",{action:this.action,text:t,trigger:e,clearSelection:function(){e&&e.focus(),documenLine truncated
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<rect x="8" y="8" width="12" height="12" rx="2" />
|
||||||
|
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 411 B |
@@ -0,0 +1,93 @@
|
|||||||
|
/* Copy buttons */
|
||||||
|
button.copybtn {
|
||||||
|
position: absolute;
|
||||||
|
display: flex;
|
||||||
|
top: .3em;
|
||||||
|
right: .3em;
|
||||||
|
width: 1.7em;
|
||||||
|
height: 1.7em;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.3s, border .3s, background-color .3s;
|
||||||
|
user-select: none;
|
||||||
|
padding: 0;
|
||||||
|
border: none;
|
||||||
|
outline: none;
|
||||||
|
border-radius: 0.4em;
|
||||||
|
/* The colors that GitHub uses */
|
||||||
|
border: #1b1f2426 1px solid;
|
||||||
|
background-color: #f6f8fa;
|
||||||
|
color: #57606a;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.copybtn.success {
|
||||||
|
border-color: #22863a;
|
||||||
|
color: #22863a;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.copybtn svg {
|
||||||
|
stroke: currentColor;
|
||||||
|
width: 1.5em;
|
||||||
|
height: 1.5em;
|
||||||
|
padding: 0.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
div.highlight {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight:hover button.copybtn {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight button.copybtn:hover {
|
||||||
|
background-color: rgb(235, 235, 235);
|
||||||
|
}
|
||||||
|
|
||||||
|
.highlight button.copybtn:active {
|
||||||
|
background-color: rgb(187, 187, 187);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* A minimal CSS-only tooltip copied from:
|
||||||
|
* https://codepen.io/mildrenben/pen/rVBrpK
|
||||||
|
*
|
||||||
|
* To use, write HTML like the following:
|
||||||
|
*
|
||||||
|
* <p class="o-tooltip--left" data-tooltip="Hey">Short</p>
|
||||||
|
*/
|
||||||
|
.o-tooltip--left {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.o-tooltip--left:after {
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
position: absolute;
|
||||||
|
content: attr(data-tooltip);
|
||||||
|
padding: .2em;
|
||||||
|
font-size: .8em;
|
||||||
|
left: -.2em;
|
||||||
|
background: grey;
|
||||||
|
color: white;
|
||||||
|
white-space: nowrap;
|
||||||
|
z-index: 2;
|
||||||
|
border-radius: 2px;
|
||||||
|
transform: translateX(-102%) translateY(0);
|
||||||
|
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
.o-tooltip--left:hover:after {
|
||||||
|
display: block;
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
transform: translateX(-100%) translateY(0);
|
||||||
|
transition: opacity 0.2s cubic-bezier(0.64, 0.09, 0.08, 1), transform 0.2s cubic-bezier(0.64, 0.09, 0.08, 1);
|
||||||
|
transition-delay: .5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* By default the copy button shouldn't show up when printing a page */
|
||||||
|
@media print {
|
||||||
|
button.copybtn {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,220 @@
|
|||||||
|
// Localization support
|
||||||
|
const messages = {
|
||||||
|
'en': {
|
||||||
|
'copy': 'Copy',
|
||||||
|
'copy_to_clipboard': 'Copy to clipboard',
|
||||||
|
'copy_success': 'Copied!',
|
||||||
|
'copy_failure': 'Failed to copy',
|
||||||
|
},
|
||||||
|
'es' : {
|
||||||
|
'copy': 'Copiar',
|
||||||
|
'copy_to_clipboard': 'Copiar al portapapeles',
|
||||||
|
'copy_success': '¡Copiado!',
|
||||||
|
'copy_failure': 'Error al copiar',
|
||||||
|
},
|
||||||
|
'de' : {
|
||||||
|
'copy': 'Kopieren',
|
||||||
|
'copy_to_clipboard': 'In die Zwischenablage kopieren',
|
||||||
|
'copy_success': 'Kopiert!',
|
||||||
|
'copy_failure': 'Fehler beim Kopieren',
|
||||||
|
},
|
||||||
|
'fr' : {
|
||||||
|
'copy': 'Copier',
|
||||||
|
'copy_to_clipboard': 'Copié dans le presse-papier',
|
||||||
|
'copy_success': 'Copié !',
|
||||||
|
'copy_failure': 'Échec de la copie',
|
||||||
|
},
|
||||||
|
'ru': {
|
||||||
|
'copy': 'Скопировать',
|
||||||
|
'copy_to_clipboard': 'Скопировать в буфер',
|
||||||
|
'copy_success': 'Скопировано!',
|
||||||
|
'copy_failure': 'Не удалось скопировать',
|
||||||
|
},
|
||||||
|
'zh-CN': {
|
||||||
|
'copy': '复制',
|
||||||
|
'copy_to_clipboard': '复制到剪贴板',
|
||||||
|
'copy_success': '复制成功!',
|
||||||
|
'copy_failure': '复制失败',
|
||||||
|
},
|
||||||
|
'it' : {
|
||||||
|
'copy': 'Copiare',
|
||||||
|
'copy_to_clipboard': 'Copiato negli appunti',
|
||||||
|
'copy_success': 'Copiato!',
|
||||||
|
'copy_failure': 'Errore durante la copia',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
let locale = 'en'
|
||||||
|
if( document.documentElement.lang !== undefined
|
||||||
|
&& messages[document.documentElement.lang] !== undefined ) {
|
||||||
|
locale = document.documentElement.lang
|
||||||
|
}
|
||||||
|
|
||||||
|
let doc_url_root = DOCUMENTATION_OPTIONS.URL_ROOT;
|
||||||
|
if (doc_url_root == '#') {
|
||||||
|
doc_url_root = '';
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SVG files for our copy buttons
|
||||||
|
*/
|
||||||
|
let iconCheck = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-check" width="44" height="44" viewBox="0 0 24 24" stroke-width="2" stroke="#22863a" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<title>${messages[locale]['copy_success']}</title>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<path d="M5 12l5 5l10 -10" />
|
||||||
|
</svg>`
|
||||||
|
|
||||||
|
// If the user specified their own SVG use that, otherwise use the default
|
||||||
|
let iconCopy = ``;
|
||||||
|
if (!iconCopy) {
|
||||||
|
iconCopy = `<svg xmlns="http://www.w3.org/2000/svg" class="icon icon-tabler icon-tabler-copy" width="44" height="44" viewBox="0 0 24 24" stroke-width="1.5" stroke="#000000" fill="none" stroke-linecap="round" stroke-linejoin="round">
|
||||||
|
<title>${messages[locale]['copy_to_clipboard']}</title>
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<rect x="8" y="8" width="12" height="12" rx="2" />
|
||||||
|
<path d="M16 8v-2a2 2 0 0 0 -2 -2h-8a2 2 0 0 0 -2 2v8a2 2 0 0 0 2 2h2" />
|
||||||
|
</svg>`
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set up copy/paste for code blocks
|
||||||
|
*/
|
||||||
|
|
||||||
|
const runWhenDOMLoaded = cb => {
|
||||||
|
if (document.readyState != 'loading') {
|
||||||
|
cb()
|
||||||
|
} else if (document.addEventListener) {
|
||||||
|
document.addEventListener('DOMContentLoaded', cb)
|
||||||
|
} else {
|
||||||
|
document.attachEvent('onreadystatechange', function() {
|
||||||
|
if (document.readyState == 'complete') cb()
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const codeCellId = index => `codecell${index}`
|
||||||
|
|
||||||
|
// Clears selected text since ClipboardJS will select the text when copying
|
||||||
|
const clearSelection = () => {
|
||||||
|
if (window.getSelection) {
|
||||||
|
window.getSelection().removeAllRanges()
|
||||||
|
} else if (document.selection) {
|
||||||
|
document.selection.empty()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes tooltip text for two seconds, then changes it back
|
||||||
|
const temporarilyChangeTooltip = (el, oldText, newText) => {
|
||||||
|
el.setAttribute('data-tooltip', newText)
|
||||||
|
el.classList.add('success')
|
||||||
|
setTimeout(() => el.setAttribute('data-tooltip', oldText), 2000)
|
||||||
|
setTimeout(() => el.classList.remove('success'), 2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
// Changes the copy button icon for two seconds, then changes it back
|
||||||
|
const temporarilyChangeIcon = (el) => {
|
||||||
|
el.innerHTML = iconCheck;
|
||||||
|
setTimeout(() => {el.innerHTML = iconCopy}, 2000)
|
||||||
|
}
|
||||||
|
|
||||||
|
const addCopyButtonToCodeCells = () => {
|
||||||
|
// If ClipboardJS hasn't loaded, wait a bit and try again. This
|
||||||
|
// happens because we load ClipboardJS asynchronously.
|
||||||
|
if (window.ClipboardJS === undefined) {
|
||||||
|
setTimeout(addCopyButtonToCodeCells, 250)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add copybuttons to all of our code cells
|
||||||
|
const codeCells = document.querySelectorAll('div.highlight pre')
|
||||||
|
codeCells.forEach((codeCell, index) => {
|
||||||
|
const id = codeCellId(index)
|
||||||
|
codeCell.setAttribute('id', id)
|
||||||
|
|
||||||
|
const clipboardButton = id =>
|
||||||
|
`<button class="copybtn o-tooltip--left" data-tooltip="${messages[locale]['copy']}" data-clipboard-target="#${id}">
|
||||||
|
${iconCopy}
|
||||||
|
</button>`
|
||||||
|
codeCell.insertAdjacentHTML('afterend', clipboardButton(id))
|
||||||
|
})
|
||||||
|
|
||||||
|
function escapeRegExp(string) {
|
||||||
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||||
|
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||||
|
function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
|
||||||
|
|
||||||
|
var regexp;
|
||||||
|
var match;
|
||||||
|
|
||||||
|
// Do we check for line continuation characters and "HERE-documents"?
|
||||||
|
var useLineCont = !!lineContinuationChar
|
||||||
|
var useHereDoc = !!hereDocDelim
|
||||||
|
|
||||||
|
// create regexp to capture prompt and remaining line
|
||||||
|
if (isRegexp) {
|
||||||
|
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
|
||||||
|
} else {
|
||||||
|
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
|
||||||
|
}
|
||||||
|
|
||||||
|
const outputLines = [];
|
||||||
|
var promptFound = false;
|
||||||
|
var gotLineCont = false;
|
||||||
|
var gotHereDoc = false;
|
||||||
|
const lineGotPrompt = [];
|
||||||
|
for (const line of textContent.split('\n')) {
|
||||||
|
match = line.match(regexp)
|
||||||
|
if (match || gotLineCont || gotHereDoc) {
|
||||||
|
promptFound = regexp.test(line)
|
||||||
|
lineGotPrompt.push(promptFound)
|
||||||
|
if (removePrompts && promptFound) {
|
||||||
|
outputLines.push(match[2])
|
||||||
|
} else {
|
||||||
|
outputLines.push(line)
|
||||||
|
}
|
||||||
|
gotLineCont = line.endsWith(lineContinuationChar) & useLineCont
|
||||||
|
if (line.includes(hereDocDelim) & useHereDoc)
|
||||||
|
gotHereDoc = !gotHereDoc
|
||||||
|
} else if (!onlyCopyPromptLines) {
|
||||||
|
outputLines.push(line)
|
||||||
|
} else if (copyEmptyLines && line.trim() === '') {
|
||||||
|
outputLines.push(line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no lines with the prompt were found then just use original lines
|
||||||
|
if (lineGotPrompt.some(v => v === true)) {
|
||||||
|
textContent = outputLines.join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove a trailing newline to avoid auto-running when pasting
|
||||||
|
if (textContent.endsWith("\n")) {
|
||||||
|
textContent = textContent.slice(0, -1)
|
||||||
|
}
|
||||||
|
return textContent
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
var copyTargetText = (trigger) => {
|
||||||
|
var target = document.querySelector(trigger.attributes['data-clipboard-target'].value);
|
||||||
|
return formatCopyText(target.innerText, '', false, true, true, true, '', '')
|
||||||
|
}
|
||||||
|
|
||||||
|
// Initialize with a callback so we can modify the text before copy
|
||||||
|
const clipboard = new ClipboardJS('.copybtn', {text: copyTargetText})
|
||||||
|
|
||||||
|
// Update UI with error/success messages
|
||||||
|
clipboard.on('success', event => {
|
||||||
|
clearSelection()
|
||||||
|
temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_success'])
|
||||||
|
temporarilyChangeIcon(event.trigger)
|
||||||
|
})
|
||||||
|
|
||||||
|
clipboard.on('error', event => {
|
||||||
|
temporarilyChangeTooltip(event.trigger, messages[locale]['copy'], messages[locale]['copy_failure'])
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
runWhenDOMLoaded(addCopyButtonToCodeCells)
|
||||||
@@ -0,0 +1,58 @@
|
|||||||
|
function escapeRegExp(string) {
|
||||||
|
return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
||||||
|
}
|
||||||
|
|
||||||
|
// Callback when a copy button is clicked. Will be passed the node that was clicked
|
||||||
|
// should then grab the text and replace pieces of text that shouldn't be used in output
|
||||||
|
export function formatCopyText(textContent, copybuttonPromptText, isRegexp = false, onlyCopyPromptLines = true, removePrompts = true, copyEmptyLines = true, lineContinuationChar = "", hereDocDelim = "") {
|
||||||
|
|
||||||
|
var regexp;
|
||||||
|
var match;
|
||||||
|
|
||||||
|
// Do we check for line continuation characters and "HERE-documents"?
|
||||||
|
var useLineCont = !!lineContinuationChar
|
||||||
|
var useHereDoc = !!hereDocDelim
|
||||||
|
|
||||||
|
// create regexp to capture prompt and remaining line
|
||||||
|
if (isRegexp) {
|
||||||
|
regexp = new RegExp('^(' + copybuttonPromptText + ')(.*)')
|
||||||
|
} else {
|
||||||
|
regexp = new RegExp('^(' + escapeRegExp(copybuttonPromptText) + ')(.*)')
|
||||||
|
}
|
||||||
|
|
||||||
|
const outputLines = [];
|
||||||
|
var promptFound = false;
|
||||||
|
var gotLineCont = false;
|
||||||
|
var gotHereDoc = false;
|
||||||
|
const lineGotPrompt = [];
|
||||||
|
for (const line of textContent.split('\n')) {
|
||||||
|
match = line.match(regexp)
|
||||||
|
if (match || gotLineCont || gotHereDoc) {
|
||||||
|
promptFound = regexp.test(line)
|
||||||
|
lineGotPrompt.push(promptFound)
|
||||||
|
if (removePrompts && promptFound) {
|
||||||
|
outputLines.push(match[2])
|
||||||
|
} else {
|
||||||
|
outputLines.push(line)
|
||||||
|
}
|
||||||
|
gotLineCont = line.endsWith(lineContinuationChar) & useLineCont
|
||||||
|
if (line.includes(hereDocDelim) & useHereDoc)
|
||||||
|
gotHereDoc = !gotHereDoc
|
||||||
|
} else if (!onlyCopyPromptLines) {
|
||||||
|
outputLines.push(line)
|
||||||
|
} else if (copyEmptyLines && line.trim() === '') {
|
||||||
|
outputLines.push(line)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// If no lines with the prompt were found then just use original lines
|
||||||
|
if (lineGotPrompt.some(v => v === true)) {
|
||||||
|
textContent = outputLines.join('\n');
|
||||||
|
}
|
||||||
|
|
||||||
|
// Remove a trailing newline to avoid auto-running when pasting
|
||||||
|
if (textContent.endsWith("\n")) {
|
||||||
|
textContent = textContent.slice(0, -1)
|
||||||
|
}
|
||||||
|
return textContent
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
h3 {
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.literal {
|
||||||
|
padding-left: 0.25rem !important;
|
||||||
|
padding-right: 0.25rem !important;
|
||||||
|
padding-top: 0.25rem !important;
|
||||||
|
padding-bottom: 0.15rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
img[src*="if_mode_graph_b.png"] {
|
||||||
|
background-color: rgb(169, 177, 186);
|
||||||
|
}
|
||||||
|
|
||||||
|
dt.sig {
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
}
|
||||||
@@ -0,0 +1,69 @@
|
|||||||
|
/*
|
||||||
|
This CSS file should be overridden by the theme authors. It's
|
||||||
|
meant for debugging and developing the skeleton that this theme provides.
|
||||||
|
*/
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif,
|
||||||
|
"Apple Color Emoji", "Segoe UI Emoji";
|
||||||
|
background: lavender;
|
||||||
|
}
|
||||||
|
.sb-announcement {
|
||||||
|
background: rgb(131, 131, 131);
|
||||||
|
}
|
||||||
|
.sb-announcement__inner {
|
||||||
|
background: black;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.sb-header {
|
||||||
|
background: lightskyblue;
|
||||||
|
}
|
||||||
|
.sb-header__inner {
|
||||||
|
background: royalblue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.sb-header-secondary {
|
||||||
|
background: lightcyan;
|
||||||
|
}
|
||||||
|
.sb-header-secondary__inner {
|
||||||
|
background: cornflowerblue;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
.sb-sidebar-primary {
|
||||||
|
background: lightgreen;
|
||||||
|
}
|
||||||
|
.sb-main {
|
||||||
|
background: blanchedalmond;
|
||||||
|
}
|
||||||
|
.sb-main__inner {
|
||||||
|
background: antiquewhite;
|
||||||
|
}
|
||||||
|
.sb-header-article {
|
||||||
|
background: lightsteelblue;
|
||||||
|
}
|
||||||
|
.sb-article-container {
|
||||||
|
background: snow;
|
||||||
|
}
|
||||||
|
.sb-article-main {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
|
.sb-footer-article {
|
||||||
|
background: lightpink;
|
||||||
|
}
|
||||||
|
.sb-sidebar-secondary {
|
||||||
|
background: lightgoldenrodyellow;
|
||||||
|
}
|
||||||
|
.sb-footer-content {
|
||||||
|
background: plum;
|
||||||
|
}
|
||||||
|
.sb-footer-content__inner {
|
||||||
|
background: palevioletred;
|
||||||
|
}
|
||||||
|
.sb-footer {
|
||||||
|
background: pink;
|
||||||
|
}
|
||||||
|
.sb-footer__inner {
|
||||||
|
background: salmon;
|
||||||
|
}
|
||||||
|
.sb-article {
|
||||||
|
background: white;
|
||||||
|
}
|
||||||
@@ -2,320 +2,155 @@
|
|||||||
* doctools.js
|
* doctools.js
|
||||||
* ~~~~~~~~~~~
|
* ~~~~~~~~~~~
|
||||||
*
|
*
|
||||||
* Sphinx JavaScript utilities for all documentation.
|
* Base JavaScript utilities for all Sphinx HTML documentation.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
"use strict";
|
||||||
|
|
||||||
/**
|
const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([
|
||||||
* select a different prefix for underscore
|
"TEXTAREA",
|
||||||
*/
|
"INPUT",
|
||||||
$u = _.noConflict();
|
"SELECT",
|
||||||
|
"BUTTON",
|
||||||
|
]);
|
||||||
|
|
||||||
/**
|
const _ready = (callback) => {
|
||||||
* make the code below compatible with browsers without
|
if (document.readyState !== "loading") {
|
||||||
* an installed firebug like debugger
|
callback();
|
||||||
if (!window.console || !console.firebug) {
|
} else {
|
||||||
var names = ["log", "debug", "info", "warn", "error", "assert", "dir",
|
document.addEventListener("DOMContentLoaded", callback);
|
||||||
"dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace",
|
|
||||||
"profile", "profileEnd"];
|
|
||||||
window.console = {};
|
|
||||||
for (var i = 0; i < names.length; ++i)
|
|
||||||
window.console[names[i]] = function() {};
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
|
||||||
* small helper function to urldecode strings
|
|
||||||
*
|
|
||||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/decodeURIComponent#Decoding_query_parameters_from_a_URL
|
|
||||||
*/
|
|
||||||
jQuery.urldecode = function(x) {
|
|
||||||
if (!x) {
|
|
||||||
return x
|
|
||||||
}
|
}
|
||||||
return decodeURIComponent(x.replace(/\+/g, ' '));
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
|
||||||
* small helper function to urlencode strings
|
|
||||||
*/
|
|
||||||
jQuery.urlencode = encodeURIComponent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This function returns the parsed url parameters of the
|
|
||||||
* current request. Multiple values per key are supported,
|
|
||||||
* it will always return arrays of strings for the value parts.
|
|
||||||
*/
|
|
||||||
jQuery.getQueryParameters = function(s) {
|
|
||||||
if (typeof s === 'undefined')
|
|
||||||
s = document.location.search;
|
|
||||||
var parts = s.substr(s.indexOf('?') + 1).split('&');
|
|
||||||
var result = {};
|
|
||||||
for (var i = 0; i < parts.length; i++) {
|
|
||||||
var tmp = parts[i].split('=', 2);
|
|
||||||
var key = jQuery.urldecode(tmp[0]);
|
|
||||||
var value = jQuery.urldecode(tmp[1]);
|
|
||||||
if (key in result)
|
|
||||||
result[key].push(value);
|
|
||||||
else
|
|
||||||
result[key] = [value];
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
* highlight a given string on a jquery object by wrapping it in
|
|
||||||
* span elements with the given class name.
|
|
||||||
*/
|
|
||||||
jQuery.fn.highlightText = function(text, className) {
|
|
||||||
function highlight(node, addItems) {
|
|
||||||
if (node.nodeType === 3) {
|
|
||||||
var val = node.nodeValue;
|
|
||||||
var pos = val.toLowerCase().indexOf(text);
|
|
||||||
if (pos >= 0 &&
|
|
||||||
!jQuery(node.parentNode).hasClass(className) &&
|
|
||||||
!jQuery(node.parentNode).hasClass("nohighlight")) {
|
|
||||||
var span;
|
|
||||||
var isInSVG = jQuery(node).closest("body, svg, foreignObject").is("svg");
|
|
||||||
if (isInSVG) {
|
|
||||||
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
||||||
} else {
|
|
||||||
span = document.createElement("span");
|
|
||||||
span.className = className;
|
|
||||||
}
|
|
||||||
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
|
||||||
node.parentNode.insertBefore(span, node.parentNode.insertBefore(
|
|
||||||
document.createTextNode(val.substr(pos + text.length)),
|
|
||||||
node.nextSibling));
|
|
||||||
node.nodeValue = val.substr(0, pos);
|
|
||||||
if (isInSVG) {
|
|
||||||
var rect = document.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
||||||
var bbox = node.parentElement.getBBox();
|
|
||||||
rect.x.baseVal.value = bbox.x;
|
|
||||||
rect.y.baseVal.value = bbox.y;
|
|
||||||
rect.width.baseVal.value = bbox.width;
|
|
||||||
rect.height.baseVal.value = bbox.height;
|
|
||||||
rect.setAttribute('class', className);
|
|
||||||
addItems.push({
|
|
||||||
"parent": node.parentNode,
|
|
||||||
"target": rect});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (!jQuery(node).is("button, select, textarea")) {
|
|
||||||
jQuery.each(node.childNodes, function() {
|
|
||||||
highlight(this, addItems);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var addItems = [];
|
|
||||||
var result = this.each(function() {
|
|
||||||
highlight(this, addItems);
|
|
||||||
});
|
|
||||||
for (var i = 0; i < addItems.length; ++i) {
|
|
||||||
jQuery(addItems[i].parent).before(addItems[i].target);
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
};
|
|
||||||
|
|
||||||
/*
|
|
||||||
* backward compatibility for jQuery.browser
|
|
||||||
* This will be supported until firefox bug is fixed.
|
|
||||||
*/
|
|
||||||
if (!jQuery.browser) {
|
|
||||||
jQuery.uaMatch = function(ua) {
|
|
||||||
ua = ua.toLowerCase();
|
|
||||||
|
|
||||||
var match = /(chrome)[ \/]([\w.]+)/.exec(ua) ||
|
|
||||||
/(webkit)[ \/]([\w.]+)/.exec(ua) ||
|
|
||||||
/(opera)(?:.*version|)[ \/]([\w.]+)/.exec(ua) ||
|
|
||||||
/(msie) ([\w.]+)/.exec(ua) ||
|
|
||||||
ua.indexOf("compatible") < 0 && /(mozilla)(?:.*? rv:([\w.]+)|)/.exec(ua) ||
|
|
||||||
[];
|
|
||||||
|
|
||||||
return {
|
|
||||||
browser: match[ 1 ] || "",
|
|
||||||
version: match[ 2 ] || "0"
|
|
||||||
};
|
|
||||||
};
|
|
||||||
jQuery.browser = {};
|
|
||||||
jQuery.browser[jQuery.uaMatch(navigator.userAgent).browser] = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Small JavaScript module for the documentation.
|
* Small JavaScript module for the documentation.
|
||||||
*/
|
*/
|
||||||
var Documentation = {
|
const Documentation = {
|
||||||
|
init: () => {
|
||||||
init : function() {
|
Documentation.initDomainIndexTable();
|
||||||
this.fixFirefoxAnchorBug();
|
Documentation.initOnKeyListeners();
|
||||||
this.highlightSearchWords();
|
|
||||||
this.initIndexTable();
|
|
||||||
if (DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) {
|
|
||||||
this.initOnKeyListeners();
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* i18n support
|
* i18n support
|
||||||
*/
|
*/
|
||||||
TRANSLATIONS : {},
|
TRANSLATIONS: {},
|
||||||
PLURAL_EXPR : function(n) { return n === 1 ? 0 : 1; },
|
PLURAL_EXPR: (n) => (n === 1 ? 0 : 1),
|
||||||
LOCALE : 'unknown',
|
LOCALE: "unknown",
|
||||||
|
|
||||||
// gettext and ngettext don't access this so that the functions
|
// gettext and ngettext don't access this so that the functions
|
||||||
// can safely bound to a different name (_ = Documentation.gettext)
|
// can safely bound to a different name (_ = Documentation.gettext)
|
||||||
gettext : function(string) {
|
gettext: (string) => {
|
||||||
var translated = Documentation.TRANSLATIONS[string];
|
const translated = Documentation.TRANSLATIONS[string];
|
||||||
if (typeof translated === 'undefined')
|
switch (typeof translated) {
|
||||||
return string;
|
case "undefined":
|
||||||
return (typeof translated === 'string') ? translated : translated[0];
|
return string; // no translation
|
||||||
|
case "string":
|
||||||
|
return translated; // translation exists
|
||||||
|
default:
|
||||||
|
return translated[0]; // (singular, plural) translation tuple exists
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
ngettext : function(singular, plural, n) {
|
ngettext: (singular, plural, n) => {
|
||||||
var translated = Documentation.TRANSLATIONS[singular];
|
const translated = Documentation.TRANSLATIONS[singular];
|
||||||
if (typeof translated === 'undefined')
|
if (typeof translated !== "undefined")
|
||||||
return (n == 1) ? singular : plural;
|
return translated[Documentation.PLURAL_EXPR(n)];
|
||||||
return translated[Documentation.PLURALEXPR(n)];
|
return n === 1 ? singular : plural;
|
||||||
},
|
},
|
||||||
|
|
||||||
addTranslations : function(catalog) {
|
addTranslations: (catalog) => {
|
||||||
for (var key in catalog.messages)
|
Object.assign(Documentation.TRANSLATIONS, catalog.messages);
|
||||||
this.TRANSLATIONS[key] = catalog.messages[key];
|
Documentation.PLURAL_EXPR = new Function(
|
||||||
this.PLURAL_EXPR = new Function('n', 'return +(' + catalog.plural_expr + ')');
|
"n",
|
||||||
this.LOCALE = catalog.locale;
|
`return (${catalog.plural_expr})`
|
||||||
|
);
|
||||||
|
Documentation.LOCALE = catalog.locale;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* add context elements like header anchor links
|
* helper function to focus on search bar
|
||||||
*/
|
*/
|
||||||
addContextElements : function() {
|
focusSearchBar: () => {
|
||||||
$('div[id] > :header:first').each(function() {
|
document.querySelectorAll("input[name=q]")[0]?.focus();
|
||||||
$('<a class="headerlink">\u00B6</a>').
|
|
||||||
attr('href', '#' + this.id).
|
|
||||||
attr('title', _('Permalink to this headline')).
|
|
||||||
appendTo(this);
|
|
||||||
});
|
|
||||||
$('dt[id]').each(function() {
|
|
||||||
$('<a class="headerlink">\u00B6</a>').
|
|
||||||
attr('href', '#' + this.id).
|
|
||||||
attr('title', _('Permalink to this definition')).
|
|
||||||
appendTo(this);
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* workaround a firefox stupidity
|
* Initialise the domain index toggle buttons
|
||||||
* see: https://bugzilla.mozilla.org/show_bug.cgi?id=645075
|
|
||||||
*/
|
*/
|
||||||
fixFirefoxAnchorBug : function() {
|
initDomainIndexTable: () => {
|
||||||
if (document.location.hash && $.browser.mozilla)
|
const toggler = (el) => {
|
||||||
window.setTimeout(function() {
|
const idNumber = el.id.substr(7);
|
||||||
document.location.href += '';
|
const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`);
|
||||||
}, 10);
|
if (el.src.substr(-9) === "minus.png") {
|
||||||
},
|
el.src = `${el.src.substr(0, el.src.length - 9)}plus.png`;
|
||||||
|
toggledRows.forEach((el) => (el.style.display = "none"));
|
||||||
/**
|
} else {
|
||||||
* highlight the search words provided in the url in the text
|
el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`;
|
||||||
*/
|
toggledRows.forEach((el) => (el.style.display = ""));
|
||||||
highlightSearchWords : function() {
|
|
||||||
var params = $.getQueryParameters();
|
|
||||||
var terms = (params.highlight) ? params.highlight[0].split(/\s+/) : [];
|
|
||||||
if (terms.length) {
|
|
||||||
var body = $('div.body');
|
|
||||||
if (!body.length) {
|
|
||||||
body = $('body');
|
|
||||||
}
|
}
|
||||||
window.setTimeout(function() {
|
};
|
||||||
$.each(terms, function() {
|
|
||||||
body.highlightText(this.toLowerCase(), 'highlighted');
|
const togglerElements = document.querySelectorAll("img.toggler");
|
||||||
});
|
togglerElements.forEach((el) =>
|
||||||
}, 10);
|
el.addEventListener("click", (event) => toggler(event.currentTarget))
|
||||||
$('<p class="highlight-link"><a href="javascript:Documentation.' +
|
);
|
||||||
'hideSearchWords()">' + _('Hide Search Matches') + '</a></p>')
|
togglerElements.forEach((el) => (el.style.display = ""));
|
||||||
.appendTo($('#searchbox'));
|
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
initOnKeyListeners: () => {
|
||||||
* init the domain index toggle buttons
|
// only install a listener if it is really needed
|
||||||
*/
|
if (
|
||||||
initIndexTable : function() {
|
!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS &&
|
||||||
var togglers = $('img.toggler').click(function() {
|
!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS
|
||||||
var src = $(this).attr('src');
|
)
|
||||||
var idnum = $(this).attr('id').substr(7);
|
return;
|
||||||
$('tr.cg-' + idnum).toggle();
|
|
||||||
if (src.substr(-9) === 'minus.png')
|
|
||||||
$(this).attr('src', src.substr(0, src.length-9) + 'plus.png');
|
|
||||||
else
|
|
||||||
$(this).attr('src', src.substr(0, src.length-8) + 'minus.png');
|
|
||||||
}).css('display', '');
|
|
||||||
if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) {
|
|
||||||
togglers.click();
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
document.addEventListener("keydown", (event) => {
|
||||||
* helper function to hide the search marks again
|
// bail for input elements
|
||||||
*/
|
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||||
hideSearchWords : function() {
|
// bail with special keys
|
||||||
$('#searchbox .highlight-link').fadeOut(300);
|
if (event.altKey || event.ctrlKey || event.metaKey) return;
|
||||||
$('span.highlighted').removeClass('highlighted');
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
if (!event.shiftKey) {
|
||||||
* make the url absolute
|
switch (event.key) {
|
||||||
*/
|
case "ArrowLeft":
|
||||||
makeURL : function(relativeURL) {
|
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||||
return DOCUMENTATION_OPTIONS.URL_ROOT + '/' + relativeURL;
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
const prevLink = document.querySelector('link[rel="prev"]');
|
||||||
* get the current relative url
|
if (prevLink && prevLink.href) {
|
||||||
*/
|
window.location.href = prevLink.href;
|
||||||
getCurrentURL : function() {
|
event.preventDefault();
|
||||||
var path = document.location.pathname;
|
|
||||||
var parts = path.split(/\//);
|
|
||||||
$.each(DOCUMENTATION_OPTIONS.URL_ROOT.split(/\//), function() {
|
|
||||||
if (this === '..')
|
|
||||||
parts.pop();
|
|
||||||
});
|
|
||||||
var url = parts.join('/');
|
|
||||||
return path.substring(url.lastIndexOf('/') + 1, path.length - 1);
|
|
||||||
},
|
|
||||||
|
|
||||||
initOnKeyListeners: function() {
|
|
||||||
$(document).keydown(function(event) {
|
|
||||||
var activeElementType = document.activeElement.tagName;
|
|
||||||
// don't navigate when in search box, textarea, dropdown or button
|
|
||||||
if (activeElementType !== 'TEXTAREA' && activeElementType !== 'INPUT' && activeElementType !== 'SELECT'
|
|
||||||
&& activeElementType !== 'BUTTON' && !event.altKey && !event.ctrlKey && !event.metaKey
|
|
||||||
&& !event.shiftKey) {
|
|
||||||
switch (event.keyCode) {
|
|
||||||
case 37: // left
|
|
||||||
var prevHref = $('link[rel="prev"]').prop('href');
|
|
||||||
if (prevHref) {
|
|
||||||
window.location.href = prevHref;
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
case 39: // right
|
break;
|
||||||
var nextHref = $('link[rel="next"]').prop('href');
|
case "ArrowRight":
|
||||||
if (nextHref) {
|
if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break;
|
||||||
window.location.href = nextHref;
|
|
||||||
return false;
|
const nextLink = document.querySelector('link[rel="next"]');
|
||||||
|
if (nextLink && nextLink.href) {
|
||||||
|
window.location.href = nextLink.href;
|
||||||
|
event.preventDefault();
|
||||||
}
|
}
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// some keyboard layouts may need Shift to get /
|
||||||
|
switch (event.key) {
|
||||||
|
case "/":
|
||||||
|
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) break;
|
||||||
|
Documentation.focusSearchBar();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
// quick alias for translations
|
// quick alias for translations
|
||||||
_ = Documentation.gettext;
|
const _ = Documentation.gettext;
|
||||||
|
|
||||||
$(document).ready(function() {
|
_ready(Documentation.init);
|
||||||
Documentation.init();
|
|
||||||
});
|
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
var DOCUMENTATION_OPTIONS = {
|
var DOCUMENTATION_OPTIONS = {
|
||||||
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
|
||||||
VERSION: '0.3.9 beta',
|
VERSION: '0.4.2 beta',
|
||||||
LANGUAGE: 'None',
|
LANGUAGE: 'en',
|
||||||
COLLAPSE_INDEX: false,
|
COLLAPSE_INDEX: false,
|
||||||
BUILDER: 'html',
|
BUILDER: 'html',
|
||||||
FILE_SUFFIX: '.html',
|
FILE_SUFFIX: '.html',
|
||||||
LINK_SUFFIX: '.html',
|
LINK_SUFFIX: '.html',
|
||||||
HAS_SOURCE: true,
|
HAS_SOURCE: true,
|
||||||
SOURCELINK_SUFFIX: '.txt',
|
SOURCELINK_SUFFIX: '.txt',
|
||||||
NAVIGATION_WITH_KEYS: false
|
NAVIGATION_WITH_KEYS: false,
|
||||||
|
SHOW_SEARCH_SUMMARY: true,
|
||||||
|
ENABLE_SEARCH_SHORTCUTS: true,
|
||||||
};
|
};
|
||||||
@@ -1,15 +1,15 @@
|
|||||||
/*!
|
/*!
|
||||||
* jQuery JavaScript Library v3.5.1
|
* jQuery JavaScript Library v3.6.0
|
||||||
* https://jquery.com/
|
* https://jquery.com/
|
||||||
*
|
*
|
||||||
* Includes Sizzle.js
|
* Includes Sizzle.js
|
||||||
* https://sizzlejs.com/
|
* https://sizzlejs.com/
|
||||||
*
|
*
|
||||||
* Copyright JS Foundation and other contributors
|
* Copyright OpenJS Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://jquery.org/license
|
* https://jquery.org/license
|
||||||
*
|
*
|
||||||
* Date: 2020-05-04T22:49Z
|
* Date: 2021-03-02T17:08Z
|
||||||
*/
|
*/
|
||||||
( function( global, factory ) {
|
( function( global, factory ) {
|
||||||
|
|
||||||
@@ -76,12 +76,16 @@ var support = {};
|
|||||||
|
|
||||||
var isFunction = function isFunction( obj ) {
|
var isFunction = function isFunction( obj ) {
|
||||||
|
|
||||||
// Support: Chrome <=57, Firefox <=52
|
// Support: Chrome <=57, Firefox <=52
|
||||||
// In some browsers, typeof returns "function" for HTML <object> elements
|
// In some browsers, typeof returns "function" for HTML <object> elements
|
||||||
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
// (i.e., `typeof document.createElement( "object" ) === "function"`).
|
||||||
// We don't want to classify *any* DOM node as a function.
|
// We don't want to classify *any* DOM node as a function.
|
||||||
return typeof obj === "function" && typeof obj.nodeType !== "number";
|
// Support: QtWeb <=3.8.5, WebKit <=534.34, wkhtmltopdf tool <=0.12.5
|
||||||
};
|
// Plus for old WebKit, typeof returns "function" for HTML collections
|
||||||
|
// (e.g., `typeof document.getElementsByTagName("div") === "function"`). (gh-4756)
|
||||||
|
return typeof obj === "function" && typeof obj.nodeType !== "number" &&
|
||||||
|
typeof obj.item !== "function";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
var isWindow = function isWindow( obj ) {
|
var isWindow = function isWindow( obj ) {
|
||||||
@@ -147,7 +151,7 @@ function toType( obj ) {
|
|||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
version = "3.5.1",
|
version = "3.6.0",
|
||||||
|
|
||||||
// Define a local copy of jQuery
|
// Define a local copy of jQuery
|
||||||
jQuery = function( selector, context ) {
|
jQuery = function( selector, context ) {
|
||||||
@@ -401,7 +405,7 @@ jQuery.extend( {
|
|||||||
if ( isArrayLike( Object( arr ) ) ) {
|
if ( isArrayLike( Object( arr ) ) ) {
|
||||||
jQuery.merge( ret,
|
jQuery.merge( ret,
|
||||||
typeof arr === "string" ?
|
typeof arr === "string" ?
|
||||||
[ arr ] : arr
|
[ arr ] : arr
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
push.call( ret, arr );
|
push.call( ret, arr );
|
||||||
@@ -496,9 +500,9 @@ if ( typeof Symbol === "function" ) {
|
|||||||
|
|
||||||
// Populate the class2type map
|
// Populate the class2type map
|
||||||
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
|
||||||
function( _i, name ) {
|
function( _i, name ) {
|
||||||
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
class2type[ "[object " + name + "]" ] = name.toLowerCase();
|
||||||
} );
|
} );
|
||||||
|
|
||||||
function isArrayLike( obj ) {
|
function isArrayLike( obj ) {
|
||||||
|
|
||||||
@@ -518,14 +522,14 @@ function isArrayLike( obj ) {
|
|||||||
}
|
}
|
||||||
var Sizzle =
|
var Sizzle =
|
||||||
/*!
|
/*!
|
||||||
* Sizzle CSS Selector Engine v2.3.5
|
* Sizzle CSS Selector Engine v2.3.6
|
||||||
* https://sizzlejs.com/
|
* https://sizzlejs.com/
|
||||||
*
|
*
|
||||||
* Copyright JS Foundation and other contributors
|
* Copyright JS Foundation and other contributors
|
||||||
* Released under the MIT license
|
* Released under the MIT license
|
||||||
* https://js.foundation/
|
* https://js.foundation/
|
||||||
*
|
*
|
||||||
* Date: 2020-03-14
|
* Date: 2021-02-16
|
||||||
*/
|
*/
|
||||||
( function( window ) {
|
( function( window ) {
|
||||||
var i,
|
var i,
|
||||||
@@ -1108,8 +1112,8 @@ support = Sizzle.support = {};
|
|||||||
* @returns {Boolean} True iff elem is a non-HTML XML node
|
* @returns {Boolean} True iff elem is a non-HTML XML node
|
||||||
*/
|
*/
|
||||||
isXML = Sizzle.isXML = function( elem ) {
|
isXML = Sizzle.isXML = function( elem ) {
|
||||||
var namespace = elem.namespaceURI,
|
var namespace = elem && elem.namespaceURI,
|
||||||
docElem = ( elem.ownerDocument || elem ).documentElement;
|
docElem = elem && ( elem.ownerDocument || elem ).documentElement;
|
||||||
|
|
||||||
// Support: IE <=8
|
// Support: IE <=8
|
||||||
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
// Assume HTML when documentElement doesn't yet exist, such as inside loading iframes
|
||||||
@@ -3024,9 +3028,9 @@ var rneedsContext = jQuery.expr.match.needsContext;
|
|||||||
|
|
||||||
function nodeName( elem, name ) {
|
function nodeName( elem, name ) {
|
||||||
|
|
||||||
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
|
||||||
|
|
||||||
};
|
}
|
||||||
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
var rsingleTag = ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i );
|
||||||
|
|
||||||
|
|
||||||
@@ -3997,8 +4001,8 @@ jQuery.extend( {
|
|||||||
resolveContexts = Array( i ),
|
resolveContexts = Array( i ),
|
||||||
resolveValues = slice.call( arguments ),
|
resolveValues = slice.call( arguments ),
|
||||||
|
|
||||||
// the master Deferred
|
// the primary Deferred
|
||||||
master = jQuery.Deferred(),
|
primary = jQuery.Deferred(),
|
||||||
|
|
||||||
// subordinate callback factory
|
// subordinate callback factory
|
||||||
updateFunc = function( i ) {
|
updateFunc = function( i ) {
|
||||||
@@ -4006,30 +4010,30 @@ jQuery.extend( {
|
|||||||
resolveContexts[ i ] = this;
|
resolveContexts[ i ] = this;
|
||||||
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
resolveValues[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
|
||||||
if ( !( --remaining ) ) {
|
if ( !( --remaining ) ) {
|
||||||
master.resolveWith( resolveContexts, resolveValues );
|
primary.resolveWith( resolveContexts, resolveValues );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
// Single- and empty arguments are adopted like Promise.resolve
|
// Single- and empty arguments are adopted like Promise.resolve
|
||||||
if ( remaining <= 1 ) {
|
if ( remaining <= 1 ) {
|
||||||
adoptValue( singleValue, master.done( updateFunc( i ) ).resolve, master.reject,
|
adoptValue( singleValue, primary.done( updateFunc( i ) ).resolve, primary.reject,
|
||||||
!remaining );
|
!remaining );
|
||||||
|
|
||||||
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
// Use .then() to unwrap secondary thenables (cf. gh-3000)
|
||||||
if ( master.state() === "pending" ||
|
if ( primary.state() === "pending" ||
|
||||||
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
isFunction( resolveValues[ i ] && resolveValues[ i ].then ) ) {
|
||||||
|
|
||||||
return master.then();
|
return primary.then();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Multiple arguments are aggregated like Promise.all array elements
|
// Multiple arguments are aggregated like Promise.all array elements
|
||||||
while ( i-- ) {
|
while ( i-- ) {
|
||||||
adoptValue( resolveValues[ i ], updateFunc( i ), master.reject );
|
adoptValue( resolveValues[ i ], updateFunc( i ), primary.reject );
|
||||||
}
|
}
|
||||||
|
|
||||||
return master.promise();
|
return primary.promise();
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
@@ -4180,8 +4184,8 @@ var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
|
|||||||
for ( ; i < len; i++ ) {
|
for ( ; i < len; i++ ) {
|
||||||
fn(
|
fn(
|
||||||
elems[ i ], key, raw ?
|
elems[ i ], key, raw ?
|
||||||
value :
|
value :
|
||||||
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
value.call( elems[ i ], i, fn( elems[ i ], key ) )
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5089,10 +5093,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
var
|
var rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
||||||
rkeyEvent = /^key/,
|
|
||||||
rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
|
|
||||||
rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
|
|
||||||
|
|
||||||
function returnTrue() {
|
function returnTrue() {
|
||||||
return true;
|
return true;
|
||||||
@@ -5387,8 +5388,8 @@ jQuery.event = {
|
|||||||
event = jQuery.event.fix( nativeEvent ),
|
event = jQuery.event.fix( nativeEvent ),
|
||||||
|
|
||||||
handlers = (
|
handlers = (
|
||||||
dataPriv.get( this, "events" ) || Object.create( null )
|
dataPriv.get( this, "events" ) || Object.create( null )
|
||||||
)[ event.type ] || [],
|
)[ event.type ] || [],
|
||||||
special = jQuery.event.special[ event.type ] || {};
|
special = jQuery.event.special[ event.type ] || {};
|
||||||
|
|
||||||
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
// Use the fix-ed jQuery.Event rather than the (read-only) native event
|
||||||
@@ -5512,12 +5513,12 @@ jQuery.event = {
|
|||||||
get: isFunction( hook ) ?
|
get: isFunction( hook ) ?
|
||||||
function() {
|
function() {
|
||||||
if ( this.originalEvent ) {
|
if ( this.originalEvent ) {
|
||||||
return hook( this.originalEvent );
|
return hook( this.originalEvent );
|
||||||
}
|
}
|
||||||
} :
|
} :
|
||||||
function() {
|
function() {
|
||||||
if ( this.originalEvent ) {
|
if ( this.originalEvent ) {
|
||||||
return this.originalEvent[ name ];
|
return this.originalEvent[ name ];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -5656,7 +5657,13 @@ function leverageNative( el, type, expectSync ) {
|
|||||||
// Cancel the outer synthetic event
|
// Cancel the outer synthetic event
|
||||||
event.stopImmediatePropagation();
|
event.stopImmediatePropagation();
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
return result.value;
|
|
||||||
|
// Support: Chrome 86+
|
||||||
|
// In Chrome, if an element having a focusout handler is blurred by
|
||||||
|
// clicking outside of it, it invokes the handler synchronously. If
|
||||||
|
// that handler calls `.remove()` on the element, the data is cleared,
|
||||||
|
// leaving `result` undefined. We need to guard against this.
|
||||||
|
return result && result.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If this is an inner synthetic event for an event with a bubbling surrogate
|
// If this is an inner synthetic event for an event with a bubbling surrogate
|
||||||
@@ -5821,34 +5828,7 @@ jQuery.each( {
|
|||||||
targetTouches: true,
|
targetTouches: true,
|
||||||
toElement: true,
|
toElement: true,
|
||||||
touches: true,
|
touches: true,
|
||||||
|
which: true
|
||||||
which: function( event ) {
|
|
||||||
var button = event.button;
|
|
||||||
|
|
||||||
// Add which for key events
|
|
||||||
if ( event.which == null && rkeyEvent.test( event.type ) ) {
|
|
||||||
return event.charCode != null ? event.charCode : event.keyCode;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Add which for click: 1 === left; 2 === middle; 3 === right
|
|
||||||
if ( !event.which && button !== undefined && rmouseEvent.test( event.type ) ) {
|
|
||||||
if ( button & 1 ) {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( button & 2 ) {
|
|
||||||
return 3;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( button & 4 ) {
|
|
||||||
return 2;
|
|
||||||
}
|
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
return event.which;
|
|
||||||
}
|
|
||||||
}, jQuery.event.addProp );
|
}, jQuery.event.addProp );
|
||||||
|
|
||||||
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateType ) {
|
||||||
@@ -5874,6 +5854,12 @@ jQuery.each( { focus: "focusin", blur: "focusout" }, function( type, delegateTyp
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
// Suppress native focus or blur as it's already being fired
|
||||||
|
// in leverageNative.
|
||||||
|
_default: function() {
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
delegateType: delegateType
|
delegateType: delegateType
|
||||||
};
|
};
|
||||||
} );
|
} );
|
||||||
@@ -6541,6 +6527,10 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||||||
// set in CSS while `offset*` properties report correct values.
|
// set in CSS while `offset*` properties report correct values.
|
||||||
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
// Behavior in IE 9 is more subtle than in newer versions & it passes
|
||||||
// some versions of this test; make sure not to make it pass there!
|
// some versions of this test; make sure not to make it pass there!
|
||||||
|
//
|
||||||
|
// Support: Firefox 70+
|
||||||
|
// Only Firefox includes border widths
|
||||||
|
// in computed dimensions. (gh-4529)
|
||||||
reliableTrDimensions: function() {
|
reliableTrDimensions: function() {
|
||||||
var table, tr, trChild, trStyle;
|
var table, tr, trChild, trStyle;
|
||||||
if ( reliableTrDimensionsVal == null ) {
|
if ( reliableTrDimensionsVal == null ) {
|
||||||
@@ -6548,17 +6538,32 @@ var rboxStyle = new RegExp( cssExpand.join( "|" ), "i" );
|
|||||||
tr = document.createElement( "tr" );
|
tr = document.createElement( "tr" );
|
||||||
trChild = document.createElement( "div" );
|
trChild = document.createElement( "div" );
|
||||||
|
|
||||||
table.style.cssText = "position:absolute;left:-11111px";
|
table.style.cssText = "position:absolute;left:-11111px;border-collapse:separate";
|
||||||
|
tr.style.cssText = "border:1px solid";
|
||||||
|
|
||||||
|
// Support: Chrome 86+
|
||||||
|
// Height set through cssText does not get applied.
|
||||||
|
// Computed height then comes back as 0.
|
||||||
tr.style.height = "1px";
|
tr.style.height = "1px";
|
||||||
trChild.style.height = "9px";
|
trChild.style.height = "9px";
|
||||||
|
|
||||||
|
// Support: Android 8 Chrome 86+
|
||||||
|
// In our bodyBackground.html iframe,
|
||||||
|
// display for all div elements is set to "inline",
|
||||||
|
// which causes a problem only in Android 8 Chrome 86.
|
||||||
|
// Ensuring the div is display: block
|
||||||
|
// gets around this issue.
|
||||||
|
trChild.style.display = "block";
|
||||||
|
|
||||||
documentElement
|
documentElement
|
||||||
.appendChild( table )
|
.appendChild( table )
|
||||||
.appendChild( tr )
|
.appendChild( tr )
|
||||||
.appendChild( trChild );
|
.appendChild( trChild );
|
||||||
|
|
||||||
trStyle = window.getComputedStyle( tr );
|
trStyle = window.getComputedStyle( tr );
|
||||||
reliableTrDimensionsVal = parseInt( trStyle.height ) > 3;
|
reliableTrDimensionsVal = ( parseInt( trStyle.height, 10 ) +
|
||||||
|
parseInt( trStyle.borderTopWidth, 10 ) +
|
||||||
|
parseInt( trStyle.borderBottomWidth, 10 ) ) === tr.offsetHeight;
|
||||||
|
|
||||||
documentElement.removeChild( table );
|
documentElement.removeChild( table );
|
||||||
}
|
}
|
||||||
@@ -7022,10 +7027,10 @@ jQuery.each( [ "height", "width" ], function( _i, dimension ) {
|
|||||||
// Running getBoundingClientRect on a disconnected node
|
// Running getBoundingClientRect on a disconnected node
|
||||||
// in IE throws an error.
|
// in IE throws an error.
|
||||||
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
( !elem.getClientRects().length || !elem.getBoundingClientRect().width ) ?
|
||||||
swap( elem, cssShow, function() {
|
swap( elem, cssShow, function() {
|
||||||
return getWidthOrHeight( elem, dimension, extra );
|
return getWidthOrHeight( elem, dimension, extra );
|
||||||
} ) :
|
} ) :
|
||||||
getWidthOrHeight( elem, dimension, extra );
|
getWidthOrHeight( elem, dimension, extra );
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -7084,7 +7089,7 @@ jQuery.cssHooks.marginLeft = addGetHookIf( support.reliableMarginLeft,
|
|||||||
swap( elem, { marginLeft: 0 }, function() {
|
swap( elem, { marginLeft: 0 }, function() {
|
||||||
return elem.getBoundingClientRect().left;
|
return elem.getBoundingClientRect().left;
|
||||||
} )
|
} )
|
||||||
) + "px";
|
) + "px";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
@@ -7223,7 +7228,7 @@ Tween.propHooks = {
|
|||||||
if ( jQuery.fx.step[ tween.prop ] ) {
|
if ( jQuery.fx.step[ tween.prop ] ) {
|
||||||
jQuery.fx.step[ tween.prop ]( tween );
|
jQuery.fx.step[ tween.prop ]( tween );
|
||||||
} else if ( tween.elem.nodeType === 1 && (
|
} else if ( tween.elem.nodeType === 1 && (
|
||||||
jQuery.cssHooks[ tween.prop ] ||
|
jQuery.cssHooks[ tween.prop ] ||
|
||||||
tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
tween.elem.style[ finalPropName( tween.prop ) ] != null ) ) {
|
||||||
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
jQuery.style( tween.elem, tween.prop, tween.now + tween.unit );
|
||||||
} else {
|
} else {
|
||||||
@@ -7468,7 +7473,7 @@ function defaultPrefilter( elem, props, opts ) {
|
|||||||
|
|
||||||
anim.done( function() {
|
anim.done( function() {
|
||||||
|
|
||||||
/* eslint-enable no-loop-func */
|
/* eslint-enable no-loop-func */
|
||||||
|
|
||||||
// The final step of a "hide" animation is actually hiding the element
|
// The final step of a "hide" animation is actually hiding the element
|
||||||
if ( !hidden ) {
|
if ( !hidden ) {
|
||||||
@@ -7588,7 +7593,7 @@ function Animation( elem, properties, options ) {
|
|||||||
tweens: [],
|
tweens: [],
|
||||||
createTween: function( prop, end ) {
|
createTween: function( prop, end ) {
|
||||||
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
var tween = jQuery.Tween( elem, animation.opts, prop, end,
|
||||||
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
animation.opts.specialEasing[ prop ] || animation.opts.easing );
|
||||||
animation.tweens.push( tween );
|
animation.tweens.push( tween );
|
||||||
return tween;
|
return tween;
|
||||||
},
|
},
|
||||||
@@ -7761,7 +7766,8 @@ jQuery.fn.extend( {
|
|||||||
anim.stop( true );
|
anim.stop( true );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
doAnimation.finish = doAnimation;
|
|
||||||
|
doAnimation.finish = doAnimation;
|
||||||
|
|
||||||
return empty || optall.queue === false ?
|
return empty || optall.queue === false ?
|
||||||
this.each( doAnimation ) :
|
this.each( doAnimation ) :
|
||||||
@@ -8401,8 +8407,8 @@ jQuery.fn.extend( {
|
|||||||
if ( this.setAttribute ) {
|
if ( this.setAttribute ) {
|
||||||
this.setAttribute( "class",
|
this.setAttribute( "class",
|
||||||
className || value === false ?
|
className || value === false ?
|
||||||
"" :
|
"" :
|
||||||
dataPriv.get( this, "__className__" ) || ""
|
dataPriv.get( this, "__className__" ) || ""
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -8417,7 +8423,7 @@ jQuery.fn.extend( {
|
|||||||
while ( ( elem = this[ i++ ] ) ) {
|
while ( ( elem = this[ i++ ] ) ) {
|
||||||
if ( elem.nodeType === 1 &&
|
if ( elem.nodeType === 1 &&
|
||||||
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
( " " + stripAndCollapse( getClass( elem ) ) + " " ).indexOf( className ) > -1 ) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -8707,9 +8713,7 @@ jQuery.extend( jQuery.event, {
|
|||||||
special.bindType || type;
|
special.bindType || type;
|
||||||
|
|
||||||
// jQuery handler
|
// jQuery handler
|
||||||
handle = (
|
handle = ( dataPriv.get( cur, "events" ) || Object.create( null ) )[ event.type ] &&
|
||||||
dataPriv.get( cur, "events" ) || Object.create( null )
|
|
||||||
)[ event.type ] &&
|
|
||||||
dataPriv.get( cur, "handle" );
|
dataPriv.get( cur, "handle" );
|
||||||
if ( handle ) {
|
if ( handle ) {
|
||||||
handle.apply( cur, data );
|
handle.apply( cur, data );
|
||||||
@@ -8856,7 +8860,7 @@ var rquery = ( /\?/ );
|
|||||||
|
|
||||||
// Cross-browser xml parsing
|
// Cross-browser xml parsing
|
||||||
jQuery.parseXML = function( data ) {
|
jQuery.parseXML = function( data ) {
|
||||||
var xml;
|
var xml, parserErrorElem;
|
||||||
if ( !data || typeof data !== "string" ) {
|
if ( !data || typeof data !== "string" ) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -8865,12 +8869,17 @@ jQuery.parseXML = function( data ) {
|
|||||||
// IE throws on parseFromString with invalid input.
|
// IE throws on parseFromString with invalid input.
|
||||||
try {
|
try {
|
||||||
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" );
|
||||||
} catch ( e ) {
|
} catch ( e ) {}
|
||||||
xml = undefined;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) {
|
parserErrorElem = xml && xml.getElementsByTagName( "parsererror" )[ 0 ];
|
||||||
jQuery.error( "Invalid XML: " + data );
|
if ( !xml || parserErrorElem ) {
|
||||||
|
jQuery.error( "Invalid XML: " + (
|
||||||
|
parserErrorElem ?
|
||||||
|
jQuery.map( parserErrorElem.childNodes, function( el ) {
|
||||||
|
return el.textContent;
|
||||||
|
} ).join( "\n" ) :
|
||||||
|
data
|
||||||
|
) );
|
||||||
}
|
}
|
||||||
return xml;
|
return xml;
|
||||||
};
|
};
|
||||||
@@ -8971,16 +8980,14 @@ jQuery.fn.extend( {
|
|||||||
// Can add propHook for "elements" to filter or add form elements
|
// Can add propHook for "elements" to filter or add form elements
|
||||||
var elements = jQuery.prop( this, "elements" );
|
var elements = jQuery.prop( this, "elements" );
|
||||||
return elements ? jQuery.makeArray( elements ) : this;
|
return elements ? jQuery.makeArray( elements ) : this;
|
||||||
} )
|
} ).filter( function() {
|
||||||
.filter( function() {
|
|
||||||
var type = this.type;
|
var type = this.type;
|
||||||
|
|
||||||
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
// Use .is( ":disabled" ) so that fieldset[disabled] works
|
||||||
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
return this.name && !jQuery( this ).is( ":disabled" ) &&
|
||||||
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
rsubmittable.test( this.nodeName ) && !rsubmitterTypes.test( type ) &&
|
||||||
( this.checked || !rcheckableType.test( type ) );
|
( this.checked || !rcheckableType.test( type ) );
|
||||||
} )
|
} ).map( function( _i, elem ) {
|
||||||
.map( function( _i, elem ) {
|
|
||||||
var val = jQuery( this ).val();
|
var val = jQuery( this ).val();
|
||||||
|
|
||||||
if ( val == null ) {
|
if ( val == null ) {
|
||||||
@@ -9033,7 +9040,8 @@ var
|
|||||||
|
|
||||||
// Anchor tag for parsing the document origin
|
// Anchor tag for parsing the document origin
|
||||||
originAnchor = document.createElement( "a" );
|
originAnchor = document.createElement( "a" );
|
||||||
originAnchor.href = location.href;
|
|
||||||
|
originAnchor.href = location.href;
|
||||||
|
|
||||||
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
// Base "constructor" for jQuery.ajaxPrefilter and jQuery.ajaxTransport
|
||||||
function addToPrefiltersOrTransports( structure ) {
|
function addToPrefiltersOrTransports( structure ) {
|
||||||
@@ -9414,8 +9422,8 @@ jQuery.extend( {
|
|||||||
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
// Context for global events is callbackContext if it is a DOM node or jQuery collection
|
||||||
globalEventContext = s.context &&
|
globalEventContext = s.context &&
|
||||||
( callbackContext.nodeType || callbackContext.jquery ) ?
|
( callbackContext.nodeType || callbackContext.jquery ) ?
|
||||||
jQuery( callbackContext ) :
|
jQuery( callbackContext ) :
|
||||||
jQuery.event,
|
jQuery.event,
|
||||||
|
|
||||||
// Deferreds
|
// Deferreds
|
||||||
deferred = jQuery.Deferred(),
|
deferred = jQuery.Deferred(),
|
||||||
@@ -9727,8 +9735,10 @@ jQuery.extend( {
|
|||||||
response = ajaxHandleResponses( s, jqXHR, responses );
|
response = ajaxHandleResponses( s, jqXHR, responses );
|
||||||
}
|
}
|
||||||
|
|
||||||
// Use a noop converter for missing script
|
// Use a noop converter for missing script but not if jsonp
|
||||||
if ( !isSuccess && jQuery.inArray( "script", s.dataTypes ) > -1 ) {
|
if ( !isSuccess &&
|
||||||
|
jQuery.inArray( "script", s.dataTypes ) > -1 &&
|
||||||
|
jQuery.inArray( "json", s.dataTypes ) < 0 ) {
|
||||||
s.converters[ "text script" ] = function() {};
|
s.converters[ "text script" ] = function() {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -10466,12 +10476,6 @@ jQuery.offset = {
|
|||||||
options.using.call( elem, props );
|
options.using.call( elem, props );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ( typeof props.top === "number" ) {
|
|
||||||
props.top += "px";
|
|
||||||
}
|
|
||||||
if ( typeof props.left === "number" ) {
|
|
||||||
props.left += "px";
|
|
||||||
}
|
|
||||||
curElem.css( props );
|
curElem.css( props );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -10640,8 +10644,11 @@ jQuery.each( [ "top", "left" ], function( _i, prop ) {
|
|||||||
|
|
||||||
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
// Create innerHeight, innerWidth, height, width, outerHeight and outerWidth methods
|
||||||
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
jQuery.each( { Height: "height", Width: "width" }, function( name, type ) {
|
||||||
jQuery.each( { padding: "inner" + name, content: type, "": "outer" + name },
|
jQuery.each( {
|
||||||
function( defaultExtra, funcName ) {
|
padding: "inner" + name,
|
||||||
|
content: type,
|
||||||
|
"": "outer" + name
|
||||||
|
}, function( defaultExtra, funcName ) {
|
||||||
|
|
||||||
// Margin is only for outerHeight, outerWidth
|
// Margin is only for outerHeight, outerWidth
|
||||||
jQuery.fn[ funcName ] = function( margin, value ) {
|
jQuery.fn[ funcName ] = function( margin, value ) {
|
||||||
@@ -10726,7 +10733,8 @@ jQuery.fn.extend( {
|
|||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
|
||||||
jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
jQuery.each(
|
||||||
|
( "blur focus focusin focusout resize scroll click dblclick " +
|
||||||
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " +
|
||||||
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
"change select submit keydown keypress keyup contextmenu" ).split( " " ),
|
||||||
function( _i, name ) {
|
function( _i, name ) {
|
||||||
@@ -10737,7 +10745,8 @@ jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " +
|
|||||||
this.on( name, null, data, fn ) :
|
this.on( name, null, data, fn ) :
|
||||||
this.trigger( name );
|
this.trigger( name );
|
||||||
};
|
};
|
||||||
} );
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,2 +1,2 @@
|
|||||||
/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */
|
/*! jQuery v3.6.0 | (c) OpenJS Foundation and other contributors | jquery.org/license */
|
||||||
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),D=function(e,t){return e===t&&(l=!0),0},j={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-lLine truncated
|
!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType&&"function"!=typeof e.item},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.6.0",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}S.fn=S.prototype={jquery:f,constructor:S,length:0,toArray:function(){return s.call(this)},get:function(e){return null==e?s.call(this):e<0?this[e+this.length]:this[e]},pushStack:function(e){var t=S.merge(this.constructor(),e);return t.prevObject=this,t},each:function(e){return S.each(this,e)},map:function(n){return this.pushStack(S.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(s.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(S.grep(this,function(e,t){return(t+1)%2}))},odd:function(){return this.pushStack(S.grep(this,function(e,t){return t%2}))},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:u,sort:t.sort,splice:t.splice},S.extend=S.fn.extend=function(){var e,t,n,r,i,o,a=arguments[0]||{},s=1,u=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[s]||{},s++),"object"==typeof a||m(a)||(a={}),s===u&&(a=this,s--);s<u;s++)if(null!=(e=arguments[s]))for(t in e)r=e[t],"__proto__"!==t&&a!==r&&(l&&r&&(S.isPlainObject(r)||(i=Array.isArray(r)))?(n=a[t],o=i&&!Array.isArray(n)?[]:i||S.isPlainObject(n)?n:{},i=!1,a[t]=S.extend(l,o,r)):void 0!==r&&(a[t]=r));return a},S.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isPlainObject:function(e){var t,n;return!(!e||"[object Object]"!==o.call(e))&&(!(t=r(e))||"function"==typeof(n=v.call(t,"constructor")&&t.constructor)&&a.call(n)===l)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},globalEval:function(e,t,n){b(e,{nonce:t&&t.nonce},n)},each:function(e,t){var n,r=0;if(p(e)){for(n=e.length;r<n;r++)if(!1===t.call(e[r],r,e[r]))break}else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},makeArray:function(e,t){var n=t||[];return null!=e&&(p(Object(e))?S.merge(n,"string"==typeof e?[e]:e):u.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,o=e.length,a=!n;i<o;i++)!t(e[i],i)!==a&&r.push(e[i]);return r},map:function(e,t,n){var r,i,o=0,a=[];if(p(e))for(r=e.length;o<r;o++)null!=(i=t(e[o],o,n))&&a.push(i);else for(o in e)null!=(i=t(e[o],o,n))&&a.push(i);return g(a)},guid:1,support:y}),"function"==typeof Symbol&&(S.fn[Symbol.iterator]=t[Symbol.iterator]),S.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var d=function(n){var e,d,b,o,i,h,f,g,w,u,l,T,C,a,E,v,s,c,y,S="sizzle"+1*new Date,p=n.document,k=0,r=0,m=ue(),x=ue(),A=ue(),N=ue(),j=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],q=t.pop,L=t.push,H=t.push,O=t.slice,P=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",I="(?:\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",W="\\["+M+"*("+I+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+I+"))|)"+M+"*\\]",F=":("+I+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+W+")*)|.*)\\)|)",B=new RegExp(M+"+","g"),$=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),_=new RegExp("^"+M+"*,"+M+"*"),z=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^Line truncated
|
||||||
@@ -5,12 +5,12 @@
|
|||||||
* This script contains the language-specific data used by searchtools.js,
|
* This script contains the language-specific data used by searchtools.js,
|
||||||
* namely the list of stopwords, stemmer, scorer and splitter.
|
* namely the list of stopwords, stemmer, scorer and splitter.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var stopwords = ["a","and","are","as","at","be","but","by","for","if","in","into","is","it","near","no","not","of","on","or","such","that","the","their","then","there","these","they","this","to","was","will","with"];
|
var stopwords = ["a", "and", "are", "as", "at", "be", "but", "by", "for", "if", "in", "into", "is", "it", "near", "no", "not", "of", "on", "or", "such", "that", "the", "their", "then", "there", "these", "they", "this", "to", "was", "will", "with"];
|
||||||
|
|
||||||
|
|
||||||
/* Non-minified version is copied as a separate JS file, is available */
|
/* Non-minified version is copied as a separate JS file, is available */
|
||||||
@@ -197,101 +197,3 @@ var Stemmer = function() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var splitChars = (function() {
|
|
||||||
var result = {};
|
|
||||||
var singles = [96, 180, 187, 191, 215, 247, 749, 885, 903, 907, 909, 930, 1014, 1648,
|
|
||||||
1748, 1809, 2416, 2473, 2481, 2526, 2601, 2609, 2612, 2615, 2653, 2702,
|
|
||||||
2706, 2729, 2737, 2740, 2857, 2865, 2868, 2910, 2928, 2948, 2961, 2971,
|
|
||||||
2973, 3085, 3089, 3113, 3124, 3213, 3217, 3241, 3252, 3295, 3341, 3345,
|
|
||||||
3369, 3506, 3516, 3633, 3715, 3721, 3736, 3744, 3748, 3750, 3756, 3761,
|
|
||||||
3781, 3912, 4239, 4347, 4681, 4695, 4697, 4745, 4785, 4799, 4801, 4823,
|
|
||||||
4881, 5760, 5901, 5997, 6313, 7405, 8024, 8026, 8028, 8030, 8117, 8125,
|
|
||||||
8133, 8181, 8468, 8485, 8487, 8489, 8494, 8527, 11311, 11359, 11687, 11695,
|
|
||||||
11703, 11711, 11719, 11727, 11735, 12448, 12539, 43010, 43014, 43019, 43587,
|
|
||||||
43696, 43713, 64286, 64297, 64311, 64317, 64319, 64322, 64325, 65141];
|
|
||||||
var i, j, start, end;
|
|
||||||
for (i = 0; i < singles.length; i++) {
|
|
||||||
result[singles[i]] = true;
|
|
||||||
}
|
|
||||||
var ranges = [[0, 47], [58, 64], [91, 94], [123, 169], [171, 177], [182, 184], [706, 709],
|
|
||||||
[722, 735], [741, 747], [751, 879], [888, 889], [894, 901], [1154, 1161],
|
|
||||||
[1318, 1328], [1367, 1368], [1370, 1376], [1416, 1487], [1515, 1519], [1523, 1568],
|
|
||||||
[1611, 1631], [1642, 1645], [1750, 1764], [1767, 1773], [1789, 1790], [1792, 1807],
|
|
||||||
[1840, 1868], [1958, 1968], [1970, 1983], [2027, 2035], [2038, 2041], [2043, 2047],
|
|
||||||
[2070, 2073], [2075, 2083], [2085, 2087], [2089, 2307], [2362, 2364], [2366, 2383],
|
|
||||||
[2385, 2391], [2402, 2405], [2419, 2424], [2432, 2436], [2445, 2446], [2449, 2450],
|
|
||||||
[2483, 2485], [2490, 2492], [2494, 2509], [2511, 2523], [2530, 2533], [2546, 2547],
|
|
||||||
[2554, 2564], [2571, 2574], [2577, 2578], [2618, 2648], [2655, 2661], [2672, 2673],
|
|
||||||
[2677, 2692], [2746, 2748], [2750, 2767], [2769, 2783], [2786, 2789], [2800, 2820],
|
|
||||||
[2829, 2830], [2833, 2834], [2874, 2876], [2878, 2907], [2914, 2917], [2930, 2946],
|
|
||||||
[2955, 2957], [2966, 2968], [2976, 2978], [2981, 2983], [2987, 2989], [3002, 3023],
|
|
||||||
[3025, 3045], [3059, 3076], [3130, 3132], [3134, 3159], [3162, 3167], [3170, 3173],
|
|
||||||
[3184, 3191], [3199, 3204], [3258, 3260], [3262, 3293], [3298, 3301], [3312, 3332],
|
|
||||||
[3386, 3388], [3390, 3423], [3426, 3429], [3446, 3449], [3456, 3460], [3479, 3481],
|
|
||||||
[3518, 3519], [3527, 3584], [3636, 3647], [3655, 3663], [3674, 3712], [3717, 3718],
|
|
||||||
[3723, 3724], [3726, 3731], [3752, 3753], [3764, 3772], [3774, 3775], [3783, 3791],
|
|
||||||
[3802, 3803], [3806, 3839], [3841, 3871], [3892, 3903], [3949, 3975], [3980, 4095],
|
|
||||||
[4139, 4158], [4170, 4175], [4182, 4185], [4190, 4192], [4194, 4196], [4199, 4205],
|
|
||||||
[4209, 4212], [4226, 4237], [4250, 4255], [4294, 4303], [4349, 4351], [4686, 4687],
|
|
||||||
[4702, 4703], [4750, 4751], [4790, 4791], [4806, 4807], [4886, 4887], [4955, 4968],
|
|
||||||
[4989, 4991], [5008, 5023], [5109, 5120], [5741, 5742], [5787, 5791], [5867, 5869],
|
|
||||||
[5873, 5887], [5906, 5919], [5938, 5951], [5970, 5983], [6001, 6015], [6068, 6102],
|
|
||||||
[6104, 6107], [6109, 6111], [6122, 6127], [6138, 6159], [6170, 6175], [6264, 6271],
|
|
||||||
[6315, 6319], [6390, 6399], [6429, 6469], [6510, 6511], [6517, 6527], [6572, 6592],
|
|
||||||
[6600, 6607], [6619, 6655], [6679, 6687], [6741, 6783], [6794, 6799], [6810, 6822],
|
|
||||||
[6824, 6916], [6964, 6980], [6988, 6991], [7002, 7042], [7073, 7085], [7098, 7167],
|
|
||||||
[7204, 7231], [7242, 7244], [7294, 7400], [7410, 7423], [7616, 7679], [7958, 7959],
|
|
||||||
[7966, 7967], [8006, 8007], [8014, 8015], [8062, 8063], [8127, 8129], [8141, 8143],
|
|
||||||
[8148, 8149], [8156, 8159], [8173, 8177], [8189, 8303], [8306, 8307], [8314, 8318],
|
|
||||||
[8330, 8335], [8341, 8449], [8451, 8454], [8456, 8457], [8470, 8472], [8478, 8483],
|
|
||||||
[8506, 8507], [8512, 8516], [8522, 8525], [8586, 9311], [9372, 9449], [9472, 10101],
|
|
||||||
[10132, 11263], [11493, 11498], [11503, 11516], [11518, 11519], [11558, 11567],
|
|
||||||
[11622, 11630], [11632, 11647], [11671, 11679], [11743, 11822], [11824, 12292],
|
|
||||||
[12296, 12320], [12330, 12336], [12342, 12343], [12349, 12352], [12439, 12444],
|
|
||||||
[12544, 12548], [12590, 12592], [12687, 12689], [12694, 12703], [12728, 12783],
|
|
||||||
[12800, 12831], [12842, 12880], [12896, 12927], [12938, 12976], [12992, 13311],
|
|
||||||
[19894, 19967], [40908, 40959], [42125, 42191], [42238, 42239], [42509, 42511],
|
|
||||||
[42540, 42559], [42592, 42593], [42607, 42622], [42648, 42655], [42736, 42774],
|
|
||||||
[42784, 42785], [42889, 42890], [42893, 43002], [43043, 43055], [43062, 43071],
|
|
||||||
[43124, 43137], [43188, 43215], [43226, 43249], [43256, 43258], [43260, 43263],
|
|
||||||
[43302, 43311], [43335, 43359], [43389, 43395], [43443, 43470], [43482, 43519],
|
|
||||||
[43561, 43583], [43596, 43599], [43610, 43615], [43639, 43641], [43643, 43647],
|
|
||||||
[43698, 43700], [43703, 43704], [43710, 43711], [43715, 43738], [43742, 43967],
|
|
||||||
[44003, 44015], [44026, 44031], [55204, 55215], [55239, 55242], [55292, 55295],
|
|
||||||
[57344, 63743], [64046, 64047], [64110, 64111], [64218, 64255], [64263, 64274],
|
|
||||||
[64280, 64284], [64434, 64466], [64830, 64847], [64912, 64913], [64968, 65007],
|
|
||||||
[65020, 65135], [65277, 65295], [65306, 65312], [65339, 65344], [65371, 65381],
|
|
||||||
[65471, 65473], [65480, 65481], [65488, 65489], [65496, 65497]];
|
|
||||||
for (i = 0; i < ranges.length; i++) {
|
|
||||||
start = ranges[i][0];
|
|
||||||
end = ranges[i][1];
|
|
||||||
for (j = start; j <= end; j++) {
|
|
||||||
result[j] = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
})();
|
|
||||||
|
|
||||||
function splitQuery(query) {
|
|
||||||
var result = [];
|
|
||||||
var start = -1;
|
|
||||||
for (var i = 0; i < query.length; i++) {
|
|
||||||
if (splitChars[query.charCodeAt(i)]) {
|
|
||||||
if (start !== -1) {
|
|
||||||
result.push(query.slice(start, i));
|
|
||||||
start = -1;
|
|
||||||
}
|
|
||||||
} else if (start === -1) {
|
|
||||||
start = i;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (start !== -1) {
|
|
||||||
result.push(query.slice(start));
|
|
||||||
}
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1,74 +1,255 @@
|
|||||||
pre { line-height: 125%; }
|
.highlight pre { line-height: 125%; }
|
||||||
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
.highlight td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
.highlight span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
.highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
.highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
.highlight .hll { background-color: #ffffcc }
|
.highlight .hll { background-color: #ffffcc }
|
||||||
.highlight { background: #eeffcc; }
|
.highlight { background: #f8f8f8; }
|
||||||
.highlight .c { color: #408090; font-style: italic } /* Comment */
|
.highlight .c { color: #8f5902; font-style: italic } /* Comment */
|
||||||
.highlight .err { border: 1px solid #FF0000 } /* Error */
|
.highlight .err { color: #a40000; border: 1px solid #ef2929 } /* Error */
|
||||||
.highlight .k { color: #007020; font-weight: bold } /* Keyword */
|
.highlight .g { color: #000000 } /* Generic */
|
||||||
.highlight .o { color: #666666 } /* Operator */
|
.highlight .k { color: #204a87; font-weight: bold } /* Keyword */
|
||||||
.highlight .ch { color: #408090; font-style: italic } /* Comment.Hashbang */
|
.highlight .l { color: #000000 } /* Literal */
|
||||||
.highlight .cm { color: #408090; font-style: italic } /* Comment.Multiline */
|
.highlight .n { color: #000000 } /* Name */
|
||||||
.highlight .cp { color: #007020 } /* Comment.Preproc */
|
.highlight .o { color: #ce5c00; font-weight: bold } /* Operator */
|
||||||
.highlight .cpf { color: #408090; font-style: italic } /* Comment.PreprocFile */
|
.highlight .x { color: #000000 } /* Other */
|
||||||
.highlight .c1 { color: #408090; font-style: italic } /* Comment.Single */
|
.highlight .p { color: #000000; font-weight: bold } /* Punctuation */
|
||||||
.highlight .cs { color: #408090; background-color: #fff0f0 } /* Comment.Special */
|
.highlight .ch { color: #8f5902; font-style: italic } /* Comment.Hashbang */
|
||||||
.highlight .gd { color: #A00000 } /* Generic.Deleted */
|
.highlight .cm { color: #8f5902; font-style: italic } /* Comment.Multiline */
|
||||||
.highlight .ge { font-style: italic } /* Generic.Emph */
|
.highlight .cp { color: #8f5902; font-style: italic } /* Comment.Preproc */
|
||||||
.highlight .gr { color: #FF0000 } /* Generic.Error */
|
.highlight .cpf { color: #8f5902; font-style: italic } /* Comment.PreprocFile */
|
||||||
|
.highlight .c1 { color: #8f5902; font-style: italic } /* Comment.Single */
|
||||||
|
.highlight .cs { color: #8f5902; font-style: italic } /* Comment.Special */
|
||||||
|
.highlight .gd { color: #a40000 } /* Generic.Deleted */
|
||||||
|
.highlight .ge { color: #000000; font-style: italic } /* Generic.Emph */
|
||||||
|
.highlight .gr { color: #ef2929 } /* Generic.Error */
|
||||||
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
|
||||||
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
.highlight .gi { color: #00A000 } /* Generic.Inserted */
|
||||||
.highlight .go { color: #333333 } /* Generic.Output */
|
.highlight .go { color: #000000; font-style: italic } /* Generic.Output */
|
||||||
.highlight .gp { color: #c65d09; font-weight: bold } /* Generic.Prompt */
|
.highlight .gp { color: #8f5902 } /* Generic.Prompt */
|
||||||
.highlight .gs { font-weight: bold } /* Generic.Strong */
|
.highlight .gs { color: #000000; font-weight: bold } /* Generic.Strong */
|
||||||
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
|
||||||
.highlight .gt { color: #0044DD } /* Generic.Traceback */
|
.highlight .gt { color: #a40000; font-weight: bold } /* Generic.Traceback */
|
||||||
.highlight .kc { color: #007020; font-weight: bold } /* Keyword.Constant */
|
.highlight .kc { color: #204a87; font-weight: bold } /* Keyword.Constant */
|
||||||
.highlight .kd { color: #007020; font-weight: bold } /* Keyword.Declaration */
|
.highlight .kd { color: #204a87; font-weight: bold } /* Keyword.Declaration */
|
||||||
.highlight .kn { color: #007020; font-weight: bold } /* Keyword.Namespace */
|
.highlight .kn { color: #204a87; font-weight: bold } /* Keyword.Namespace */
|
||||||
.highlight .kp { color: #007020 } /* Keyword.Pseudo */
|
.highlight .kp { color: #204a87; font-weight: bold } /* Keyword.Pseudo */
|
||||||
.highlight .kr { color: #007020; font-weight: bold } /* Keyword.Reserved */
|
.highlight .kr { color: #204a87; font-weight: bold } /* Keyword.Reserved */
|
||||||
.highlight .kt { color: #902000 } /* Keyword.Type */
|
.highlight .kt { color: #204a87; font-weight: bold } /* Keyword.Type */
|
||||||
.highlight .m { color: #208050 } /* Literal.Number */
|
.highlight .ld { color: #000000 } /* Literal.Date */
|
||||||
.highlight .s { color: #4070a0 } /* Literal.String */
|
.highlight .m { color: #0000cf; font-weight: bold } /* Literal.Number */
|
||||||
.highlight .na { color: #4070a0 } /* Name.Attribute */
|
.highlight .s { color: #4e9a06 } /* Literal.String */
|
||||||
.highlight .nb { color: #007020 } /* Name.Builtin */
|
.highlight .na { color: #c4a000 } /* Name.Attribute */
|
||||||
.highlight .nc { color: #0e84b5; font-weight: bold } /* Name.Class */
|
.highlight .nb { color: #204a87 } /* Name.Builtin */
|
||||||
.highlight .no { color: #60add5 } /* Name.Constant */
|
.highlight .nc { color: #000000 } /* Name.Class */
|
||||||
.highlight .nd { color: #555555; font-weight: bold } /* Name.Decorator */
|
.highlight .no { color: #000000 } /* Name.Constant */
|
||||||
.highlight .ni { color: #d55537; font-weight: bold } /* Name.Entity */
|
.highlight .nd { color: #5c35cc; font-weight: bold } /* Name.Decorator */
|
||||||
.highlight .ne { color: #007020 } /* Name.Exception */
|
.highlight .ni { color: #ce5c00 } /* Name.Entity */
|
||||||
.highlight .nf { color: #06287e } /* Name.Function */
|
.highlight .ne { color: #cc0000; font-weight: bold } /* Name.Exception */
|
||||||
.highlight .nl { color: #002070; font-weight: bold } /* Name.Label */
|
.highlight .nf { color: #000000 } /* Name.Function */
|
||||||
.highlight .nn { color: #0e84b5; font-weight: bold } /* Name.Namespace */
|
.highlight .nl { color: #f57900 } /* Name.Label */
|
||||||
.highlight .nt { color: #062873; font-weight: bold } /* Name.Tag */
|
.highlight .nn { color: #000000 } /* Name.Namespace */
|
||||||
.highlight .nv { color: #bb60d5 } /* Name.Variable */
|
.highlight .nx { color: #000000 } /* Name.Other */
|
||||||
.highlight .ow { color: #007020; font-weight: bold } /* Operator.Word */
|
.highlight .py { color: #000000 } /* Name.Property */
|
||||||
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
|
.highlight .nt { color: #204a87; font-weight: bold } /* Name.Tag */
|
||||||
.highlight .mb { color: #208050 } /* Literal.Number.Bin */
|
.highlight .nv { color: #000000 } /* Name.Variable */
|
||||||
.highlight .mf { color: #208050 } /* Literal.Number.Float */
|
.highlight .ow { color: #204a87; font-weight: bold } /* Operator.Word */
|
||||||
.highlight .mh { color: #208050 } /* Literal.Number.Hex */
|
.highlight .pm { color: #000000; font-weight: bold } /* Punctuation.Marker */
|
||||||
.highlight .mi { color: #208050 } /* Literal.Number.Integer */
|
.highlight .w { color: #f8f8f8 } /* Text.Whitespace */
|
||||||
.highlight .mo { color: #208050 } /* Literal.Number.Oct */
|
.highlight .mb { color: #0000cf; font-weight: bold } /* Literal.Number.Bin */
|
||||||
.highlight .sa { color: #4070a0 } /* Literal.String.Affix */
|
.highlight .mf { color: #0000cf; font-weight: bold } /* Literal.Number.Float */
|
||||||
.highlight .sb { color: #4070a0 } /* Literal.String.Backtick */
|
.highlight .mh { color: #0000cf; font-weight: bold } /* Literal.Number.Hex */
|
||||||
.highlight .sc { color: #4070a0 } /* Literal.String.Char */
|
.highlight .mi { color: #0000cf; font-weight: bold } /* Literal.Number.Integer */
|
||||||
.highlight .dl { color: #4070a0 } /* Literal.String.Delimiter */
|
.highlight .mo { color: #0000cf; font-weight: bold } /* Literal.Number.Oct */
|
||||||
.highlight .sd { color: #4070a0; font-style: italic } /* Literal.String.Doc */
|
.highlight .sa { color: #4e9a06 } /* Literal.String.Affix */
|
||||||
.highlight .s2 { color: #4070a0 } /* Literal.String.Double */
|
.highlight .sb { color: #4e9a06 } /* Literal.String.Backtick */
|
||||||
.highlight .se { color: #4070a0; font-weight: bold } /* Literal.String.Escape */
|
.highlight .sc { color: #4e9a06 } /* Literal.String.Char */
|
||||||
.highlight .sh { color: #4070a0 } /* Literal.String.Heredoc */
|
.highlight .dl { color: #4e9a06 } /* Literal.String.Delimiter */
|
||||||
.highlight .si { color: #70a0d0; font-style: italic } /* Literal.String.Interpol */
|
.highlight .sd { color: #8f5902; font-style: italic } /* Literal.String.Doc */
|
||||||
.highlight .sx { color: #c65d09 } /* Literal.String.Other */
|
.highlight .s2 { color: #4e9a06 } /* Literal.String.Double */
|
||||||
.highlight .sr { color: #235388 } /* Literal.String.Regex */
|
.highlight .se { color: #4e9a06 } /* Literal.String.Escape */
|
||||||
.highlight .s1 { color: #4070a0 } /* Literal.String.Single */
|
.highlight .sh { color: #4e9a06 } /* Literal.String.Heredoc */
|
||||||
.highlight .ss { color: #517918 } /* Literal.String.Symbol */
|
.highlight .si { color: #4e9a06 } /* Literal.String.Interpol */
|
||||||
.highlight .bp { color: #007020 } /* Name.Builtin.Pseudo */
|
.highlight .sx { color: #4e9a06 } /* Literal.String.Other */
|
||||||
.highlight .fm { color: #06287e } /* Name.Function.Magic */
|
.highlight .sr { color: #4e9a06 } /* Literal.String.Regex */
|
||||||
.highlight .vc { color: #bb60d5 } /* Name.Variable.Class */
|
.highlight .s1 { color: #4e9a06 } /* Literal.String.Single */
|
||||||
.highlight .vg { color: #bb60d5 } /* Name.Variable.Global */
|
.highlight .ss { color: #4e9a06 } /* Literal.String.Symbol */
|
||||||
.highlight .vi { color: #bb60d5 } /* Name.Variable.Instance */
|
.highlight .bp { color: #3465a4 } /* Name.Builtin.Pseudo */
|
||||||
.highlight .vm { color: #bb60d5 } /* Name.Variable.Magic */
|
.highlight .fm { color: #000000 } /* Name.Function.Magic */
|
||||||
.highlight .il { color: #208050 } /* Literal.Number.Integer.Long */
|
.highlight .vc { color: #000000 } /* Name.Variable.Class */
|
||||||
|
.highlight .vg { color: #000000 } /* Name.Variable.Global */
|
||||||
|
.highlight .vi { color: #000000 } /* Name.Variable.Instance */
|
||||||
|
.highlight .vm { color: #000000 } /* Name.Variable.Magic */
|
||||||
|
.highlight .il { color: #0000cf; font-weight: bold } /* Literal.Number.Integer.Long */
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] .highlight pre { line-height: 125%; }
|
||||||
|
body[data-theme="dark"] .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body[data-theme="dark"] .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body[data-theme="dark"] .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body[data-theme="dark"] .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body[data-theme="dark"] .highlight .hll { background-color: #404040 }
|
||||||
|
body[data-theme="dark"] .highlight { background: #202020; color: #d0d0d0 }
|
||||||
|
body[data-theme="dark"] .highlight .c { color: #ababab; font-style: italic } /* Comment */
|
||||||
|
body[data-theme="dark"] .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||||
|
body[data-theme="dark"] .highlight .esc { color: #d0d0d0 } /* Escape */
|
||||||
|
body[data-theme="dark"] .highlight .g { color: #d0d0d0 } /* Generic */
|
||||||
|
body[data-theme="dark"] .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */
|
||||||
|
body[data-theme="dark"] .highlight .l { color: #d0d0d0 } /* Literal */
|
||||||
|
body[data-theme="dark"] .highlight .n { color: #d0d0d0 } /* Name */
|
||||||
|
body[data-theme="dark"] .highlight .o { color: #d0d0d0 } /* Operator */
|
||||||
|
body[data-theme="dark"] .highlight .x { color: #d0d0d0 } /* Other */
|
||||||
|
body[data-theme="dark"] .highlight .p { color: #d0d0d0 } /* Punctuation */
|
||||||
|
body[data-theme="dark"] .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */
|
||||||
|
body[data-theme="dark"] .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */
|
||||||
|
body[data-theme="dark"] .highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
|
||||||
|
body[data-theme="dark"] .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */
|
||||||
|
body[data-theme="dark"] .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */
|
||||||
|
body[data-theme="dark"] .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
|
||||||
|
body[data-theme="dark"] .highlight .gd { color: #d22323 } /* Generic.Deleted */
|
||||||
|
body[data-theme="dark"] .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
|
||||||
|
body[data-theme="dark"] .highlight .gr { color: #d22323 } /* Generic.Error */
|
||||||
|
body[data-theme="dark"] .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
|
||||||
|
body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */
|
||||||
|
body[data-theme="dark"] .highlight .go { color: #cccccc } /* Generic.Output */
|
||||||
|
body[data-theme="dark"] .highlight .gp { color: #aaaaaa } /* Generic.Prompt */
|
||||||
|
body[data-theme="dark"] .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
|
||||||
|
body[data-theme="dark"] .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
|
||||||
|
body[data-theme="dark"] .highlight .gt { color: #d22323 } /* Generic.Traceback */
|
||||||
|
body[data-theme="dark"] .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */
|
||||||
|
body[data-theme="dark"] .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */
|
||||||
|
body[data-theme="dark"] .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */
|
||||||
|
body[data-theme="dark"] .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */
|
||||||
|
body[data-theme="dark"] .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */
|
||||||
|
body[data-theme="dark"] .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */
|
||||||
|
body[data-theme="dark"] .highlight .ld { color: #d0d0d0 } /* Literal.Date */
|
||||||
|
body[data-theme="dark"] .highlight .m { color: #51b2fd } /* Literal.Number */
|
||||||
|
body[data-theme="dark"] .highlight .s { color: #ed9d13 } /* Literal.String */
|
||||||
|
body[data-theme="dark"] .highlight .na { color: #bbbbbb } /* Name.Attribute */
|
||||||
|
body[data-theme="dark"] .highlight .nb { color: #2fbccd } /* Name.Builtin */
|
||||||
|
body[data-theme="dark"] .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */
|
||||||
|
body[data-theme="dark"] .highlight .no { color: #40ffff } /* Name.Constant */
|
||||||
|
body[data-theme="dark"] .highlight .nd { color: #ffa500 } /* Name.Decorator */
|
||||||
|
body[data-theme="dark"] .highlight .ni { color: #d0d0d0 } /* Name.Entity */
|
||||||
|
body[data-theme="dark"] .highlight .ne { color: #bbbbbb } /* Name.Exception */
|
||||||
|
body[data-theme="dark"] .highlight .nf { color: #71adff } /* Name.Function */
|
||||||
|
body[data-theme="dark"] .highlight .nl { color: #d0d0d0 } /* Name.Label */
|
||||||
|
body[data-theme="dark"] .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */
|
||||||
|
body[data-theme="dark"] .highlight .nx { color: #d0d0d0 } /* Name.Other */
|
||||||
|
body[data-theme="dark"] .highlight .py { color: #d0d0d0 } /* Name.Property */
|
||||||
|
body[data-theme="dark"] .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */
|
||||||
|
body[data-theme="dark"] .highlight .nv { color: #40ffff } /* Name.Variable */
|
||||||
|
body[data-theme="dark"] .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */
|
||||||
|
body[data-theme="dark"] .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */
|
||||||
|
body[data-theme="dark"] .highlight .w { color: #666666 } /* Text.Whitespace */
|
||||||
|
body[data-theme="dark"] .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */
|
||||||
|
body[data-theme="dark"] .highlight .mf { color: #51b2fd } /* Literal.Number.Float */
|
||||||
|
body[data-theme="dark"] .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */
|
||||||
|
body[data-theme="dark"] .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */
|
||||||
|
body[data-theme="dark"] .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */
|
||||||
|
body[data-theme="dark"] .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */
|
||||||
|
body[data-theme="dark"] .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */
|
||||||
|
body[data-theme="dark"] .highlight .sc { color: #ed9d13 } /* Literal.String.Char */
|
||||||
|
body[data-theme="dark"] .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */
|
||||||
|
body[data-theme="dark"] .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */
|
||||||
|
body[data-theme="dark"] .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */
|
||||||
|
body[data-theme="dark"] .highlight .se { color: #ed9d13 } /* Literal.String.Escape */
|
||||||
|
body[data-theme="dark"] .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */
|
||||||
|
body[data-theme="dark"] .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */
|
||||||
|
body[data-theme="dark"] .highlight .sx { color: #ffa500 } /* Literal.String.Other */
|
||||||
|
body[data-theme="dark"] .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */
|
||||||
|
body[data-theme="dark"] .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */
|
||||||
|
body[data-theme="dark"] .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */
|
||||||
|
body[data-theme="dark"] .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */
|
||||||
|
body[data-theme="dark"] .highlight .fm { color: #71adff } /* Name.Function.Magic */
|
||||||
|
body[data-theme="dark"] .highlight .vc { color: #40ffff } /* Name.Variable.Class */
|
||||||
|
body[data-theme="dark"] .highlight .vg { color: #40ffff } /* Name.Variable.Global */
|
||||||
|
body[data-theme="dark"] .highlight .vi { color: #40ffff } /* Name.Variable.Instance */
|
||||||
|
body[data-theme="dark"] .highlight .vm { color: #40ffff } /* Name.Variable.Magic */
|
||||||
|
body[data-theme="dark"] .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) .highlight pre { line-height: 125%; }
|
||||||
|
body:not([data-theme="light"]) .highlight td.linenos .normal { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body:not([data-theme="light"]) .highlight span.linenos { color: #aaaaaa; background-color: transparent; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body:not([data-theme="light"]) .highlight td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body:not([data-theme="light"]) .highlight span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
|
||||||
|
body:not([data-theme="light"]) .highlight .hll { background-color: #404040 }
|
||||||
|
body:not([data-theme="light"]) .highlight { background: #202020; color: #d0d0d0 }
|
||||||
|
body:not([data-theme="light"]) .highlight .c { color: #ababab; font-style: italic } /* Comment */
|
||||||
|
body:not([data-theme="light"]) .highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
|
||||||
|
body:not([data-theme="light"]) .highlight .esc { color: #d0d0d0 } /* Escape */
|
||||||
|
body:not([data-theme="light"]) .highlight .g { color: #d0d0d0 } /* Generic */
|
||||||
|
body:not([data-theme="light"]) .highlight .k { color: #6ebf26; font-weight: bold } /* Keyword */
|
||||||
|
body:not([data-theme="light"]) .highlight .l { color: #d0d0d0 } /* Literal */
|
||||||
|
body:not([data-theme="light"]) .highlight .n { color: #d0d0d0 } /* Name */
|
||||||
|
body:not([data-theme="light"]) .highlight .o { color: #d0d0d0 } /* Operator */
|
||||||
|
body:not([data-theme="light"]) .highlight .x { color: #d0d0d0 } /* Other */
|
||||||
|
body:not([data-theme="light"]) .highlight .p { color: #d0d0d0 } /* Punctuation */
|
||||||
|
body:not([data-theme="light"]) .highlight .ch { color: #ababab; font-style: italic } /* Comment.Hashbang */
|
||||||
|
body:not([data-theme="light"]) .highlight .cm { color: #ababab; font-style: italic } /* Comment.Multiline */
|
||||||
|
body:not([data-theme="light"]) .highlight .cp { color: #cd2828; font-weight: bold } /* Comment.Preproc */
|
||||||
|
body:not([data-theme="light"]) .highlight .cpf { color: #ababab; font-style: italic } /* Comment.PreprocFile */
|
||||||
|
body:not([data-theme="light"]) .highlight .c1 { color: #ababab; font-style: italic } /* Comment.Single */
|
||||||
|
body:not([data-theme="light"]) .highlight .cs { color: #e50808; font-weight: bold; background-color: #520000 } /* Comment.Special */
|
||||||
|
body:not([data-theme="light"]) .highlight .gd { color: #d22323 } /* Generic.Deleted */
|
||||||
|
body:not([data-theme="light"]) .highlight .ge { color: #d0d0d0; font-style: italic } /* Generic.Emph */
|
||||||
|
body:not([data-theme="light"]) .highlight .gr { color: #d22323 } /* Generic.Error */
|
||||||
|
body:not([data-theme="light"]) .highlight .gh { color: #ffffff; font-weight: bold } /* Generic.Heading */
|
||||||
|
body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */
|
||||||
|
body:not([data-theme="light"]) .highlight .go { color: #cccccc } /* Generic.Output */
|
||||||
|
body:not([data-theme="light"]) .highlight .gp { color: #aaaaaa } /* Generic.Prompt */
|
||||||
|
body:not([data-theme="light"]) .highlight .gs { color: #d0d0d0; font-weight: bold } /* Generic.Strong */
|
||||||
|
body:not([data-theme="light"]) .highlight .gu { color: #ffffff; text-decoration: underline } /* Generic.Subheading */
|
||||||
|
body:not([data-theme="light"]) .highlight .gt { color: #d22323 } /* Generic.Traceback */
|
||||||
|
body:not([data-theme="light"]) .highlight .kc { color: #6ebf26; font-weight: bold } /* Keyword.Constant */
|
||||||
|
body:not([data-theme="light"]) .highlight .kd { color: #6ebf26; font-weight: bold } /* Keyword.Declaration */
|
||||||
|
body:not([data-theme="light"]) .highlight .kn { color: #6ebf26; font-weight: bold } /* Keyword.Namespace */
|
||||||
|
body:not([data-theme="light"]) .highlight .kp { color: #6ebf26 } /* Keyword.Pseudo */
|
||||||
|
body:not([data-theme="light"]) .highlight .kr { color: #6ebf26; font-weight: bold } /* Keyword.Reserved */
|
||||||
|
body:not([data-theme="light"]) .highlight .kt { color: #6ebf26; font-weight: bold } /* Keyword.Type */
|
||||||
|
body:not([data-theme="light"]) .highlight .ld { color: #d0d0d0 } /* Literal.Date */
|
||||||
|
body:not([data-theme="light"]) .highlight .m { color: #51b2fd } /* Literal.Number */
|
||||||
|
body:not([data-theme="light"]) .highlight .s { color: #ed9d13 } /* Literal.String */
|
||||||
|
body:not([data-theme="light"]) .highlight .na { color: #bbbbbb } /* Name.Attribute */
|
||||||
|
body:not([data-theme="light"]) .highlight .nb { color: #2fbccd } /* Name.Builtin */
|
||||||
|
body:not([data-theme="light"]) .highlight .nc { color: #71adff; text-decoration: underline } /* Name.Class */
|
||||||
|
body:not([data-theme="light"]) .highlight .no { color: #40ffff } /* Name.Constant */
|
||||||
|
body:not([data-theme="light"]) .highlight .nd { color: #ffa500 } /* Name.Decorator */
|
||||||
|
body:not([data-theme="light"]) .highlight .ni { color: #d0d0d0 } /* Name.Entity */
|
||||||
|
body:not([data-theme="light"]) .highlight .ne { color: #bbbbbb } /* Name.Exception */
|
||||||
|
body:not([data-theme="light"]) .highlight .nf { color: #71adff } /* Name.Function */
|
||||||
|
body:not([data-theme="light"]) .highlight .nl { color: #d0d0d0 } /* Name.Label */
|
||||||
|
body:not([data-theme="light"]) .highlight .nn { color: #71adff; text-decoration: underline } /* Name.Namespace */
|
||||||
|
body:not([data-theme="light"]) .highlight .nx { color: #d0d0d0 } /* Name.Other */
|
||||||
|
body:not([data-theme="light"]) .highlight .py { color: #d0d0d0 } /* Name.Property */
|
||||||
|
body:not([data-theme="light"]) .highlight .nt { color: #6ebf26; font-weight: bold } /* Name.Tag */
|
||||||
|
body:not([data-theme="light"]) .highlight .nv { color: #40ffff } /* Name.Variable */
|
||||||
|
body:not([data-theme="light"]) .highlight .ow { color: #6ebf26; font-weight: bold } /* Operator.Word */
|
||||||
|
body:not([data-theme="light"]) .highlight .pm { color: #d0d0d0 } /* Punctuation.Marker */
|
||||||
|
body:not([data-theme="light"]) .highlight .w { color: #666666 } /* Text.Whitespace */
|
||||||
|
body:not([data-theme="light"]) .highlight .mb { color: #51b2fd } /* Literal.Number.Bin */
|
||||||
|
body:not([data-theme="light"]) .highlight .mf { color: #51b2fd } /* Literal.Number.Float */
|
||||||
|
body:not([data-theme="light"]) .highlight .mh { color: #51b2fd } /* Literal.Number.Hex */
|
||||||
|
body:not([data-theme="light"]) .highlight .mi { color: #51b2fd } /* Literal.Number.Integer */
|
||||||
|
body:not([data-theme="light"]) .highlight .mo { color: #51b2fd } /* Literal.Number.Oct */
|
||||||
|
body:not([data-theme="light"]) .highlight .sa { color: #ed9d13 } /* Literal.String.Affix */
|
||||||
|
body:not([data-theme="light"]) .highlight .sb { color: #ed9d13 } /* Literal.String.Backtick */
|
||||||
|
body:not([data-theme="light"]) .highlight .sc { color: #ed9d13 } /* Literal.String.Char */
|
||||||
|
body:not([data-theme="light"]) .highlight .dl { color: #ed9d13 } /* Literal.String.Delimiter */
|
||||||
|
body:not([data-theme="light"]) .highlight .sd { color: #ed9d13 } /* Literal.String.Doc */
|
||||||
|
body:not([data-theme="light"]) .highlight .s2 { color: #ed9d13 } /* Literal.String.Double */
|
||||||
|
body:not([data-theme="light"]) .highlight .se { color: #ed9d13 } /* Literal.String.Escape */
|
||||||
|
body:not([data-theme="light"]) .highlight .sh { color: #ed9d13 } /* Literal.String.Heredoc */
|
||||||
|
body:not([data-theme="light"]) .highlight .si { color: #ed9d13 } /* Literal.String.Interpol */
|
||||||
|
body:not([data-theme="light"]) .highlight .sx { color: #ffa500 } /* Literal.String.Other */
|
||||||
|
body:not([data-theme="light"]) .highlight .sr { color: #ed9d13 } /* Literal.String.Regex */
|
||||||
|
body:not([data-theme="light"]) .highlight .s1 { color: #ed9d13 } /* Literal.String.Single */
|
||||||
|
body:not([data-theme="light"]) .highlight .ss { color: #ed9d13 } /* Literal.String.Symbol */
|
||||||
|
body:not([data-theme="light"]) .highlight .bp { color: #2fbccd } /* Name.Builtin.Pseudo */
|
||||||
|
body:not([data-theme="light"]) .highlight .fm { color: #71adff } /* Name.Function.Magic */
|
||||||
|
body:not([data-theme="light"]) .highlight .vc { color: #40ffff } /* Name.Variable.Class */
|
||||||
|
body:not([data-theme="light"]) .highlight .vg { color: #40ffff } /* Name.Variable.Global */
|
||||||
|
body:not([data-theme="light"]) .highlight .vi { color: #40ffff } /* Name.Variable.Instance */
|
||||||
|
body:not([data-theme="light"]) .highlight .vm { color: #40ffff } /* Name.Variable.Magic */
|
||||||
|
body:not([data-theme="light"]) .highlight .il { color: #51b2fd } /* Literal.Number.Integer.Long */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
After Width: | Height: | Size: 85 KiB |
@@ -0,0 +1,3 @@
|
|||||||
|
/*! For license information please see furo.js.LICENSE.txt */
|
||||||
|
(()=>{var t={212:function(t,e,n){var o,r;r=void 0!==n.g?n.g:"undefined"!=typeof window?window:this,o=function(){return function(t){"use strict";var e={navClass:"active",contentClass:"active",nested:!1,nestedClass:"active",offset:0,reflow:!1,events:!0},n=function(t,e,n){if(n.settings.events){var o=new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:n});e.dispatchEvent(o)}},o=function(t){var e=0;if(t.offsetParent)for(;t;)e+=t.offsetTop,t=t.offsetParent;return e>=0?e:0},r=function(t){t&&t.sort((function(t,e){return o(t.content)<o(e.content)?-1:1}))},c=function(e,n,o){var r=e.getBoundingClientRect(),c=function(t){return"function"==typeof t.offset?parseFloat(t.offset()):parseFloat(t.offset)}(n);return o?parseInt(r.bottom,10)<(t.innerHeight||document.documentElement.clientHeight):parseInt(r.top,10)<=c},s=function(){return Math.ceil(t.innerHeight+t.pageYOffset)>=Math.max(document.body.scrollHeight,document.documentElement.scrollHeight,document.body.offsetHeight,document.documentElement.offsetHeight,document.body.clientHeight,document.documentElement.clientHeight)},l=function(t,e){var n=t[t.length-1];if(function(t,e){return!(!s()||!c(t.content,e,!0))}(n,e))return n;for(var o=t.length-1;o>=0;o--)if(c(t[o].content,e))return t[o]},a=function(t,e){if(e.nested&&t.parentNode){var n=t.parentNode.closest("li");n&&(n.classList.remove(e.nestedClass),a(n,e))}},i=function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.remove(e.navClass),t.content.classList.remove(e.contentClass),a(o,e),n("gumshoeDeactivate",o,{link:t.nav,content:t.content,settings:e}))}},u=function(t,e){if(e.nested){var n=t.parentNode.closest("li");n&&(n.classList.add(e.nestedClass),u(n,e))}};return function(o,c){var s,a,d,f,m,v={setup:function(){s=document.querySelectorAll(o),a=[],Array.prototype.forEach.call(s,(function(t){var e=document.getElementById(decodeURIComponent(t.hash.substr(1)));e&&a.push({nav:t,content:e})})),r(a)},detect:function(){var t=l(a,m);t?d&&t.content===d.content||(i(d,m),function(t,e){if(t){var o=t.nav.closest("li");o&&(o.classList.add(e.navClass),t.content.classList.add(e.contentClass),u(o,e),n("gumshoeActivate",o,{link:t.nav,content:t.content,settings:e}))}}(t,m),d=t):d&&(i(d,m),d=null)}},h=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame(v.detect)},g=function(e){f&&t.cancelAnimationFrame(f),f=t.requestAnimationFrame((function(){r(a),v.detect()}))};return v.destroy=function(){d&&i(d,m),t.removeEventListener("scroll",h,!1),m.reflow&&t.removeEventListener("resize",g,!1),a=null,s=null,d=null,f=null,m=null},m=function(){var t={};return Array.prototype.forEach.call(arguments,(function(e){for(var n in e){if(!e.hasOwnProperty(n))return;t[n]=e[n]}})),t}(e,c||{}),v.setup(),v.detect(),t.addEventListener("scroll",h,!1),m.reflow&&t.addEventListener("resize",g,!1),v}}(r)}.apply(e,[]),void 0===o||(t.exports=o)}},e={};function n(o){var r=e[o];if(void 0!==r)return r.exports;var c=e[o]={exports:{}};return t[o].call(c.exports,c,c.exports,n),c.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var o in e)n.o(e,o)&&!n.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";var t=n(212),e=n.n(t),o=null,r=null,c=window.pageYOffset||document.documentElement.scrollTop;function s(){const t=localStorage.getItem("theme")||"auto";var e;"light"!==(e=window.matchMedia("(prefers-color-scheme: dark)").matches?"auto"===t?"light":"light"==t?"dark":"auto":"auto"===t?"dark":"dark"==t?"light":"auto")&&"dark"!==e&&"auto"!==e&&(console.error(`Got invalid theme mode: ${e}. Resetting to auto.`),e="auto"),document.body.dataset.theme=e,localStorage.setItem("theme",e),console.log(`Changed to ${e} mode.`)}function l(){!function(){const t=document.getElementsByClassName("theme-toggle");Array.from(t).forEach((t=>{t.addEventListener("click",s)}))}(),function(){let t=0,e=!1;window.addEventListener("scroll",(function(n){t=window.scrollY,e||(window.requestAnimationFrame((function(){var n;n=t,0==Math.floor(r.getBoundingClientRect().top)?r.classList.add("scrolled"):r.classList.remove("scrolled"),function(t){t<64?document.documentElement.classList.remove("show-back-to-top"):t<c?document.documentElement.classList.add("show-back-to-top"):t>c&&document.documentElement.classList.remove("show-back-to-top"),c=t}(n),function(t){null!==o&&(0==t?o.scrollTo(0,0):Math.ceil(t)>=Math.floor(document.documentElement.scrollHeight-window.innerHeight)?o.scrollTo(0,o.scrollHeight):document.querySelector(".scroll-current"))}(n),e=!1})),e=!0)})),window.scroll()}(),null!==o&&new(e())(".toc-tree a",{reflow:!0,recursive:!0,navClass:"scroll-current",offset:()=>{let t=parseFloat(getComputedStyle(document.documentElement).fontSize);return r.getBoundingClientRect().height+.5*t+1}})}document.addEventListener("Line truncated
|
||||||
|
//# sourceMappingURL=furo.js.map
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
/*!
|
||||||
|
* gumshoejs v5.1.2 (patched by @pradyunsg)
|
||||||
|
* A simple, framework-agnostic scrollspy script.
|
||||||
|
* (c) 2019 Chris Ferdinandi
|
||||||
|
* MIT License
|
||||||
|
* http://github.com/cferdinandi/gumshoe
|
||||||
|
*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"scripts/furo.js","mappings":";iCAAA,MAQWA,SAWS,IAAX,EAAAC,EACH,EAAAA,EACkB,oBAAXC,OACPA,OACAC,KAbS,EAAF,WACP,OAaJ,SAAUD,GACR,aAMA,IAAIE,EAAW,CAEbC,SAAU,SACVC,aAAc,SAGdC,QAAQ,EACRC,YAAa,SAGbC,OAAQ,EACRC,QAAQ,EAGRC,QAAQ,GA6BNC,EAAY,SAAUC,EAAMC,EAAMC,GAEpC,GAAKA,EAAOC,SAASL,OAArB,CAGA,IAAIM,EAAQ,IAAIC,YAAYL,EAAM,CAChCM,SAAS,EACTC,YAAY,EACZL,OAAQA,IAIVD,EAAKO,cAAcJ,KAQjBK,EAAe,SAAUR,GAC3B,IAAIS,EAAW,EACf,GAAIT,EAAKU,aACP,KAAOV,GACLS,GAAYT,EAAKW,UACjBX,EAAOA,EAAKU,aAGhB,OAAOD,GAAY,EAAIA,EAAW,GAOhCG,EAAe,SAAUC,GACvBA,GACFA,EAASC,MAAK,SAAUC,EAAOC,GAG7B,OAFcR,EAAaO,EAAME,SACnBT,EAAaQ,EAAMC,UACF,EACxB,MA2CTC,EAAW,SAAUlB,EAAME,EAAUiB,GACvC,IAAIC,EAASpB,EAAKqB,wBACd1B,EAnCU,SAAUO,GAExB,MAA+B,mBAApBA,EAASP,OACX2B,WAAWpB,EAASP,UAItB2B,WAAWpB,EAASP,QA4Bd4B,CAAUrB,GACvB,OAAIiB,EAEAK,SAASJ,EAAOD,OAAQ,KACvB/B,EAAOqC,aAAeC,SAASC,gBAAgBC,cAG7CJ,SAASJ,EAAOS,IAAK,KAAOlC,GAOjCmC,EAAa,WACf,OACEC,KAAKC,KAAK5C,EAAOqC,YAAcrC,EAAO6C,cAnCjCF,KAAKG,IACVR,SAASS,KAAKC,aACdV,SAASC,gBAAgBS,aACzBV,SAASS,KAAKE,aACdX,SAASC,gBAAgBU,aACzBX,SAASS,KAAKP,aACdF,SAASC,gBAAgBC,eAqDzBU,EAAY,SAAUzB,EAAUX,GAClC,IAAIqC,EAAO1B,EAASA,EAAS2B,OAAS,GACtC,GAbgB,SAAUC,EAAMvC,GAChC,SAAI4B,MAAgBZ,EAASuB,EAAKxB,QAASf,GAAU,IAYjDwC,CAAYH,EAAMrC,GAAW,OAAOqC,EACxC,IAAK,IAAII,EAAI9B,EAAS2B,OAAS,EAAGG,GAAK,EAAGA,IACxC,GAAIzB,EAASL,EAAS8B,GAAG1B,QAASf,GAAW,OAAOW,EAAS8B,IAS7DC,EAAmB,SAAUC,EAAK3C,GAEpC,GAAKA,EAAST,QAAWoD,EAAIC,WAA7B,CAGA,IAAIC,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASR,aAG7BkD,EAAiBG,EAAI7C,MAQnBiD,EAAa,SAAUC,EAAOlD,GAEhC,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASX,UAC7B6D,EAAMnC,QAAQgC,UAAUC,OAAOhD,EAASV,cAGxCoD,EAAiBG,EAAI7C,GAGrBJ,EAAU,oBAAqBiD,EAAI,CACjCM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,OASVoD,EAAiB,SAAUT,EAAK3C,GAElC,GAAKA,EAAST,OAAd,CAGA,IAAIsD,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASR,aAG1B4D,EAAeP,EAAI7C,MA8LrB,OA1JkB,SAAUsD,EAAUC,GAKpC,IACIC,EAAU7C,EAAU8C,EAASC,EAAS1D,EADtC2D,EAAa,CAUjBA,MAAmB,WAEjBH,EAAWhC,SAASoC,iBAAiBN,GAGrC3C,EAAW,GAGXkD,MAAMC,UAAUC,QAAQC,KAAKR,GAAU,SAAUjB,GAE/C,IAAIxB,EAAUS,SAASyC,eACrBC,mBAAmB3B,EAAK4B,KAAKC,OAAO,KAEjCrD,GAGLJ,EAAS0D,KAAK,CACZ1B,IAAKJ,EACLxB,QAASA,OAKbL,EAAaC,IAMfgD,OAAoB,WAElB,IAAIW,EAASlC,EAAUzB,EAAUX,GAG5BsE,EASDb,GAAWa,EAAOvD,UAAY0C,EAAQ1C,UAG1CkC,EAAWQ,EAASzD,GAzFT,SAAUkD,EAAOlD,GAE9B,GAAKkD,EAAL,CAGA,IAAIL,EAAKK,EAAMP,IAAIG,QAAQ,MACtBD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASX,UAC1B6D,EAAMnC,QAAQgC,UAAUM,IAAIrD,EAASV,cAGrC8D,EAAeP,EAAI7C,GAGnBJ,EAAU,kBAAmBiD,EAAI,CAC/BM,KAAMD,EAAMP,IACZ5B,QAASmC,EAAMnC,QACff,SAAUA,MAuEVuE,CAASD,EAAQtE,GAGjByD,EAAUa,GAfJb,IACFR,EAAWQ,EAASzD,GACpByD,EAAU,QAoBZe,EAAgB,SAAUvE,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,sBAAsBf,EAAWgB,SAOhDC,EAAgB,SAAU3E,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,uBAAsB,WACrChE,EAAaC,GACbgD,EAAWgB,aAoDf,OA7CAhB,EAAWkB,QAAU,WAEfpB,GACFR,EAAWQ,EAASzD,GAItBd,EAAO4F,oBAAoB,SAAUN,GAAe,GAChDxE,EAASN,QACXR,EAAO4F,oBAAoB,SAAUF,GAAe,GAItDjE,EAAW,KACX6C,EAAW,KACXC,EAAU,KACVC,EAAU,KACV1D,EAAW,MAQXA,EA3XS,WACX,IAAI+E,EAAS,GAOb,OANAlB,MAAMC,UAAUC,QAAQC,KAAKgB,WAAW,SAAUC,GAChD,IAAK,IAAIC,KAAOD,EAAK,CACnB,IAAKA,EAAIE,eAAeD,GAAM,OAC9BH,EAAOG,GAAOD,EAAIC,OAGfH,EAmXMK,CAAOhG,EAAUmE,GAAW,IAGvCI,EAAW0B,QAGX1B,EAAWgB,SAGXzF,EAAOoG,iBAAiB,SAAUd,GAAe,GAC7CxE,EAASN,QACXR,EAAOoG,iBAAiB,SAAUV,GAAe,GAS9CjB,GA7bA4B,CAAQvG,IAChB,QAFM,SAEN,uBCXDwG,EAA2B,GAG/B,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,IAOV,OAHAE,EAAoBL,GAAU1B,KAAK8B,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAGpEK,EAAOD,QCpBfJ,EAAoBO,EAAKF,IACxB,IAAIG,EAASH,GAAUA,EAAOI,WAC7B,IAAOJ,EAAiB,QACxB,IAAM,EAEP,OADAL,EAAoBU,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,GCLRR,EAAoBU,EAAI,CAACN,EAASQ,KACjC,IAAI,IAAInB,KAAOmB,EACXZ,EAAoBa,EAAED,EAAYnB,KAASO,EAAoBa,EAAET,EAASX,IAC5EqB,OAAOC,eAAeX,EAASX,EAAK,CAAEuB,YAAY,EAAMC,IAAKL,EAAWnB,MCJ3EO,EAAoBxG,EAAI,WACvB,GAA0B,iBAAf0H,WAAyB,OAAOA,WAC3C,IACC,OAAOxH,MAAQ,IAAIyH,SAAS,cAAb,GACd,MAAOC,GACR,GAAsB,iBAAX3H,OAAqB,OAAOA,QALjB,GCAxBuG,EAAoBa,EAAI,CAACrB,EAAK6B,IAAUP,OAAOzC,UAAUqB,eAAenB,KAAKiB,EAAK6B,4CCK9EC,EAAY,KACZC,EAAS,KACTC,EAAgB/H,OAAO6C,aAAeP,SAASC,gBAAgByF,UA4EnE,SAASC,IACP,MAAMC,EAAeC,aAAaC,QAAQ,UAAY,OAZxD,IAAkBC,EACH,WADGA,EAaIrI,OAAOsI,WAAW,gCAAgCC,QAI/C,SAAjBL,EACO,QACgB,SAAhBA,EACA,OAEA,OAIU,SAAjBA,EACO,OACgB,QAAhBA,EACA,QAEA,SA9BoB,SAATG,GAA4B,SAATA,IACzCG,QAAQC,MAAM,2BAA2BJ,yBACzCA,EAAO,QAGT/F,SAASS,KAAK2F,QAAQC,MAAQN,EAC9BF,aAAaS,QAAQ,QAASP,GAC9BG,QAAQK,IAAI,cAAcR,WA4E5B,SAASlC,KART,WAEE,MAAM2C,EAAUxG,SAASyG,uBAAuB,gBAChDpE,MAAMqE,KAAKF,GAASjE,SAASoE,IAC3BA,EAAI7C,iBAAiB,QAAS6B,MAKhCiB,GA9CF,WAEE,IAAIC,EAA6B,EAC7BC,GAAU,EAEdpJ,OAAOoG,iBAAiB,UAAU,SAAUuB,GAC1CwB,EAA6BnJ,OAAOqJ,QAE/BD,IACHpJ,OAAOwF,uBAAsB,WAzDnC,IAAuB8D,IA0DDH,EA9GkC,GAAlDxG,KAAK4G,MAAMzB,EAAO7F,wBAAwBQ,KAC5CqF,EAAOjE,UAAUM,IAAI,YAErB2D,EAAOjE,UAAUC,OAAO,YAI5B,SAAmCwF,GAC7BA,EAXmB,GAYrBhH,SAASC,gBAAgBsB,UAAUC,OAAO,oBAEtCwF,EAAYvB,EACdzF,SAASC,gBAAgBsB,UAAUM,IAAI,oBAC9BmF,EAAYvB,GACrBzF,SAASC,gBAAgBsB,UAAUC,OAAO,oBAG9CiE,EAAgBuB,Line truncated
|
||||||
@@ -4,22 +4,24 @@
|
|||||||
*
|
*
|
||||||
* Sphinx JavaScript utilities for the full-text search.
|
* Sphinx JavaScript utilities for the full-text search.
|
||||||
*
|
*
|
||||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
* :copyright: Copyright 2007-2022 by the Sphinx team, see AUTHORS.
|
||||||
* :license: BSD, see LICENSE for details.
|
* :license: BSD, see LICENSE for details.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
"use strict";
|
||||||
|
|
||||||
if (!Scorer) {
|
/**
|
||||||
/**
|
* Simple result scoring code.
|
||||||
* Simple result scoring code.
|
*/
|
||||||
*/
|
if (typeof Scorer === "undefined") {
|
||||||
var Scorer = {
|
var Scorer = {
|
||||||
// Implement the following function to further tweak the score for each result
|
// Implement the following function to further tweak the score for each result
|
||||||
// The function takes a result array [filename, title, anchor, descr, score]
|
// The function takes a result array [docname, title, anchor, descr, score, filename]
|
||||||
// and returns the new score.
|
// and returns the new score.
|
||||||
/*
|
/*
|
||||||
score: function(result) {
|
score: result => {
|
||||||
return result[4];
|
const [docname, title, anchor, descr, score, filename] = result
|
||||||
|
return score
|
||||||
},
|
},
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -28,9 +30,11 @@ if (!Scorer) {
|
|||||||
// or matches in the last dotted part of the object name
|
// or matches in the last dotted part of the object name
|
||||||
objPartialMatch: 6,
|
objPartialMatch: 6,
|
||||||
// Additive scores depending on the priority of the object
|
// Additive scores depending on the priority of the object
|
||||||
objPrio: {0: 15, // used to be importantResults
|
objPrio: {
|
||||||
1: 5, // used to be objectResults
|
0: 15, // used to be importantResults
|
||||||
2: -5}, // used to be unimportantResults
|
1: 5, // used to be objectResults
|
||||||
|
2: -5, // used to be unimportantResults
|
||||||
|
},
|
||||||
// Used when the priority is not in the mapping.
|
// Used when the priority is not in the mapping.
|
||||||
objPrioDefault: 0,
|
objPrioDefault: 0,
|
||||||
|
|
||||||
@@ -39,452 +43,495 @@ if (!Scorer) {
|
|||||||
partialTitle: 7,
|
partialTitle: 7,
|
||||||
// query found in terms
|
// query found in terms
|
||||||
term: 5,
|
term: 5,
|
||||||
partialTerm: 2
|
partialTerm: 2,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!splitQuery) {
|
const _removeChildren = (element) => {
|
||||||
function splitQuery(query) {
|
while (element && element.lastChild) element.removeChild(element.lastChild);
|
||||||
return query.split(/\s+/);
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#escaping
|
||||||
|
*/
|
||||||
|
const _escapeRegExp = (string) =>
|
||||||
|
string.replace(/[.*+\-?^${}()|[\]\\]/g, "\\$&"); // $& means the whole matched string
|
||||||
|
|
||||||
|
const _displayItem = (item, searchTerms) => {
|
||||||
|
const docBuilder = DOCUMENTATION_OPTIONS.BUILDER;
|
||||||
|
const docUrlRoot = DOCUMENTATION_OPTIONS.URL_ROOT;
|
||||||
|
const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
||||||
|
const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
||||||
|
const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY;
|
||||||
|
|
||||||
|
const [docName, title, anchor, descr, score, _filename] = item;
|
||||||
|
|
||||||
|
let listItem = document.createElement("li");
|
||||||
|
let requestUrl;
|
||||||
|
let linkUrl;
|
||||||
|
if (docBuilder === "dirhtml") {
|
||||||
|
// dirhtml builder
|
||||||
|
let dirname = docName + "/";
|
||||||
|
if (dirname.match(/\/index\/$/))
|
||||||
|
dirname = dirname.substring(0, dirname.length - 6);
|
||||||
|
else if (dirname === "index/") dirname = "";
|
||||||
|
requestUrl = docUrlRoot + dirname;
|
||||||
|
linkUrl = requestUrl;
|
||||||
|
} else {
|
||||||
|
// normal html builders
|
||||||
|
requestUrl = docUrlRoot + docName + docFileSuffix;
|
||||||
|
linkUrl = docName + docLinkSuffix;
|
||||||
}
|
}
|
||||||
|
let linkEl = listItem.appendChild(document.createElement("a"));
|
||||||
|
linkEl.href = linkUrl + anchor;
|
||||||
|
linkEl.dataset.score = score;
|
||||||
|
linkEl.innerHTML = title;
|
||||||
|
if (descr)
|
||||||
|
listItem.appendChild(document.createElement("span")).innerHTML =
|
||||||
|
" (" + descr + ")";
|
||||||
|
else if (showSearchSummary)
|
||||||
|
fetch(requestUrl)
|
||||||
|
.then((responseData) => responseData.text())
|
||||||
|
.then((data) => {
|
||||||
|
if (data)
|
||||||
|
listItem.appendChild(
|
||||||
|
Search.makeSearchSummary(data, searchTerms)
|
||||||
|
);
|
||||||
|
});
|
||||||
|
Search.output.appendChild(listItem);
|
||||||
|
};
|
||||||
|
const _finishSearch = (resultCount) => {
|
||||||
|
Search.stopPulse();
|
||||||
|
Search.title.innerText = _("Search Results");
|
||||||
|
if (!resultCount)
|
||||||
|
Search.status.innerText = Documentation.gettext(
|
||||||
|
"Your search did not match any documents. Please make sure that all words are spelled correctly and that you've selected enough categories."
|
||||||
|
);
|
||||||
|
else
|
||||||
|
Search.status.innerText = _(
|
||||||
|
`Search finished, found ${resultCount} page(s) matching the search query.`
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const _displayNextItem = (
|
||||||
|
results,
|
||||||
|
resultCount,
|
||||||
|
searchTerms
|
||||||
|
) => {
|
||||||
|
// results left, load the summary and display it
|
||||||
|
// this is intended to be dynamic (don't sub resultsCount)
|
||||||
|
if (results.length) {
|
||||||
|
_displayItem(results.pop(), searchTerms);
|
||||||
|
setTimeout(
|
||||||
|
() => _displayNextItem(results, resultCount, searchTerms),
|
||||||
|
5
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// search finished, update title and status message
|
||||||
|
else _finishSearch(resultCount);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Default splitQuery function. Can be overridden in ``sphinx.search`` with a
|
||||||
|
* custom function per language.
|
||||||
|
*
|
||||||
|
* The regular expression works by splitting the string on consecutive characters
|
||||||
|
* that are not Unicode letters, numbers, underscores, or emoji characters.
|
||||||
|
* This is the same as ``\W+`` in Python, preserving the surrogate pair area.
|
||||||
|
*/
|
||||||
|
if (typeof splitQuery === "undefined") {
|
||||||
|
var splitQuery = (query) => query
|
||||||
|
.split(/[^\p{Letter}\p{Number}_\p{Emoji_Presentation}]+/gu)
|
||||||
|
.filter(term => term) // remove remaining empty strings
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search Module
|
* Search Module
|
||||||
*/
|
*/
|
||||||
var Search = {
|
const Search = {
|
||||||
|
_index: null,
|
||||||
|
_queued_query: null,
|
||||||
|
_pulse_status: -1,
|
||||||
|
|
||||||
_index : null,
|
htmlToText: (htmlString) => {
|
||||||
_queued_query : null,
|
const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html');
|
||||||
_pulse_status : -1,
|
htmlElement.querySelectorAll(".headerlink").forEach((el) => { el.remove() });
|
||||||
|
const docContent = htmlElement.querySelector('[role="main"]');
|
||||||
htmlToText : function(htmlString) {
|
if (docContent !== undefined) return docContent.textContent;
|
||||||
var virtualDocument = document.implementation.createHTMLDocument('virtual');
|
console.warn(
|
||||||
var htmlElement = $(htmlString, virtualDocument);
|
"Content block not found. Sphinx search tries to obtain it via '[role=main]'. Could you check your theme or template."
|
||||||
htmlElement.find('.headerlink').remove();
|
);
|
||||||
docContent = htmlElement.find('[role=main]')[0];
|
return "";
|
||||||
if(docContent === undefined) {
|
|
||||||
console.warn("Content block not found. Sphinx search tries to obtain it " +
|
|
||||||
"via '[role=main]'. Could you check your theme or template.");
|
|
||||||
return "";
|
|
||||||
}
|
|
||||||
return docContent.textContent || docContent.innerText;
|
|
||||||
},
|
},
|
||||||
|
|
||||||
init : function() {
|
init: () => {
|
||||||
var params = $.getQueryParameters();
|
const query = new URLSearchParams(window.location.search).get("q");
|
||||||
if (params.q) {
|
document
|
||||||
var query = params.q[0];
|
.querySelectorAll('input[name="q"]')
|
||||||
$('input[name="q"]')[0].value = query;
|
.forEach((el) => (el.value = query));
|
||||||
this.performSearch(query);
|
if (query) Search.performSearch(query);
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
loadIndex : function(url) {
|
loadIndex: (url) =>
|
||||||
$.ajax({type: "GET", url: url, data: null,
|
(document.body.appendChild(document.createElement("script")).src = url),
|
||||||
dataType: "script", cache: true,
|
|
||||||
complete: function(jqxhr, textstatus) {
|
|
||||||
if (textstatus != "success") {
|
|
||||||
document.getElementById("searchindexloader").src = url;
|
|
||||||
}
|
|
||||||
}});
|
|
||||||
},
|
|
||||||
|
|
||||||
setIndex : function(index) {
|
setIndex: (index) => {
|
||||||
var q;
|
Search._index = index;
|
||||||
this._index = index;
|
if (Search._queued_query !== null) {
|
||||||
if ((q = this._queued_query) !== null) {
|
const query = Search._queued_query;
|
||||||
this._queued_query = null;
|
Search._queued_query = null;
|
||||||
Search.query(q);
|
Search.query(query);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
hasIndex : function() {
|
hasIndex: () => Search._index !== null,
|
||||||
return this._index !== null;
|
|
||||||
},
|
|
||||||
|
|
||||||
deferQuery : function(query) {
|
deferQuery: (query) => (Search._queued_query = query),
|
||||||
this._queued_query = query;
|
|
||||||
},
|
|
||||||
|
|
||||||
stopPulse : function() {
|
stopPulse: () => (Search._pulse_status = -1),
|
||||||
this._pulse_status = 0;
|
|
||||||
},
|
|
||||||
|
|
||||||
startPulse : function() {
|
startPulse: () => {
|
||||||
if (this._pulse_status >= 0)
|
if (Search._pulse_status >= 0) return;
|
||||||
return;
|
|
||||||
function pulse() {
|
const pulse = () => {
|
||||||
var i;
|
|
||||||
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
Search._pulse_status = (Search._pulse_status + 1) % 4;
|
||||||
var dotString = '';
|
Search.dots.innerText = ".".repeat(Search._pulse_status);
|
||||||
for (i = 0; i < Search._pulse_status; i++)
|
if (Search._pulse_status >= 0) window.setTimeout(pulse, 500);
|
||||||
dotString += '.';
|
};
|
||||||
Search.dots.text(dotString);
|
|
||||||
if (Search._pulse_status > -1)
|
|
||||||
window.setTimeout(pulse, 500);
|
|
||||||
}
|
|
||||||
pulse();
|
pulse();
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* perform a search for something (or wait until index is loaded)
|
* perform a search for something (or wait until index is loaded)
|
||||||
*/
|
*/
|
||||||
performSearch : function(query) {
|
performSearch: (query) => {
|
||||||
// create the required interface elements
|
// create the required interface elements
|
||||||
this.out = $('#search-results');
|
const searchText = document.createElement("h2");
|
||||||
this.title = $('<h2>' + _('Searching') + '</h2>').appendTo(this.out);
|
searchText.textContent = _("Searching");
|
||||||
this.dots = $('<span></span>').appendTo(this.title);
|
const searchSummary = document.createElement("p");
|
||||||
this.status = $('<p class="search-summary"> </p>').appendTo(this.out);
|
searchSummary.classList.add("search-summary");
|
||||||
this.output = $('<ul class="search"/>').appendTo(this.out);
|
searchSummary.innerText = "";
|
||||||
|
const searchList = document.createElement("ul");
|
||||||
|
searchList.classList.add("search");
|
||||||
|
|
||||||
$('#search-progress').text(_('Preparing search...'));
|
const out = document.getElementById("search-results");
|
||||||
this.startPulse();
|
Search.title = out.appendChild(searchText);
|
||||||
|
Search.dots = Search.title.appendChild(document.createElement("span"));
|
||||||
|
Search.status = out.appendChild(searchSummary);
|
||||||
|
Search.output = out.appendChild(searchList);
|
||||||
|
|
||||||
|
const searchProgress = document.getElementById("search-progress");
|
||||||
|
// Some themes don't use the search progress node
|
||||||
|
if (searchProgress) {
|
||||||
|
searchProgress.innerText = _("Preparing search...");
|
||||||
|
}
|
||||||
|
Search.startPulse();
|
||||||
|
|
||||||
// index already loaded, the browser was quick!
|
// index already loaded, the browser was quick!
|
||||||
if (this.hasIndex())
|
if (Search.hasIndex()) Search.query(query);
|
||||||
this.query(query);
|
else Search.deferQuery(query);
|
||||||
else
|
|
||||||
this.deferQuery(query);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* execute search (requires search index to be loaded)
|
* execute search (requires search index to be loaded)
|
||||||
*/
|
*/
|
||||||
query : function(query) {
|
query: (query) => {
|
||||||
var i;
|
const filenames = Search._index.filenames;
|
||||||
|
const docNames = Search._index.docnames;
|
||||||
|
const titles = Search._index.titles;
|
||||||
|
const allTitles = Search._index.alltitles;
|
||||||
|
const indexEntries = Search._index.indexentries;
|
||||||
|
|
||||||
// stem the searchterms and add them to the correct list
|
// stem the search terms and add them to the correct list
|
||||||
var stemmer = new Stemmer();
|
const stemmer = new Stemmer();
|
||||||
var searchterms = [];
|
const searchTerms = new Set();
|
||||||
var excluded = [];
|
const excludedTerms = new Set();
|
||||||
var hlterms = [];
|
const highlightTerms = new Set();
|
||||||
var tmp = splitQuery(query);
|
const objectTerms = new Set(splitQuery(query.toLowerCase().trim()));
|
||||||
var objectterms = [];
|
splitQuery(query.trim()).forEach((queryTerm) => {
|
||||||
for (i = 0; i < tmp.length; i++) {
|
const queryTermLower = queryTerm.toLowerCase();
|
||||||
if (tmp[i] !== "") {
|
|
||||||
objectterms.push(tmp[i].toLowerCase());
|
// maybe skip this "word"
|
||||||
}
|
// stopwords array is from language_data.js
|
||||||
|
if (
|
||||||
|
stopwords.indexOf(queryTermLower) !== -1 ||
|
||||||
|
queryTerm.match(/^\d+$/)
|
||||||
|
)
|
||||||
|
return;
|
||||||
|
|
||||||
if ($u.indexOf(stopwords, tmp[i].toLowerCase()) != -1 || tmp[i] === "") {
|
|
||||||
// skip this "word"
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// stem the word
|
// stem the word
|
||||||
var word = stemmer.stemWord(tmp[i].toLowerCase());
|
let word = stemmer.stemWord(queryTermLower);
|
||||||
// prevent stemmer from cutting word smaller than two chars
|
|
||||||
if(word.length < 3 && tmp[i].length >= 3) {
|
|
||||||
word = tmp[i];
|
|
||||||
}
|
|
||||||
var toAppend;
|
|
||||||
// select the correct list
|
// select the correct list
|
||||||
if (word[0] == '-') {
|
if (word[0] === "-") excludedTerms.add(word.substr(1));
|
||||||
toAppend = excluded;
|
|
||||||
word = word.substr(1);
|
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
toAppend = searchterms;
|
searchTerms.add(word);
|
||||||
hlterms.push(tmp[i].toLowerCase());
|
highlightTerms.add(queryTermLower);
|
||||||
}
|
}
|
||||||
// only add if not already in the list
|
});
|
||||||
if (!$u.contains(toAppend, word))
|
|
||||||
toAppend.push(word);
|
if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js
|
||||||
|
localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" "))
|
||||||
}
|
}
|
||||||
var highlightstring = '?highlight=' + $.urlencode(hlterms.join(" "));
|
|
||||||
|
|
||||||
// console.debug('SEARCH: searching for:');
|
// console.debug("SEARCH: searching for:");
|
||||||
// console.info('required: ', searchterms);
|
// console.info("required: ", [...searchTerms]);
|
||||||
// console.info('excluded: ', excluded);
|
// console.info("excluded: ", [...excludedTerms]);
|
||||||
|
|
||||||
// prepare search
|
// array of [docname, title, anchor, descr, score, filename]
|
||||||
var terms = this._index.terms;
|
let results = [];
|
||||||
var titleterms = this._index.titleterms;
|
_removeChildren(document.getElementById("search-progress"));
|
||||||
|
|
||||||
// array of [filename, title, anchor, descr, score]
|
const queryLower = query.toLowerCase();
|
||||||
var results = [];
|
for (const [title, foundTitles] of Object.entries(allTitles)) {
|
||||||
$('#search-progress').empty();
|
if (title.toLowerCase().includes(queryLower) && (queryLower.length >= title.length/2)) {
|
||||||
|
for (const [file, id] of foundTitles) {
|
||||||
|
let score = Math.round(100 * queryLower.length / title.length)
|
||||||
|
results.push([
|
||||||
|
docNames[file],
|
||||||
|
titles[file] !== title ? `${titles[file]} > ${title}` : title,
|
||||||
|
id !== null ? "#" + id : "",
|
||||||
|
null,
|
||||||
|
score,
|
||||||
|
filenames[file],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// search for explicit entries in index directives
|
||||||
|
for (const [entry, foundEntries] of Object.entries(indexEntries)) {
|
||||||
|
if (entry.includes(queryLower) && (queryLower.length >= entry.length/2)) {
|
||||||
|
for (const [file, id] of foundEntries) {
|
||||||
|
let score = Math.round(100 * queryLower.length / entry.length)
|
||||||
|
results.push([
|
||||||
|
docNames[file],
|
||||||
|
titles[file],
|
||||||
|
id ? "#" + id : "",
|
||||||
|
null,
|
||||||
|
score,
|
||||||
|
filenames[file],
|
||||||
|
]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// lookup as object
|
// lookup as object
|
||||||
for (i = 0; i < objectterms.length; i++) {
|
objectTerms.forEach((term) =>
|
||||||
var others = [].concat(objectterms.slice(0, i),
|
results.push(...Search.performObjectSearch(term, objectTerms))
|
||||||
objectterms.slice(i+1, objectterms.length));
|
);
|
||||||
results = results.concat(this.performObjectSearch(objectterms[i], others));
|
|
||||||
}
|
|
||||||
|
|
||||||
// lookup as search terms in fulltext
|
// lookup as search terms in fulltext
|
||||||
results = results.concat(this.performTermsSearch(searchterms, excluded, terms, titleterms));
|
results.push(...Search.performTermsSearch(searchTerms, excludedTerms));
|
||||||
|
|
||||||
// let the scorer override scores with a custom scoring function
|
// let the scorer override scores with a custom scoring function
|
||||||
if (Scorer.score) {
|
if (Scorer.score) results.forEach((item) => (item[4] = Scorer.score(item)));
|
||||||
for (i = 0; i < results.length; i++)
|
|
||||||
results[i][4] = Scorer.score(results[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// now sort the results by score (in opposite order of appearance, since the
|
// now sort the results by score (in opposite order of appearance, since the
|
||||||
// display function below uses pop() to retrieve items) and then
|
// display function below uses pop() to retrieve items) and then
|
||||||
// alphabetically
|
// alphabetically
|
||||||
results.sort(function(a, b) {
|
results.sort((a, b) => {
|
||||||
var left = a[4];
|
const leftScore = a[4];
|
||||||
var right = b[4];
|
const rightScore = b[4];
|
||||||
if (left > right) {
|
if (leftScore === rightScore) {
|
||||||
return 1;
|
|
||||||
} else if (left < right) {
|
|
||||||
return -1;
|
|
||||||
} else {
|
|
||||||
// same score: sort alphabetically
|
// same score: sort alphabetically
|
||||||
left = a[1].toLowerCase();
|
const leftTitle = a[1].toLowerCase();
|
||||||
right = b[1].toLowerCase();
|
const rightTitle = b[1].toLowerCase();
|
||||||
return (left > right) ? -1 : ((left < right) ? 1 : 0);
|
if (leftTitle === rightTitle) return 0;
|
||||||
|
return leftTitle > rightTitle ? -1 : 1; // inverted is intentional
|
||||||
}
|
}
|
||||||
|
return leftScore > rightScore ? 1 : -1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// remove duplicate search results
|
||||||
|
// note the reversing of results, so that in the case of duplicates, the highest-scoring entry is kept
|
||||||
|
let seen = new Set();
|
||||||
|
results = results.reverse().reduce((acc, result) => {
|
||||||
|
let resultStr = result.slice(0, 4).concat([result[5]]).map(v => String(v)).join(',');
|
||||||
|
if (!seen.has(resultStr)) {
|
||||||
|
acc.push(result);
|
||||||
|
seen.add(resultStr);
|
||||||
|
}
|
||||||
|
return acc;
|
||||||
|
}, []);
|
||||||
|
|
||||||
|
results = results.reverse();
|
||||||
|
|
||||||
// for debugging
|
// for debugging
|
||||||
//Search.lastresults = results.slice(); // a copy
|
//Search.lastresults = results.slice(); // a copy
|
||||||
//console.info('search results:', Search.lastresults);
|
// console.info("search results:", Search.lastresults);
|
||||||
|
|
||||||
// print the results
|
// print the results
|
||||||
var resultCount = results.length;
|
_displayNextItem(results, results.length, searchTerms);
|
||||||
function displayNextItem() {
|
|
||||||
// results left, load the summary and display it
|
|
||||||
if (results.length) {
|
|
||||||
var item = results.pop();
|
|
||||||
var listItem = $('<li></li>');
|
|
||||||
var requestUrl = "";
|
|
||||||
var linkUrl = "";
|
|
||||||
if (DOCUMENTATION_OPTIONS.BUILDER === 'dirhtml') {
|
|
||||||
// dirhtml builder
|
|
||||||
var dirname = item[0] + '/';
|
|
||||||
if (dirname.match(/\/index\/$/)) {
|
|
||||||
dirname = dirname.substring(0, dirname.length-6);
|
|
||||||
} else if (dirname == 'index/') {
|
|
||||||
dirname = '';
|
|
||||||
}
|
|
||||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + dirname;
|
|
||||||
linkUrl = requestUrl;
|
|
||||||
|
|
||||||
} else {
|
|
||||||
// normal html builders
|
|
||||||
requestUrl = DOCUMENTATION_OPTIONS.URL_ROOT + item[0] + DOCUMENTATION_OPTIONS.FILE_SUFFIX;
|
|
||||||
linkUrl = item[0] + DOCUMENTATION_OPTIONS.LINK_SUFFIX;
|
|
||||||
}
|
|
||||||
listItem.append($('<a/>').attr('href',
|
|
||||||
linkUrl +
|
|
||||||
highlightstring + item[2]).html(item[1]));
|
|
||||||
if (item[3]) {
|
|
||||||
listItem.append($('<span> (' + item[3] + ')</span>'));
|
|
||||||
Search.output.append(listItem);
|
|
||||||
setTimeout(function() {
|
|
||||||
displayNextItem();
|
|
||||||
}, 5);
|
|
||||||
} else if (DOCUMENTATION_OPTIONS.HAS_SOURCE) {
|
|
||||||
$.ajax({url: requestUrl,
|
|
||||||
dataType: "text",
|
|
||||||
complete: function(jqxhr, textstatus) {
|
|
||||||
var data = jqxhr.responseText;
|
|
||||||
if (data !== '' && data !== undefined) {
|
|
||||||
listItem.append(Search.makeSearchSummary(data, searchterms, hlterms));
|
|
||||||
}
|
|
||||||
Search.output.append(listItem);
|
|
||||||
setTimeout(function() {
|
|
||||||
displayNextItem();
|
|
||||||
}, 5);
|
|
||||||
}});
|
|
||||||
} else {
|
|
||||||
// no source available, just display title
|
|
||||||
Search.output.append(listItem);
|
|
||||||
setTimeout(function() {
|
|
||||||
displayNextItem();
|
|
||||||
}, 5);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// search finished, update title and status message
|
|
||||||
else {
|
|
||||||
Search.stopPulse();
|
|
||||||
Search.title.text(_('Search Results'));
|
|
||||||
if (!resultCount)
|
|
||||||
Search.status.text(_('Your search did not match any documents. Please make sure that all words are spelled correctly and that you\'ve selected enough categories.'));
|
|
||||||
else
|
|
||||||
Search.status.text(_('Search finished, found %s page(s) matching the search query.').replace('%s', resultCount));
|
|
||||||
Search.status.fadeIn(500);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
displayNextItem();
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* search for object names
|
* search for object names
|
||||||
*/
|
*/
|
||||||
performObjectSearch : function(object, otherterms) {
|
performObjectSearch: (object, objectTerms) => {
|
||||||
var filenames = this._index.filenames;
|
const filenames = Search._index.filenames;
|
||||||
var docnames = this._index.docnames;
|
const docNames = Search._index.docnames;
|
||||||
var objects = this._index.objects;
|
const objects = Search._index.objects;
|
||||||
var objnames = this._index.objnames;
|
const objNames = Search._index.objnames;
|
||||||
var titles = this._index.titles;
|
const titles = Search._index.titles;
|
||||||
|
|
||||||
var i;
|
const results = [];
|
||||||
var results = [];
|
|
||||||
|
|
||||||
for (var prefix in objects) {
|
const objectSearchCallback = (prefix, match) => {
|
||||||
for (var name in objects[prefix]) {
|
const name = match[4]
|
||||||
var fullname = (prefix ? prefix + '.' : '') + name;
|
const fullname = (prefix ? prefix + "." : "") + name;
|
||||||
var fullnameLower = fullname.toLowerCase()
|
const fullnameLower = fullname.toLowerCase();
|
||||||
if (fullnameLower.indexOf(object) > -1) {
|
if (fullnameLower.indexOf(object) < 0) return;
|
||||||
var score = 0;
|
|
||||||
var parts = fullnameLower.split('.');
|
|
||||||
// check for different match types: exact matches of full name or
|
|
||||||
// "last name" (i.e. last dotted part)
|
|
||||||
if (fullnameLower == object || parts[parts.length - 1] == object) {
|
|
||||||
score += Scorer.objNameMatch;
|
|
||||||
// matches in last name
|
|
||||||
} else if (parts[parts.length - 1].indexOf(object) > -1) {
|
|
||||||
score += Scorer.objPartialMatch;
|
|
||||||
}
|
|
||||||
var match = objects[prefix][name];
|
|
||||||
var objname = objnames[match[1]][2];
|
|
||||||
var title = titles[match[0]];
|
|
||||||
// If more than one term searched for, we require other words to be
|
|
||||||
// found in the name/title/description
|
|
||||||
if (otherterms.length > 0) {
|
|
||||||
var haystack = (prefix + ' ' + name + ' ' +
|
|
||||||
objname + ' ' + title).toLowerCase();
|
|
||||||
var allfound = true;
|
|
||||||
for (i = 0; i < otherterms.length; i++) {
|
|
||||||
if (haystack.indexOf(otherterms[i]) == -1) {
|
|
||||||
allfound = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!allfound) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
var descr = objname + _(', in ') + title;
|
|
||||||
|
|
||||||
var anchor = match[3];
|
let score = 0;
|
||||||
if (anchor === '')
|
const parts = fullnameLower.split(".");
|
||||||
anchor = fullname;
|
|
||||||
else if (anchor == '-')
|
// check for different match types: exact matches of full name or
|
||||||
anchor = objnames[match[1]][1] + '-' + fullname;
|
// "last name" (i.e. last dotted part)
|
||||||
// add custom score for some objects according to scorer
|
if (fullnameLower === object || parts.slice(-1)[0] === object)
|
||||||
if (Scorer.objPrio.hasOwnProperty(match[2])) {
|
score += Scorer.objNameMatch;
|
||||||
score += Scorer.objPrio[match[2]];
|
else if (parts.slice(-1)[0].indexOf(object) > -1)
|
||||||
} else {
|
score += Scorer.objPartialMatch; // matches in last name
|
||||||
score += Scorer.objPrioDefault;
|
|
||||||
}
|
const objName = objNames[match[1]][2];
|
||||||
results.push([docnames[match[0]], fullname, '#'+anchor, descr, score, filenames[match[0]]]);
|
const title = titles[match[0]];
|
||||||
}
|
|
||||||
|
// If more than one term searched for, we require other words to be
|
||||||
|
// found in the name/title/description
|
||||||
|
const otherTerms = new Set(objectTerms);
|
||||||
|
otherTerms.delete(object);
|
||||||
|
if (otherTerms.size > 0) {
|
||||||
|
const haystack = `${prefix} ${name} ${objName} ${title}`.toLowerCase();
|
||||||
|
if (
|
||||||
|
[...otherTerms].some((otherTerm) => haystack.indexOf(otherTerm) < 0)
|
||||||
|
)
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
let anchor = match[3];
|
||||||
|
if (anchor === "") anchor = fullname;
|
||||||
|
else if (anchor === "-") anchor = objNames[match[1]][1] + "-" + fullname;
|
||||||
|
|
||||||
|
const descr = objName + _(", in ") + title;
|
||||||
|
|
||||||
|
// add custom score for some objects according to scorer
|
||||||
|
if (Scorer.objPrio.hasOwnProperty(match[2]))
|
||||||
|
score += Scorer.objPrio[match[2]];
|
||||||
|
else score += Scorer.objPrioDefault;
|
||||||
|
|
||||||
|
results.push([
|
||||||
|
docNames[match[0]],
|
||||||
|
fullname,
|
||||||
|
"#" + anchor,
|
||||||
|
descr,
|
||||||
|
score,
|
||||||
|
filenames[match[0]],
|
||||||
|
]);
|
||||||
|
};
|
||||||
|
Object.keys(objects).forEach((prefix) =>
|
||||||
|
objects[prefix].forEach((array) =>
|
||||||
|
objectSearchCallback(prefix, array)
|
||||||
|
)
|
||||||
|
);
|
||||||
return results;
|
return results;
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
|
||||||
* See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions
|
|
||||||
*/
|
|
||||||
escapeRegExp : function(string) {
|
|
||||||
return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string
|
|
||||||
},
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* search for full-text terms in the index
|
* search for full-text terms in the index
|
||||||
*/
|
*/
|
||||||
performTermsSearch : function(searchterms, excluded, terms, titleterms) {
|
performTermsSearch: (searchTerms, excludedTerms) => {
|
||||||
var docnames = this._index.docnames;
|
// prepare search
|
||||||
var filenames = this._index.filenames;
|
const terms = Search._index.terms;
|
||||||
var titles = this._index.titles;
|
const titleTerms = Search._index.titleterms;
|
||||||
|
const filenames = Search._index.filenames;
|
||||||
|
const docNames = Search._index.docnames;
|
||||||
|
const titles = Search._index.titles;
|
||||||
|
|
||||||
var i, j, file;
|
const scoreMap = new Map();
|
||||||
var fileMap = {};
|
const fileMap = new Map();
|
||||||
var scoreMap = {};
|
|
||||||
var results = [];
|
|
||||||
|
|
||||||
// perform the search on the required terms
|
// perform the search on the required terms
|
||||||
for (i = 0; i < searchterms.length; i++) {
|
searchTerms.forEach((word) => {
|
||||||
var word = searchterms[i];
|
const files = [];
|
||||||
var files = [];
|
const arr = [
|
||||||
var _o = [
|
{ files: terms[word], score: Scorer.term },
|
||||||
{files: terms[word], score: Scorer.term},
|
{ files: titleTerms[word], score: Scorer.title },
|
||||||
{files: titleterms[word], score: Scorer.title}
|
|
||||||
];
|
];
|
||||||
// add support for partial matches
|
// add support for partial matches
|
||||||
if (word.length > 2) {
|
if (word.length > 2) {
|
||||||
var word_regex = this.escapeRegExp(word);
|
const escapedWord = _escapeRegExp(word);
|
||||||
for (var w in terms) {
|
Object.keys(terms).forEach((term) => {
|
||||||
if (w.match(word_regex) && !terms[word]) {
|
if (term.match(escapedWord) && !terms[word])
|
||||||
_o.push({files: terms[w], score: Scorer.partialTerm})
|
arr.push({ files: terms[term], score: Scorer.partialTerm });
|
||||||
}
|
});
|
||||||
}
|
Object.keys(titleTerms).forEach((term) => {
|
||||||
for (var w in titleterms) {
|
if (term.match(escapedWord) && !titleTerms[word])
|
||||||
if (w.match(word_regex) && !titleterms[word]) {
|
arr.push({ files: titleTerms[word], score: Scorer.partialTitle });
|
||||||
_o.push({files: titleterms[w], score: Scorer.partialTitle})
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// no match but word was a required one
|
// no match but word was a required one
|
||||||
if ($u.every(_o, function(o){return o.files === undefined;})) {
|
if (arr.every((record) => record.files === undefined)) return;
|
||||||
break;
|
|
||||||
}
|
|
||||||
// found search word in contents
|
// found search word in contents
|
||||||
$u.each(_o, function(o) {
|
arr.forEach((record) => {
|
||||||
var _files = o.files;
|
if (record.files === undefined) return;
|
||||||
if (_files === undefined)
|
|
||||||
return
|
|
||||||
|
|
||||||
if (_files.length === undefined)
|
let recordFiles = record.files;
|
||||||
_files = [_files];
|
if (recordFiles.length === undefined) recordFiles = [recordFiles];
|
||||||
files = files.concat(_files);
|
files.push(...recordFiles);
|
||||||
|
|
||||||
// set score for the word in each file to Scorer.term
|
// set score for the word in each file
|
||||||
for (j = 0; j < _files.length; j++) {
|
recordFiles.forEach((file) => {
|
||||||
file = _files[j];
|
if (!scoreMap.has(file)) scoreMap.set(file, {});
|
||||||
if (!(file in scoreMap))
|
scoreMap.get(file)[word] = record.score;
|
||||||
scoreMap[file] = {};
|
});
|
||||||
scoreMap[file][word] = o.score;
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// create the mapping
|
// create the mapping
|
||||||
for (j = 0; j < files.length; j++) {
|
files.forEach((file) => {
|
||||||
file = files[j];
|
if (fileMap.has(file) && fileMap.get(file).indexOf(word) === -1)
|
||||||
if (file in fileMap && fileMap[file].indexOf(word) === -1)
|
fileMap.get(file).push(word);
|
||||||
fileMap[file].push(word);
|
else fileMap.set(file, [word]);
|
||||||
else
|
});
|
||||||
fileMap[file] = [word];
|
});
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// now check if the files don't contain excluded terms
|
// now check if the files don't contain excluded terms
|
||||||
for (file in fileMap) {
|
const results = [];
|
||||||
var valid = true;
|
for (const [file, wordList] of fileMap) {
|
||||||
|
|
||||||
// check if all requirements are matched
|
// check if all requirements are matched
|
||||||
var filteredTermCount = // as search terms with length < 3 are discarded: ignore
|
|
||||||
searchterms.filter(function(term){return term.length > 2}).length
|
// as search terms with length < 3 are discarded
|
||||||
|
const filteredTermCount = [...searchTerms].filter(
|
||||||
|
(term) => term.length > 2
|
||||||
|
).length;
|
||||||
if (
|
if (
|
||||||
fileMap[file].length != searchterms.length &&
|
wordList.length !== searchTerms.size &&
|
||||||
fileMap[file].length != filteredTermCount
|
wordList.length !== filteredTermCount
|
||||||
) continue;
|
)
|
||||||
|
continue;
|
||||||
|
|
||||||
// ensure that none of the excluded terms is in the search result
|
// ensure that none of the excluded terms is in the search result
|
||||||
for (i = 0; i < excluded.length; i++) {
|
if (
|
||||||
if (terms[excluded[i]] == file ||
|
[...excludedTerms].some(
|
||||||
titleterms[excluded[i]] == file ||
|
(term) =>
|
||||||
$u.contains(terms[excluded[i]] || [], file) ||
|
terms[term] === file ||
|
||||||
$u.contains(titleterms[excluded[i]] || [], file)) {
|
titleTerms[term] === file ||
|
||||||
valid = false;
|
(terms[term] || []).includes(file) ||
|
||||||
break;
|
(titleTerms[term] || []).includes(file)
|
||||||
}
|
)
|
||||||
}
|
)
|
||||||
|
break;
|
||||||
|
|
||||||
// if we have still a valid result we can add it to the result list
|
// select one (max) score for the file.
|
||||||
if (valid) {
|
const score = Math.max(...wordList.map((w) => scoreMap.get(file)[w]));
|
||||||
// select one (max) score for the file.
|
// add result to the result list
|
||||||
// for better ranking, we should calculate ranking by using words statistics like basic tf-idf...
|
results.push([
|
||||||
var score = $u.max($u.map(fileMap[file], function(w){return scoreMap[file][w]}));
|
docNames[file],
|
||||||
results.push([docnames[file], titles[file], '', null, score, filenames[file]]);
|
titles[file],
|
||||||
}
|
"",
|
||||||
|
null,
|
||||||
|
score,
|
||||||
|
filenames[file],
|
||||||
|
]);
|
||||||
}
|
}
|
||||||
return results;
|
return results;
|
||||||
},
|
},
|
||||||
@@ -492,31 +539,28 @@ var Search = {
|
|||||||
/**
|
/**
|
||||||
* helper function to return a node containing the
|
* helper function to return a node containing the
|
||||||
* search summary for a given text. keywords is a list
|
* search summary for a given text. keywords is a list
|
||||||
* of stemmed words, hlwords is the list of normal, unstemmed
|
* of stemmed words.
|
||||||
* words. the first one is used to find the occurrence, the
|
|
||||||
* latter for highlighting it.
|
|
||||||
*/
|
*/
|
||||||
makeSearchSummary : function(htmlText, keywords, hlwords) {
|
makeSearchSummary: (htmlText, keywords) => {
|
||||||
var text = Search.htmlToText(htmlText);
|
const text = Search.htmlToText(htmlText);
|
||||||
var textLower = text.toLowerCase();
|
if (text === "") return null;
|
||||||
var start = 0;
|
|
||||||
$.each(keywords, function() {
|
const textLower = text.toLowerCase();
|
||||||
var i = textLower.indexOf(this.toLowerCase());
|
const actualStartPosition = [...keywords]
|
||||||
if (i > -1)
|
.map((k) => textLower.indexOf(k.toLowerCase()))
|
||||||
start = i;
|
.filter((i) => i > -1)
|
||||||
});
|
.slice(-1)[0];
|
||||||
start = Math.max(start - 120, 0);
|
const startWithContext = Math.max(actualStartPosition - 120, 0);
|
||||||
var excerpt = ((start > 0) ? '...' : '') +
|
|
||||||
$.trim(text.substr(start, 240)) +
|
const top = startWithContext === 0 ? "" : "...";
|
||||||
((start + 240 - text.length) ? '...' : '');
|
const tail = startWithContext + 240 < text.length ? "..." : "";
|
||||||
var rv = $('<p class="context"></p>').text(excerpt);
|
|
||||||
$.each(hlwords, function() {
|
let summary = document.createElement("p");
|
||||||
rv = rv.highlightText(this, 'highlighted');
|
summary.classList.add("context");
|
||||||
});
|
summary.textContent = top + text.substr(startWithContext, 240).trim() + tail;
|
||||||
return rv;
|
|
||||||
}
|
return summary;
|
||||||
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
$(document).ready(function() {
|
_ready(Search.init);
|
||||||
Search.init();
|
|
||||||
});
|
|
||||||
@@ -1,159 +0,0 @@
|
|||||||
/*
|
|
||||||
* sidebar.js
|
|
||||||
* ~~~~~~~~~~
|
|
||||||
*
|
|
||||||
* This script makes the Sphinx sidebar collapsible.
|
|
||||||
*
|
|
||||||
* .sphinxsidebar contains .sphinxsidebarwrapper. This script adds
|
|
||||||
* in .sphixsidebar, after .sphinxsidebarwrapper, the #sidebarbutton
|
|
||||||
* used to collapse and expand the sidebar.
|
|
||||||
*
|
|
||||||
* When the sidebar is collapsed the .sphinxsidebarwrapper is hidden
|
|
||||||
* and the width of the sidebar and the margin-left of the document
|
|
||||||
* are decreased. When the sidebar is expanded the opposite happens.
|
|
||||||
* This script saves a per-browser/per-session cookie used to
|
|
||||||
* remember the position of the sidebar among the pages.
|
|
||||||
* Once the browser is closed the cookie is deleted and the position
|
|
||||||
* reset to the default (expanded).
|
|
||||||
*
|
|
||||||
* :copyright: Copyright 2007-2021 by the Sphinx team, see AUTHORS.
|
|
||||||
* :license: BSD, see LICENSE for details.
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
|
|
||||||
$(function() {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// global elements used by the functions.
|
|
||||||
// the 'sidebarbutton' element is defined as global after its
|
|
||||||
// creation, in the add_sidebar_button function
|
|
||||||
var bodywrapper = $('.bodywrapper');
|
|
||||||
var sidebar = $('.sphinxsidebar');
|
|
||||||
var sidebarwrapper = $('.sphinxsidebarwrapper');
|
|
||||||
|
|
||||||
// for some reason, the document has no sidebar; do not run into errors
|
|
||||||
if (!sidebar.length) return;
|
|
||||||
|
|
||||||
// original margin-left of the bodywrapper and width of the sidebar
|
|
||||||
// with the sidebar expanded
|
|
||||||
var bw_margin_expanded = bodywrapper.css('margin-left');
|
|
||||||
var ssb_width_expanded = sidebar.width();
|
|
||||||
|
|
||||||
// margin-left of the bodywrapper and width of the sidebar
|
|
||||||
// with the sidebar collapsed
|
|
||||||
var bw_margin_collapsed = '.8em';
|
|
||||||
var ssb_width_collapsed = '.8em';
|
|
||||||
|
|
||||||
// colors used by the current theme
|
|
||||||
var dark_color = $('.related').css('background-color');
|
|
||||||
var light_color = $('.document').css('background-color');
|
|
||||||
|
|
||||||
function sidebar_is_collapsed() {
|
|
||||||
return sidebarwrapper.is(':not(:visible)');
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggle_sidebar() {
|
|
||||||
if (sidebar_is_collapsed())
|
|
||||||
expand_sidebar();
|
|
||||||
else
|
|
||||||
collapse_sidebar();
|
|
||||||
}
|
|
||||||
|
|
||||||
function collapse_sidebar() {
|
|
||||||
sidebarwrapper.hide();
|
|
||||||
sidebar.css('width', ssb_width_collapsed);
|
|
||||||
bodywrapper.css('margin-left', bw_margin_collapsed);
|
|
||||||
sidebarbutton.css({
|
|
||||||
'margin-left': '0',
|
|
||||||
'height': bodywrapper.height()
|
|
||||||
});
|
|
||||||
sidebarbutton.find('span').text('»');
|
|
||||||
sidebarbutton.attr('title', _('Expand sidebar'));
|
|
||||||
document.cookie = 'sidebar=collapsed';
|
|
||||||
}
|
|
||||||
|
|
||||||
function expand_sidebar() {
|
|
||||||
bodywrapper.css('margin-left', bw_margin_expanded);
|
|
||||||
sidebar.css('width', ssb_width_expanded);
|
|
||||||
sidebarwrapper.show();
|
|
||||||
sidebarbutton.css({
|
|
||||||
'margin-left': ssb_width_expanded-12,
|
|
||||||
'height': bodywrapper.height()
|
|
||||||
});
|
|
||||||
sidebarbutton.find('span').text('«');
|
|
||||||
sidebarbutton.attr('title', _('Collapse sidebar'));
|
|
||||||
document.cookie = 'sidebar=expanded';
|
|
||||||
}
|
|
||||||
|
|
||||||
function add_sidebar_button() {
|
|
||||||
sidebarwrapper.css({
|
|
||||||
'float': 'left',
|
|
||||||
'margin-right': '0',
|
|
||||||
'width': ssb_width_expanded - 28
|
|
||||||
});
|
|
||||||
// create the button
|
|
||||||
sidebar.append(
|
|
||||||
'<div id="sidebarbutton"><span>«</span></div>'
|
|
||||||
);
|
|
||||||
var sidebarbutton = $('#sidebarbutton');
|
|
||||||
light_color = sidebarbutton.css('background-color');
|
|
||||||
// find the height of the viewport to center the '<<' in the page
|
|
||||||
var viewport_height;
|
|
||||||
if (window.innerHeight)
|
|
||||||
viewport_height = window.innerHeight;
|
|
||||||
else
|
|
||||||
viewport_height = $(window).height();
|
|
||||||
sidebarbutton.find('span').css({
|
|
||||||
'display': 'block',
|
|
||||||
'margin-top': (viewport_height - sidebar.position().top - 20) / 2
|
|
||||||
});
|
|
||||||
|
|
||||||
sidebarbutton.click(toggle_sidebar);
|
|
||||||
sidebarbutton.attr('title', _('Collapse sidebar'));
|
|
||||||
sidebarbutton.css({
|
|
||||||
'color': '#FFFFFF',
|
|
||||||
'border-left': '1px solid ' + dark_color,
|
|
||||||
'font-size': '1.2em',
|
|
||||||
'cursor': 'pointer',
|
|
||||||
'height': bodywrapper.height(),
|
|
||||||
'padding-top': '1px',
|
|
||||||
'margin-left': ssb_width_expanded - 12
|
|
||||||
});
|
|
||||||
|
|
||||||
sidebarbutton.hover(
|
|
||||||
function () {
|
|
||||||
$(this).css('background-color', dark_color);
|
|
||||||
},
|
|
||||||
function () {
|
|
||||||
$(this).css('background-color', light_color);
|
|
||||||
}
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
function set_position_from_cookie() {
|
|
||||||
if (!document.cookie)
|
|
||||||
return;
|
|
||||||
var items = document.cookie.split(';');
|
|
||||||
for(var k=0; k<items.length; k++) {
|
|
||||||
var key_val = items[k].split('=');
|
|
||||||
var key = key_val[0].replace(/ /, ""); // strip leading spaces
|
|
||||||
if (key == 'sidebar') {
|
|
||||||
var value = key_val[1];
|
|
||||||
if ((value == 'collapsed') && (!sidebar_is_collapsed()))
|
|
||||||
collapse_sidebar();
|
|
||||||
else if ((value == 'expanded') && (sidebar_is_collapsed()))
|
|
||||||
expand_sidebar();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
add_sidebar_button();
|
|
||||||
var sidebarbutton = $('#sidebarbutton');
|
|
||||||
set_position_from_cookie();
|
|
||||||
});
|
|
||||||
@@ -0,0 +1,296 @@
|
|||||||
|
/* Some sane resets. */
|
||||||
|
html {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
margin: 0;
|
||||||
|
min-height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* All the flexbox magic! */
|
||||||
|
body,
|
||||||
|
.sb-announcement,
|
||||||
|
.sb-content,
|
||||||
|
.sb-main,
|
||||||
|
.sb-container,
|
||||||
|
.sb-container__inner,
|
||||||
|
.sb-article-container,
|
||||||
|
.sb-footer-content,
|
||||||
|
.sb-header,
|
||||||
|
.sb-header-secondary,
|
||||||
|
.sb-footer {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These order things vertically */
|
||||||
|
body,
|
||||||
|
.sb-main,
|
||||||
|
.sb-article-container {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Put elements in the center */
|
||||||
|
.sb-header,
|
||||||
|
.sb-header-secondary,
|
||||||
|
.sb-container,
|
||||||
|
.sb-content,
|
||||||
|
.sb-footer,
|
||||||
|
.sb-footer-content {
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
/* Put elements at the ends */
|
||||||
|
.sb-article-container {
|
||||||
|
justify-content: space-between;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* These elements grow. */
|
||||||
|
.sb-main,
|
||||||
|
.sb-content,
|
||||||
|
.sb-container,
|
||||||
|
article {
|
||||||
|
flex-grow: 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Because padding making this wider is not fun */
|
||||||
|
article {
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* The announcements element should never be wider than the page. */
|
||||||
|
.sb-announcement {
|
||||||
|
max-width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-sidebar-primary,
|
||||||
|
.sb-sidebar-secondary {
|
||||||
|
flex-shrink: 0;
|
||||||
|
width: 17rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-announcement__inner {
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
box-sizing: border-box;
|
||||||
|
height: 3rem;
|
||||||
|
|
||||||
|
overflow-x: auto;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Sidebars, with checkbox-based toggle */
|
||||||
|
.sb-sidebar-primary,
|
||||||
|
.sb-sidebar-secondary {
|
||||||
|
position: fixed;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-sidebar-primary {
|
||||||
|
left: -17rem;
|
||||||
|
transition: left 250ms ease-in-out;
|
||||||
|
}
|
||||||
|
.sb-sidebar-secondary {
|
||||||
|
right: -17rem;
|
||||||
|
transition: right 250ms ease-in-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-sidebar-toggle {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
.sb-sidebar-overlay {
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
|
||||||
|
transition: width 0ms ease 250ms, height 0ms ease 250ms, opacity 250ms ease;
|
||||||
|
|
||||||
|
opacity: 0;
|
||||||
|
background-color: rgba(0, 0, 0, 0.54);
|
||||||
|
}
|
||||||
|
|
||||||
|
#sb-sidebar-toggle--primary:checked
|
||||||
|
~ .sb-sidebar-overlay[for="sb-sidebar-toggle--primary"],
|
||||||
|
#sb-sidebar-toggle--secondary:checked
|
||||||
|
~ .sb-sidebar-overlay[for="sb-sidebar-toggle--secondary"] {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
opacity: 1;
|
||||||
|
transition: width 0ms ease, height 0ms ease, opacity 250ms ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
#sb-sidebar-toggle--primary:checked ~ .sb-container .sb-sidebar-primary {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
#sb-sidebar-toggle--secondary:checked ~ .sb-container .sb-sidebar-secondary {
|
||||||
|
right: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Full-width mode */
|
||||||
|
.drop-secondary-sidebar-for-full-width-content
|
||||||
|
.hide-when-secondary-sidebar-shown {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-sidebar-secondary {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Mobile views */
|
||||||
|
.sb-page-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-article-container,
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 100vw;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
padding: 0 1rem;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 32rem) {
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
padding: 0 2rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tablet views */
|
||||||
|
@media (min-width: 42rem) {
|
||||||
|
.sb-article-container {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 42rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 42rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 46rem) {
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 46rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 46rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 50rem) {
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 50rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 50rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Tablet views */
|
||||||
|
@media (min-width: 59rem) {
|
||||||
|
.sb-sidebar-secondary {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
.hide-when-secondary-sidebar-shown {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 59rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 42rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 63rem) {
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 63rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 46rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@media (min-width: 67rem) {
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 67rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 50rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Desktop views */
|
||||||
|
@media (min-width: 76rem) {
|
||||||
|
.sb-sidebar-primary {
|
||||||
|
position: static;
|
||||||
|
}
|
||||||
|
.hide-when-primary-sidebar-shown {
|
||||||
|
display: none !important;
|
||||||
|
}
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 59rem;
|
||||||
|
}
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 42rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Full desktop views */
|
||||||
|
@media (min-width: 80rem) {
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 46rem;
|
||||||
|
}
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 63rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 84rem) {
|
||||||
|
.sb-article,
|
||||||
|
.match-content-width {
|
||||||
|
width: 50rem;
|
||||||
|
}
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 67rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (min-width: 88rem) {
|
||||||
|
.sb-footer-content__inner,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .sb-article,
|
||||||
|
.drop-secondary-sidebar-for-full-width-content .match-content-width {
|
||||||
|
width: 67rem;
|
||||||
|
}
|
||||||
|
.sb-page-width {
|
||||||
|
width: 88rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,144 @@
|
|||||||
|
/* Highlighting utilities for Sphinx HTML documentation. */
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
const SPHINX_HIGHLIGHT_ENABLED = true
|
||||||
|
|
||||||
|
/**
|
||||||
|
* highlight a given string on a node by wrapping it in
|
||||||
|
* span elements with the given class name.
|
||||||
|
*/
|
||||||
|
const _highlight = (node, addItems, text, className) => {
|
||||||
|
if (node.nodeType === Node.TEXT_NODE) {
|
||||||
|
const val = node.nodeValue;
|
||||||
|
const parent = node.parentNode;
|
||||||
|
const pos = val.toLowerCase().indexOf(text);
|
||||||
|
if (
|
||||||
|
pos >= 0 &&
|
||||||
|
!parent.classList.contains(className) &&
|
||||||
|
!parent.classList.contains("nohighlight")
|
||||||
|
) {
|
||||||
|
let span;
|
||||||
|
|
||||||
|
const closestNode = parent.closest("body, svg, foreignObject");
|
||||||
|
const isInSVG = closestNode && closestNode.matches("svg");
|
||||||
|
if (isInSVG) {
|
||||||
|
span = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
||||||
|
} else {
|
||||||
|
span = document.createElement("span");
|
||||||
|
span.classList.add(className);
|
||||||
|
}
|
||||||
|
|
||||||
|
span.appendChild(document.createTextNode(val.substr(pos, text.length)));
|
||||||
|
parent.insertBefore(
|
||||||
|
span,
|
||||||
|
parent.insertBefore(
|
||||||
|
document.createTextNode(val.substr(pos + text.length)),
|
||||||
|
node.nextSibling
|
||||||
|
)
|
||||||
|
);
|
||||||
|
node.nodeValue = val.substr(0, pos);
|
||||||
|
|
||||||
|
if (isInSVG) {
|
||||||
|
const rect = document.createElementNS(
|
||||||
|
"http://www.w3.org/2000/svg",
|
||||||
|
"rect"
|
||||||
|
);
|
||||||
|
const bbox = parent.getBBox();
|
||||||
|
rect.x.baseVal.value = bbox.x;
|
||||||
|
rect.y.baseVal.value = bbox.y;
|
||||||
|
rect.width.baseVal.value = bbox.width;
|
||||||
|
rect.height.baseVal.value = bbox.height;
|
||||||
|
rect.setAttribute("class", className);
|
||||||
|
addItems.push({ parent: parent, target: rect });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if (node.matches && !node.matches("button, select, textarea")) {
|
||||||
|
node.childNodes.forEach((el) => _highlight(el, addItems, text, className));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const _highlightText = (thisNode, text, className) => {
|
||||||
|
let addItems = [];
|
||||||
|
_highlight(thisNode, addItems, text, className);
|
||||||
|
addItems.forEach((obj) =>
|
||||||
|
obj.parent.insertAdjacentElement("beforebegin", obj.target)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Small JavaScript module for the documentation.
|
||||||
|
*/
|
||||||
|
const SphinxHighlight = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* highlight the search words provided in localstorage in the text
|
||||||
|
*/
|
||||||
|
highlightSearchWords: () => {
|
||||||
|
if (!SPHINX_HIGHLIGHT_ENABLED) return; // bail if no highlight
|
||||||
|
|
||||||
|
// get and clear terms from localstorage
|
||||||
|
const url = new URL(window.location);
|
||||||
|
const highlight =
|
||||||
|
localStorage.getItem("sphinx_highlight_terms")
|
||||||
|
|| url.searchParams.get("highlight")
|
||||||
|
|| "";
|
||||||
|
localStorage.removeItem("sphinx_highlight_terms")
|
||||||
|
url.searchParams.delete("highlight");
|
||||||
|
window.history.replaceState({}, "", url);
|
||||||
|
|
||||||
|
// get individual terms from highlight string
|
||||||
|
const terms = highlight.toLowerCase().split(/\s+/).filter(x => x);
|
||||||
|
if (terms.length === 0) return; // nothing to do
|
||||||
|
|
||||||
|
// There should never be more than one element matching "div.body"
|
||||||
|
const divBody = document.querySelectorAll("div.body");
|
||||||
|
const body = divBody.length ? divBody[0] : document.querySelector("body");
|
||||||
|
window.setTimeout(() => {
|
||||||
|
terms.forEach((term) => _highlightText(body, term, "highlighted"));
|
||||||
|
}, 10);
|
||||||
|
|
||||||
|
const searchBox = document.getElementById("searchbox");
|
||||||
|
if (searchBox === null) return;
|
||||||
|
searchBox.appendChild(
|
||||||
|
document
|
||||||
|
.createRange()
|
||||||
|
.createContextualFragment(
|
||||||
|
'<p class="highlight-link">' +
|
||||||
|
'<a href="javascript:SphinxHighlight.hideSearchWords()">' +
|
||||||
|
_("Hide Search Matches") +
|
||||||
|
"</a></p>"
|
||||||
|
)
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* helper function to hide the search marks again
|
||||||
|
*/
|
||||||
|
hideSearchWords: () => {
|
||||||
|
document
|
||||||
|
.querySelectorAll("#searchbox .highlight-link")
|
||||||
|
.forEach((el) => el.remove());
|
||||||
|
document
|
||||||
|
.querySelectorAll("span.highlighted")
|
||||||
|
.forEach((el) => el.classList.remove("highlighted"));
|
||||||
|
localStorage.removeItem("sphinx_highlight_terms")
|
||||||
|
},
|
||||||
|
|
||||||
|
initEscapeListener: () => {
|
||||||
|
// only install a listener if it is really needed
|
||||||
|
if (!DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS) return;
|
||||||
|
|
||||||
|
document.addEventListener("keydown", (event) => {
|
||||||
|
// bail for input elements
|
||||||
|
if (BLACKLISTED_KEY_CONTROL_ELEMENTS.has(document.activeElement.tagName)) return;
|
||||||
|
// bail with special keys
|
||||||
|
if (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey) return;
|
||||||
|
if (DOCUMENTATION_OPTIONS.ENABLE_SEARCH_SHORTCUTS && (event.key === "Escape")) {
|
||||||
|
SphinxHighlight.hideSearchWords();
|
||||||
|
event.preventDefault();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
_ready(SphinxHighlight.highlightSearchWords);
|
||||||
|
_ready(SphinxHighlight.initEscapeListener);
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
#furo-sidebar-ad-placement{padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)}#furo-sidebar-ad-placement .ethical-sidebar{background:var(--color-background-secondary);border:none;box-shadow:none}#furo-sidebar-ad-placement .ethical-sidebar:hover{background:var(--color-background-hover)}#furo-sidebar-ad-placement .ethical-sidebar a{color:var(--color-foreground-primary)}#furo-sidebar-ad-placement .ethical-callout a{color:var(--color-foreground-secondary)!important}#furo-readthedocs-versions{background:transparent;display:block;position:static;width:100%}#furo-readthedocs-versions .rst-versions{background:#1a1c1e}#furo-readthedocs-versions .rst-current-version{background:var(--color-sidebar-item-background);cursor:unset}#furo-readthedocs-versions .rst-current-version:hover{background:var(--color-sidebar-item-background)}#furo-readthedocs-versions .rst-current-version .fa-book{color:var(--color-foreground-primary)}#furo-readthedocs-versions>.rst-other-versions{padding:0}#furo-readthedocs-versions>.rst-other-versions small{opacity:1}#furo-readthedocs-versions .injected .rst-versions{position:unset}#furo-readthedocs-versions:focus-within,#furo-readthedocs-versions:hover{box-shadow:0 0 0 1px var(--color-sidebar-background-border)}#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:hover .rst-current-version{background:#1a1c1e;font-size:inherit;height:auto;line-height:inherit;padding:12px;text-align:right}#furo-readthedocs-versions:focus-within .rst-current-version .fa-book,#furo-readthedocs-versions:hover .rst-current-version .fa-book{color:#fff;float:left}#furo-readthedocs-versions:focus-within .fa-caret-down,#furo-readthedocs-versions:hover .fa-caret-down{display:none}#furo-readthedocs-versions:focus-within .injected,#furo-readthedocs-versions:focus-within .rst-current-version,#furo-readthedocs-versions:focus-within .rst-other-versions,#furo-readthedocs-versions:hover .injected,#furo-readthedocs-versions:hover .rst-current-version,#furo-readthedocs-versions:hover .rst-other-versions{display:block}#furo-readthedocs-versions:focus-within>.rst-current-version,#furo-readthedocs-versions:hover>.rst-current-version{display:none}.highlight:hover button.copybtn{color:var(--color-code-foreground)}.highlight button.copybtn{align-items:center;background-color:var(--color-code-background);border:none;color:var(--color-background-item);cursor:pointer;height:1.25em;opacity:1;right:.5rem;top:.625rem;transition:color .3s,opacity .3s;width:1.25em}.highlight button.copybtn:hover{background-color:var(--color-code-background);color:var(--color-brand-content)}.highlight button.copybtn:after{background-color:transparent;color:var(--color-code-foreground);display:none}.highlight button.copybtn.success{color:#22863a;transition:color 0ms}.highlight button.copybtn.success:after{display:block}.highlight button.copybtn svg{padding:0}body{--sd-color-primary:var(--color-brand-primary);--sd-color-primary-highlight:var(--color-brand-content);--sd-color-primary-text:var(--color-background-primary);--sd-color-shadow:rgba(0,0,0,.05);--sd-color-card-border:var(--color-card-border);--sd-color-card-border-hover:var(--color-brand-content);--sd-color-card-background:var(--color-card-background);--sd-color-card-text:var(--color-foreground-primary);--sd-color-card-header:var(--color-card-marginals-background);--sd-color-card-footer:var(--color-card-marginals-background);--sd-color-tabs-label-active:var(--color-brand-content);--sd-color-tabs-label-hover:var(--color-foreground-muted);--sd-color-tabs-label-inactive:var(--color-foreground-muted);--sd-color-tabs-underline-active:var(--color-brand-content);--sd-color-tabs-underline-hover:var(--color-foreground-border);--sd-color-tabs-underline-inactive:var(--color-background-border);--sd-color-tabs-overline:var(--color-background-border);--sd-color-tabs-underline:var(--color-background-border)}.sd-tab-content{box-shadow:0 -2px var(--sd-color-tabs-overline),0 1px var(--sd-color-tabs-underline)}.sd-card{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)}.sd-shadow-sm{box-shadow:0 .1rem .25rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-md{box-shadow:0 .3rem .75rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-shadow-lg{box-shadow:0 .6rem 1.5rem var(--sd-color-shadow),0 0 .0625rem rgba(0,0,0,.1)!important}.sd-card-hover:hover{transform:none}.sd-cards-carousel{gap:.25rem;padding:.25rem}body{--tabs--label-text:var(--color-foreground-muted);--tabs--label-text--hover:var(--color-foreground-muted);--tabs--label-text--active:var(--color-brand-content);--tabs--label-text--active--hover:var(--color-brand-content);--tabs--label-background:transparent;--tabs--label-background--hover:transparent;--tabs--label-background--active:transparent;--tabs--label-background--active--hover:transparent;--tabs--padding-x:0.25em;--tabs--margin-x:1em;--tabs--border:var(--color-background-border);--Line truncated
|
||||||
|
/*# sourceMappingURL=furo-extensions.css.map*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"styles/furo-extensions.css","mappings":"AAGA,2BACE,oFACA,4CAKE,6CAHA,YACA,eAEA,CACA,kDACE,yCAEF,8CACE,sCAEJ,8CACE,kDAEJ,2BAGE,uBACA,cAHA,gBACA,UAEA,CAGA,yCACE,mBAEF,gDAEE,gDADA,YACA,CACA,sDACE,gDACF,yDACE,sCAEJ,+CACE,UACA,qDACE,UAGF,mDACE,eAEJ,yEAEE,4DAEA,mHASE,mBAPA,kBAEA,YADA,oBAGA,aADA,gBAIA,CAEA,qIAEE,WADA,UACA,CAEJ,uGACE,aAEF,iUAGE,cAEF,mHACE,aC1EJ,gCACE,mCAEF,0BAKE,mBAUA,8CACA,YAFA,mCAKA,eAZA,cALA,UASA,YADA,YAYA,iCAdA,YAcA,CAEA,gCAEE,8CADA,gCACA,CAEF,gCAGE,6BADA,mCADA,YAEA,CAEF,kCAEE,cADA,oBACA,CACA,wCACE,cAEJ,8BACE,UC5CN,KAEE,6CAA8C,CAC9C,uDAAwD,CACxD,uDAAwD,CAGxD,iCAAsC,CAGtC,+CAAgD,CAChD,uDAAwD,CACxD,uDAAwD,CACxD,oDAAqD,CACrD,6DAA8D,CAC9D,6DAA8D,CAG9D,uDAAwD,CACxD,yDAA0D,CAC1D,4DAA6D,CAC7D,2DAA4D,CAC5D,8DAA+D,CAC/D,iEAAkE,CAClE,uDAAwD,CACxD,wDAAyD,CAG3D,gBACE,qFAGF,SACE,6EAEF,cACE,uFAEF,cACE,uFAEF,cACE,uFAGF,qBACE,eAEF,mBACE,WACA,eChDF,KACE,gDAAiD,CACjD,uDAAwD,CACxD,qDAAsD,CACtD,4DAA6D,CAC7D,oCAAqC,CACrC,2CAA4C,CAC5C,4CAA6C,CAC7C,mDAAoD,CACpD,wBAAyB,CACzB,oBAAqB,CACrB,6CAA8C,CAC9C,gCAAiC,CACjC,yDAA0D,CAC1D,uDAAwD,CACxD,8DAA+D,CCbjE,uBACE,eACA,eACA,gBAGF,iBACE,YACA,+EAGF,iBACE,mDACA","sources":["webpack:///./src/furo/assets/styles/extensions/_readthedocs.sass","webpack:///./src/furo/assets/styles/extensions/_copybutton.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-design.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-inline-tabs.sass","webpack:///./src/furo/assets/styles/extensions/_sphinx-panels.sass"],"sourcesContent":["// This file contains the styles used for tweaking how ReadTheDoc's embedded\n// contents would show up inside the theme.\n\n#furo-sidebar-ad-placement\n padding: var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal)\n .ethical-sidebar\n // Remove the border and box-shadow.\n border: none\n box-shadow: none\n // Manage the background colors.\n background: var(--color-background-secondary)\n &:hover\n background: var(--color-background-hover)\n // Ensure the text is legible.\n a\n color: var(--color-foreground-primary)\n\n .ethical-callout a\n color: var(--color-foreground-secondary) !important\n\n#furo-readthedocs-versions\n position: static\n width: 100%\n background: transparent\n display: block\n\n // Make the background color fit with the theme's aesthetic.\n .rst-versions\n background: rgb(26, 28, 30)\n\n .rst-current-version\n cursor: unset\n background: var(--color-sidebar-item-background)\n &:hover\n background: var(--color-sidebar-item-background)\n .fa-book\n color: var(--color-foreground-primary)\n\n > .rst-other-versions\n padding: 0\n small\n opacity: 1\n\n .injected\n .rst-versions\n position: unset\n\n &:hover,\n &:focus-within\n box-shadow: 0 0 0 1px var(--color-sidebar-background-border)\n\n .rst-current-version\n // Undo the tweaks done in RTD's CSS\n font-size: inherit\n line-height: inherit\n height: auto\n text-align: right\n padding: 12px\n\n // Match the rest of the body\n background: #1a1c1e\n\n .fa-book\n float: left\n color: white\n\n .fa-caret-down\n display: none\n\n .rst-current-version,\n .rst-other-versions,\n .injected\n display: block\n\n > .rst-current-version\n display: none\n",".highlight\n &:hover button.copybtn\n color: var(--color-code-foreground)\n\n button.copybtn\n // Make it visible\n opacity: 1\n\n // Align things correctly\n align-items: center\n\n height: 1.25em\n width: 1.25em\n\n top: 0.625rem // $code-spacing-vertical\n right: 0.5rem\n\n // Make it look better\n color: var(--color-background-item)\n background-color: var(--color-code-background)\n border: none\n\n // Change to cursor to make it obvious that you can click on it\n cursor: pointer\n\n // Transition smoothly, for aesthetics\n transition: color 300ms, opacity 300ms\n\n &:hover\n color: var(--color-brand-content)\n background-color: var(--color-code-background)\n\n &::after\n display: none\n color: var(--color-code-foreground)\n background-color: transparent\n\n &.success\n transition: color 0ms\n color: #22863a\n &::after\n display: block\n\n svg\n padding: 0\n","body\n // Colors\n --sd-color-primary: var(--color-brand-primary)\n --sd-color-primary-highlight: var(--color-brand-content)\n --sd-color-primary-text: var(--color-background-primary)\n\n // Shadows\n --sd-color-shadow: rgba(0, 0, 0, 0.05)\n\n // Cards\n --sd-color-card-border: var(--color-card-border)\n --sd-color-card-border-hover: var(--color-brand-content)\n --sd-color-card-background: var(--color-card-background)\n --sd-color-card-text: var(--color-foreground-primary)\n --sd-color-card-header: var(--color-card-marginals-background)\n --sd-color-card-footer: var(--color-card-marginals-background)\n\n // Tabs\n --sd-coloLine truncated
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{-webkit-text-size-adjust:100%;line-height:1.15}body{margin:0}main{display:block}h1{font-size:2em;margin:.67em 0}hr{box-sizing:content-box;height:0;overflow:visible}pre{font-family:monospace,monospace;font-size:1em}a{background-color:transparent}abbr[title]{border-bottom:none;text-decoration:underline;text-decoration:underline dotted}b,strong{font-weight:bolder}code,kbd,samp{font-family:monospace,monospace;font-size:1em}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}button,input,optgroup,select,textarea{font-family:inherit;font-size:100%;line-height:1.15;margin:0}button,input{overflow:visible}button,select{text-transform:none}[type=button],[type=reset],[type=submit],button{-webkit-appearance:button}[type=button]::-moz-focus-inner,[type=reset]::-moz-focus-inner,[type=submit]::-moz-focus-inner,button::-moz-focus-inner{border-style:none;padding:0}[type=button]:-moz-focusring,[type=reset]:-moz-focusring,[type=submit]:-moz-focusring,button:-moz-focusring{outline:1px dotted ButtonText}fieldset{padding:.35em .75em .625em}legend{box-sizing:border-box;color:inherit;display:table;max-width:100%;padding:0;white-space:normal}progress{vertical-align:baseline}textarea{overflow:auto}[type=checkbox],[type=radio]{box-sizing:border-box;padding:0}[type=number]::-webkit-inner-spin-button,[type=number]::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}[type=search]::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}details{display:block}summary{display:list-item}[hidden],template{display:none}@media print{.content-icon-container,.headerlink,.mobile-header,.related-pages{display:none!important}.highlight{border:.1pt solid var(--color-foreground-border)}}.visually-hidden{clip:rect(0,0,0,0)!important;border:0!important;height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;white-space:nowrap!important;width:1px!important}:-moz-focusring{outline:auto}body{--font-stack:-apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-serif,Apple Color Emoji,Segoe UI Emoji;--font-stack--monospace:"SFMono-Regular",Menlo,Consolas,Monaco,Liberation Mono,Lucida Console,monospace;--font-size--normal:100%;--font-size--small:87.5%;--font-size--small--2:81.25%;--font-size--small--3:75%;--font-size--small--4:62.5%;--sidebar-caption-font-size:var(--font-size--small--2);--sidebar-item-font-size:var(--font-size--small);--sidebar-search-input-font-size:var(--font-size--small);--toc-font-size:var(--font-size--small--3);--toc-font-size--mobile:var(--font-size--normal);--toc-title-font-size:var(--font-size--small--4);--admonition-font-size:0.8125rem;--admonition-title-font-size:0.8125rem;--code-font-size:var(--font-size--small--2);--api-font-size:var(--font-size--small);--header-height:calc(var(--sidebar-item-line-height) + var(--sidebar-item-spacing-vertical)*4);--header-padding:0.5rem;--sidebar-tree-space-above:1.5rem;--sidebar-caption-space-above:1rem;--sidebar-item-line-height:1rem;--sidebar-item-spacing-vertical:0.5rem;--sidebar-item-spacing-horizontal:1rem;--sidebar-item-height:calc(var(--sidebar-item-line-height) + var(--sidebar-item-spacing-vertical)*2);--sidebar-expander-width:var(--sidebar-item-height);--sidebar-search-space-above:0.5rem;--sidebar-search-input-spacing-vertical:0.5rem;--sidebar-search-input-spacing-horizontal:0.5rem;--sidebar-search-input-height:1rem;--sidebar-search-icon-size:var(--sidebar-search-input-height);--toc-title-padding:0.25rem 0;--toc-spacing-vertical:1.5rem;--toc-spacing-horizontal:1.5rem;--toc-item-spacing-vertical:0.4rem;--toc-item-spacing-horizontal:1rem;--icon-search:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" fill="none" stroke-linecap="round" stroke-linejoin="round"><path d="M0 0h24v24H0z" stroke="none"/><circle cx="10" cy="10" r="7"/><path d="m21 21-6-6"/></svg>');--icon-pencil:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.71 7.04c.39-.39.39-1.04 0-1.41l-2.34-2.34c-.37-.39-1.02-.39-1.41 0l-1.84 1.83 3.75 3.75M3 17.25V21h3.75L17.81 9.93l-3.75-3.75L3 17.25z"/></svg>');--icon-abstract:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 5h16v2H4V5m0 4h16v2H4V9m0 4h16v2H4v-2m0 4h10v2H4v-2z"/></svg>');--icon-info:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M13 9h-2V7h2m0 10h-2v-6h2m-1-9A10 10 0 0 0 2 12a10 10 0 0 0 10 10 10 10 0 0 0 10-10A10 10 0 0 0 12 2z"/></svg>');--icon-flame:url('data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M17.55 11.2Line truncated
|
||||||
|
/*# sourceMappingURL=furo.css.map*/
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
{"version":3,"file":"styles/furo.css","mappings":"AAAA,2EAA2E,CAU3E,KAEE,6BAA8B,CAD9B,gBAEF,CASA,KACE,QACF,CAMA,KACE,aACF,CAOA,GACE,aAAc,CACd,cACF,CAUA,GACE,sBAAuB,CACvB,QAAS,CACT,gBACF,CAOA,IACE,+BAAiC,CACjC,aACF,CASA,EACE,4BACF,CAOA,YACE,kBAAmB,CACnB,yBAA0B,CAC1B,gCACF,CAMA,SAEE,kBACF,CAOA,cAGE,+BAAiC,CACjC,aACF,CAeA,QAEE,aAAc,CACd,aAAc,CACd,iBAAkB,CAClB,uBACF,CAEA,IACE,aACF,CAEA,IACE,SACF,CASA,IACE,iBACF,CAUA,sCAKE,mBAAoB,CACpB,cAAe,CACf,gBAAiB,CACjB,QACF,CAOA,aAEE,gBACF,CAOA,cAEE,mBACF,CAMA,gDAIE,yBACF,CAMA,wHAIE,iBAAkB,CAClB,SACF,CAMA,4GAIE,6BACF,CAMA,SACE,0BACF,CASA,OACE,qBAAsB,CACtB,aAAc,CACd,aAAc,CACd,cAAe,CACf,SAAU,CACV,kBACF,CAMA,SACE,uBACF,CAMA,SACE,aACF,CAOA,6BAEE,qBAAsB,CACtB,SACF,CAMA,kFAEE,WACF,CAOA,cACE,4BAA6B,CAC7B,mBACF,CAMA,yCACE,uBACF,CAOA,6BACE,yBAA0B,CAC1B,YACF,CASA,QACE,aACF,CAMA,QACE,iBACF,CAiBA,kBACE,YACF,CCvVA,aAcE,kEACE,uBAOF,WACE,iDARA,CCpBJ,iBAOE,6BAEA,mBANA,qBAEA,sBACA,0BAFA,oBAHA,4BAOA,6BANA,mBAOA,CAEF,gBACE,aCPF,KCGE,mHAEA,wGAGA,wBAAyB,CACzB,wBAAyB,CACzB,4BAA6B,CAC7B,yBAA0B,CAC1B,2BAA4B,CAG5B,sDAAuD,CACvD,gDAAiD,CACjD,wDAAyD,CAGzD,0CAA2C,CAC3C,gDAAiD,CACjD,gDAAiD,CAKjD,gCAAiC,CACjC,sCAAuC,CAGvC,2CAA4C,CAG5C,uCAAwC,CChCxC,+FAGA,uBAAwB,CAGxB,iCAAkC,CAClC,kCAAmC,CAEnC,+BAAgC,CAChC,sCAAuC,CACvC,sCAAuC,CACvC,qGAIA,mDAAoD,CAEpD,mCAAoC,CACpC,8CAA+C,CAC/C,gDAAiD,CACjD,kCAAmC,CACnC,6DAA8D,CAG9D,6BAA8B,CAC9B,6BAA8B,CAC9B,+BAAgC,CAChC,kCAAmC,CACnC,kCAAmC,CCPjC,ukBCYA,srCAZF,kaCVA,mLAOA,oTAWA,2UAaA,0CACA,gEACA,0CAGA,gEAUA,yCACA,+DAIA,4CACA,kEAGA,sGAEA,mGAGA,sCACA,2DAEA,4CACA,kEACA,uCACA,6DAEA,2GACA,+CAGA,+MAOA,4BACA,2FAIA,4DACA,sEACA,kEACA,sEACA,gDAGA,kCACA,uEACA,mCACA,4DACA,yDAGA,2DACA,qDAGA,0CACA,8CACA,oDACA,oDL7GF,iCAEA,iEAME,oCKyGA,yDAIA,sCACA,kCACA,sDAGA,0CACA,kEACA,oDAEA,sDAGA,oCACA,oEAIA,CAGA,yDAGA,qDACA,oDAGA,6DAIA,iEAGA,2DAEA,2DL9IE,4DAEA,gEAIF,gEKgGA,gFAIA,oNAOA,qDAEA,gFAIA,4DAIA,oEAMA,yEAIA,6DACA,0DAGA,uDAGA,qDAEA,wDLpII,6DAEA,yDACE,2DAMN,uCAIA,yCACE,8CAGF,sDMjDA,6DAKA,oCAIA,4CACA,kBAGF,sBAMA,2BAME,qCAGA,qCAEA,iCAEA,+BAEA,mCAEA,qCAIA,CACA,gCACA,gDAKA,kCAIA,6BAEA,0CAQA,kCAIF,8BAGE,8BACA,uCAGF,sCAKE,kCAEA,sDACA,uEAGE,sDACA,gGACF,wCAGI,sBACA,yHCzEJ,2BACA,qCAGF,sEAGE,kEAGA,sHAGA,2IACE,8BACA,8BAOF,uCAEA,wEAGA,sDACA,iCAKA,CAEF,qCAEE,sDACA,gCACA,gEAKA,+CAOE,sBACA,gEAGA,GAYF,yLACA,gDAGA,mBAEA,wCACA,wCAGF,CAEE,iCAGF,wBACE,mBAIF,oBAFE,eAEF,CAJE,gBAEA,CAMA,mBACA,mBAGA,mDAIA,YACA,mBAEA,CACA,kBAGF,OAJE,kBAQA,CAJF,GACE,aAGA,IACA,mCACA,qBAEF,IACE,oBAEA,aACA,CAFA,WAEA,GAEE,oBAKJ,CAPE,gBAOF,aACE,+CAGA,UAHA,kCAGA,4BACA,GAEA,uBACA,CAHA,yBAEA,CACA,yDAGF,kDAEE,SACA,8BAEA,iEAGE,yDACA,sEAEA,iEAEE,yHAKN,kDAMA,0DAIE,CANA,oBAMA,0GAOA,aAEF,CAHE,YAGF,4HAWE,+CACE,iCAIJ,0CAGE,CALE,qCAEJ,CAHI,WAMF,SAIA,0CAIA,CANF,qCAME,mBACA,gBACA,gBAIA,+CAEE,CAIF,kDAGF,CAPI,8BAGJ,CAKE,YACF,CAbE,2BAEA,CAHA,WAYF,UAEA,yBACE,kBAIA,iEAKA,iCAGA,mDAEA,mBACF,OACE,iBAQA,0CAIA,CAPA,6DAGA,CALF,qBAEE,CAOA,qCAEE,CAGA,eAHA,sBAGA,gCAKF,qBACE,WACA,aACA,sCAEA,mBAOJ,6BASE,kCACA,CAHA,sBACA,aACA,CARA,uBAGA,gBAEA,MAIA,6BAEA,yBACA,2DAEA,sBAGA,8BACA,CANA,wBAMA,2BAEE,YACA,sBACA,WAEF,CAFE,UAEF,eAeF,kBAEE,CAhBE,qDAGA,qCAOJ,CAEI,YAEJ,CAJA,2BAEI,CAIF,eACE,qBACF,4CAIE,uBACA,sBACF,cACE,CAFA,aACF,CAEE,kBADA,kBACA,yBAGF,oCACE,6DAMF,qDAGE,CC1VY,8BDgWd,oCAEA,uDAEA,CACE,8CAIA,gCAEA,YACA,8CACA,CAEA,oCAGE,CAHF,oCAGE,mBAEA,mDADA,YADA,qBACA,WACA,sBAEE,WAGN,kBACE,qCAIA,eADF,YACE,iDAKA,uCAEA,YACA,+CAMA,kBAEJ,CAHI,sBAGJ,mBAEI,cAEF,qCAGE,YE1ZJ,CFyZI,WACA,CExZF,SAEA,CAFA,mBADA,gBACA,CAFF,iBAIE,6CAEA,yBACA,uFAEA,kCAGA,mBAOA,gCAGF,CAPE,SAIA,UAPA,cAGA,4DAIA,CAJA,OAOF,kBACE,wBACA,2BAEA,gCACA,CAFA,UAEA,aAGA,iCACA,CAHA,UAGA,wCAIA,sBAHA,UAGA,6CAGE,OADA,KACA,CACA,4BAIJ,WACE,WADF,UACE,kCACA,QADA,KACA,cAEE,0CACA,CADA,mBACA,wEAIF,CANE,aACA,mBADA,MACA,CAKF,eACE,CANA,iCADA,eADF,oBACE,CACA,SAMA,2BADF,UACE,kBACA,gFACA,kDAMF,mBADF,YACE,6BAGE,uCACE,2CAEE,oDADF,4BACE,YADF,KAEE,kEACE,yCACA,uDANN,iBACE,uBACA,CADA,+BACA,uEACE,kCACA,6BAEE,mBADA,0CACA,CAFF,uBACE,sBACA,0DALJ,wEACA,sEACE,YACA,yDACE,oDACA,6DANN,kCACE,kCACA,gBADA,UACA,yBACE,wDACA,cADA,UACA,qBACE,6CACA,yFALJ,sCACA,CAEE,gBACE,CAHJ,gBAGI,sBAHJ,uBACE,4DACA,4CACE,iDAJJ,2CACA,CADA,gBAEE,gBAGE,sBALJ,+BAII,iBAFF,gDACA,WACE,YADF,uCACE,6EACA,2BANN,8CACE,kDACA,0CACE,8BACA,yFACE,sBACA,sFALJ,mEACA,sBACE,kEACA,6EACE,uCACA,kEALJ,qGAEE,kEACA,6EACE,uCACA,kEALJ,8CACA,uDACE,sEACA,2EACE,sCACA,iEALJ,mGACA,qCACE,oDACA,0DACE,6GACA,gDAGR,yDCpEA,sEACE,CACA,6GACE,gEACF,iGAIF,wFACE,qDAGA,mGAEE,2CAEF,4FACE,gCACF,wGACE,8DAEE,6FAIA,iJAKN,6GACE,gDAKF,yDAGA,qCACA,6BAIA,kBACA,qDAIA,oCAGE,+DAIA,2CAKF,oDAIA,sCAEE,8BACJ,qBACE,wDAGA,uCAEA,kEAIF,8CAGE,uDAEE,oCAGJ,4BAEE,6BC9FA,gEAGE,+CCHJ,0EAGE,sDAKA,gEACE,qCACA,8BAEA,oCAGF,wBACE,4FCdF,gBAEA,yGAIE,kBAOJ,CAKE,2MAUE,oBAEF,wGASE,iCAEA,CAJF,wBAIE,8GAOF,mBAGA,2GAEE,mBAGF,6HAQF,YACE,mIAOA,eAEA,CAFA,YAEA,4FAEA,8BAEA,MAaA,sCAIA,CANE,oBAEF,CAXE,wCACE,CAHJ,8BAEE,CAFF,gBASA,+BACA,mBAOA,YACE,6EACA,eACA,aACA,eACA,mCACA,0CAEF,8BA7FwB,CA+FtB,qCACA,6CAGF,CAHE,eAGF,wCAGE,YACA,iBAEA,mCACE,0DAMF,qBACA,CAFF,kBAEE,+BAEA,4BACA,2EC/HF,8CACA,qDAKA,iCACA,kBAEA,2FACA,iCAEE,CAEE,eAEF,CAHA,kBACE,CAFF,wBAIA,8BAIE,gBAHA,YAGA,4DAEA,mBACE,qCAGJLine truncated
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
(function (global, factory) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define('underscore', factory) :
|
typeof define === 'function' && define.amd ? define('underscore', factory) :
|
||||||
(global = global || self, (function () {
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, (function () {
|
||||||
var current = global._;
|
var current = global._;
|
||||||
var exports = global._ = factory();
|
var exports = global._ = factory();
|
||||||
exports.noConflict = function () { global._ = current; return exports; };
|
exports.noConflict = function () { global._ = current; return exports; };
|
||||||
}()));
|
}()));
|
||||||
}(this, (function () {
|
}(this, (function () {
|
||||||
// Underscore.js 1.12.0
|
// Underscore.js 1.13.1
|
||||||
// https://underscorejs.org
|
// https://underscorejs.org
|
||||||
// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
|
||||||
// Underscore may be freely distributed under the MIT license.
|
// Underscore may be freely distributed under the MIT license.
|
||||||
|
|
||||||
// Current version.
|
// Current version.
|
||||||
var VERSION = '1.12.0';
|
var VERSION = '1.13.1';
|
||||||
|
|
||||||
// Establish the root object, `window` (`self`) in the browser, `global`
|
// Establish the root object, `window` (`self`) in the browser, `global`
|
||||||
// on the server, or `this` in some virtual machines. We use `self`
|
// on the server, or `this` in some virtual machines. We use `self`
|
||||||
@@ -170,7 +170,7 @@
|
|||||||
var isArray = nativeIsArray || tagTester('Array');
|
var isArray = nativeIsArray || tagTester('Array');
|
||||||
|
|
||||||
// Internal function to check whether `key` is an own property name of `obj`.
|
// Internal function to check whether `key` is an own property name of `obj`.
|
||||||
function has(obj, key) {
|
function has$1(obj, key) {
|
||||||
return obj != null && hasOwnProperty.call(obj, key);
|
return obj != null && hasOwnProperty.call(obj, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -181,7 +181,7 @@
|
|||||||
(function() {
|
(function() {
|
||||||
if (!isArguments(arguments)) {
|
if (!isArguments(arguments)) {
|
||||||
isArguments = function(obj) {
|
isArguments = function(obj) {
|
||||||
return has(obj, 'callee');
|
return has$1(obj, 'callee');
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}());
|
}());
|
||||||
@@ -268,7 +268,7 @@
|
|||||||
|
|
||||||
// Constructor is a special case.
|
// Constructor is a special case.
|
||||||
var prop = 'constructor';
|
var prop = 'constructor';
|
||||||
if (has(obj, prop) && !keys.contains(prop)) keys.push(prop);
|
if (has$1(obj, prop) && !keys.contains(prop)) keys.push(prop);
|
||||||
|
|
||||||
while (nonEnumIdx--) {
|
while (nonEnumIdx--) {
|
||||||
prop = nonEnumerableProps[nonEnumIdx];
|
prop = nonEnumerableProps[nonEnumIdx];
|
||||||
@@ -284,7 +284,7 @@
|
|||||||
if (!isObject(obj)) return [];
|
if (!isObject(obj)) return [];
|
||||||
if (nativeKeys) return nativeKeys(obj);
|
if (nativeKeys) return nativeKeys(obj);
|
||||||
var keys = [];
|
var keys = [];
|
||||||
for (var key in obj) if (has(obj, key)) keys.push(key);
|
for (var key in obj) if (has$1(obj, key)) keys.push(key);
|
||||||
// Ahem, IE < 9.
|
// Ahem, IE < 9.
|
||||||
if (hasEnumBug) collectNonEnumProps(obj, keys);
|
if (hasEnumBug) collectNonEnumProps(obj, keys);
|
||||||
return keys;
|
return keys;
|
||||||
@@ -318,24 +318,24 @@
|
|||||||
// If Underscore is called as a function, it returns a wrapped object that can
|
// If Underscore is called as a function, it returns a wrapped object that can
|
||||||
// be used OO-style. This wrapper holds altered versions of all functions added
|
// be used OO-style. This wrapper holds altered versions of all functions added
|
||||||
// through `_.mixin`. Wrapped objects may be chained.
|
// through `_.mixin`. Wrapped objects may be chained.
|
||||||
function _(obj) {
|
function _$1(obj) {
|
||||||
if (obj instanceof _) return obj;
|
if (obj instanceof _$1) return obj;
|
||||||
if (!(this instanceof _)) return new _(obj);
|
if (!(this instanceof _$1)) return new _$1(obj);
|
||||||
this._wrapped = obj;
|
this._wrapped = obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
_.VERSION = VERSION;
|
_$1.VERSION = VERSION;
|
||||||
|
|
||||||
// Extracts the result from a wrapped and chained object.
|
// Extracts the result from a wrapped and chained object.
|
||||||
_.prototype.value = function() {
|
_$1.prototype.value = function() {
|
||||||
return this._wrapped;
|
return this._wrapped;
|
||||||
};
|
};
|
||||||
|
|
||||||
// Provide unwrapping proxies for some methods used in engine operations
|
// Provide unwrapping proxies for some methods used in engine operations
|
||||||
// such as arithmetic and JSON stringification.
|
// such as arithmetic and JSON stringification.
|
||||||
_.prototype.valueOf = _.prototype.toJSON = _.prototype.value;
|
_$1.prototype.valueOf = _$1.prototype.toJSON = _$1.prototype.value;
|
||||||
|
|
||||||
_.prototype.toString = function() {
|
_$1.prototype.toString = function() {
|
||||||
return String(this._wrapped);
|
return String(this._wrapped);
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -370,8 +370,8 @@
|
|||||||
// Internal recursive comparison function for `_.isEqual`.
|
// Internal recursive comparison function for `_.isEqual`.
|
||||||
function deepEq(a, b, aStack, bStack) {
|
function deepEq(a, b, aStack, bStack) {
|
||||||
// Unwrap any wrapped objects.
|
// Unwrap any wrapped objects.
|
||||||
if (a instanceof _) a = a._wrapped;
|
if (a instanceof _$1) a = a._wrapped;
|
||||||
if (b instanceof _) b = b._wrapped;
|
if (b instanceof _$1) b = b._wrapped;
|
||||||
// Compare `[[Class]]` names.
|
// Compare `[[Class]]` names.
|
||||||
var className = toString.call(a);
|
var className = toString.call(a);
|
||||||
if (className !== toString.call(b)) return false;
|
if (className !== toString.call(b)) return false;
|
||||||
@@ -463,7 +463,7 @@
|
|||||||
while (length--) {
|
while (length--) {
|
||||||
// Deep compare each member
|
// Deep compare each member
|
||||||
key = _keys[length];
|
key = _keys[length];
|
||||||
if (!(has(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
|
if (!(has$1(b, key) && eq(a[key], b[key], aStack, bStack))) return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Remove the first object from the stack of traversed objects.
|
// Remove the first object from the stack of traversed objects.
|
||||||
@@ -642,15 +642,15 @@
|
|||||||
|
|
||||||
// Normalize a (deep) property `path` to array.
|
// Normalize a (deep) property `path` to array.
|
||||||
// Like `_.iteratee`, this function can be customized.
|
// Like `_.iteratee`, this function can be customized.
|
||||||
function toPath(path) {
|
function toPath$1(path) {
|
||||||
return isArray(path) ? path : [path];
|
return isArray(path) ? path : [path];
|
||||||
}
|
}
|
||||||
_.toPath = toPath;
|
_$1.toPath = toPath$1;
|
||||||
|
|
||||||
// Internal wrapper for `_.toPath` to enable minification.
|
// Internal wrapper for `_.toPath` to enable minification.
|
||||||
// Similar to `cb` for `_.iteratee`.
|
// Similar to `cb` for `_.iteratee`.
|
||||||
function toPath$1(path) {
|
function toPath(path) {
|
||||||
return _.toPath(path);
|
return _$1.toPath(path);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Internal function to obtain a nested property in `obj` along `path`.
|
// Internal function to obtain a nested property in `obj` along `path`.
|
||||||
@@ -668,19 +668,19 @@
|
|||||||
// `undefined`, return `defaultValue` instead.
|
// `undefined`, return `defaultValue` instead.
|
||||||
// The `path` is normalized through `_.toPath`.
|
// The `path` is normalized through `_.toPath`.
|
||||||
function get(object, path, defaultValue) {
|
function get(object, path, defaultValue) {
|
||||||
var value = deepGet(object, toPath$1(path));
|
var value = deepGet(object, toPath(path));
|
||||||
return isUndefined(value) ? defaultValue : value;
|
return isUndefined(value) ? defaultValue : value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shortcut function for checking if an object has a given property directly on
|
// Shortcut function for checking if an object has a given property directly on
|
||||||
// itself (in other words, not on a prototype). Unlike the internal `has`
|
// itself (in other words, not on a prototype). Unlike the internal `has`
|
||||||
// function, this public version can also traverse nested properties.
|
// function, this public version can also traverse nested properties.
|
||||||
function has$1(obj, path) {
|
function has(obj, path) {
|
||||||
path = toPath$1(path);
|
path = toPath(path);
|
||||||
var length = path.length;
|
var length = path.length;
|
||||||
for (var i = 0; i < length; i++) {
|
for (var i = 0; i < length; i++) {
|
||||||
var key = path[i];
|
var key = path[i];
|
||||||
if (!has(obj, key)) return false;
|
if (!has$1(obj, key)) return false;
|
||||||
obj = obj[key];
|
obj = obj[key];
|
||||||
}
|
}
|
||||||
return !!length;
|
return !!length;
|
||||||
@@ -703,7 +703,7 @@
|
|||||||
// Creates a function that, when passed an object, will traverse that object’s
|
// Creates a function that, when passed an object, will traverse that object’s
|
||||||
// properties down the given `path`, specified as an array of keys or indices.
|
// properties down the given `path`, specified as an array of keys or indices.
|
||||||
function property(path) {
|
function property(path) {
|
||||||
path = toPath$1(path);
|
path = toPath(path);
|
||||||
return function(obj) {
|
return function(obj) {
|
||||||
return deepGet(obj, path);
|
return deepGet(obj, path);
|
||||||
};
|
};
|
||||||
@@ -747,12 +747,12 @@
|
|||||||
function iteratee(value, context) {
|
function iteratee(value, context) {
|
||||||
return baseIteratee(value, context, Infinity);
|
return baseIteratee(value, context, Infinity);
|
||||||
}
|
}
|
||||||
_.iteratee = iteratee;
|
_$1.iteratee = iteratee;
|
||||||
|
|
||||||
// The function we call internally to generate a callback. It invokes
|
// The function we call internally to generate a callback. It invokes
|
||||||
// `_.iteratee` if overridden, otherwise `baseIteratee`.
|
// `_.iteratee` if overridden, otherwise `baseIteratee`.
|
||||||
function cb(value, context, argCount) {
|
function cb(value, context, argCount) {
|
||||||
if (_.iteratee !== iteratee) return _.iteratee(value, context);
|
if (_$1.iteratee !== iteratee) return _$1.iteratee(value, context);
|
||||||
return baseIteratee(value, context, argCount);
|
return baseIteratee(value, context, argCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -840,7 +840,7 @@
|
|||||||
|
|
||||||
// By default, Underscore uses ERB-style template delimiters. Change the
|
// By default, Underscore uses ERB-style template delimiters. Change the
|
||||||
// following template settings to use alternative delimiters.
|
// following template settings to use alternative delimiters.
|
||||||
var templateSettings = _.templateSettings = {
|
var templateSettings = _$1.templateSettings = {
|
||||||
evaluate: /<%([\s\S]+?)%>/g,
|
evaluate: /<%([\s\S]+?)%>/g,
|
||||||
interpolate: /<%=([\s\S]+?)%>/g,
|
interpolate: /<%=([\s\S]+?)%>/g,
|
||||||
escape: /<%-([\s\S]+?)%>/g
|
escape: /<%-([\s\S]+?)%>/g
|
||||||
@@ -868,13 +868,20 @@
|
|||||||
return '\\' + escapes[match];
|
return '\\' + escapes[match];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// In order to prevent third-party code injection through
|
||||||
|
// `_.templateSettings.variable`, we test it against the following regular
|
||||||
|
// expression. It is intentionally a bit more liberal than just matching valid
|
||||||
|
// identifiers, but still prevents possible loopholes through defaults or
|
||||||
|
// destructuring assignment.
|
||||||
|
var bareIdentifier = /^\s*(\w|\$)+\s*$/;
|
||||||
|
|
||||||
// JavaScript micro-templating, similar to John Resig's implementation.
|
// JavaScript micro-templating, similar to John Resig's implementation.
|
||||||
// Underscore templating handles arbitrary delimiters, preserves whitespace,
|
// Underscore templating handles arbitrary delimiters, preserves whitespace,
|
||||||
// and correctly escapes quotes within interpolated code.
|
// and correctly escapes quotes within interpolated code.
|
||||||
// NB: `oldSettings` only exists for backwards compatibility.
|
// NB: `oldSettings` only exists for backwards compatibility.
|
||||||
function template(text, settings, oldSettings) {
|
function template(text, settings, oldSettings) {
|
||||||
if (!settings && oldSettings) settings = oldSettings;
|
if (!settings && oldSettings) settings = oldSettings;
|
||||||
settings = defaults({}, settings, _.templateSettings);
|
settings = defaults({}, settings, _$1.templateSettings);
|
||||||
|
|
||||||
// Combine delimiters into one regular expression via alternation.
|
// Combine delimiters into one regular expression via alternation.
|
||||||
var matcher = RegExp([
|
var matcher = RegExp([
|
||||||
@@ -903,8 +910,17 @@
|
|||||||
});
|
});
|
||||||
source += "';\n";
|
source += "';\n";
|
||||||
|
|
||||||
// If a variable is not specified, place data values in local scope.
|
var argument = settings.variable;
|
||||||
if (!settings.variable) source = 'with(obj||{}){\n' + source + '}\n';
|
if (argument) {
|
||||||
|
// Insure against third-party code injection. (CVE-2021-23358)
|
||||||
|
if (!bareIdentifier.test(argument)) throw new Error(
|
||||||
|
'variable is not a bare identifier: ' + argument
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
// If a variable is not specified, place data values in local scope.
|
||||||
|
source = 'with(obj||{}){\n' + source + '}\n';
|
||||||
|
argument = 'obj';
|
||||||
|
}
|
||||||
|
|
||||||
source = "var __t,__p='',__j=Array.prototype.join," +
|
source = "var __t,__p='',__j=Array.prototype.join," +
|
||||||
"print=function(){__p+=__j.call(arguments,'');};\n" +
|
"print=function(){__p+=__j.call(arguments,'');};\n" +
|
||||||
@@ -912,18 +928,17 @@
|
|||||||
|
|
||||||
var render;
|
var render;
|
||||||
try {
|
try {
|
||||||
render = new Function(settings.variable || 'obj', '_', source);
|
render = new Function(argument, '_', source);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
e.source = source;
|
e.source = source;
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
var template = function(data) {
|
var template = function(data) {
|
||||||
return render.call(this, data, _);
|
return render.call(this, data, _$1);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Provide the compiled source as a convenience for precompilation.
|
// Provide the compiled source as a convenience for precompilation.
|
||||||
var argument = settings.variable || 'obj';
|
|
||||||
template.source = 'function(' + argument + '){\n' + source + '}';
|
template.source = 'function(' + argument + '){\n' + source + '}';
|
||||||
|
|
||||||
return template;
|
return template;
|
||||||
@@ -933,7 +948,7 @@
|
|||||||
// is invoked with its parent as context. Returns the value of the final
|
// is invoked with its parent as context. Returns the value of the final
|
||||||
// child, or `fallback` if any child is undefined.
|
// child, or `fallback` if any child is undefined.
|
||||||
function result(obj, path, fallback) {
|
function result(obj, path, fallback) {
|
||||||
path = toPath$1(path);
|
path = toPath(path);
|
||||||
var length = path.length;
|
var length = path.length;
|
||||||
if (!length) {
|
if (!length) {
|
||||||
return isFunction$1(fallback) ? fallback.call(obj) : fallback;
|
return isFunction$1(fallback) ? fallback.call(obj) : fallback;
|
||||||
@@ -959,7 +974,7 @@
|
|||||||
|
|
||||||
// Start chaining a wrapped Underscore object.
|
// Start chaining a wrapped Underscore object.
|
||||||
function chain(obj) {
|
function chain(obj) {
|
||||||
var instance = _(obj);
|
var instance = _$1(obj);
|
||||||
instance._chain = true;
|
instance._chain = true;
|
||||||
return instance;
|
return instance;
|
||||||
}
|
}
|
||||||
@@ -993,7 +1008,7 @@
|
|||||||
return bound;
|
return bound;
|
||||||
});
|
});
|
||||||
|
|
||||||
partial.placeholder = _;
|
partial.placeholder = _$1;
|
||||||
|
|
||||||
// Create a function bound to a given object (assigning `this`, and arguments,
|
// Create a function bound to a given object (assigning `this`, and arguments,
|
||||||
// optionally).
|
// optionally).
|
||||||
@@ -1012,7 +1027,7 @@
|
|||||||
var isArrayLike = createSizePropertyCheck(getLength);
|
var isArrayLike = createSizePropertyCheck(getLength);
|
||||||
|
|
||||||
// Internal implementation of a recursive `flatten` function.
|
// Internal implementation of a recursive `flatten` function.
|
||||||
function flatten(input, depth, strict, output) {
|
function flatten$1(input, depth, strict, output) {
|
||||||
output = output || [];
|
output = output || [];
|
||||||
if (!depth && depth !== 0) {
|
if (!depth && depth !== 0) {
|
||||||
depth = Infinity;
|
depth = Infinity;
|
||||||
@@ -1025,7 +1040,7 @@
|
|||||||
if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
|
if (isArrayLike(value) && (isArray(value) || isArguments$1(value))) {
|
||||||
// Flatten current level of array or arguments object.
|
// Flatten current level of array or arguments object.
|
||||||
if (depth > 1) {
|
if (depth > 1) {
|
||||||
flatten(value, depth - 1, strict, output);
|
flatten$1(value, depth - 1, strict, output);
|
||||||
idx = output.length;
|
idx = output.length;
|
||||||
} else {
|
} else {
|
||||||
var j = 0, len = value.length;
|
var j = 0, len = value.length;
|
||||||
@@ -1042,7 +1057,7 @@
|
|||||||
// are the method names to be bound. Useful for ensuring that all callbacks
|
// are the method names to be bound. Useful for ensuring that all callbacks
|
||||||
// defined on an object belong to it.
|
// defined on an object belong to it.
|
||||||
var bindAll = restArguments(function(obj, keys) {
|
var bindAll = restArguments(function(obj, keys) {
|
||||||
keys = flatten(keys, false, false);
|
keys = flatten$1(keys, false, false);
|
||||||
var index = keys.length;
|
var index = keys.length;
|
||||||
if (index < 1) throw new Error('bindAll must be passed function names');
|
if (index < 1) throw new Error('bindAll must be passed function names');
|
||||||
while (index--) {
|
while (index--) {
|
||||||
@@ -1057,7 +1072,7 @@
|
|||||||
var memoize = function(key) {
|
var memoize = function(key) {
|
||||||
var cache = memoize.cache;
|
var cache = memoize.cache;
|
||||||
var address = '' + (hasher ? hasher.apply(this, arguments) : key);
|
var address = '' + (hasher ? hasher.apply(this, arguments) : key);
|
||||||
if (!has(cache, address)) cache[address] = func.apply(this, arguments);
|
if (!has$1(cache, address)) cache[address] = func.apply(this, arguments);
|
||||||
return cache[address];
|
return cache[address];
|
||||||
};
|
};
|
||||||
memoize.cache = {};
|
memoize.cache = {};
|
||||||
@@ -1074,7 +1089,7 @@
|
|||||||
|
|
||||||
// Defers a function, scheduling it to run after the current call stack has
|
// Defers a function, scheduling it to run after the current call stack has
|
||||||
// cleared.
|
// cleared.
|
||||||
var defer = partial(delay, _, 1);
|
var defer = partial(delay, _$1, 1);
|
||||||
|
|
||||||
// Returns a function, that, when invoked, will only be triggered at most once
|
// Returns a function, that, when invoked, will only be triggered at most once
|
||||||
// during a given window of time. Normally, the throttled function will run
|
// during a given window of time. Normally, the throttled function will run
|
||||||
@@ -1420,7 +1435,7 @@
|
|||||||
if (isFunction$1(path)) {
|
if (isFunction$1(path)) {
|
||||||
func = path;
|
func = path;
|
||||||
} else {
|
} else {
|
||||||
path = toPath$1(path);
|
path = toPath(path);
|
||||||
contextPath = path.slice(0, -1);
|
contextPath = path.slice(0, -1);
|
||||||
path = path[path.length - 1];
|
path = path[path.length - 1];
|
||||||
}
|
}
|
||||||
@@ -1562,7 +1577,7 @@
|
|||||||
// Groups the object's values by a criterion. Pass either a string attribute
|
// Groups the object's values by a criterion. Pass either a string attribute
|
||||||
// to group by, or a function that returns the criterion.
|
// to group by, or a function that returns the criterion.
|
||||||
var groupBy = group(function(result, value, key) {
|
var groupBy = group(function(result, value, key) {
|
||||||
if (has(result, key)) result[key].push(value); else result[key] = [value];
|
if (has$1(result, key)) result[key].push(value); else result[key] = [value];
|
||||||
});
|
});
|
||||||
|
|
||||||
// Indexes the object's values by a criterion, similar to `_.groupBy`, but for
|
// Indexes the object's values by a criterion, similar to `_.groupBy`, but for
|
||||||
@@ -1575,7 +1590,7 @@
|
|||||||
// either a string attribute to count by, or a function that returns the
|
// either a string attribute to count by, or a function that returns the
|
||||||
// criterion.
|
// criterion.
|
||||||
var countBy = group(function(result, value, key) {
|
var countBy = group(function(result, value, key) {
|
||||||
if (has(result, key)) result[key]++; else result[key] = 1;
|
if (has$1(result, key)) result[key]++; else result[key] = 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Split a collection into two arrays: one whose elements all pass the given
|
// Split a collection into two arrays: one whose elements all pass the given
|
||||||
@@ -1618,7 +1633,7 @@
|
|||||||
keys = allKeys(obj);
|
keys = allKeys(obj);
|
||||||
} else {
|
} else {
|
||||||
iteratee = keyInObj;
|
iteratee = keyInObj;
|
||||||
keys = flatten(keys, false, false);
|
keys = flatten$1(keys, false, false);
|
||||||
obj = Object(obj);
|
obj = Object(obj);
|
||||||
}
|
}
|
||||||
for (var i = 0, length = keys.length; i < length; i++) {
|
for (var i = 0, length = keys.length; i < length; i++) {
|
||||||
@@ -1636,7 +1651,7 @@
|
|||||||
iteratee = negate(iteratee);
|
iteratee = negate(iteratee);
|
||||||
if (keys.length > 1) context = keys[1];
|
if (keys.length > 1) context = keys[1];
|
||||||
} else {
|
} else {
|
||||||
keys = map(flatten(keys, false, false), String);
|
keys = map(flatten$1(keys, false, false), String);
|
||||||
iteratee = function(value, key) {
|
iteratee = function(value, key) {
|
||||||
return !contains(keys, key);
|
return !contains(keys, key);
|
||||||
};
|
};
|
||||||
@@ -1681,14 +1696,14 @@
|
|||||||
|
|
||||||
// Flatten out an array, either recursively (by default), or up to `depth`.
|
// Flatten out an array, either recursively (by default), or up to `depth`.
|
||||||
// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
|
// Passing `true` or `false` as `depth` means `1` or `Infinity`, respectively.
|
||||||
function flatten$1(array, depth) {
|
function flatten(array, depth) {
|
||||||
return flatten(array, depth, false);
|
return flatten$1(array, depth, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Take the difference between one array and a number of other arrays.
|
// Take the difference between one array and a number of other arrays.
|
||||||
// Only the elements present in just the first array will remain.
|
// Only the elements present in just the first array will remain.
|
||||||
var difference = restArguments(function(array, rest) {
|
var difference = restArguments(function(array, rest) {
|
||||||
rest = flatten(rest, true, true);
|
rest = flatten$1(rest, true, true);
|
||||||
return filter(array, function(value){
|
return filter(array, function(value){
|
||||||
return !contains(rest, value);
|
return !contains(rest, value);
|
||||||
});
|
});
|
||||||
@@ -1734,7 +1749,7 @@
|
|||||||
// Produce an array that contains the union: each distinct element from all of
|
// Produce an array that contains the union: each distinct element from all of
|
||||||
// the passed-in arrays.
|
// the passed-in arrays.
|
||||||
var union = restArguments(function(arrays) {
|
var union = restArguments(function(arrays) {
|
||||||
return uniq(flatten(arrays, true, true));
|
return uniq(flatten$1(arrays, true, true));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Produce an array that contains every item shared between all the
|
// Produce an array that contains every item shared between all the
|
||||||
@@ -1821,26 +1836,26 @@
|
|||||||
|
|
||||||
// Helper function to continue chaining intermediate results.
|
// Helper function to continue chaining intermediate results.
|
||||||
function chainResult(instance, obj) {
|
function chainResult(instance, obj) {
|
||||||
return instance._chain ? _(obj).chain() : obj;
|
return instance._chain ? _$1(obj).chain() : obj;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add your own custom functions to the Underscore object.
|
// Add your own custom functions to the Underscore object.
|
||||||
function mixin(obj) {
|
function mixin(obj) {
|
||||||
each(functions(obj), function(name) {
|
each(functions(obj), function(name) {
|
||||||
var func = _[name] = obj[name];
|
var func = _$1[name] = obj[name];
|
||||||
_.prototype[name] = function() {
|
_$1.prototype[name] = function() {
|
||||||
var args = [this._wrapped];
|
var args = [this._wrapped];
|
||||||
push.apply(args, arguments);
|
push.apply(args, arguments);
|
||||||
return chainResult(this, func.apply(_, args));
|
return chainResult(this, func.apply(_$1, args));
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
return _;
|
return _$1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add all mutator `Array` functions to the wrapper.
|
// Add all mutator `Array` functions to the wrapper.
|
||||||
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
each(['pop', 'push', 'reverse', 'shift', 'sort', 'splice', 'unshift'], function(name) {
|
||||||
var method = ArrayProto[name];
|
var method = ArrayProto[name];
|
||||||
_.prototype[name] = function() {
|
_$1.prototype[name] = function() {
|
||||||
var obj = this._wrapped;
|
var obj = this._wrapped;
|
||||||
if (obj != null) {
|
if (obj != null) {
|
||||||
method.apply(obj, arguments);
|
method.apply(obj, arguments);
|
||||||
@@ -1855,7 +1870,7 @@
|
|||||||
// Add all accessor `Array` functions to the wrapper.
|
// Add all accessor `Array` functions to the wrapper.
|
||||||
each(['concat', 'join', 'slice'], function(name) {
|
each(['concat', 'join', 'slice'], function(name) {
|
||||||
var method = ArrayProto[name];
|
var method = ArrayProto[name];
|
||||||
_.prototype[name] = function() {
|
_$1.prototype[name] = function() {
|
||||||
var obj = this._wrapped;
|
var obj = this._wrapped;
|
||||||
if (obj != null) obj = method.apply(obj, arguments);
|
if (obj != null) obj = method.apply(obj, arguments);
|
||||||
return chainResult(this, obj);
|
return chainResult(this, obj);
|
||||||
@@ -1909,12 +1924,12 @@
|
|||||||
clone: clone,
|
clone: clone,
|
||||||
tap: tap,
|
tap: tap,
|
||||||
get: get,
|
get: get,
|
||||||
has: has$1,
|
has: has,
|
||||||
mapObject: mapObject,
|
mapObject: mapObject,
|
||||||
identity: identity,
|
identity: identity,
|
||||||
constant: constant,
|
constant: constant,
|
||||||
noop: noop,
|
noop: noop,
|
||||||
toPath: toPath,
|
toPath: toPath$1,
|
||||||
property: property,
|
property: property,
|
||||||
propertyOf: propertyOf,
|
propertyOf: propertyOf,
|
||||||
matcher: matcher,
|
matcher: matcher,
|
||||||
@@ -1997,7 +2012,7 @@
|
|||||||
tail: rest,
|
tail: rest,
|
||||||
drop: rest,
|
drop: rest,
|
||||||
compact: compact,
|
compact: compact,
|
||||||
flatten: flatten$1,
|
flatten: flatten,
|
||||||
without: without,
|
without: without,
|
||||||
uniq: uniq,
|
uniq: uniq,
|
||||||
unique: uniq,
|
unique: uniq,
|
||||||
@@ -2011,17 +2026,17 @@
|
|||||||
range: range,
|
range: range,
|
||||||
chunk: chunk,
|
chunk: chunk,
|
||||||
mixin: mixin,
|
mixin: mixin,
|
||||||
'default': _
|
'default': _$1
|
||||||
};
|
};
|
||||||
|
|
||||||
// Default Export
|
// Default Export
|
||||||
|
|
||||||
// Add all of the Underscore functions to the wrapper object.
|
// Add all of the Underscore functions to the wrapper object.
|
||||||
var _$1 = mixin(allExports);
|
var _ = mixin(allExports);
|
||||||
// Legacy Node.js API.
|
// Legacy Node.js API.
|
||||||
_$1._ = _$1;
|
_._ = _;
|
||||||
|
|
||||||
return _$1;
|
return _;
|
||||||
|
|
||||||
})));
|
})));
|
||||||
//# sourceMappingURL=underscore.js.map
|
//# sourceMappingURL=underscore-umd.js.map
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n=n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
|
!function(n,r){"object"==typeof exports&&"undefined"!=typeof module?module.exports=r():"function"==typeof define&&define.amd?define("underscore",r):(n="undefined"!=typeof globalThis?globalThis:n||self,function(){var t=n._,e=n._=r();e.noConflict=function(){return n._=t,e}}())}(this,(function(){
|
||||||
// Underscore.js 1.12.0
|
// Underscore.js 1.13.1
|
||||||
// https://underscorejs.org
|
// https://underscorejs.org
|
||||||
// (c) 2009-2020 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
// (c) 2009-2021 Jeremy Ashkenas, Julian Gonggrijp, and DocumentCloud and Investigative Reporters & Editors
|
||||||
// Underscore may be freely distributed under the MIT license.
|
// Underscore may be freely distributed under the MIT license.
|
||||||
var n="1.12.0",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,g=isFinite,d=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),k=x("Function"),T=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof T&&(k=function(n){return"function"==typeof n||!1});var D=k,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function C(n){return O(n)&&y(n)}function K(n){return function(){return n}}function J(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function $(n){return function(r){return null==r?void 0:r[n]}}var G=$("byteLength"),H=J(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:K(!1),Y=$("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return d&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return d&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),gn=V?fn(vn):x("Map"),dn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("Line truncated
|
var n="1.13.1",r="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},t=Array.prototype,e=Object.prototype,u="undefined"!=typeof Symbol?Symbol.prototype:null,o=t.push,i=t.slice,a=e.toString,f=e.hasOwnProperty,c="undefined"!=typeof ArrayBuffer,l="undefined"!=typeof DataView,s=Array.isArray,p=Object.keys,v=Object.create,h=c&&ArrayBuffer.isView,y=isNaN,d=isFinite,g=!{toString:null}.propertyIsEnumerable("toString"),b=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],m=Math.pow(2,53)-1;function j(n,r){return r=null==r?n.length-1:+r,function(){for(var t=Math.max(arguments.length-r,0),e=Array(t),u=0;u<t;u++)e[u]=arguments[u+r];switch(r){case 0:return n.call(this,e);case 1:return n.call(this,arguments[0],e);case 2:return n.call(this,arguments[0],arguments[1],e)}var o=Array(r+1);for(u=0;u<r;u++)o[u]=arguments[u];return o[r]=e,n.apply(this,o)}}function _(n){var r=typeof n;return"function"===r||"object"===r&&!!n}function w(n){return void 0===n}function A(n){return!0===n||!1===n||"[object Boolean]"===a.call(n)}function x(n){var r="[object "+n+"]";return function(n){return a.call(n)===r}}var S=x("String"),O=x("Number"),M=x("Date"),E=x("RegExp"),B=x("Error"),N=x("Symbol"),I=x("ArrayBuffer"),T=x("Function"),k=r.document&&r.document.childNodes;"function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof k&&(T=function(n){return"function"==typeof n||!1});var D=T,R=x("Object"),F=l&&R(new DataView(new ArrayBuffer(8))),V="undefined"!=typeof Map&&R(new Map),P=x("DataView");var q=F?function(n){return null!=n&&D(n.getInt8)&&I(n.buffer)}:P,U=s||x("Array");function W(n,r){return null!=n&&f.call(n,r)}var z=x("Arguments");!function(){z(arguments)||(z=function(n){return W(n,"callee")})}();var L=z;function $(n){return O(n)&&y(n)}function C(n){return function(){return n}}function K(n){return function(r){var t=n(r);return"number"==typeof t&&t>=0&&t<=m}}function J(n){return function(r){return null==r?void 0:r[n]}}var G=J("byteLength"),H=K(G),Q=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var X=c?function(n){return h?h(n)&&!q(n):H(n)&&Q.test(a.call(n))}:C(!1),Y=J("length");function Z(n,r){r=function(n){for(var r={},t=n.length,e=0;e<t;++e)r[n[e]]=!0;return{contains:function(n){return r[n]},push:function(t){return r[t]=!0,n.push(t)}}}(r);var t=b.length,u=n.constructor,o=D(u)&&u.prototype||e,i="constructor";for(W(n,i)&&!r.contains(i)&&r.push(i);t--;)(i=b[t])in n&&n[i]!==o[i]&&!r.contains(i)&&r.push(i)}function nn(n){if(!_(n))return[];if(p)return p(n);var r=[];for(var t in n)W(n,t)&&r.push(t);return g&&Z(n,r),r}function rn(n,r){var t=nn(r),e=t.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=t[o];if(r[i]!==u[i]||!(i in u))return!1}return!0}function tn(n){return n instanceof tn?n:this instanceof tn?void(this._wrapped=n):new tn(n)}function en(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,G(n))}tn.VERSION=n,tn.prototype.value=function(){return this._wrapped},tn.prototype.valueOf=tn.prototype.toJSON=tn.prototype.value,tn.prototype.toString=function(){return String(this._wrapped)};var un="[object DataView]";function on(n,r,t,e){if(n===r)return 0!==n||1/n==1/r;if(null==n||null==r)return!1;if(n!=n)return r!=r;var o=typeof n;return("function"===o||"object"===o||"object"==typeof r)&&function n(r,t,e,o){r instanceof tn&&(r=r._wrapped);t instanceof tn&&(t=t._wrapped);var i=a.call(r);if(i!==a.call(t))return!1;if(F&&"[object Object]"==i&&q(r)){if(!q(t))return!1;i=un}switch(i){case"[object RegExp]":case"[object String]":return""+r==""+t;case"[object Number]":return+r!=+r?+t!=+t:0==+r?1/+r==1/t:+r==+t;case"[object Date]":case"[object Boolean]":return+r==+t;case"[object Symbol]":return u.valueOf.call(r)===u.valueOf.call(t);case"[object ArrayBuffer]":case un:return n(en(r),en(t),e,o)}var f="[object Array]"===i;if(!f&&X(r)){if(G(r)!==G(t))return!1;if(r.buffer===t.buffer&&r.byteOffset===t.byteOffset)return!0;f=!0}if(!f){if("object"!=typeof r||"object"!=typeof t)return!1;var c=r.constructor,l=t.constructor;if(c!==l&&!(D(c)&&c instanceof c&&D(l)&&l instanceof l)&&"constructor"in r&&"constructor"in t)return!1}o=o||[];var s=(e=e||[]).length;for(;s--;)if(e[s]===r)return o[s]===t;if(e.push(r),o.push(t),f){if((s=r.length)!==t.length)return!1;for(;s--;)if(!on(r[s],t[s],e,o))return!1}else{var p,v=nn(r);if(s=v.length,nn(t).length!==s)return!1;for(;s--;)if(p=v[s],!W(t,p)||!on(r[p],t[p],e,o))return!1}return e.pop(),o.pop(),!0}(n,r,t,e)}function an(n){if(!_(n))return[];var r=[];for(var t in n)r.push(t);return g&&Z(n,r),r}function fn(n){var r=Y(n);return function(t){if(null==t)return!1;var e=an(t);if(Y(e))return!1;for(var u=0;u<r;u++)if(!D(t[n[u]]))return!1;return n!==hn||!D(t[cn])}}var cn="forEach",ln="has",sn=["clear","delete"],pn=["get",ln,"set"],vn=sn.concat(cn,pn),hn=sn.concat(pn),yn=["add"].concat(sn,cn,ln),dn=V?fn(vn):x("Map"),gn=V?fn(hn):x("WeakMap"),bn=V?fn(yn):x("Set"),mn=x("Line truncated
|
||||||
@@ -1,52 +1,232 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Support Reticulum" href="support.html" /><link rel="prev" title="Building Networks" href="networks.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Code Examples - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Code Examples — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Support Reticulum" href="support.html" />
|
|
||||||
<link rel="prev" title="API Reference" href="reference.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="support.html" title="Support Reticulum"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="reference.html" title="API Reference"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Code Examples</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="code-examples">
|
|
||||||
<span id="examples-main"></span><h1>Code Examples<a class="headerlink" href="#code-examples" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="code-examples">
|
||||||
|
<span id="examples-main"></span><h1>Code Examples<a class="headerlink" href="#code-examples" title="Permalink to this heading">#</a></h1>
|
||||||
<p>A number of examples are included in the source distribution of Reticulum.
|
<p>A number of examples are included in the source distribution of Reticulum.
|
||||||
You can use these examples to learn how to write your own programs.</p>
|
You can use these examples to learn how to write your own programs.</p>
|
||||||
<div class="section" id="minimal">
|
<section id="minimal">
|
||||||
<span id="example-minimal"></span><h2>Minimal<a class="headerlink" href="#minimal" title="Permalink to this headline">¶</a></h2>
|
<span id="example-minimal"></span><h2>Minimal<a class="headerlink" href="#minimal" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Minimal</em> example demonstrates the bare-minimum setup required to connect to
|
<p>The <em>Minimal</em> example demonstrates the bare-minimum setup required to connect to
|
||||||
a Reticulum network from your program. In about five lines of code, you will
|
a Reticulum network from your program. In about five lines of code, you will
|
||||||
have the Reticulum Network Stack initialised, and ready to pass traffic in your
|
have the Reticulum Network Stack initialised, and ready to pass traffic in your
|
||||||
@@ -155,9 +335,9 @@ program.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Minimal.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Minimal.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Minimal.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Minimal.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="announce">
|
<section id="announce">
|
||||||
<span id="example-announce"></span><h2>Announce<a class="headerlink" href="#announce" title="Permalink to this headline">¶</a></h2>
|
<span id="example-announce"></span><h2>Announce<a class="headerlink" href="#announce" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Announce</em> example builds upon the previous example by exploring how to
|
<p>The <em>Announce</em> example builds upon the previous example by exploring how to
|
||||||
announce a destination on the network, and how to let your program receive
|
announce a destination on the network, and how to let your program receive
|
||||||
notifications about announces from relevant destinations.</p>
|
notifications about announces from relevant destinations.</p>
|
||||||
@@ -293,10 +473,11 @@ notifications about announces from relevant destinations.</p>
|
|||||||
<span class="n">RNS</span><span class="o">.</span><span class="n">prettyhexrep</span><span class="p">(</span><span class="n">destination_hash</span><span class="p">)</span>
|
<span class="n">RNS</span><span class="o">.</span><span class="n">prettyhexrep</span><span class="p">(</span><span class="n">destination_hash</span><span class="p">)</span>
|
||||||
<span class="p">)</span>
|
<span class="p">)</span>
|
||||||
|
|
||||||
<span class="n">RNS</span><span class="o">.</span><span class="n">log</span><span class="p">(</span>
|
<span class="k">if</span> <span class="n">app_data</span><span class="p">:</span>
|
||||||
<span class="s2">"The announce contained the following app data: "</span><span class="o">+</span>
|
<span class="n">RNS</span><span class="o">.</span><span class="n">log</span><span class="p">(</span>
|
||||||
<span class="n">app_data</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">"utf-8"</span><span class="p">)</span>
|
<span class="s2">"The announce contained the following app data: "</span><span class="o">+</span>
|
||||||
<span class="p">)</span>
|
<span class="n">app_data</span><span class="o">.</span><span class="n">decode</span><span class="p">(</span><span class="s2">"utf-8"</span><span class="p">)</span>
|
||||||
|
<span class="p">)</span>
|
||||||
|
|
||||||
<span class="c1">##########################################################</span>
|
<span class="c1">##########################################################</span>
|
||||||
<span class="c1">#### Program Startup #####################################</span>
|
<span class="c1">#### Program Startup #####################################</span>
|
||||||
@@ -334,9 +515,9 @@ notifications about announces from relevant destinations.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Announce.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Announce.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Announce.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Announce.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="broadcast">
|
<section id="broadcast">
|
||||||
<span id="example-broadcast"></span><h2>Broadcast<a class="headerlink" href="#broadcast" title="Permalink to this headline">¶</a></h2>
|
<span id="example-broadcast"></span><h2>Broadcast<a class="headerlink" href="#broadcast" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Broadcast</em> example explores how to transmit plaintext broadcast messages
|
<p>The <em>Broadcast</em> example explores how to transmit plaintext broadcast messages
|
||||||
over the network.</p>
|
over the network.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
||||||
@@ -463,9 +644,9 @@ over the network.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Broadcast.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Broadcast.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Broadcast.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Broadcast.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="echo">
|
<section id="echo">
|
||||||
<span id="example-echo"></span><h2>Echo<a class="headerlink" href="#echo" title="Permalink to this headline">¶</a></h2>
|
<span id="example-echo"></span><h2>Echo<a class="headerlink" href="#echo" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Echo</em> example demonstrates communication between two destinations using
|
<p>The <em>Echo</em> example demonstrates communication between two destinations using
|
||||||
the Packet interface.</p>
|
the Packet interface.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
||||||
@@ -801,9 +982,9 @@ the Packet interface.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Echo.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Echo.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Echo.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Echo.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="link">
|
<section id="link">
|
||||||
<span id="example-link"></span><h2>Link<a class="headerlink" href="#link" title="Permalink to this headline">¶</a></h2>
|
<span id="example-link"></span><h2>Link<a class="headerlink" href="#link" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Link</em> example explores establishing an encrypted link to a remote
|
<p>The <em>Link</em> example explores establishing an encrypted link to a remote
|
||||||
destination, and passing traffic back and forth over the link.</p>
|
destination, and passing traffic back and forth over the link.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
||||||
@@ -1100,9 +1281,9 @@ destination, and passing traffic back and forth over the link.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Link.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Link.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Link.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Link.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="example-identify">
|
<section id="example-identify">
|
||||||
<span id="identification"></span><h2>Identification<a class="headerlink" href="#example-identify" title="Permalink to this headline">¶</a></h2>
|
<span id="identification"></span><h2>Identification<a class="headerlink" href="#example-identify" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Identify</em> example explores identifying an intiator of a link, once
|
<p>The <em>Identify</em> example explores identifying an intiator of a link, once
|
||||||
the link has been established.</p>
|
the link has been established.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
||||||
@@ -1422,9 +1603,9 @@ the link has been established.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Identify.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Identify.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Identify.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Identify.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="requests-responses">
|
<section id="requests-responses">
|
||||||
<span id="example-request"></span><h2>Requests & Responses<a class="headerlink" href="#requests-responses" title="Permalink to this headline">¶</a></h2>
|
<span id="example-request"></span><h2>Requests & Responses<a class="headerlink" href="#requests-responses" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Request</em> example explores sendig requests and receiving responses.</p>
|
<p>The <em>Request</em> example explores sendig requests and receiving responses.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1">##########################################################</span>
|
||||||
<span class="c1"># This RNS example demonstrates how to set perform #</span>
|
<span class="c1"># This RNS example demonstrates how to set perform #</span>
|
||||||
@@ -1716,9 +1897,9 @@ the link has been established.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Request.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Request.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Request.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Request.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="filetransfer">
|
<section id="filetransfer">
|
||||||
<span id="example-filetransfer"></span><h2>Filetransfer<a class="headerlink" href="#filetransfer" title="Permalink to this headline">¶</a></h2>
|
<span id="example-filetransfer"></span><h2>Filetransfer<a class="headerlink" href="#filetransfer" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The <em>Filetransfer</em> example implements a basic file-server program that
|
<p>The <em>Filetransfer</em> example implements a basic file-server program that
|
||||||
allow clients to connect and download files. The program uses the Resource
|
allow clients to connect and download files. The program uses the Resource
|
||||||
interface to efficiently pass files of any size over a Reticulum <a class="reference internal" href="reference.html#api-link"><span class="std std-ref">Link</span></a>.</p>
|
interface to efficiently pass files of any size over a Reticulum <a class="reference internal" href="reference.html#api-link"><span class="std std-ref">Link</span></a>.</p>
|
||||||
@@ -2330,18 +2511,65 @@ interface to efficiently pass files of any size over a Reticulum <a class="refer
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Filetransfer.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Filetransfer.py</a>.</p>
|
<p>This example can also be found at <a class="reference external" href="https://github.com/markqvist/Reticulum/blob/master/Examples/Filetransfer.py">https://github.com/markqvist/Reticulum/blob/master/Examples/Filetransfer.py</a>.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="support.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Support Reticulum</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="networks.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Building Networks</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Code Examples</a><ul>
|
<li><a class="reference internal" href="#">Code Examples</a><ul>
|
||||||
<li><a class="reference internal" href="#minimal">Minimal</a></li>
|
<li><a class="reference internal" href="#minimal">Minimal</a></li>
|
||||||
<li><a class="reference internal" href="#announce">Announce</a></li>
|
<li><a class="reference internal" href="#announce">Announce</a></li>
|
||||||
@@ -2355,52 +2583,21 @@ interface to efficiently pass files of any size over a Reticulum <a class="refer
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="reference.html"
|
|
||||||
title="previous chapter">API Reference</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="support.html"
|
|
||||||
title="next chapter">Support Reticulum</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/examples.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="support.html" title="Support Reticulum"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="reference.html" title="API Reference"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Code Examples</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,65 +1,245 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Using Reticulum on Your System" href="using.html" /><link rel="prev" title="What is Reticulum?" href="whatis.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Getting Started Fast - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Getting Started Fast — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Using Reticulum on Your System" href="using.html" />
|
|
||||||
<link rel="prev" title="What is Reticulum?" href="whatis.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="using.html" title="Using Reticulum on Your System"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="whatis.html" title="What is Reticulum?"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Getting Started Fast</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="getting-started-fast">
|
|
||||||
<h1>Getting Started Fast<a class="headerlink" href="#getting-started-fast" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="getting-started-fast">
|
||||||
|
<h1>Getting Started Fast<a class="headerlink" href="#getting-started-fast" title="Permalink to this heading">#</a></h1>
|
||||||
<p>The best way to get started with the Reticulum Network Stack depends on what
|
<p>The best way to get started with the Reticulum Network Stack depends on what
|
||||||
you want to do. This guide will outline sensible starting paths for different
|
you want to do. This guide will outline sensible starting paths for different
|
||||||
scenarios.</p>
|
scenarios.</p>
|
||||||
<div class="section" id="try-using-a-reticulum-based-program">
|
<section id="try-using-a-reticulum-based-program">
|
||||||
<h2>Try Using a Reticulum-based Program<a class="headerlink" href="#try-using-a-reticulum-based-program" title="Permalink to this headline">¶</a></h2>
|
<h2>Try Using a Reticulum-based Program<a class="headerlink" href="#try-using-a-reticulum-based-program" title="Permalink to this heading">#</a></h2>
|
||||||
<p>If you simply want to try using a program built with Reticulum, a few different
|
<p>If you simply want to try using a program built with Reticulum, a few different
|
||||||
programs exist that allow basic communication and a range of other useful functions
|
programs exist that allow basic communication and a range of other useful functions
|
||||||
over even extremely low-bandwidth Reticulum networks.</p>
|
over even extremely low-bandwidth Reticulum networks.</p>
|
||||||
<p>These programs will let you get a feel for how Reticulum works. They have been designed
|
<p>These programs will let you get a feel for how Reticulum works. They have been designed
|
||||||
to run well over networks based on LoRa or packet radio, but can also be used completely
|
to run well over networks based on LoRa or packet radio, but can also be used completely
|
||||||
over local WiFi, wired ethernet, the Internet, or any combination.</p>
|
over local WiFi, wired Ethernet, the Internet, or any combination.</p>
|
||||||
<p>As such, it is easy to get started experimenting, without having to set up any radio
|
<p>As such, it is easy to get started experimenting, without having to set up any radio
|
||||||
transceivers or infrastructure just to try it out. Launching the programs on separate
|
transceivers or infrastructure just to try it out. Launching the programs on separate
|
||||||
devices connected to the same WiFi network is enough to get started, and physical
|
devices connected to the same WiFi network is enough to get started, and physical
|
||||||
radio interfaces can then be added later.</p>
|
radio interfaces can then be added later.</p>
|
||||||
<div class="section" id="nomad-network">
|
<section id="nomad-network">
|
||||||
<h3>Nomad Network<a class="headerlink" href="#nomad-network" title="Permalink to this headline">¶</a></h3>
|
<h3>Nomad Network<a class="headerlink" href="#nomad-network" title="Permalink to this heading">#</a></h3>
|
||||||
<p>The terminal-based program <a class="reference external" href="https://github.com/markqvist/nomadnet">Nomad Network</a>
|
<p>The terminal-based program <a class="reference external" href="https://github.com/markqvist/nomadnet">Nomad Network</a>
|
||||||
provides a complete encrypted communications suite built with Reticulum. It features
|
provides a complete encrypted communications suite built with Reticulum. It features
|
||||||
encrypted messaging (both direct and delayed-delivery for offline users), file sharing,
|
encrypted messaging (both direct and delayed-delivery for offline users), file sharing,
|
||||||
@@ -81,19 +261,19 @@ for the messaging and information-sharing protocol
|
|||||||
on your system, you might need to reboot your system for your program to become
|
on your system, you might need to reboot your system for your program to become
|
||||||
available. If you get a “command not found” error or similar when running the
|
available. If you get a “command not found” error or similar when running the
|
||||||
program, reboot your system and try again.</p>
|
program, reboot your system and try again.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="sideband">
|
<section id="sideband">
|
||||||
<h3>Sideband<a class="headerlink" href="#sideband" title="Permalink to this headline">¶</a></h3>
|
<h3>Sideband<a class="headerlink" href="#sideband" title="Permalink to this heading">#</a></h3>
|
||||||
<p>If you would rather use a program with a graphical user interface, you can take
|
<p>If you would rather use a program with a graphical user interface, you can take
|
||||||
a look at <a class="reference external" href="https://unsigned.io/sideband">Sideband</a>, which is available for Android,
|
a look at <a class="reference external" href="https://unsigned.io/sideband">Sideband</a>, which is available for Android,
|
||||||
Linux and macOS.</p>
|
Linux and macOS.</p>
|
||||||
<a class="reference external image-reference" href="_images/sideband_1.png"><img alt="_images/sideband_1.png" class="align-center" src="_images/sideband_1.png" style="width: 400px;" /></a>
|
<a class="reference external image-reference" href="_images/sideband_1.png"><img alt="_images/sideband_1.png" class="align-center" src="_images/sideband_1.png" /></a>
|
||||||
<p>Sideband is currently in the early stages of development, but already provides basic
|
<p>Sideband is currently in the early stages of development, but already provides basic
|
||||||
communication features, and interoperates with Nomad Network, or any other LXMF client.</p>
|
communication features, and interoperates with Nomad Network, or any other LXMF client.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="using-the-included-utilities">
|
<section id="using-the-included-utilities">
|
||||||
<h2>Using the Included Utilities<a class="headerlink" href="#using-the-included-utilities" title="Permalink to this headline">¶</a></h2>
|
<h2>Using the Included Utilities<a class="headerlink" href="#using-the-included-utilities" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum comes with a range of included utilities that make it easier to
|
<p>Reticulum comes with a range of included utilities that make it easier to
|
||||||
manage your network, check connectivity and make Reticulum available to other
|
manage your network, check connectivity and make Reticulum available to other
|
||||||
programs on your system.</p>
|
programs on your system.</p>
|
||||||
@@ -102,16 +282,16 @@ and the <code class="docutils literal notranslate"><span class="pre">rnstatus</s
|
|||||||
network status and connectivity.</p>
|
network status and connectivity.</p>
|
||||||
<p>To learn more about these utility programs, have a look at the
|
<p>To learn more about these utility programs, have a look at the
|
||||||
<a class="reference internal" href="using.html#using-main"><span class="std std-ref">Using Reticulum on Your System</span></a> chapter of this manual.</p>
|
<a class="reference internal" href="using.html#using-main"><span class="std std-ref">Using Reticulum on Your System</span></a> chapter of this manual.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="creating-a-network-with-reticulum">
|
<section id="creating-a-network-with-reticulum">
|
||||||
<h2>Creating a Network With Reticulum<a class="headerlink" href="#creating-a-network-with-reticulum" title="Permalink to this headline">¶</a></h2>
|
<h2>Creating a Network With Reticulum<a class="headerlink" href="#creating-a-network-with-reticulum" title="Permalink to this heading">#</a></h2>
|
||||||
<p>To create a network, you will need to specify one or more <em>interfaces</em> for
|
<p>To create a network, you will need to specify one or more <em>interfaces</em> for
|
||||||
Reticulum to use. This is done in the Reticulum configuration file, which by
|
Reticulum to use. This is done in the Reticulum configuration file, which by
|
||||||
default is located at <code class="docutils literal notranslate"><span class="pre">~/.reticulum/config</span></code>. You can edit this file by hand,
|
default is located at <code class="docutils literal notranslate"><span class="pre">~/.reticulum/config</span></code>. You can edit this file by hand,
|
||||||
or use the interactive <code class="docutils literal notranslate"><span class="pre">rnsconfig</span></code> utility.</p>
|
or use the interactive <code class="docutils literal notranslate"><span class="pre">rnsconfig</span></code> utility.</p>
|
||||||
<p>When Reticulum is started for the first time, it will create a default
|
<p>When Reticulum is started for the first time, it will create a default
|
||||||
configuration file, with one active interface. This default interface uses
|
configuration file, with one active interface. This default interface uses
|
||||||
your existing ethernet and WiFi networks (if any), and only allows you to
|
your existing Ethernet and WiFi networks (if any), and only allows you to
|
||||||
communicate with other Reticulum peers within your local broadcast domains.</p>
|
communicate with other Reticulum peers within your local broadcast domains.</p>
|
||||||
<p>To communicate further, you will have to add one or more interfaces. The default
|
<p>To communicate further, you will have to add one or more interfaces. The default
|
||||||
configuration includes a number of examples, ranging from using TCP over the
|
configuration includes a number of examples, ranging from using TCP over the
|
||||||
@@ -122,7 +302,7 @@ or other things you might be used to from other network types.</p>
|
|||||||
<p>Once Reticulum knows which interfaces it should use, it will automatically
|
<p>Once Reticulum knows which interfaces it should use, it will automatically
|
||||||
discover topography and configure transport of data to any destinations it
|
discover topography and configure transport of data to any destinations it
|
||||||
knows about.</p>
|
knows about.</p>
|
||||||
<p>In situations where you already have an established WiFi or ethernet network, and
|
<p>In situations where you already have an established WiFi or Ethernet network, and
|
||||||
many devices that want to utilise the same external Reticulum network paths (for example over
|
many devices that want to utilise the same external Reticulum network paths (for example over
|
||||||
LoRa), it will often be sufficient to let one system act as a Reticulum gateway, by
|
LoRa), it will often be sufficient to let one system act as a Reticulum gateway, by
|
||||||
adding any external interfaces to the configuration of this system, and then enabling transport on it. Any
|
adding any external interfaces to the configuration of this system, and then enabling transport on it. Any
|
||||||
@@ -131,9 +311,9 @@ network just using the default (<a class="reference internal" href="interfaces.h
|
|||||||
<p>Possibly, the examples in the config file are enough to get you started. If
|
<p>Possibly, the examples in the config file are enough to get you started. If
|
||||||
you want more information, you can read the <a class="reference internal" href="networks.html#networks-main"><span class="std std-ref">Building Networks</span></a>
|
you want more information, you can read the <a class="reference internal" href="networks.html#networks-main"><span class="std std-ref">Building Networks</span></a>
|
||||||
and <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">Interfaces</span></a> chapters of this manual.</p>
|
and <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">Interfaces</span></a> chapters of this manual.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="connecting-reticulum-instances-over-the-internet">
|
<section id="connecting-reticulum-instances-over-the-internet">
|
||||||
<h2>Connecting Reticulum Instances Over the Internet<a class="headerlink" href="#connecting-reticulum-instances-over-the-internet" title="Permalink to this headline">¶</a></h2>
|
<h2>Connecting Reticulum Instances Over the Internet<a class="headerlink" href="#connecting-reticulum-instances-over-the-internet" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum currently offers two interfaces suitable for connecting instances over the Internet: <a class="reference internal" href="interfaces.html#interfaces-tcps"><span class="std std-ref">TCP</span></a>
|
<p>Reticulum currently offers two interfaces suitable for connecting instances over the Internet: <a class="reference internal" href="interfaces.html#interfaces-tcps"><span class="std std-ref">TCP</span></a>
|
||||||
and <a class="reference internal" href="interfaces.html#interfaces-i2p"><span class="std std-ref">I2P</span></a>. Each interface offers a different set of features, and Reticulum
|
and <a class="reference internal" href="interfaces.html#interfaces-i2p"><span class="std std-ref">I2P</span></a>. Each interface offers a different set of features, and Reticulum
|
||||||
users should carefully choose the interface which best suites their needs.</p>
|
users should carefully choose the interface which best suites their needs.</p>
|
||||||
@@ -144,7 +324,7 @@ however it also leaks more data about the server host.</p>
|
|||||||
inspect the connection. Someone could use this information to determine your location or identity. Adversaries
|
inspect the connection. Someone could use this information to determine your location or identity. Adversaries
|
||||||
inspecting your packets may be able to record packet metadata like time of transmission and packet size.
|
inspecting your packets may be able to record packet metadata like time of transmission and packet size.
|
||||||
Even though Reticulum encrypts traffic, TCP does not, so an adversary may be able to use
|
Even though Reticulum encrypts traffic, TCP does not, so an adversary may be able to use
|
||||||
packet inspection to learn that a system is running Reticulum, and what other IP adresses connect to it.
|
packet inspection to learn that a system is running Reticulum, and what other IP addresses connect to it.
|
||||||
Hosting a publicly reachable instance over TCP also requires a publicly reachable IP address,
|
Hosting a publicly reachable instance over TCP also requires a publicly reachable IP address,
|
||||||
which most Internet connections don’t offer anymore.</p>
|
which most Internet connections don’t offer anymore.</p>
|
||||||
<p>The <code class="docutils literal notranslate"><span class="pre">I2PInterface</span></code> routes messages through the <a class="reference external" href="https://geti2p.net/en/">Invisible Internet Protocol
|
<p>The <code class="docutils literal notranslate"><span class="pre">I2PInterface</span></code> routes messages through the <a class="reference external" href="https://geti2p.net/en/">Invisible Internet Protocol
|
||||||
@@ -155,13 +335,13 @@ hide both the sender and receiver Reticulum instance IP addresses. Running an I2
|
|||||||
will also relay other I2P user’s encrypted packets, which will use extra
|
will also relay other I2P user’s encrypted packets, which will use extra
|
||||||
bandwidth and compute power, but also makes timing attacks and other forms of
|
bandwidth and compute power, but also makes timing attacks and other forms of
|
||||||
deep-packet-inspection much more difficult.</p>
|
deep-packet-inspection much more difficult.</p>
|
||||||
<p>I2P also allows users to host globally available Reticulum instances from non-public IPs and behind firewalls and NAT.</p>
|
<p>I2P also allows users to host globally available Reticulum instances from non-public IP’s and behind firewalls and NAT.</p>
|
||||||
<p>In general it is recommended to use an I2P node if you want to host a publically accessible
|
<p>In general it is recommended to use an I2P node if you want to host a publicly accessible
|
||||||
instance, while preserving anonymity. If you care more about performance, and a slightly
|
instance, while preserving anonymity. If you care more about performance, and a slightly
|
||||||
easier setup, use TCP.</p>
|
easier setup, use TCP.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="connect-to-the-public-testnet">
|
<section id="connect-to-the-public-testnet">
|
||||||
<h2>Connect to the Public Testnet<a class="headerlink" href="#connect-to-the-public-testnet" title="Permalink to this headline">¶</a></h2>
|
<h2>Connect to the Public Testnet<a class="headerlink" href="#connect-to-the-public-testnet" title="Permalink to this heading">#</a></h2>
|
||||||
<p>An experimental public testnet has been made accessible over both I2P and TCP. You can join it
|
<p>An experimental public testnet has been made accessible over both I2P and TCP. You can join it
|
||||||
by adding one of the following interfaces to your <code class="docutils literal notranslate"><span class="pre">.reticulum/config</span></code> file:</p>
|
by adding one of the following interfaces to your <code class="docutils literal notranslate"><span class="pre">.reticulum/config</span></code> file:</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># TCP/IP interface to the Dublin hub</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># TCP/IP interface to the Dublin hub</span>
|
||||||
@@ -189,9 +369,9 @@ by adding one of the following interfaces to your <code class="docutils literal
|
|||||||
via other entry points if you know them. There is absolutely no control over the network
|
via other entry points if you know them. There is absolutely no control over the network
|
||||||
topography, usage or what types of instances connect. It will also occasionally be used
|
topography, usage or what types of instances connect. It will also occasionally be used
|
||||||
to test various failure scenarios, and there are no availability or service guarantees.</p>
|
to test various failure scenarios, and there are no availability or service guarantees.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="adding-radio-interfaces">
|
<section id="adding-radio-interfaces">
|
||||||
<h2>Adding Radio Interfaces<a class="headerlink" href="#adding-radio-interfaces" title="Permalink to this headline">¶</a></h2>
|
<h2>Adding Radio Interfaces<a class="headerlink" href="#adding-radio-interfaces" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Once you have Reticulum installed and working, you can add radio interfaces with
|
<p>Once you have Reticulum installed and working, you can add radio interfaces with
|
||||||
any compatible hardware you have available. Reticulum supports a wide range of radio
|
any compatible hardware you have available. Reticulum supports a wide range of radio
|
||||||
hardware, and if you already have any available, it is very likely that it will
|
hardware, and if you already have any available, it is very likely that it will
|
||||||
@@ -215,9 +395,9 @@ refer to these additional external resources:</p>
|
|||||||
<a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">existing interface types</span></a>, but you think would be suitable for use with Reticulum,
|
<a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">existing interface types</span></a>, but you think would be suitable for use with Reticulum,
|
||||||
you are welcome to head over to the <a class="reference external" href="https://github.com/markqvist/Reticulum/discussions">GitHub discussion pages</a>
|
you are welcome to head over to the <a class="reference external" href="https://github.com/markqvist/Reticulum/discussions">GitHub discussion pages</a>
|
||||||
and propose adding an interface for the hardware.</p>
|
and propose adding an interface for the hardware.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="develop-a-program-with-reticulum">
|
<section id="develop-a-program-with-reticulum">
|
||||||
<h2>Develop a Program with Reticulum<a class="headerlink" href="#develop-a-program-with-reticulum" title="Permalink to this headline">¶</a></h2>
|
<h2>Develop a Program with Reticulum<a class="headerlink" href="#develop-a-program-with-reticulum" title="Permalink to this heading">#</a></h2>
|
||||||
<p>If you want to develop programs that use Reticulum, the easiest way to get
|
<p>If you want to develop programs that use Reticulum, the easiest way to get
|
||||||
started is to install the latest release of Reticulum via pip:</p>
|
started is to install the latest release of Reticulum via pip:</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">rns</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip3</span> <span class="n">install</span> <span class="n">rns</span>
|
||||||
@@ -231,9 +411,9 @@ likely be to look at some <a class="reference internal" href="examples.html#exam
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Further information can be found in the <a class="reference internal" href="reference.html#api-main"><span class="std std-ref">API Reference</span></a>.</p>
|
<p>Further information can be found in the <a class="reference internal" href="reference.html#api-main"><span class="std std-ref">API Reference</span></a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="participate-in-reticulum-development">
|
<section id="participate-in-reticulum-development">
|
||||||
<h2>Participate in Reticulum Development<a class="headerlink" href="#participate-in-reticulum-development" title="Permalink to this headline">¶</a></h2>
|
<h2>Participate in Reticulum Development<a class="headerlink" href="#participate-in-reticulum-development" title="Permalink to this heading">#</a></h2>
|
||||||
<p>If you want to participate in the development of Reticulum and associated
|
<p>If you want to participate in the development of Reticulum and associated
|
||||||
utilities, you’ll want to get the latest source from GitHub. In that case,
|
utilities, you’ll want to get the latest source from GitHub. In that case,
|
||||||
don’t use pip, but try this recipe:</p>
|
don’t use pip, but try this recipe:</p>
|
||||||
@@ -270,10 +450,13 @@ don’t use pip, but try this recipe:</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>When you have experimented with the basic examples, it’s time to go read the
|
<p>When you have experimented with the basic examples, it’s time to go read the
|
||||||
<a class="reference internal" href="understanding.html#understanding-main"><span class="std std-ref">Understanding Reticulum</span></a> chapter.</p>
|
<a class="reference internal" href="understanding.html#understanding-main"><span class="std std-ref">Understanding Reticulum</span></a> chapter. Before submitting
|
||||||
</div>
|
your first pull request, it is probably a good idea to introduce yourself on
|
||||||
<div class="section" id="reticulum-on-arm64">
|
the <a class="reference external" href="https://github.com/markqvist/Reticulum/discussions">disucssion forum on GitHub</a>,
|
||||||
<h2>Reticulum on ARM64<a class="headerlink" href="#reticulum-on-arm64" title="Permalink to this headline">¶</a></h2>
|
or ask one of the developers or maintainers for a good place to start.</p>
|
||||||
|
</section>
|
||||||
|
<section id="reticulum-on-arm64">
|
||||||
|
<h2>Reticulum on ARM64<a class="headerlink" href="#reticulum-on-arm64" title="Permalink to this heading">#</a></h2>
|
||||||
<p>On some architectures, including ARM64, not all dependencies have precompiled
|
<p>On some architectures, including ARM64, not all dependencies have precompiled
|
||||||
binaries. On such systems, you will need to install <code class="docutils literal notranslate"><span class="pre">python3-dev</span></code> before
|
binaries. On such systems, you will need to install <code class="docutils literal notranslate"><span class="pre">python3-dev</span></code> before
|
||||||
installing Reticulum or programs that depend on Reticulum.</p>
|
installing Reticulum or programs that depend on Reticulum.</p>
|
||||||
@@ -285,9 +468,9 @@ installing Reticulum or programs that depend on Reticulum.</p>
|
|||||||
<span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">rns</span>
|
<span class="n">python3</span> <span class="o">-</span><span class="n">m</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">rns</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="reticulum-on-android">
|
<section id="reticulum-on-android">
|
||||||
<h2>Reticulum on Android<a class="headerlink" href="#reticulum-on-android" title="Permalink to this headline">¶</a></h2>
|
<h2>Reticulum on Android<a class="headerlink" href="#reticulum-on-android" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum can be used on Android in different ways. The easiest way to get
|
<p>Reticulum can be used on Android in different ways. The easiest way to get
|
||||||
started is using an app like <a class="reference external" href="https://unsigned.io/sideband">Sideband</a>.</p>
|
started is using an app like <a class="reference external" href="https://unsigned.io/sideband">Sideband</a>.</p>
|
||||||
<p>For more control and features, you can use Reticulum and related programs via
|
<p>For more control and features, you can use Reticulum and related programs via
|
||||||
@@ -326,10 +509,10 @@ and a few extra commands are required.</p>
|
|||||||
</div>
|
</div>
|
||||||
<p>It is also possible to include Reticulum in apps compiled and distributed as
|
<p>It is also possible to include Reticulum in apps compiled and distributed as
|
||||||
Android APKs. A detailed tutorial and example source code will be included
|
Android APKs. A detailed tutorial and example source code will be included
|
||||||
here at a later point.</p>
|
here at a later point. Until then you can use the <a class="reference external" href="https://github.com/markqvist/sideband">Sideband source code</a> as an example and startig point.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="pure-python-reticulum">
|
<section id="pure-python-reticulum">
|
||||||
<h2>Pure-Python Reticulum<a class="headerlink" href="#pure-python-reticulum" title="Permalink to this headline">¶</a></h2>
|
<h2>Pure-Python Reticulum<a class="headerlink" href="#pure-python-reticulum" title="Permalink to this heading">#</a></h2>
|
||||||
<p>In some rare cases, and on more obscure system types, it is not possible to
|
<p>In some rare cases, and on more obscure system types, it is not possible to
|
||||||
install one or more dependencies</p>
|
install one or more dependencies</p>
|
||||||
<p>On more unusual systems, and in some rare cases, it might not be possible to
|
<p>On more unusual systems, and in some rare cases, it might not be possible to
|
||||||
@@ -348,18 +531,65 @@ All other available modules will still be loaded when needed.</p>
|
|||||||
do not support <a class="reference external" href="https://github.com/pyca/cryptography">PyCA/cryptography</a>, it is
|
do not support <a class="reference external" href="https://github.com/pyca/cryptography">PyCA/cryptography</a>, it is
|
||||||
important that you read and understand the <a class="reference internal" href="understanding.html#understanding-primitives"><span class="std std-ref">Cryptographic Primitives</span></a>
|
important that you read and understand the <a class="reference internal" href="understanding.html#understanding-primitives"><span class="std std-ref">Cryptographic Primitives</span></a>
|
||||||
section of this manual.</p>
|
section of this manual.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="using.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Using Reticulum on Your System</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="whatis.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">What is Reticulum?</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Getting Started Fast</a><ul>
|
<li><a class="reference internal" href="#">Getting Started Fast</a><ul>
|
||||||
<li><a class="reference internal" href="#try-using-a-reticulum-based-program">Try Using a Reticulum-based Program</a><ul>
|
<li><a class="reference internal" href="#try-using-a-reticulum-based-program">Try Using a Reticulum-based Program</a><ul>
|
||||||
<li><a class="reference internal" href="#nomad-network">Nomad Network</a></li>
|
<li><a class="reference internal" href="#nomad-network">Nomad Network</a></li>
|
||||||
@@ -380,52 +610,21 @@ section of this manual.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="whatis.html"
|
|
||||||
title="previous chapter">What is Reticulum?</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="using.html"
|
|
||||||
title="next chapter">Using Reticulum on Your System</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/gettingstartedfast.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="using.html" title="Using Reticulum on Your System"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="whatis.html" title="What is Reticulum?"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Getting Started Fast</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,48 +1,228 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Supported Interfaces" href="interfaces.html" /><link rel="prev" title="Understanding Reticulum" href="understanding.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Communications Hardware - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Communications Hardware — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Supported Interfaces" href="interfaces.html" />
|
|
||||||
<link rel="prev" title="Understanding Reticulum" href="understanding.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="interfaces.html" title="Supported Interfaces"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="understanding.html" title="Understanding Reticulum"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Communications Hardware</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="communications-hardware">
|
|
||||||
<span id="hardware-main"></span><h1>Communications Hardware<a class="headerlink" href="#communications-hardware" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="communications-hardware">
|
||||||
|
<span id="hardware-main"></span><h1>Communications Hardware<a class="headerlink" href="#communications-hardware" title="Permalink to this heading">#</a></h1>
|
||||||
<p>One of the truly valuable aspects of Reticulum is the ability to use it over
|
<p>One of the truly valuable aspects of Reticulum is the ability to use it over
|
||||||
almost any conceivable kind of communications medium. The <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">interface types</span></a>
|
almost any conceivable kind of communications medium. The <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">interface types</span></a>
|
||||||
available for configuration in Reticulum are flexible enough to cover the use
|
available for configuration in Reticulum are flexible enough to cover the use
|
||||||
@@ -64,8 +244,8 @@ and effort. Two fundamental devices categories will be covered, <em>RNodes</em>
|
|||||||
<p>While there are many other device categories that are useful in building Reticulum
|
<p>While there are many other device categories that are useful in building Reticulum
|
||||||
networks, knowing how to employ just these two will make it possible to build
|
networks, knowing how to employ just these two will make it possible to build
|
||||||
a wide range of useful networks with little effort.</p>
|
a wide range of useful networks with little effort.</p>
|
||||||
<div class="section" id="rnode">
|
<section id="rnode">
|
||||||
<span id="rnode-main"></span><h2>RNode<a class="headerlink" href="#rnode" title="Permalink to this headline">¶</a></h2>
|
<span id="rnode-main"></span><h2>RNode<a class="headerlink" href="#rnode" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reliable and general-purpose long-range digital radio transceiver systems are
|
<p>Reliable and general-purpose long-range digital radio transceiver systems are
|
||||||
commonly either very expensive, difficult to set up and operate, hard to source,
|
commonly either very expensive, difficult to set up and operate, hard to source,
|
||||||
power-hungry, or all of the above at the same time. In an attempt to alleviate
|
power-hungry, or all of the above at the same time. In an attempt to alleviate
|
||||||
@@ -81,10 +261,10 @@ the discussion to RNodes using <em>LoRa</em> modulation in common ISM bands.</p>
|
|||||||
<p><strong>Avoid Confusion!</strong> RNodes can use LoRa as a <em>physical-layer modulation</em>, but it
|
<p><strong>Avoid Confusion!</strong> RNodes can use LoRa as a <em>physical-layer modulation</em>, but it
|
||||||
does not use, and has nothing to do with the <em>LoRaWAN</em> protocol and standard, commonly
|
does not use, and has nothing to do with the <em>LoRaWAN</em> protocol and standard, commonly
|
||||||
used for centrally controlled IoT devices. RNodes use <em>raw LoRa modulation</em>, without
|
used for centrally controlled IoT devices. RNodes use <em>raw LoRa modulation</em>, without
|
||||||
any additional protocol overhead. All high-level protocol funcionality is handled
|
any additional protocol overhead. All high-level protocol functionality is handled
|
||||||
directly by Reticulum.</p>
|
directly by Reticulum.</p>
|
||||||
<div class="section" id="creating-rnodes">
|
<section id="creating-rnodes">
|
||||||
<span id="rnode-creating"></span><h3>Creating RNodes<a class="headerlink" href="#creating-rnodes" title="Permalink to this headline">¶</a></h3>
|
<span id="rnode-creating"></span><h3>Creating RNodes<a class="headerlink" href="#creating-rnodes" title="Permalink to this heading">#</a></h3>
|
||||||
<p>RNode has been designed as a system that is easy to replicate across time and
|
<p>RNode has been designed as a system that is easy to replicate across time and
|
||||||
space. You can put together a functioning transceiver using commonly available
|
space. You can put together a functioning transceiver using commonly available
|
||||||
components, and a few open source software tools. While you can design and build RNodes
|
components, and a few open source software tools. While you can design and build RNodes
|
||||||
@@ -99,13 +279,13 @@ LoRa development boards. This approach can be boiled down to two simple steps:</
|
|||||||
is ready to use with any software that supports RNodes, including Reticulum.
|
is ready to use with any software that supports RNodes, including Reticulum.
|
||||||
The device can be used with Reticulum by adding an <a class="reference internal" href="interfaces.html#interfaces-rnode"><span class="std std-ref">RNodeInterface</span></a>
|
The device can be used with Reticulum by adding an <a class="reference internal" href="interfaces.html#interfaces-rnode"><span class="std std-ref">RNodeInterface</span></a>
|
||||||
to the configuration.</p>
|
to the configuration.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="supported-boards">
|
<section id="supported-boards">
|
||||||
<span id="rnode-supported"></span><h3>Supported Boards<a class="headerlink" href="#supported-boards" title="Permalink to this headline">¶</a></h3>
|
<span id="rnode-supported"></span><h3>Supported Boards<a class="headerlink" href="#supported-boards" title="Permalink to this heading">#</a></h3>
|
||||||
<p>To create one or more RNodes, you will need to obtain supported development
|
<p>To create one or more RNodes, you will need to obtain supported development
|
||||||
boards. The following boards are supported by the auto-installer.</p>
|
boards. The following boards are supported by the auto-installer.</p>
|
||||||
<div class="section" id="lilygo-lora32-v2-1">
|
<section id="lilygo-lora32-v2-1">
|
||||||
<h4>LilyGO LoRa32 v2.1<a class="headerlink" href="#lilygo-lora32-v2-1" title="Permalink to this headline">¶</a></h4>
|
<h4>LilyGO LoRa32 v2.1<a class="headerlink" href="#lilygo-lora32-v2-1" title="Permalink to this heading">#</a></h4>
|
||||||
<a class="reference internal image-reference" href="_images/board_t3v21.png"><img alt="_images/board_t3v21.png" class="align-center" src="_images/board_t3v21.png" style="width: 46%;" /></a>
|
<a class="reference internal image-reference" href="_images/board_t3v21.png"><img alt="_images/board_t3v21.png" class="align-center" src="_images/board_t3v21.png" style="width: 46%;" /></a>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
||||||
@@ -113,9 +293,9 @@ boards. The following boards are supported by the auto-installer.</p>
|
|||||||
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
||||||
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://lilygo.cn">LilyGO</a></p></li>
|
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://lilygo.cn">LilyGO</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="lilygo-lora32-v2-0">
|
<section id="lilygo-lora32-v2-0">
|
||||||
<h4>LilyGO LoRa32 v2.0<a class="headerlink" href="#lilygo-lora32-v2-0" title="Permalink to this headline">¶</a></h4>
|
<h4>LilyGO LoRa32 v2.0<a class="headerlink" href="#lilygo-lora32-v2-0" title="Permalink to this heading">#</a></h4>
|
||||||
<a class="reference internal image-reference" href="_images/board_t3v20.png"><img alt="_images/board_t3v20.png" class="align-center" src="_images/board_t3v20.png" style="width: 46%;" /></a>
|
<a class="reference internal image-reference" href="_images/board_t3v20.png"><img alt="_images/board_t3v20.png" class="align-center" src="_images/board_t3v20.png" style="width: 46%;" /></a>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
||||||
@@ -123,9 +303,9 @@ boards. The following boards are supported by the auto-installer.</p>
|
|||||||
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
||||||
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://lilygo.cn">LilyGO</a></p></li>
|
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://lilygo.cn">LilyGO</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="lilygo-t-beam">
|
<section id="lilygo-t-beam">
|
||||||
<h4>LilyGO T-Beam<a class="headerlink" href="#lilygo-t-beam" title="Permalink to this headline">¶</a></h4>
|
<h4>LilyGO T-Beam<a class="headerlink" href="#lilygo-t-beam" title="Permalink to this heading">#</a></h4>
|
||||||
<a class="reference internal image-reference" href="_images/board_tbeam.png"><img alt="_images/board_tbeam.png" class="align-center" src="_images/board_tbeam.png" style="width: 75%;" /></a>
|
<a class="reference internal image-reference" href="_images/board_tbeam.png"><img alt="_images/board_tbeam.png" class="align-center" src="_images/board_tbeam.png" style="width: 75%;" /></a>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
||||||
@@ -133,9 +313,9 @@ boards. The following boards are supported by the auto-installer.</p>
|
|||||||
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
||||||
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://lilygo.cn">LilyGO</a></p></li>
|
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://lilygo.cn">LilyGO</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="heltec-lora32-v2-0">
|
<section id="heltec-lora32-v2-0">
|
||||||
<h4>Heltec LoRa32 v2.0<a class="headerlink" href="#heltec-lora32-v2-0" title="Permalink to this headline">¶</a></h4>
|
<h4>Heltec LoRa32 v2.0<a class="headerlink" href="#heltec-lora32-v2-0" title="Permalink to this heading">#</a></h4>
|
||||||
<a class="reference internal image-reference" href="_images/board_heltec32.png"><img alt="_images/board_heltec32.png" class="align-center" src="_images/board_heltec32.png" style="width: 58%;" /></a>
|
<a class="reference internal image-reference" href="_images/board_heltec32.png"><img alt="_images/board_heltec32.png" class="align-center" src="_images/board_heltec32.png" style="width: 58%;" /></a>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
||||||
@@ -143,9 +323,9 @@ boards. The following boards are supported by the auto-installer.</p>
|
|||||||
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
||||||
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://heltec.org">Heltec Automation</a></p></li>
|
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://heltec.org">Heltec Automation</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="unsigned-rnode-v2-x">
|
<section id="unsigned-rnode-v2-x">
|
||||||
<h4>Unsigned RNode v2.x<a class="headerlink" href="#unsigned-rnode-v2-x" title="Permalink to this headline">¶</a></h4>
|
<h4>Unsigned RNode v2.x<a class="headerlink" href="#unsigned-rnode-v2-x" title="Permalink to this heading">#</a></h4>
|
||||||
<a class="reference internal image-reference" href="_images/board_rnodev2.png"><img alt="_images/board_rnodev2.png" class="align-center" src="_images/board_rnodev2.png" style="width: 58%;" /></a>
|
<a class="reference internal image-reference" href="_images/board_rnodev2.png"><img alt="_images/board_rnodev2.png" class="align-center" src="_images/board_rnodev2.png" style="width: 58%;" /></a>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
<li><p><strong>Supported Firmware Lines</strong> v1.x & v2.x</p></li>
|
||||||
@@ -153,9 +333,9 @@ boards. The following boards are supported by the auto-installer.</p>
|
|||||||
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
<li><p><strong>Device Platform</strong> ESP32</p></li>
|
||||||
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://unsigned.io">unsigned.io</a></p></li>
|
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://unsigned.io">unsigned.io</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="unsigned-rnode-v1-x">
|
<section id="unsigned-rnode-v1-x">
|
||||||
<h4>Unsigned RNode v1.x<a class="headerlink" href="#unsigned-rnode-v1-x" title="Permalink to this headline">¶</a></h4>
|
<h4>Unsigned RNode v1.x<a class="headerlink" href="#unsigned-rnode-v1-x" title="Permalink to this heading">#</a></h4>
|
||||||
<a class="reference internal image-reference" href="_images/board_rnode.png"><img alt="_images/board_rnode.png" class="align-center" src="_images/board_rnode.png" style="width: 50%;" /></a>
|
<a class="reference internal image-reference" href="_images/board_rnode.png"><img alt="_images/board_rnode.png" class="align-center" src="_images/board_rnode.png" style="width: 50%;" /></a>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><strong>Supported Firmware Lines</strong> v1.x</p></li>
|
<li><p><strong>Supported Firmware Lines</strong> v1.x</p></li>
|
||||||
@@ -163,10 +343,10 @@ boards. The following boards are supported by the auto-installer.</p>
|
|||||||
<li><p><strong>Device Platform</strong> AVR ATmega1284p</p></li>
|
<li><p><strong>Device Platform</strong> AVR ATmega1284p</p></li>
|
||||||
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://unsigned.io">unsigned.io</a></p></li>
|
<li><p><strong>Manufacturer</strong> <a class="reference external" href="https://unsigned.io">unsigned.io</a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="installation">
|
<section id="installation">
|
||||||
<span id="rnode-installation"></span><h3>Installation<a class="headerlink" href="#installation" title="Permalink to this headline">¶</a></h3>
|
<span id="rnode-installation"></span><h3>Installation<a class="headerlink" href="#installation" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Once you have obtained compatible boards, you can install the <a class="reference external" href="https://github.com/markqvist/RNode_Firmware">RNode Firmware</a>
|
<p>Once you have obtained compatible boards, you can install the <a class="reference external" href="https://github.com/markqvist/RNode_Firmware">RNode Firmware</a>
|
||||||
using the <a class="reference external" href="https://github.com/markqvist/rnodeconfigutil">RNode Configuration Utility</a>.
|
using the <a class="reference external" href="https://github.com/markqvist/rnodeconfigutil">RNode Configuration Utility</a>.
|
||||||
Make sure that <code class="docutils literal notranslate"><span class="pre">Python3</span></code> and <code class="docutils literal notranslate"><span class="pre">pip</span></code> is installed on your system, and then install
|
Make sure that <code class="docutils literal notranslate"><span class="pre">Python3</span></code> and <code class="docutils literal notranslate"><span class="pre">pip</span></code> is installed on your system, and then install
|
||||||
@@ -186,26 +366,26 @@ auto-install and configure your devices</p>
|
|||||||
even though the v2.x line is available for early testing. The v2.x line should still be
|
even though the v2.x line is available for early testing. The v2.x line should still be
|
||||||
considered an experimental pre-release. Only use the v2.x firmware line if you want to test
|
considered an experimental pre-release. Only use the v2.x firmware line if you want to test
|
||||||
out the absolutely newest version, and don’t care about stability.</p>
|
out the absolutely newest version, and don’t care about stability.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="usage-with-reticulum">
|
<section id="usage-with-reticulum">
|
||||||
<span id="rnode-usage"></span><h3>Usage with Reticulum<a class="headerlink" href="#usage-with-reticulum" title="Permalink to this headline">¶</a></h3>
|
<span id="rnode-usage"></span><h3>Usage with Reticulum<a class="headerlink" href="#usage-with-reticulum" title="Permalink to this heading">#</a></h3>
|
||||||
<p>When the devices have been installed and provisioned, you can use them with Reticulum
|
<p>When the devices have been installed and provisioned, you can use them with Reticulum
|
||||||
by adding the <a class="reference internal" href="interfaces.html#interfaces-rnode"><span class="std std-ref">relevant interface section</span></a> to the configuration
|
by adding the <a class="reference internal" href="interfaces.html#interfaces-rnode"><span class="std std-ref">relevant interface section</span></a> to the configuration
|
||||||
file of Reticulum. For v1.x firmwares, you will have to specify all interface parameters,
|
file of Reticulum. For v1.x firmwares, you will have to specify all interface parameters,
|
||||||
such as serial port and on-air parameters. For v2.x firmwares, you just need to specify
|
such as serial port and on-air parameters. For v2.x firmwares, you just need to specify
|
||||||
the Connection ID of the RNode, and Reticulum will automatically locate and connect to the
|
the Connection ID of the RNode, and Reticulum will automatically locate and connect to the
|
||||||
RNode, using the parameters stored in the RNode itself.</p>
|
RNode, using the parameters stored in the RNode itself.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="suppliers">
|
<section id="suppliers">
|
||||||
<span id="rnode-suppliers"></span><h3>Suppliers<a class="headerlink" href="#suppliers" title="Permalink to this headline">¶</a></h3>
|
<span id="rnode-suppliers"></span><h3>Suppliers<a class="headerlink" href="#suppliers" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Get in touch if you want to have your RNode supplier listed here, or if you want help to
|
<p>Get in touch if you want to have your RNode supplier listed here, or if you want help to
|
||||||
get started with producing RNodes.</p>
|
get started with producing RNodes.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="wifi-based-hardware">
|
<section id="wifi-based-hardware">
|
||||||
<h2>WiFi-based Hardware<a class="headerlink" href="#wifi-based-hardware" title="Permalink to this headline">¶</a></h2>
|
<h2>WiFi-based Hardware<a class="headerlink" href="#wifi-based-hardware" title="Permalink to this heading">#</a></h2>
|
||||||
<p>It is possible to use all kinds of both short- and long-range Wifi-based hardware
|
<p>It is possible to use all kinds of both short- and long-range WiFi-based hardware
|
||||||
with Reticulum. Any kind of hardware that fully supports bridged ethernet over the
|
with Reticulum. Any kind of hardware that fully supports bridged Ethernet over the
|
||||||
WiFi interface will work with the <a class="reference internal" href="interfaces.html#interfaces-auto"><span class="std std-ref">AutoInterface</span></a> in Reticulum.
|
WiFi interface will work with the <a class="reference internal" href="interfaces.html#interfaces-auto"><span class="std std-ref">AutoInterface</span></a> in Reticulum.
|
||||||
Most devices will behave like this by default, or allow it via configuration options.</p>
|
Most devices will behave like this by default, or allow it via configuration options.</p>
|
||||||
<p>This means that you can simply configure the physical links of the WiFi based devices,
|
<p>This means that you can simply configure the physical links of the WiFi based devices,
|
||||||
@@ -225,26 +405,73 @@ Reticulum links over long distances:</p>
|
|||||||
that is relatively cheap while providing long range and high capacity for Reticulum
|
that is relatively cheap while providing long range and high capacity for Reticulum
|
||||||
networks. As in all other cases, it is also possible for Reticulum to co-exist with IP
|
networks. As in all other cases, it is also possible for Reticulum to co-exist with IP
|
||||||
networks running concurrently on such devices.</p>
|
networks running concurrently on such devices.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="combining-hardware-types">
|
<section id="combining-hardware-types">
|
||||||
<h2>Combining Hardware Types<a class="headerlink" href="#combining-hardware-types" title="Permalink to this headline">¶</a></h2>
|
<h2>Combining Hardware Types<a class="headerlink" href="#combining-hardware-types" title="Permalink to this heading">#</a></h2>
|
||||||
<p>It is useful to combine different link and hardware types when designing and
|
<p>It is useful to combine different link and hardware types when designing and
|
||||||
building a network. One useful design pattern is to employ high-capacity point-to-point
|
building a network. One useful design pattern is to employ high-capacity point-to-point
|
||||||
links based on WiFi or millimeter-wave radios (with high-gain directional antennas)
|
links based on WiFi or millimeter-wave radios (with high-gain directional antennas)
|
||||||
for the network backbone, and using LoRa-based RNodes for covering large areas with
|
for the network backbone, and using LoRa-based RNodes for covering large areas with
|
||||||
connectivity for client devices.</p>
|
connectivity for client devices.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="interfaces.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Supported Interfaces</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="understanding.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Understanding Reticulum</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Communications Hardware</a><ul>
|
<li><a class="reference internal" href="#">Communications Hardware</a><ul>
|
||||||
<li><a class="reference internal" href="#rnode">RNode</a><ul>
|
<li><a class="reference internal" href="#rnode">RNode</a><ul>
|
||||||
<li><a class="reference internal" href="#creating-rnodes">Creating RNodes</a></li>
|
<li><a class="reference internal" href="#creating-rnodes">Creating RNodes</a></li>
|
||||||
@@ -268,52 +495,21 @@ connectivity for client devices.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="understanding.html"
|
|
||||||
title="previous chapter">Understanding Reticulum</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="interfaces.html"
|
|
||||||
title="next chapter">Supported Interfaces</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/hardware.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="interfaces.html" title="Supported Interfaces"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="understanding.html" title="Understanding Reticulum"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Communications Hardware</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,47 +1,234 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="What is Reticulum?" href="whatis.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Reticulum Network Stack Manual — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="What is Reticulum?" href="whatis.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="whatis.html" title="What is Reticulum?"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="#">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Reticulum Network Stack Manual</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="reticulum-network-stack-manual">
|
|
||||||
<h1>Reticulum Network Stack Manual<a class="headerlink" href="#reticulum-network-stack-manual" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="#"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="#">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="reticulum-network-stack-manual">
|
||||||
|
<h1>Reticulum Network Stack Manual<a class="headerlink" href="#reticulum-network-stack-manual" title="Permalink to this heading">#</a></h1>
|
||||||
<p>This manual aims to provide you with all the information you need to
|
<p>This manual aims to provide you with all the information you need to
|
||||||
understand Reticulum, build networks or develop programs using it, or
|
understand Reticulum, build networks or develop programs using it, or
|
||||||
to participate in the development of Reticulum itself.</p>
|
to participate in the development of Reticulum itself.</p>
|
||||||
|
<section id="table-of-contents">
|
||||||
|
<h2>Table Of Contents<a class="headerlink" href="#table-of-contents" title="Permalink to this heading">#</a></h2>
|
||||||
|
</section>
|
||||||
<div class="toctree-wrapper compound">
|
<div class="toctree-wrapper compound">
|
||||||
<ul>
|
<ul>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a><ul>
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a><ul>
|
||||||
@@ -155,21 +342,6 @@ to participate in the development of Reticulum itself.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a><ul>
|
|
||||||
<li class="toctree-l2"><a class="reference internal" href="reference.html#classes">Classes</a><ul>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#reticulum">Reticulum</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#api-identity">Identity</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#destination">Destination</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#packet">Packet</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#packet-receipt">Packet Receipt</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#link">Link</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#request-receipt">Request Receipt</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#resource">Resource</a></li>
|
|
||||||
<li class="toctree-l3"><a class="reference internal" href="reference.html#transport">Transport</a></li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</li>
|
|
||||||
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a><ul>
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a><ul>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="examples.html#minimal">Minimal</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="examples.html#minimal">Minimal</a></li>
|
||||||
<li class="toctree-l2"><a class="reference internal" href="examples.html#announce">Announce</a></li>
|
<li class="toctree-l2"><a class="reference internal" href="examples.html#announce">Announce</a></li>
|
||||||
@@ -189,70 +361,99 @@ to participate in the development of Reticulum itself.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="indices-and-tables">
|
<div class="toctree-wrapper compound">
|
||||||
<h2>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2>
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a><ul>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Reticulum"><code class="docutils literal notranslate"><span class="pre">Reticulum</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Identity"><code class="docutils literal notranslate"><span class="pre">Identity</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Destination"><code class="docutils literal notranslate"><span class="pre">Destination</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Packet"><code class="docutils literal notranslate"><span class="pre">Packet</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.PacketReceipt"><code class="docutils literal notranslate"><span class="pre">PacketReceipt</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Link"><code class="docutils literal notranslate"><span class="pre">Link</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.RequestReceipt"><code class="docutils literal notranslate"><span class="pre">RequestReceipt</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Resource"><code class="docutils literal notranslate"><span class="pre">Resource</span></code></a></li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="reference.html#RNS.Transport"><code class="docutils literal notranslate"><span class="pre">Transport</span></code></a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<section id="indices-and-tables">
|
||||||
|
<h2>Indices and Tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this heading">#</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
|
<li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li>
|
||||||
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
|
<li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="whatis.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">What is Reticulum?</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="#">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Reticulum Network Stack Manual</a><ul>
|
<li><a class="reference internal" href="#">Reticulum Network Stack Manual</a><ul>
|
||||||
|
<li><a class="reference internal" href="#table-of-contents">Table Of Contents</a></li>
|
||||||
<li><a class="reference internal" href="#indices-and-tables">Indices and Tables</a></li>
|
<li><a class="reference internal" href="#indices-and-tables">Indices and Tables</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Next topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="whatis.html"
|
|
||||||
title="next chapter">What is Reticulum?</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/index.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="whatis.html" title="What is Reticulum?"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="nav-item nav-item-0"><a href="#">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<li class="nav-item nav-item-this"><a href="">Reticulum Network Stack Manual</a></li>
|
<script src="_static/copybutton.js"></script>
|
||||||
</ul>
|
</body>
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,48 +1,228 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Building Networks" href="networks.html" /><link rel="prev" title="Communications Hardware" href="hardware.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Supported Interfaces - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Supported Interfaces — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Building Networks" href="networks.html" />
|
|
||||||
<link rel="prev" title="Communications Hardware" href="hardware.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="networks.html" title="Building Networks"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="hardware.html" title="Communications Hardware"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Supported Interfaces</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="supported-interfaces">
|
|
||||||
<span id="interfaces-main"></span><h1>Supported Interfaces<a class="headerlink" href="#supported-interfaces" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="supported-interfaces">
|
||||||
|
<span id="interfaces-main"></span><h1>Supported Interfaces<a class="headerlink" href="#supported-interfaces" title="Permalink to this heading">#</a></h1>
|
||||||
<p>Reticulum supports using many kinds of devices as networking interfaces, and
|
<p>Reticulum supports using many kinds of devices as networking interfaces, and
|
||||||
allows you to mix and match them in any way you choose. The number of distinct
|
allows you to mix and match them in any way you choose. The number of distinct
|
||||||
network topologies you can create with Reticulum is more or less endless, but
|
network topologies you can create with Reticulum is more or less endless, but
|
||||||
@@ -53,8 +233,8 @@ and gives example configurations for the respective interface types.</p>
|
|||||||
<p>For a high-level overview of how networks can be formed over different interface
|
<p>For a high-level overview of how networks can be formed over different interface
|
||||||
types, have a look at the <a class="reference internal" href="networks.html#networks-main"><span class="std std-ref">Building Networks</span></a> chapter of this
|
types, have a look at the <a class="reference internal" href="networks.html#networks-main"><span class="std std-ref">Building Networks</span></a> chapter of this
|
||||||
manual.</p>
|
manual.</p>
|
||||||
<div class="section" id="auto-interface">
|
<section id="auto-interface">
|
||||||
<span id="interfaces-auto"></span><h2>Auto Interface<a class="headerlink" href="#auto-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-auto"></span><h2>Auto Interface<a class="headerlink" href="#auto-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The Auto Interface enables communication with other discoverable Reticulum
|
<p>The Auto Interface enables communication with other discoverable Reticulum
|
||||||
nodes over autoconfigured IPv6 and UDP. It does not need any functional IP
|
nodes over autoconfigured IPv6 and UDP. It does not need any functional IP
|
||||||
infrastructure like routers or DHCP servers, but will require at least some
|
infrastructure like routers or DHCP servers, but will require at least some
|
||||||
@@ -106,9 +286,9 @@ the discovery scope by setting it to one of <code class="docutils literal notran
|
|||||||
<span class="n">data_port</span> <span class="o">=</span> <span class="mi">49555</span>
|
<span class="n">data_port</span> <span class="o">=</span> <span class="mi">49555</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="i2p-interface">
|
<section id="i2p-interface">
|
||||||
<span id="interfaces-i2p"></span><h2>I2P Interface<a class="headerlink" href="#i2p-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-i2p"></span><h2>I2P Interface<a class="headerlink" href="#i2p-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The I2P interface lets you connect Reticulum instances over the
|
<p>The I2P interface lets you connect Reticulum instances over the
|
||||||
<a class="reference external" href="https://i2pd.website">Invisible Internet Protocol</a>. This can be
|
<a class="reference external" href="https://i2pd.website">Invisible Internet Protocol</a>. This can be
|
||||||
especially useful in cases where you want to host a globally reachable
|
especially useful in cases where you want to host a globally reachable
|
||||||
@@ -119,12 +299,12 @@ inbound traffic.</p>
|
|||||||
and persistent I2P address that your Reticulum instance can be reached
|
and persistent I2P address that your Reticulum instance can be reached
|
||||||
at.</p>
|
at.</p>
|
||||||
<p>To use the I2P interface, you must have an I2P router running
|
<p>To use the I2P interface, you must have an I2P router running
|
||||||
on your system. The easiest way to acheive this is to download and
|
on your system. The easiest way to achieve this is to download and
|
||||||
install the <a class="reference external" href="https://github.com/PurpleI2P/i2pd/releases/latest">latest release</a>
|
install the <a class="reference external" href="https://github.com/PurpleI2P/i2pd/releases/latest">latest release</a>
|
||||||
of the <code class="docutils literal notranslate"><span class="pre">i2pd</span></code> package. For more details about I2P, see the
|
of the <code class="docutils literal notranslate"><span class="pre">i2pd</span></code> package. For more details about I2P, see the
|
||||||
<a class="reference external" href="https://geti2p.net/en/about/intro">geti2p.net website</a>.</p>
|
<a class="reference external" href="https://geti2p.net/en/about/intro">geti2p.net website</a>.</p>
|
||||||
<p>When an I2P router is running on your system, you can simply add
|
<p>When an I2P router is running on your system, you can simply add
|
||||||
an I2P interface to reticulum:</p>
|
an I2P interface to Reticulum:</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">I2P</span><span class="p">]]</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">I2P</span><span class="p">]]</span>
|
||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">I2PInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">I2PInterface</span>
|
||||||
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="n">yes</span>
|
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="n">yes</span>
|
||||||
@@ -159,9 +339,9 @@ You can use the I2PInterface to connect to a TCPServerInterface that
|
|||||||
was manually tunneled over I2P, for example. This offers a high degree
|
was manually tunneled over I2P, for example. This offers a high degree
|
||||||
of flexibility in network setup, while retaining ease of use in simpler
|
of flexibility in network setup, while retaining ease of use in simpler
|
||||||
use-cases.</p>
|
use-cases.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="tcp-server-interface">
|
<section id="tcp-server-interface">
|
||||||
<span id="interfaces-tcps"></span><h2>TCP Server Interface<a class="headerlink" href="#tcp-server-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-tcps"></span><h2>TCP Server Interface<a class="headerlink" href="#tcp-server-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The TCP Server interface is suitable for allowing other peers to connect over
|
<p>The TCP Server interface is suitable for allowing other peers to connect over
|
||||||
the Internet or private IP networks. When a TCP server interface has been
|
the Internet or private IP networks. When a TCP server interface has been
|
||||||
configured, other Reticulum peers can connect to it with a TCP Client interface.</p>
|
configured, other Reticulum peers can connect to it with a TCP Client interface.</p>
|
||||||
@@ -176,7 +356,7 @@ configured, other Reticulum peers can connect to it with a TCP Client interface.
|
|||||||
<span class="c1"># This configuration will listen on all IP</span>
|
<span class="c1"># This configuration will listen on all IP</span>
|
||||||
<span class="c1"># interfaces on port 4242</span>
|
<span class="c1"># interfaces on port 4242</span>
|
||||||
|
|
||||||
<span class="n">listen_ip</span> <span class="o">=</span> <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span>
|
<span class="n">listen_ip</span> <span class="o">=</span> <span class="mf">0.0.0.0</span>
|
||||||
<span class="n">listen_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
<span class="n">listen_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
||||||
|
|
||||||
<span class="c1"># Alternatively you can bind to a specific IP</span>
|
<span class="c1"># Alternatively you can bind to a specific IP</span>
|
||||||
@@ -195,16 +375,16 @@ you must use the i2p_tunneled option:</p>
|
|||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">TCP</span> <span class="n">Server</span> <span class="n">on</span> <span class="n">I2P</span><span class="p">]]</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">TCP</span> <span class="n">Server</span> <span class="n">on</span> <span class="n">I2P</span><span class="p">]]</span>
|
||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPServerInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPServerInterface</span>
|
||||||
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="n">yes</span>
|
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="n">yes</span>
|
||||||
<span class="n">listen_ip</span> <span class="o">=</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span>
|
<span class="n">listen_ip</span> <span class="o">=</span> <span class="mf">127.0.0.1</span>
|
||||||
<span class="n">listen_port</span> <span class="o">=</span> <span class="mi">5001</span>
|
<span class="n">listen_port</span> <span class="o">=</span> <span class="mi">5001</span>
|
||||||
<span class="n">i2p_tunneled</span> <span class="o">=</span> <span class="n">yes</span>
|
<span class="n">i2p_tunneled</span> <span class="o">=</span> <span class="n">yes</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>In almost all cases, it is easier to use the dedicated <code class="docutils literal notranslate"><span class="pre">I2PInterface</span></code>, but for complete
|
<p>In almost all cases, it is easier to use the dedicated <code class="docutils literal notranslate"><span class="pre">I2PInterface</span></code>, but for complete
|
||||||
control, and using I2P routers running on external systems, this option also exists.</p>
|
control, and using I2P routers running on external systems, this option also exists.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="tcp-client-interface">
|
<section id="tcp-client-interface">
|
||||||
<span id="interfaces-tcpc"></span><h2>TCP Client Interface<a class="headerlink" href="#tcp-client-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-tcpc"></span><h2>TCP Client Interface<a class="headerlink" href="#tcp-client-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>To connect to a TCP server interface, you would naturally use the TCP client
|
<p>To connect to a TCP server interface, you would naturally use the TCP client
|
||||||
interface. Many TCP Client interfaces from different peers can connect to the
|
interface. Many TCP Client interfaces from different peers can connect to the
|
||||||
same TCP Server interface at the same time.</p>
|
same TCP Server interface at the same time.</p>
|
||||||
@@ -217,7 +397,7 @@ and restore connectivity after a failure, once the other end of a TCP interface
|
|||||||
<span class="p">[[</span><span class="n">TCP</span> <span class="n">Client</span> <span class="n">Interface</span><span class="p">]]</span>
|
<span class="p">[[</span><span class="n">TCP</span> <span class="n">Client</span> <span class="n">Interface</span><span class="p">]]</span>
|
||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPClientInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPClientInterface</span>
|
||||||
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="kc">True</span>
|
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
<span class="n">target_host</span> <span class="o">=</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span>
|
<span class="n">target_host</span> <span class="o">=</span> <span class="mf">127.0.0.1</span>
|
||||||
<span class="n">target_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
<span class="n">target_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -231,7 +411,7 @@ software-based soundmodems. To do this, use the <code class="docutils literal no
|
|||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPClientInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPClientInterface</span>
|
||||||
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="kc">True</span>
|
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
<span class="n">kiss_framing</span> <span class="o">=</span> <span class="kc">True</span>
|
<span class="n">kiss_framing</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
<span class="n">target_host</span> <span class="o">=</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span>
|
<span class="n">target_host</span> <span class="o">=</span> <span class="mf">127.0.0.1</span>
|
||||||
<span class="n">target_port</span> <span class="o">=</span> <span class="mi">8001</span>
|
<span class="n">target_port</span> <span class="o">=</span> <span class="mi">8001</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
@@ -246,21 +426,21 @@ you must use the i2p_tunneled option:</p>
|
|||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">TCP</span> <span class="n">Client</span> <span class="n">over</span> <span class="n">I2P</span><span class="p">]]</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">TCP</span> <span class="n">Client</span> <span class="n">over</span> <span class="n">I2P</span><span class="p">]]</span>
|
||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPClientInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">TCPClientInterface</span>
|
||||||
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="n">yes</span>
|
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="n">yes</span>
|
||||||
<span class="n">target_host</span> <span class="o">=</span> <span class="mf">127.0</span><span class="o">.</span><span class="mf">0.1</span>
|
<span class="n">target_host</span> <span class="o">=</span> <span class="mf">127.0.0.1</span>
|
||||||
<span class="n">target_port</span> <span class="o">=</span> <span class="mi">5001</span>
|
<span class="n">target_port</span> <span class="o">=</span> <span class="mi">5001</span>
|
||||||
<span class="n">i2p_tunneled</span> <span class="o">=</span> <span class="n">yes</span>
|
<span class="n">i2p_tunneled</span> <span class="o">=</span> <span class="n">yes</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="udp-interface">
|
<section id="udp-interface">
|
||||||
<span id="interfaces-udp"></span><h2>UDP Interface<a class="headerlink" href="#udp-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-udp"></span><h2>UDP Interface<a class="headerlink" href="#udp-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>A UDP interface can be useful for communicating over IP networks, both
|
<p>A UDP interface can be useful for communicating over IP networks, both
|
||||||
private and the internet. It can also allow broadcast communication
|
private and the internet. It can also allow broadcast communication
|
||||||
over IP networks, so it can provide an easy way to enable connectivity
|
over IP networks, so it can provide an easy way to enable connectivity
|
||||||
with all other peers on a local area network.</p>
|
with all other peers on a local area network.</p>
|
||||||
<p><em>Please Note!</em> Using broadcast UDP traffic has performance implications,
|
<p><em>Please Note!</em> Using broadcast UDP traffic has performance implications,
|
||||||
especially on WiFi. If your goal is simply to enable easy communication
|
especially on WiFi. If your goal is simply to enable easy communication
|
||||||
with all peers in your local ethernet broadcast domain, the
|
with all peers in your local Ethernet broadcast domain, the
|
||||||
<a class="reference internal" href="#interfaces-auto"><span class="std std-ref">Auto Interface</span></a> performs better, and is even
|
<a class="reference internal" href="#interfaces-auto"><span class="std std-ref">Auto Interface</span></a> performs better, and is even
|
||||||
easier to use.</p>
|
easier to use.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># This example enables communication with other</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># This example enables communication with other</span>
|
||||||
@@ -270,9 +450,9 @@ easier to use.</p>
|
|||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">UDPInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">UDPInterface</span>
|
||||||
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="kc">True</span>
|
<span class="n">interface_enabled</span> <span class="o">=</span> <span class="kc">True</span>
|
||||||
|
|
||||||
<span class="n">listen_ip</span> <span class="o">=</span> <span class="mf">0.0</span><span class="o">.</span><span class="mf">0.0</span>
|
<span class="n">listen_ip</span> <span class="o">=</span> <span class="mf">0.0.0.0</span>
|
||||||
<span class="n">listen_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
<span class="n">listen_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
||||||
<span class="n">forward_ip</span> <span class="o">=</span> <span class="mf">255.255</span><span class="o">.</span><span class="mf">255.255</span>
|
<span class="n">forward_ip</span> <span class="o">=</span> <span class="mf">255.255.255.255</span>
|
||||||
<span class="n">forward_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
<span class="n">forward_port</span> <span class="o">=</span> <span class="mi">4242</span>
|
||||||
|
|
||||||
<span class="c1"># The above configuration will allow communication</span>
|
<span class="c1"># The above configuration will allow communication</span>
|
||||||
@@ -306,9 +486,9 @@ easier to use.</p>
|
|||||||
<span class="c1"># forward_port = 4242</span>
|
<span class="c1"># forward_port = 4242</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="rnode-lora-interface">
|
<section id="rnode-lora-interface">
|
||||||
<span id="interfaces-rnode"></span><h2>RNode LoRa Interface<a class="headerlink" href="#rnode-lora-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-rnode"></span><h2>RNode LoRa Interface<a class="headerlink" href="#rnode-lora-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>To use Reticulum over LoRa, the <a class="reference external" href="https://unsigned.io/rnode/">RNode</a> interface
|
<p>To use Reticulum over LoRa, the <a class="reference external" href="https://unsigned.io/rnode/">RNode</a> interface
|
||||||
can be used, and offers full control over LoRa parameters.</p>
|
can be used, and offers full control over LoRa parameters.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Here's an example of how to add a LoRa interface</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Here's an example of how to add a LoRa interface</span>
|
||||||
@@ -357,9 +537,9 @@ can be used, and offers full control over LoRa parameters.</p>
|
|||||||
<span class="n">flow_control</span> <span class="o">=</span> <span class="kc">False</span>
|
<span class="n">flow_control</span> <span class="o">=</span> <span class="kc">False</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="serial-interface">
|
<section id="serial-interface">
|
||||||
<span id="interfaces-serial"></span><h2>Serial Interface<a class="headerlink" href="#serial-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-serial"></span><h2>Serial Interface<a class="headerlink" href="#serial-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum can be used over serial ports directly, or over any device with a
|
<p>Reticulum can be used over serial ports directly, or over any device with a
|
||||||
serial port, that will transparently pass data. Useful for communicating
|
serial port, that will transparently pass data. Useful for communicating
|
||||||
directly over a wire-pair, or for using devices such as data radios and lasers.</p>
|
directly over a wire-pair, or for using devices such as data radios and lasers.</p>
|
||||||
@@ -378,10 +558,10 @@ directly over a wire-pair, or for using devices such as data radios and lasers.<
|
|||||||
<span class="n">stopbits</span> <span class="o">=</span> <span class="mi">1</span>
|
<span class="n">stopbits</span> <span class="o">=</span> <span class="mi">1</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="pipe-interface">
|
<section id="pipe-interface">
|
||||||
<span id="interfaces-pipe"></span><h2>Pipe Interface<a class="headerlink" href="#pipe-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-pipe"></span><h2>Pipe Interface<a class="headerlink" href="#pipe-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Using this interface, reticulum can use any program as an interface via <cite>stdin</cite> and
|
<p>Using this interface, Reticulum can use any program as an interface via <cite>stdin</cite> and
|
||||||
<cite>stdout</cite>. This can be used to easily create virtual interfaces, or to interface with
|
<cite>stdout</cite>. This can be used to easily create virtual interfaces, or to interface with
|
||||||
custom hardware or other systems.</p>
|
custom hardware or other systems.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">Pipe</span> <span class="n">Interface</span><span class="p">]]</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">Pipe</span> <span class="n">Interface</span><span class="p">]]</span>
|
||||||
@@ -396,11 +576,11 @@ custom hardware or other systems.</p>
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>Reticulum will write all packets to <cite>stdin</cite> of the <code class="docutils literal notranslate"><span class="pre">command</span></code> option, and will
|
<p>Reticulum will write all packets to <cite>stdin</cite> of the <code class="docutils literal notranslate"><span class="pre">command</span></code> option, and will
|
||||||
continously read and scan its <cite>stdout</cite> for Reticulum packets. If <code class="docutils literal notranslate"><span class="pre">EOF</span></code> is reached,
|
continuously read and scan its <cite>stdout</cite> for Reticulum packets. If <code class="docutils literal notranslate"><span class="pre">EOF</span></code> is reached,
|
||||||
Reticulum will try to respawn the program after waiting for <code class="docutils literal notranslate"><span class="pre">respawn_interval</span></code> seconds.</p>
|
Reticulum will try to respawn the program after waiting for <code class="docutils literal notranslate"><span class="pre">respawn_interval</span></code> seconds.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="kiss-interface">
|
<section id="kiss-interface">
|
||||||
<span id="interfaces-kiss"></span><h2>KISS Interface<a class="headerlink" href="#kiss-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-kiss"></span><h2>KISS Interface<a class="headerlink" href="#kiss-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>With the KISS interface, you can use Reticulum over a variety of packet
|
<p>With the KISS interface, you can use Reticulum over a variety of packet
|
||||||
radio modems and TNCs, including <a class="reference external" href="https://unsigned.io/openmodem/">OpenModem</a>.
|
radio modems and TNCs, including <a class="reference external" href="https://unsigned.io/openmodem/">OpenModem</a>.
|
||||||
KISS interfaces can also be configured to periodically send out beacons
|
KISS interfaces can also be configured to periodically send out beacons
|
||||||
@@ -450,9 +630,9 @@ for station identification purposes.</p>
|
|||||||
<span class="n">flow_control</span> <span class="o">=</span> <span class="n">false</span>
|
<span class="n">flow_control</span> <span class="o">=</span> <span class="n">false</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="ax-25-kiss-interface">
|
<section id="ax-25-kiss-interface">
|
||||||
<span id="interfaces-ax25"></span><h2>AX.25 KISS Interface<a class="headerlink" href="#ax-25-kiss-interface" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-ax25"></span><h2>AX.25 KISS Interface<a class="headerlink" href="#ax-25-kiss-interface" title="Permalink to this heading">#</a></h2>
|
||||||
<p>If you’re using Reticulum on amateur radio spectrum, you might want to
|
<p>If you’re using Reticulum on amateur radio spectrum, you might want to
|
||||||
use the AX.25 KISS interface. This way, Reticulum will automatically
|
use the AX.25 KISS interface. This way, Reticulum will automatically
|
||||||
encapsulate it’s traffic in AX.25 and also identify your stations
|
encapsulate it’s traffic in AX.25 and also identify your stations
|
||||||
@@ -462,7 +642,7 @@ layer for anything, and it incurs extra overhead on every packet to
|
|||||||
encapsulate in AX.25.</p>
|
encapsulate in AX.25.</p>
|
||||||
<p>A more efficient way is to use the plain KISS interface with the
|
<p>A more efficient way is to use the plain KISS interface with the
|
||||||
beaconing functionality described above.</p>
|
beaconing functionality described above.</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">Packet</span> <span class="n">Radio</span> <span class="n">AX</span><span class="o">.</span><span class="mi">25</span> <span class="n">KISS</span> <span class="n">Interface</span><span class="p">]]</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="p">[[</span><span class="n">Packet</span> <span class="n">Radio</span> <span class="n">AX</span><span class="mf">.25</span> <span class="n">KISS</span> <span class="n">Interface</span><span class="p">]]</span>
|
||||||
<span class="nb">type</span> <span class="o">=</span> <span class="n">AX25KISSInterface</span>
|
<span class="nb">type</span> <span class="o">=</span> <span class="n">AX25KISSInterface</span>
|
||||||
|
|
||||||
<span class="c1"># Set the station callsign and SSID</span>
|
<span class="c1"># Set the station callsign and SSID</span>
|
||||||
@@ -506,9 +686,9 @@ beaconing functionality described above.</p>
|
|||||||
<span class="n">flow_control</span> <span class="o">=</span> <span class="n">false</span>
|
<span class="n">flow_control</span> <span class="o">=</span> <span class="n">false</span>
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="common-interface-options">
|
<section id="common-interface-options">
|
||||||
<span id="interfaces-options"></span><h2>Common Interface Options<a class="headerlink" href="#common-interface-options" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-options"></span><h2>Common Interface Options<a class="headerlink" href="#common-interface-options" title="Permalink to this heading">#</a></h2>
|
||||||
<p>A number of general configuration options are available on most interfaces.
|
<p>A number of general configuration options are available on most interfaces.
|
||||||
These can be used to control various aspects of interface behaviour.</p>
|
These can be used to control various aspects of interface behaviour.</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
@@ -602,9 +782,9 @@ option, to set the interface speed in <em>bits per second</em>.</div>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="interface-modes">
|
<section id="interface-modes">
|
||||||
<span id="interfaces-modes"></span><h2>Interface Modes<a class="headerlink" href="#interface-modes" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-modes"></span><h2>Interface Modes<a class="headerlink" href="#interface-modes" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The optional <code class="docutils literal notranslate"><span class="pre">mode</span></code> setting is available on all interfaces, and allows
|
<p>The optional <code class="docutils literal notranslate"><span class="pre">mode</span></code> setting is available on all interfaces, and allows
|
||||||
selecting the high-level behaviour of the interface from a number of modes.
|
selecting the high-level behaviour of the interface from a number of modes.
|
||||||
These modes affect how Reticulum selects paths in the network, how announces
|
These modes affect how Reticulum selects paths in the network, how announces
|
||||||
@@ -694,9 +874,9 @@ connecting over the Internet should be set to <code class="docutils literal notr
|
|||||||
</div></blockquote>
|
</div></blockquote>
|
||||||
<p>For a table describing the impact of all modes on announce propagation,
|
<p>For a table describing the impact of all modes on announce propagation,
|
||||||
please see the <a class="reference internal" href="understanding.html#understanding-announcepropagation"><span class="std std-ref">Announce Propagation Rules</span></a> section.</p>
|
please see the <a class="reference internal" href="understanding.html#understanding-announcepropagation"><span class="std std-ref">Announce Propagation Rules</span></a> section.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="announce-rate-control">
|
<section id="announce-rate-control">
|
||||||
<span id="interfaces-announcerates"></span><h2>Announce Rate Control<a class="headerlink" href="#announce-rate-control" title="Permalink to this headline">¶</a></h2>
|
<span id="interfaces-announcerates"></span><h2>Announce Rate Control<a class="headerlink" href="#announce-rate-control" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The built-in announce control mechanisms and the default <code class="docutils literal notranslate"><span class="pre">announce_cap</span></code>
|
<p>The built-in announce control mechanisms and the default <code class="docutils literal notranslate"><span class="pre">announce_cap</span></code>
|
||||||
option described above are sufficient most of the time, but in some cases, especially on fast
|
option described above are sufficient most of the time, but in some cases, especially on fast
|
||||||
interfaces, it may be useful to control the target announce rate. Using the
|
interfaces, it may be useful to control the target announce rate. Using the
|
||||||
@@ -742,18 +922,65 @@ rates. Slower networks will naturally tend towards using less frequent announces
|
|||||||
conserve bandwidth, while very fast networks can support applications that
|
conserve bandwidth, while very fast networks can support applications that
|
||||||
need very frequent announces. Reticulum implements these mechanisms to ensure
|
need very frequent announces. Reticulum implements these mechanisms to ensure
|
||||||
that a large span of network types can seamlessly <em>co-exist</em> and interconnect.</p>
|
that a large span of network types can seamlessly <em>co-exist</em> and interconnect.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="networks.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Building Networks</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="hardware.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Communications Hardware</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Supported Interfaces</a><ul>
|
<li><a class="reference internal" href="#">Supported Interfaces</a><ul>
|
||||||
<li><a class="reference internal" href="#auto-interface">Auto Interface</a></li>
|
<li><a class="reference internal" href="#auto-interface">Auto Interface</a></li>
|
||||||
<li><a class="reference internal" href="#i2p-interface">I2P Interface</a></li>
|
<li><a class="reference internal" href="#i2p-interface">I2P Interface</a></li>
|
||||||
@@ -772,52 +999,21 @@ that a large span of network types can seamlessly <em>co-exist</em> and intercon
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="hardware.html"
|
|
||||||
title="previous chapter">Communications Hardware</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="networks.html"
|
|
||||||
title="next chapter">Building Networks</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/interfaces.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="networks.html" title="Building Networks"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="hardware.html" title="Communications Hardware"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Supported Interfaces</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,71 +1,251 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Code Examples" href="examples.html" /><link rel="prev" title="Supported Interfaces" href="interfaces.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Building Networks - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Building Networks — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="API Reference" href="reference.html" />
|
|
||||||
<link rel="prev" title="Supported Interfaces" href="interfaces.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="reference.html" title="API Reference"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="interfaces.html" title="Supported Interfaces"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Building Networks</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="building-networks">
|
|
||||||
<span id="networks-main"></span><h1>Building Networks<a class="headerlink" href="#building-networks" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="building-networks">
|
||||||
|
<span id="networks-main"></span><h1>Building Networks<a class="headerlink" href="#building-networks" title="Permalink to this heading">#</a></h1>
|
||||||
<p>This chapter will provide you with the knowledge needed to build networks with
|
<p>This chapter will provide you with the knowledge needed to build networks with
|
||||||
Reticulum, which can often be easier than using traditional stacks, since you
|
Reticulum, which can often be easier than using traditional stacks, since you
|
||||||
don’t have to worry about coordinating addresses, subnets and routing for an
|
don’t have to worry about coordinating addresses, subnets and routing for an
|
||||||
entire network that you might not know how will evolve in the future. With
|
entire network that you might not know how will evolve in the future. With
|
||||||
Reticulum, you can simply add more segments to your network when it becomes
|
Reticulum, you can simply add more segments to your network when it becomes
|
||||||
necesarry, and Reticulum will handle the convergence of the entire network
|
necessary, and Reticulum will handle the convergence of the entire network
|
||||||
automatically.</p>
|
automatically.</p>
|
||||||
<div class="section" id="concepts-overview">
|
<section id="concepts-overview">
|
||||||
<h2>Concepts & Overview<a class="headerlink" href="#concepts-overview" title="Permalink to this headline">¶</a></h2>
|
<h2>Concepts & Overview<a class="headerlink" href="#concepts-overview" title="Permalink to this heading">#</a></h2>
|
||||||
<p>There are important points that need to be kept in mind when building networks
|
<p>There are important points that need to be kept in mind when building networks
|
||||||
with Reticulum:</p>
|
with Reticulum:</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<div><ul>
|
<div><ul>
|
||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
<div class="line">In a Reticulum network, any node can autonomously generate as many adresses
|
<div class="line">In a Reticulum network, any node can autonomously generate as many addresses
|
||||||
(called <em>destinations</em> in Reticulum terminology) as it needs, which become
|
(called <em>destinations</em> in Reticulum terminology) as it needs, which become
|
||||||
globally reachable to the rest of the network. There is no central point of
|
globally reachable to the rest of the network. There is no central point of
|
||||||
control over the adress space.</div>
|
control over the address space.</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
<div class="line">Reticulum was designed to handle both very small, and very large networks.
|
<div class="line">Reticulum was designed to handle both very small, and very large networks.
|
||||||
While the adress space can support billions of endpoints, Reticulum is
|
While the address space can support billions of endpoints, Reticulum is
|
||||||
also very useful when just a few devices needs to communicate.</div>
|
also very useful when just a few devices needs to communicate.</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -144,13 +324,13 @@ chapter of this manual for interface configuration examples.</p>
|
|||||||
<p>Any number of interfaces can be configured, and Reticulum will automatically
|
<p>Any number of interfaces can be configured, and Reticulum will automatically
|
||||||
decide which are suitable to use in any given situation, depending on where
|
decide which are suitable to use in any given situation, depending on where
|
||||||
traffic needs to flow.</p>
|
traffic needs to flow.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="example-scenarios">
|
<section id="example-scenarios">
|
||||||
<h2>Example Scenarios<a class="headerlink" href="#example-scenarios" title="Permalink to this headline">¶</a></h2>
|
<h2>Example Scenarios<a class="headerlink" href="#example-scenarios" title="Permalink to this heading">#</a></h2>
|
||||||
<p>This section illustrates a few example scenarios, and how they would, in general
|
<p>This section illustrates a few example scenarios, and how they would, in general
|
||||||
terms, be planned, implemented and configured.</p>
|
terms, be planned, implemented and configured.</p>
|
||||||
<div class="section" id="interconnected-lora-sites">
|
<section id="interconnected-lora-sites">
|
||||||
<h3>Interconnected LoRa Sites<a class="headerlink" href="#interconnected-lora-sites" title="Permalink to this headline">¶</a></h3>
|
<h3>Interconnected LoRa Sites<a class="headerlink" href="#interconnected-lora-sites" title="Permalink to this heading">#</a></h3>
|
||||||
<p>An organisation wants to provide communication and information services to it’s
|
<p>An organisation wants to provide communication and information services to it’s
|
||||||
members, which are located mainly in three separate areas. Three suitable hill-top
|
members, which are located mainly in three separate areas. Three suitable hill-top
|
||||||
locations are found, where the organisation can install equipment: Site A, B and C.</p>
|
locations are found, where the organisation can install equipment: Site A, B and C.</p>
|
||||||
@@ -163,8 +343,8 @@ need to use the Internet to interconnect the sites, but purchases four Point-to-
|
|||||||
WiFi based radios for interconnecting the sites.</p>
|
WiFi based radios for interconnecting the sites.</p>
|
||||||
<p>At each site, a Raspberry Pi is installed to function as a gateway. A LoRa radio
|
<p>At each site, a Raspberry Pi is installed to function as a gateway. A LoRa radio
|
||||||
is connected to the Pi with a USB cable, and the WiFi radio is connected to the
|
is connected to the Pi with a USB cable, and the WiFi radio is connected to the
|
||||||
ethernet port of the Pi. At site B, two WiFi radios are needed to be able to reach
|
Ethernet port of the Pi. At site B, two WiFi radios are needed to be able to reach
|
||||||
both site A and site C, so an extra ethernet adapter is connected to the Pi in
|
both site A and site C, so an extra Ethernet adapter is connected to the Pi in
|
||||||
this location.</p>
|
this location.</p>
|
||||||
<p>Once the hardware has been installed, Reticulum is installed on all the Pis, and at
|
<p>Once the hardware has been installed, Reticulum is installed on all the Pis, and at
|
||||||
site A and C, one interface is added for the LoRa radio, as well as one for the WiFi
|
site A and C, one interface is added for the LoRa radio, as well as one for the WiFi
|
||||||
@@ -177,9 +357,9 @@ with a Reticulum configuration file, that contains the right parameters for
|
|||||||
communicating with the LoRa radios installed at the gateway sites.</p>
|
communicating with the LoRa radios installed at the gateway sites.</p>
|
||||||
<p>Once users connect to the network, anyone will be able to communicate with anyone
|
<p>Once users connect to the network, anyone will be able to communicate with anyone
|
||||||
else across all three sites.</p>
|
else across all three sites.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="bridging-over-the-internet">
|
<section id="bridging-over-the-internet">
|
||||||
<h3>Bridging Over the Internet<a class="headerlink" href="#bridging-over-the-internet" title="Permalink to this headline">¶</a></h3>
|
<h3>Bridging Over the Internet<a class="headerlink" href="#bridging-over-the-internet" title="Permalink to this heading">#</a></h3>
|
||||||
<p>As the organisation grows, several new communities form in places too far away
|
<p>As the organisation grows, several new communities form in places too far away
|
||||||
from the core network to be reachable over WiFi links. New gateways similar to those
|
from the core network to be reachable over WiFi links. New gateways similar to those
|
||||||
previously installed are set up for the new communities at the new sites D and E, but
|
previously installed are set up for the new communities at the new sites D and E, but
|
||||||
@@ -194,9 +374,9 @@ enabled Internet interface on the gateway at site A. Dori is now connected to bo
|
|||||||
all the nodes at her own local site (through the hill-top LoRa gateway), and all the
|
all the nodes at her own local site (through the hill-top LoRa gateway), and all the
|
||||||
combined users of sites A, B and C. She then enables transport on her node, and
|
combined users of sites A, B and C. She then enables transport on her node, and
|
||||||
traffic from site D can now reach everyone at site A, B and C, and vice versa.</p>
|
traffic from site D can now reach everyone at site A, B and C, and vice versa.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="growth-and-convergence">
|
<section id="growth-and-convergence">
|
||||||
<h3>Growth and Convergence<a class="headerlink" href="#growth-and-convergence" title="Permalink to this headline">¶</a></h3>
|
<h3>Growth and Convergence<a class="headerlink" href="#growth-and-convergence" title="Permalink to this heading">#</a></h3>
|
||||||
<p>As the organisation grows, more gateways are added to keep up with the growing user
|
<p>As the organisation grows, more gateways are added to keep up with the growing user
|
||||||
base. Some local gateways even add VHF radios and packet modems to reach outlying users
|
base. Some local gateways even add VHF radios and packet modems to reach outlying users
|
||||||
and communities that are out of reach for the LoRa radios and WiFi backhauls.</p>
|
and communities that are out of reach for the LoRa radios and WiFi backhauls.</p>
|
||||||
@@ -208,19 +388,66 @@ space or routing tables.</p>
|
|||||||
the original internet bridged interfaces are no longer utilised. The network has
|
the original internet bridged interfaces are no longer utilised. The network has
|
||||||
converged to be completely self-connected, and the sites that were once poorly
|
converged to be completely self-connected, and the sites that were once poorly
|
||||||
connected outliers are now an integral part of the network.</p>
|
connected outliers are now an integral part of the network.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="examples.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Code Examples</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="interfaces.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Supported Interfaces</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Building Networks</a><ul>
|
<li><a class="reference internal" href="#">Building Networks</a><ul>
|
||||||
<li><a class="reference internal" href="#concepts-overview">Concepts & Overview</a></li>
|
<li><a class="reference internal" href="#concepts-overview">Concepts & Overview</a></li>
|
||||||
<li><a class="reference internal" href="#example-scenarios">Example Scenarios</a><ul>
|
<li><a class="reference internal" href="#example-scenarios">Example Scenarios</a><ul>
|
||||||
@@ -233,52 +460,21 @@ connected outliers are now an integral part of the network.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="interfaces.html"
|
|
||||||
title="previous chapter">Supported Interfaces</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="reference.html"
|
|
||||||
title="next chapter">API Reference</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/networks.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="reference.html" title="API Reference"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="interfaces.html" title="Supported Interfaces"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Building Networks</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,97 +1,278 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="#" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/><title>Search - Reticulum Network Stack 0.4.2 beta documentation</title><link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
||||||
<title>Search — Reticulum Network Stack 0.3.9 beta documentation</title>
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
<style>
|
||||||
<script src="_static/doctools.js"></script>
|
body {
|
||||||
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
<script src="_static/searchtools.js"></script>
|
|
||||||
<script src="_static/language_data.js"></script>
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="#" />
|
|
||||||
<script src="searchindex.js" defer></script>
|
|
||||||
|
|
||||||
|
|
||||||
</head><body>
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
<h3>Navigation</h3>
|
<title>Contents</title>
|
||||||
<ul>
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
<li class="right" style="margin-right: 10px">
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
<a href="genindex.html" title="General Index"
|
</svg>
|
||||||
accesskey="I">index</a></li>
|
</symbol>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
<li class="nav-item nav-item-this"><a href="">Search</a></li>
|
<title>Menu</title>
|
||||||
</ul>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
</div>
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
<div class="document">
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
<div class="documentwrapper">
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
<div class="bodywrapper">
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
<div class="body" role="main">
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon no-toc" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta documentation</span>
|
||||||
|
|
||||||
|
</a><form class="sidebar-search-container" method="get" action="#" role="search">
|
||||||
|
<input class="sidebar-search" placeholder=Search name="q" aria-label="Search">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon no-toc" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
|
||||||
|
<noscript>
|
||||||
|
<div class="admonition error">
|
||||||
|
<p class="admonition-title">Error</p>
|
||||||
|
<p>
|
||||||
|
Please activate JavaScript to enable the search functionality.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</noscript>
|
||||||
|
|
||||||
|
<div id="search-results"></div>
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
<h1 id="search-documentation">Search</h1>
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
<div id="fallback" class="admonition warning">
|
<div class="icons">
|
||||||
<script>$('#fallback').hide();</script>
|
|
||||||
<p>
|
</div>
|
||||||
Please activate JavaScript to enable the search
|
|
||||||
functionality.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<p>
|
|
||||||
Searching for multiple words only shows matches that contain
|
|
||||||
all words.
|
|
||||||
</p>
|
|
||||||
|
|
||||||
|
|
||||||
<form action="" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="search-documentation" value="" />
|
|
||||||
<input type="submit" value="search" />
|
|
||||||
<span id="search-progress" style="padding-left: 10px"></span>
|
|
||||||
</form>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="search-results">
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
<aside class="toc-drawer no-toc">
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
</aside>
|
||||||
>index</a></li>
|
</div>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="nav-item nav-item-this"><a href="">Search</a></li>
|
<script src="_static/jquery.js"></script>
|
||||||
</ul>
|
<script src="_static/underscore.js"></script>
|
||||||
</div>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<div class="footer" role="contentinfo">
|
<script src="_static/doctools.js"></script>
|
||||||
© Copyright 2022, Mark Qvist.
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
<script src="_static/scripts/furo.js"></script>
|
||||||
</div>
|
<script src="_static/clipboard.min.js"></script>
|
||||||
</body>
|
<script src="_static/copybutton.js"></script>
|
||||||
|
|
||||||
|
<script src="_static/searchtools.js"></script>
|
||||||
|
<script src="_static/language_data.js"></script>
|
||||||
|
<script src="searchindex.js"></script></body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1 +1 @@
|
|||||||
Search.setIndex({docnames:["examples","gettingstartedfast","hardware","index","interfaces","networks","reference","support","understanding","using","whatis"],envversion:{"sphinx.domains.c":2,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":3,"sphinx.domains.index":1,"sphinx.domains.javascript":2,"sphinx.domains.math":2,"sphinx.domains.python":3,"sphinx.domains.rst":2,"sphinx.domains.std":2,sphinx:56},filenames:["examples.rst","gettingstartedfast.rst","hardware.rst","index.rst","interfaces.rst","networks.rst","reference.rst","support.rst","understanding.rst","using.rst","whatis.rst"],objects:{"RNS.Destination":{accepts_links:[6,1,1,""],announce:[6,1,1,""],app_and_aspects_from_name:[6,1,1,""],clear_default_app_data:[6,1,1,""],create_keys:[6,1,1,""],decrypt:[6,1,1,""],deregister_request_handler:[6,1,1,""],encrypt:[6,1,1,""],full_name:[6,1,1,""],get_private_key:[6,1,1,""],hash:[6,1,1,""],hash_from_name_and_identity:[6,1,1,""],load_private_key:[6,1,1,""],register_request_handler:[6,1,1,""],set_default_app_data:[6,1,1,""],set_link_established_callback:[6,1,1,""],set_packet_callback:[6,1,1,""],set_proof_requested_callback:[6,1,1,""],set_proof_strategy:[6,1,1,""],sign:[6,1,1,""]},"RNS.Identity":{CURVE:[6,2,1,""],KEYSIZE:[6,2,1,""],TRUNCATED_HASHLENGTH:[6,2,1,""],decrypt:[6,1,1,""],encrypt:[6,1,1,""],from_bytes:[6,1,1,""],from_file:[6,1,1,""],full_hash:[6,1,1,""],get_private_key:[6,1,1,""],get_public_key:[6,1,1,""],get_random_hash:[6,1,1,""],load_private_key:[6,1,1,""],load_public_key:[6,1,1,""],recall:[6,1,1,""],recall_app_data:[6,1,1,""],sign:[6,1,1,""],to_file:[6,1,1,""],truncated_hash:[6,1,1,""],validate:[6,1,1,""]},"RNS.Link":{CURVE:[6,2,1,""],ESTABLISHMENT_TIMEOUT_PER_HOP:[6,2,1,""],KEEPALIVE:[6,2,1,""],KEEPALIVE_TIMEOUT_FACTOR:[6,2,1,""],STALE_GRACE:[6,2,1,""],STALE_TIME:[6,2,1,""],get_remote_identity:[6,1,1,""],identify:[6,1,1,""],inactive_for:[6,1,1,""],no_inbound_for:[6,1,1,""],no_outbound_for:[6,1,1,""],request:[6,1,1,""],set_link_closed_callback:[6,1,1,""],set_packet_callback:[6,1,1,""],set_remote_identified_callback:[6,1,1,""],set_resource_callback:[6,1,1,""],set_resource_concluded_callback:[6,1,1,""],set_resource_started_callback:[6,1,1,""],set_resource_strategy:[6,1,1,""],teardown:[6,1,1,""]},"RNS.Packet":{ENCRYPTED_MDU:[6,2,1,""],PLAIN_MDU:[6,2,1,""],resend:[6,1,1,""],send:[6,1,1,""]},"RNS.PacketReceipt":{get_rtt:[6,1,1,""],get_status:[6,1,1,""],set_delivery_callback:[6,1,1,""],set_timeout:[6,1,1,""],set_timeout_callback:[6,1,1,""]},"RNS.RequestReceipt":{get_progress:[6,1,1,""],get_request_id:[6,1,1,""],get_response:[6,1,1,""],get_response_time:[6,1,1,""],get_status:[6,1,1,""]},"RNS.Resource":{advertise:[6,1,1,""],cancel:[6,1,1,""],get_data_size:[6,1,1,""],get_hash:[6,1,1,""],get_parts:[6,1,1,""],get_progress:[6,1,1,""],get_segments:[6,1,1,""],get_transfer_size:[6,1,1,""],is_compressed:[6,1,1,""]},"RNS.Reticulum":{ANNOUNCE_CAP:[6,2,1,""],MTU:[6,2,1,""],should_use_implicit_proof:[6,1,1,""],transport_enabled:[6,1,1,""]},"RNS.Transport":{PATHFINDER_M:[6,2,1,""],deregister_announce_handler:[6,1,1,""],has_path:[6,1,1,""],hops_to:[6,1,1,""],next_hop:[6,1,1,""],next_hop_interface:[6,1,1,""],register_announce_handler:[6,1,1,""],request_path:[6,1,1,""]},RNS:{Destination:[6,0,1,""],Identity:[6,0,1,""],Link:[6,0,1,""],Packet:[6,0,1,""],PacketReceipt:[6,0,1,""],RequestReceipt:[6,0,1,""],Resource:[6,0,1,""],Reticulum:[6,0,1,""],Transport:[6,0,1,""]}},objnames:{"0":["py","class","Python class"],"1":["py","method","Python method"],"2":["py","attribute","Python attribute"]},objtypes:{"0":"py:class","1":"py:method","2":"py:attribute"},terms:{"0":[0,4,6,8,9,10],"00":[8,9],"000":[],"00000000":8,"00000100":8,"00000111":8,"01":8,"01010000":8,"02":[],"05":0,"07":[],"0x81f7b979fea6134ba9fd5c701b3501a2e61e897a":7,"1":[0,4,6,8,9],"10":[4,8,9],"100":[0,4,8],"1000":0,"10000000":8,"1024":0,"11":8,"115200":[4,9],"12":4,"1200":8,"125":4,"125000":4,"127":4,"128":[6,8,10],"13":9,"13425ec15b621c1d928589718000d814":8,"14":[],"141":[],"15":4,"150":[4,9],"150m":4,"151":[],"157":8,"16":[4,8,9],"17":9,"1726dbad538775b5bf9b0ea25a4079c8":9,"18":[],"180":[],"182":[],"187":9,"1b03013c25f1c2ca068a4f080b844a10":9,"2":[0,4,6,8,9],"20":[4,8,9],"200":[4,9],"2000000":[],"205":[],"211":[],"23":9,"237":[],"24":4,"240":[],"24ghz":[],"25":[0,3,10],"255":4,"256":[6,8],"256320d405d6d525d1e9":[],"265":[8,10],"27":9,"270":[],"2d03725b327348980d570f739a3a5708":9,"2f":0,"3":[0,4,8,9,10],"30":9,"32":8,"323":[],"33":[],"34":[],"360":6,"3600":[0,4],"367":[],"37":[],"37428":9,"37429":9,"38":9,"383":6,"3cpmacgm34qyvr6xwlvejmi2ane3pzquuq":7,"3e12fc71692f8ec47bc5":1,"3w3lha":[],"4":[6,8,9],"409":[],"4242":4,"430":8,"44":10,"45":[0,8],"460":[],"464":6,"465":8,"469":9,"476":[],"477":[],"48555":4,"49":9,"49555":4,"4965":[1,9],"4faf1b2e0a077e6a9d92fa051f256038":8,"5":[0,4,6,9],"500":[6,8,10],"5001":4,"507":6,"51":8,"512":[4,6,8],"5245a8efe1788c6a1cd36144a270e13b":9,"5245a8efe1788c6a70e1":[],"5377":1,"55":4,"56b115c30cd386cad69c":[],"5757"Line truncated
|
Search.setIndex({"docnames": ["examples", "gettingstartedfast", "hardware", "index", "interfaces", "networks", "reference", "support", "understanding", "using", "whatis"], "filenames": ["examples.rst", "gettingstartedfast.rst", "hardware.rst", "index.rst", "interfaces.rst", "networks.rst", "reference.rst", "support.rst", "understanding.rst", "using.rst", "whatis.rst"], "titles": ["Code Examples", "Getting Started Fast", "Communications Hardware", "Reticulum Network Stack Manual", "Supported Interfaces", "Building Networks", "API Reference", "Support Reticulum", "Understanding Reticulum", "Using Reticulum on Your System", "What is Reticulum?"], "terms": {"A": [0, 1, 4, 5, 6, 8, 10], "number": [0, 1, 4, 5, 6, 8, 9], "ar": [0, 1, 2, 4, 5, 6, 7, 8, 9, 10], "includ": [0, 2, 3, 4, 6, 8], "sourc": [0, 1, 2, 5, 8, 10], "distribut": [0, 1, 5, 6, 8, 9], "reticulum": [0, 4, 5, 6], "you": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "can": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "us": [0, 2, 3, 4, 5, 6, 8], "learn": [0, 1, 7, 8], "how": [0, 1, 2, 4, 5, 8, 10], "write": [0, 1, 4, 6, 8], "your": [0, 1, 2, 3, 4, 5, 7, 8, 10], "own": [0, 1, 5, 6, 8, 9, 10], "program": [0, 3, 4, 6, 8, 10], "The": [0, 1, 2, 3, 4, 5, 6, 10], "demonstr": [0, 4], "bare": 0, "minimum": [0, 4, 5, 8], "setup": [0, 1, 3, 4], "requir": [0, 1, 4, 5, 8, 9, 10], "connect": [0, 2, 3, 4, 5, 6, 8, 9, 10], "network": [0, 2, 4, 6, 8, 9, 10], "from": [0, 1, 2, 4, 5, 6, 8, 9, 10], "In": [0, 1, 2, 4, 5, 6, 8, 9, 10], "about": [0, 1, 2, 4, 5, 6, 8], "five": 0, "line": [0, 1, 2, 4, 5, 8, 9, 10], "have": [0, 1, 2, 4, 5, 6, 8, 9], "stack": [0, 1, 5, 6, 8, 9, 10], "initialis": [0, 6, 9], "readi": [0, 1, 2, 4, 5, 6, 10], "pass": [0, 2, 4, 5, 6, 8, 9], "traffic": [0, 1, 4, 5, 6, 8, 9], "thi": [0, 1, 2, 3, 4, 5, 6, 8, 9, 10], "rn": [0, 1, 6, 8, 9], "start": [0, 2, 3, 4, 6, 8, 9], "up": [0, 1, 2, 4, 5, 8, 9, 10], "gener": [0, 1, 2, 4, 5, 6, 8, 9, 10], "new": [0, 4, 5, 6, 8, 9], "destin": [0, 1, 3, 4, 5, 6, 9], "let": [0, 1, 4, 5, 8, 9], "user": [0, 1, 4, 5, 8, 9, 10], "send": [0, 4, 6, 8, 9], "an": [0, 1, 2, 4, 5, 6, 8, 9, 10], "import": [0, 1, 2, 4, 5, 7, 8], "argpars": 0, "": [0, 1, 4, 5, 8, 9, 10], "defin": [0, 4, 8, 9], "app": [0, 1, 6, 8], "name": [0, 3, 4, 5, 6], "we": [0, 1, 2, 4, 7, 8], "ll": [0, 1, 10], "all": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10], "creat": [0, 3, 4, 5, 6, 8, 9, 10], "sinc": [0, 1, 4, 5, 6, 8], "basic": [0, 1, 3, 6, 9], "i": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "part": [0, 4, 5, 6, 8], "rang": [0, 1, 2, 4, 5, 8, 9, 10], "util": [0, 2, 3, 4, 8], "put": [0, 2, 4], "them": [0, 1, 2, 4, 5, 7, 8, 9, 10], "within": [0, 1, 4, 5, 6, 8], "namespac": 0, "example_util": [0, 9], "app_nam": [0, 6], "execut": [0, 1, 4, 6, 9], "when": [0, 1, 2, 4, 5, 6, 8, 9], "def": 0, "program_setup": 0, "configpath": 0, "must": [0, 1, 4, 5, 6, 8], "first": [0, 1, 4, 6, 8, 9], "randomli": [0, 8], "ident": [0, 1, 3, 6, 9, 10], "our": [0, 8], "just": [0, 1, 2, 4, 5, 8, 10], "endpoint": [0, 5, 6, 8], "address": [0, 1, 4, 5, 6, 8, 10], "commun": [0, 1, 3, 4, 5, 6, 7, 8, 9, 10], "also": [0, 1, 2, 4, 5, 6, 8, 9, 10], "exist": [0, 1, 2, 4, 8, 9, 10], "which": [0, 1, 4, 5, 6, 8, 9], "know": [0, 1, 2, 5, 6, 8, 10], "thei": [0, 1, 4, 5, 6, 8, 9], "reachabl": [0, 1, 4, 5, 6, 8, 9], "autoomat": 0, "path": [0, 1, 2, 4, 6, 8, 9], "anywher": [0, 4], "els": [0, 5, 8], "IN": [0, 6], "singl": [0, 4, 6, 8, 9, 10], "minimalsampl": 0, "configur": [0, 1, 2, 3, 4, 5, 6, 8, 10], "automat": [0, 1, 2, 4, 5, 6, 8, 9, 10], "prove": [0, 8], "packet": [0, 1, 2, 3, 4, 5, 6, 9, 10], "adress": [0, 6, 8], "By": [0, 1, 4, 6, 8, 9], "do": [0, 1, 2, 4, 6, 8, 10], "proof": [0, 6, 8, 9], "each": [0, 1, 4, 5, 8, 9], "incom": [0, 4, 6, 9], "transmit": [0, 4, 8], "back": [0, 4, 8, 10], "sender": [0, 1, 5, 8, 9], "anyon": [0, 1, 2, 5, 6, 8, 9], "tri": 0, "whether": [0, 4, 6, 8], "wa": [0, 2, 4, 5, 6, 8, 10], "receiv": [0, 1, 4, 6, 8, 9], "correctli": 0, "set_proof_strategi": [0, 6], "prove_al": [0, 6], "everyth": [0, 5, 8], "hand": [0, 1], "over": [0, 2, 3, 4, 6, 8, 9, 10], "control": [0, 1, 2, 3, 5, 6, 8, 10], "loop": 0, "announceloop": 0, "log": [0, 4, 9], "prettyhexrep": 0, "hash": [0, 1, 6, 8, 9], "run": [0, 1, 2, 4, 5, 6, 8, 9, 10], "hit": 0, "enter": [0, 9], "manual": [0, 1, 4, 5, 6, 9], "ctrl": 0, "c": [0, 5], "quit": 0, "until": [0, 1, 4, 6], "exit": [0, 1, 6, 9], "If": [0, 1, 2, 4, 5, 6, 8, 9, 10], "server": [0, 1, 2, 3, 9], "client": [0, 1, 2, 3, 6], "messag": [0, 1, 6, 8, 9], "direct": [0, 1, 2, 5, 6, 8, 9], "toward": [0, 4, 8], "while": [0, 1, 2, 4, 5, 6, 8, 10], "true": [0, 4, 6, 9], "input": [0, 9], "sent": [0, 1, 6, 8, 9], "startup": 0, "get": [0, 2, 3, 4, 6, 10], "pars": 0, "desir": [0, 2, 4, 8], "mode": [0, 1, 2, 3, 8, 9, 10], "__name__": 0, "__main__": 0, "try": [0, 3, 4], "parser": 0, "argumentpars": 0, "descript": [0, 9], "add_argu": 0, "config": [0, 1, 2, 5, 9], "action": 0, "store": [0, 2, 8, 9], "default": [0, 1, 2, 4, 5, 6, 8, 9], "none": [0, 4, 6, 8, 9], "help": [0, 2, 5, 7, 8, 9, 10], "altern": [0, 4, 9], "directLine truncated
|
||||||
@@ -1,48 +1,232 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="API Reference" href="reference.html" /><link rel="prev" title="Code Examples" href="examples.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Support Reticulum - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Support Reticulum — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="prev" title="Code Examples" href="examples.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="examples.html" title="Code Examples"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Support Reticulum</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="support-reticulum">
|
|
||||||
<span id="support-main"></span><h1>Support Reticulum<a class="headerlink" href="#support-reticulum" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="support-reticulum">
|
||||||
|
<span id="support-main"></span><h1>Support Reticulum<a class="headerlink" href="#support-reticulum" title="Permalink to this heading">#</a></h1>
|
||||||
<p>You can help support the continued development of open, free and private communications
|
<p>You can help support the continued development of open, free and private communications
|
||||||
systems by donating, providing feedback and contributing code and learning resources.</p>
|
systems by donating, providing feedback and contributing code and learning resources.</p>
|
||||||
<div class="section" id="donations">
|
<section id="donations">
|
||||||
<h2>Donations<a class="headerlink" href="#donations" title="Permalink to this headline">¶</a></h2>
|
<h2>Donations<a class="headerlink" href="#donations" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Donations are gratefully accepted via the following channels:</p>
|
<p>Donations are gratefully accepted via the following channels:</p>
|
||||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Monero:
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>Monero:
|
||||||
84FpY1QbxHcgdseePYNmhTHcrgMX4nFfBYtz2GKYToqHVVhJp8Eaw1Z1EedRnKD19b3B8NiLCGVxzKV17UMmmeEsCrPyA5w
|
84FpY1QbxHcgdseePYNmhTHcrgMX4nFfBYtz2GKYToqHVVhJp8Eaw1Z1EedRnKD19b3B8NiLCGVxzKV17UMmmeEsCrPyA5w
|
||||||
@@ -59,31 +243,78 @@ https://ko-fi.com/markqvist
|
|||||||
</div>
|
</div>
|
||||||
<p>Are certain features in the development roadmap are important to you or your
|
<p>Are certain features in the development roadmap are important to you or your
|
||||||
organisation? Make them a reality quickly by sponsoring their implementation.</p>
|
organisation? Make them a reality quickly by sponsoring their implementation.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="provide-feedback">
|
<section id="provide-feedback">
|
||||||
<h2>Provide Feedback<a class="headerlink" href="#provide-feedback" title="Permalink to this headline">¶</a></h2>
|
<h2>Provide Feedback<a class="headerlink" href="#provide-feedback" title="Permalink to this heading">#</a></h2>
|
||||||
<p>All feedback on the usage, functioning and potential dysfunctioning of any and
|
<p>All feedback on the usage, functioning and potential dysfunctioning of any and
|
||||||
all components of the system is very valuable to the continued development and
|
all components of the system is very valuable to the continued development and
|
||||||
improvement of Reticulum. Absolutely no automated analytics, telemetly, error
|
improvement of Reticulum. Absolutely no automated analytics, telemetry, error
|
||||||
reporting or statistics is collected and reported by Reticulum under any
|
reporting or statistics is collected and reported by Reticulum under any
|
||||||
circumstances, so we rely on old-fashioned human feedback.</p>
|
circumstances, so we rely on old-fashioned human feedback.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="contribute-code">
|
<section id="contribute-code">
|
||||||
<h2>Contribute Code<a class="headerlink" href="#contribute-code" title="Permalink to this headline">¶</a></h2>
|
<h2>Contribute Code<a class="headerlink" href="#contribute-code" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Join us on <a class="reference external" href="https://github.com/markqvist/reticulum">the GitHub repository</a> to
|
<p>Join us on <a class="reference external" href="https://github.com/markqvist/reticulum">the GitHub repository</a> to
|
||||||
report issues, suggest functionality and contribute code to Reticulum.</p>
|
report issues, suggest functionality and contribute code to Reticulum.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="reference.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">API Reference</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="examples.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Code Examples</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Support Reticulum</a><ul>
|
<li><a class="reference internal" href="#">Support Reticulum</a><ul>
|
||||||
<li><a class="reference internal" href="#donations">Donations</a></li>
|
<li><a class="reference internal" href="#donations">Donations</a></li>
|
||||||
<li><a class="reference internal" href="#provide-feedback">Provide Feedback</a></li>
|
<li><a class="reference internal" href="#provide-feedback">Provide Feedback</a></li>
|
||||||
@@ -92,46 +323,21 @@ report issues, suggest functionality and contribute code to Reticulum.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="examples.html"
|
|
||||||
title="previous chapter">Code Examples</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/support.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="examples.html" title="Code Examples"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>previous</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<li class="nav-item nav-item-this"><a href="">Support Reticulum</a></li>
|
<script src="_static/copybutton.js"></script>
|
||||||
</ul>
|
</body>
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,48 +1,228 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Communications Hardware" href="hardware.html" /><link rel="prev" title="Using Reticulum on Your System" href="using.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Understanding Reticulum - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Understanding Reticulum — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Communications Hardware" href="hardware.html" />
|
|
||||||
<link rel="prev" title="Using Reticulum on Your System" href="using.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="hardware.html" title="Communications Hardware"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="using.html" title="Using Reticulum on Your System"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Understanding Reticulum</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="understanding-reticulum">
|
|
||||||
<span id="understanding-main"></span><h1>Understanding Reticulum<a class="headerlink" href="#understanding-reticulum" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="understanding-reticulum">
|
||||||
|
<span id="understanding-main"></span><h1>Understanding Reticulum<a class="headerlink" href="#understanding-reticulum" title="Permalink to this heading">#</a></h1>
|
||||||
<p>This chapter will briefly describe the overall purpose and operating principles of Reticulum.
|
<p>This chapter will briefly describe the overall purpose and operating principles of Reticulum.
|
||||||
It should give you an overview of how the stack works, and an understanding of how to
|
It should give you an overview of how the stack works, and an understanding of how to
|
||||||
develop networked applications using Reticulum.</p>
|
develop networked applications using Reticulum.</p>
|
||||||
@@ -56,8 +236,8 @@ operates, what it can achieve, and how you can use it yourself. If you want to h
|
|||||||
development, this is also the place to start, since it will provide a pretty clear overview of the
|
development, this is also the place to start, since it will provide a pretty clear overview of the
|
||||||
sentiments and the philosophy behind Reticulum, what problems it seeks to solve, and how it
|
sentiments and the philosophy behind Reticulum, what problems it seeks to solve, and how it
|
||||||
approaches those solutions.</p>
|
approaches those solutions.</p>
|
||||||
<div class="section" id="motivation">
|
<section id="motivation">
|
||||||
<span id="understanding-motivation"></span><h2>Motivation<a class="headerlink" href="#motivation" title="Permalink to this headline">¶</a></h2>
|
<span id="understanding-motivation"></span><h2>Motivation<a class="headerlink" href="#motivation" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The primary motivation for designing and implementing Reticulum has been the current lack of
|
<p>The primary motivation for designing and implementing Reticulum has been the current lack of
|
||||||
reliable, functional and secure minimal-infrastructure modes of digital communication. It is my
|
reliable, functional and secure minimal-infrastructure modes of digital communication. It is my
|
||||||
belief that it is highly desirable to create a reliable and efficient way to set up long-range digital
|
belief that it is highly desirable to create a reliable and efficient way to set up long-range digital
|
||||||
@@ -83,9 +263,9 @@ cheap and easy to cover vast areas with a myriad of independent, interconnectabl
|
|||||||
Reticulum <strong>is not</strong> <em>one network</em>, it <strong>is a tool</strong> to build <em>thousands of networks</em>. Networks without
|
Reticulum <strong>is not</strong> <em>one network</em>, it <strong>is a tool</strong> to build <em>thousands of networks</em>. Networks without
|
||||||
kill-switches, surveillance, censorship and control. Networks that can freely interoperate, associate and disassociate
|
kill-switches, surveillance, censorship and control. Networks that can freely interoperate, associate and disassociate
|
||||||
with each other, and require no central oversight. Networks for human beings. <em>Networks for the people</em>.</p>
|
with each other, and require no central oversight. Networks for human beings. <em>Networks for the people</em>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="goals">
|
<section id="goals">
|
||||||
<span id="understanding-goals"></span><h2>Goals<a class="headerlink" href="#goals" title="Permalink to this headline">¶</a></h2>
|
<span id="understanding-goals"></span><h2>Goals<a class="headerlink" href="#goals" title="Permalink to this heading">#</a></h2>
|
||||||
<p>To be as widely usable and efficient to deploy as possible, the following goals have been used to
|
<p>To be as widely usable and efficient to deploy as possible, the following goals have been used to
|
||||||
guide the design of Reticulum:</p>
|
guide the design of Reticulum:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
@@ -98,7 +278,7 @@ critical to ensuring the availability, security and transparency of the system.<
|
|||||||
<li><dl class="simple">
|
<li><dl class="simple">
|
||||||
<dt><strong>Hardware layer agnosticism</strong></dt><dd><p>Reticulum must be fully hardware agnostic, and shall be useable over a wide range of
|
<dt><strong>Hardware layer agnosticism</strong></dt><dd><p>Reticulum must be fully hardware agnostic, and shall be useable over a wide range of
|
||||||
physical networking layers, such as data radios, serial lines, modems, handheld transceivers,
|
physical networking layers, such as data radios, serial lines, modems, handheld transceivers,
|
||||||
wired ethernet, wifi, or anything else that can carry a digital data stream. Hardware made for
|
wired Ethernet, WiFi, or anything else that can carry a digital data stream. Hardware made for
|
||||||
dedicated Reticulum use shall be as cheap as possible and use off-the-shelf components, so
|
dedicated Reticulum use shall be as cheap as possible and use off-the-shelf components, so
|
||||||
it can be easily modified and replicated by anyone interested in doing so.</p>
|
it can be easily modified and replicated by anyone interested in doing so.</p>
|
||||||
</dd>
|
</dd>
|
||||||
@@ -154,12 +334,12 @@ needs to be purchased.</p>
|
|||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="introduction-basic-functionality">
|
<section id="introduction-basic-functionality">
|
||||||
<span id="understanding-basicfunctionality"></span><h2>Introduction & Basic Functionality<a class="headerlink" href="#introduction-basic-functionality" title="Permalink to this headline">¶</a></h2>
|
<span id="understanding-basicfunctionality"></span><h2>Introduction & Basic Functionality<a class="headerlink" href="#introduction-basic-functionality" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum is a networking stack suited for high-latency, low-bandwidth links. Reticulum is at it’s
|
<p>Reticulum is a networking stack suited for high-latency, low-bandwidth links. Reticulum is at it’s
|
||||||
core a <em>message oriented</em> system. It is suited for both local point-to-point or point-to-multipoint
|
core a <em>message oriented</em> system. It is suited for both local point-to-point or point-to-multipoint
|
||||||
scenarios where alle nodes are within range of each other, as well as scenarios where packets need
|
scenarios where all nodes are within range of each other, as well as scenarios where packets need
|
||||||
to be transported over multiple hops in a complex network to reach the recipient.</p>
|
to be transported over multiple hops in a complex network to reach the recipient.</p>
|
||||||
<p>Reticulum does away with the idea of addresses and ports known from IP, TCP and UDP. Instead
|
<p>Reticulum does away with the idea of addresses and ports known from IP, TCP and UDP. Instead
|
||||||
Reticulum uses the singular concept of <em>destinations</em>. Any application using Reticulum as it’s
|
Reticulum uses the singular concept of <em>destinations</em>. Any application using Reticulum as it’s
|
||||||
@@ -168,28 +348,29 @@ destinations it needs to send data to.</p>
|
|||||||
<p>All destinations in Reticulum are _represented_ as a 16 byte hash. This hash is derived from truncating a full
|
<p>All destinations in Reticulum are _represented_ as a 16 byte hash. This hash is derived from truncating a full
|
||||||
SHA-256 hash of identifying characteristics of the destination. To users, the destination addresses
|
SHA-256 hash of identifying characteristics of the destination. To users, the destination addresses
|
||||||
will be displayed as 16 hexadecimal bytes, like this example: <code class="docutils literal notranslate"><span class="pre"><13425ec15b621c1d928589718000d814></span></code>.</p>
|
will be displayed as 16 hexadecimal bytes, like this example: <code class="docutils literal notranslate"><span class="pre"><13425ec15b621c1d928589718000d814></span></code>.</p>
|
||||||
<p>The truncation size of 16 bytes (128 bits) for destinations has been choosen as a reasonable tradeoff
|
<p>The truncation size of 16 bytes (128 bits) for destinations has been chosen as a reasonable trade-off
|
||||||
between address space
|
between address space
|
||||||
and packet overhead. The address space accomodated by this size can support many billions of
|
and packet overhead. The address space accommodated by this size can support many billions of
|
||||||
simultaneously active devices on the same network, while keeping packet overhead low, which is
|
simultaneously active devices on the same network, while keeping packet overhead low, which is
|
||||||
essential on low-bandwidth networks. In the very unlikely case that this address space nears
|
essential on low-bandwidth networks. In the very unlikely case that this address space nears
|
||||||
congestion, a one-line code change can upgrade the Reticulum address space all the way up to 256
|
congestion, a one-line code change can upgrade the Reticulum address space all the way up to 256
|
||||||
bits, ensuring the Reticulum address space could potentially support galactic-scale networks.
|
bits, ensuring the Reticulum address space could potentially support galactic-scale networks.
|
||||||
This is obviusly complete and ridiculous over-allocation, and as such, the current 128 bits should
|
This is obviously complete and ridiculous over-allocation, and as such, the current 128 bits should
|
||||||
be sufficient, even far into the future.</p>
|
be sufficient, even far into the future.</p>
|
||||||
<p>By default Reticulum encrypts all data using elliptic curve cryptography. Any packet sent to a
|
<p>By default Reticulum encrypts all data using elliptic curve cryptography and AES. Any packet sent to a
|
||||||
destination is encrypted with a derived ephemeral key. Reticulum can also set up an encrypted
|
destination is encrypted with a per-packet derived key. Reticulum can also set up an encrypted
|
||||||
channel to a destination, called a <em>Link</em>. Both data sent over Links and single packets offer
|
channel to a destination, called a <em>Link</em>. Both data sent over Links and single packets offer
|
||||||
<em>Forward Secrecy</em> and <em>Initiator Anonymity</em>, by using an Elliptic Curve Diffie Hellman key exchange
|
<em>Initiator Anonymity</em>, and links additionally offer <em>Forward Secrecy</em> by using an Elliptic Curve
|
||||||
on Curve25519 to derive ephemeral keys. The multi-hop transport, coordination, verification
|
Diffie Hellman key exchange on Curve25519 to derive per-link ephemeral keys. The multi-hop transport,
|
||||||
and reliability layers are fully autonomous and also based on elliptic curve cryptography.</p>
|
coordination, verification and reliability layers are fully autonomous and also based on elliptic
|
||||||
|
curve cryptography.</p>
|
||||||
<p>Reticulum also offers symmetric key encryption for group-oriented communications, as well as
|
<p>Reticulum also offers symmetric key encryption for group-oriented communications, as well as
|
||||||
unencrypted packets for local broadcast purposes.</p>
|
unencrypted packets for local broadcast purposes.</p>
|
||||||
<p>Reticulum can connect to a variety of interfaces such as radio modems, data radios and serial ports,
|
<p>Reticulum can connect to a variety of interfaces such as radio modems, data radios and serial ports,
|
||||||
and offers the possibility to easily tunnel Reticulum traffic over IP links such as the Internet or
|
and offers the possibility to easily tunnel Reticulum traffic over IP links such as the Internet or
|
||||||
private IP networks.</p>
|
private IP networks.</p>
|
||||||
<div class="section" id="destinations">
|
<section id="destinations">
|
||||||
<span id="understanding-destinations"></span><h3>Destinations<a class="headerlink" href="#destinations" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-destinations"></span><h3>Destinations<a class="headerlink" href="#destinations" title="Permalink to this heading">#</a></h3>
|
||||||
<p>To receive and send data with the Reticulum stack, an application needs to create one or more
|
<p>To receive and send data with the Reticulum stack, an application needs to create one or more
|
||||||
destinations. Reticulum uses three different basic destination types, and one special:</p>
|
destinations. Reticulum uses three different basic destination types, and one special:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
@@ -205,7 +386,7 @@ only be readable by the creator of the destination, who holds the corresponding
|
|||||||
<dt><strong>Plain</strong></dt><dd><p>A <em>plain</em> destination type is unencrypted, and suited for traffic that should be broadcast to a
|
<dt><strong>Plain</strong></dt><dd><p>A <em>plain</em> destination type is unencrypted, and suited for traffic that should be broadcast to a
|
||||||
number of users, or should be readable by anyone. Traffic to a <em>plain</em> destination is not encrypted.
|
number of users, or should be readable by anyone. Traffic to a <em>plain</em> destination is not encrypted.
|
||||||
Generally, <em>plain</em> destinations can be used for broadcast information intended to be public.
|
Generally, <em>plain</em> destinations can be used for broadcast information intended to be public.
|
||||||
Plain destinations are only reachable directly, and packets adressed to plain destinations are
|
Plain destinations are only reachable directly, and packets addressed to plain destinations are
|
||||||
never transported over multiple hops in the network. To be transportable over multiple hops in Reticulum, information
|
never transported over multiple hops in the network. To be transportable over multiple hops in Reticulum, information
|
||||||
<em>must</em> be encrypted, since Reticulum uses the per-packet encryption to verify routing paths and
|
<em>must</em> be encrypted, since Reticulum uses the per-packet encryption to verify routing paths and
|
||||||
keep them alive.</p>
|
keep them alive.</p>
|
||||||
@@ -231,8 +412,8 @@ out requests and responses, large data transfers and more.</p>
|
|||||||
</dl>
|
</dl>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<div class="section" id="destination-naming">
|
<section id="destination-naming">
|
||||||
<span id="understanding-destinationnaming"></span><h4>Destination Naming<a class="headerlink" href="#destination-naming" title="Permalink to this headline">¶</a></h4>
|
<span id="understanding-destinationnaming"></span><h4>Destination Naming<a class="headerlink" href="#destination-naming" title="Permalink to this heading">#</a></h4>
|
||||||
<p>Destinations are created and named in an easy to understand dotted notation of <em>aspects</em>, and
|
<p>Destinations are created and named in an easy to understand dotted notation of <em>aspects</em>, and
|
||||||
represented on the network as a hash of this value. The hash is a SHA-256 truncated to 128 bits. The
|
represented on the network as a hash of this value. The hash is a SHA-256 truncated to 128 bits. The
|
||||||
top level aspect should always be a unique identifier for the application using the destination.
|
top level aspect should always be a unique identifier for the application using the destination.
|
||||||
@@ -261,9 +442,9 @@ addressable, because their public keys will differ.</p></li>
|
|||||||
</ul>
|
</ul>
|
||||||
<p>In actual use of <em>single</em> destination naming, it is advisable not to use any uniquely identifying
|
<p>In actual use of <em>single</em> destination naming, it is advisable not to use any uniquely identifying
|
||||||
features in aspect naming. Aspect names should be general terms describing what kind of destination
|
features in aspect naming. Aspect names should be general terms describing what kind of destination
|
||||||
is represented. The uniquely identifying aspect is always acheived by the appending the public key,
|
is represented. The uniquely identifying aspect is always achieved by the appending the public key,
|
||||||
which expands the destination into a uniquely identifyable one. Reticulum does this automatically.</p>
|
which expands the destination into a uniquely identifiable one. Reticulum does this automatically.</p>
|
||||||
<p>Any destination on a Reticulum network can be addressed and reached simply by knowning its
|
<p>Any destination on a Reticulum network can be addressed and reached simply by knowing its
|
||||||
destination hash (and public key, but if the public key is not known, it can be requested from the
|
destination hash (and public key, but if the public key is not known, it can be requested from the
|
||||||
network simply by knowing the destination hash). The use of app names and aspects makes it easy to
|
network simply by knowing the destination hash). The use of app names and aspects makes it easy to
|
||||||
structure Reticulum programs and makes it possible to filter what information and data your program
|
structure Reticulum programs and makes it possible to filter what information and data your program
|
||||||
@@ -296,10 +477,10 @@ of public keys.</p>
|
|||||||
built-in <em>announce</em> functionality, and that it is therefore not required to use the <em>announce</em> and <em>path request</em>
|
built-in <em>announce</em> functionality, and that it is therefore not required to use the <em>announce</em> and <em>path request</em>
|
||||||
functionality to obtain public keys. It is by far the easiest though, and should definitely be used
|
functionality to obtain public keys. It is by far the easiest though, and should definitely be used
|
||||||
if there is not a very good reason for doing it differently.</p>
|
if there is not a very good reason for doing it differently.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="public-key-announcements">
|
<section id="public-key-announcements">
|
||||||
<span id="understanding-keyannouncements"></span><h3>Public Key Announcements<a class="headerlink" href="#public-key-announcements" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-keyannouncements"></span><h3>Public Key Announcements<a class="headerlink" href="#public-key-announcements" title="Permalink to this heading">#</a></h3>
|
||||||
<p>An <em>announce</em> will send a special packet over any relevant interfaces, containing all needed
|
<p>An <em>announce</em> will send a special packet over any relevant interfaces, containing all needed
|
||||||
information about the destination hash and public key, and can also contain some additional,
|
information about the destination hash and public key, and can also contain some additional,
|
||||||
application specific data. The entire packet is signed by the sender to ensure authenticity. It is not
|
application specific data. The entire packet is signed by the sender to ensure authenticity. It is not
|
||||||
@@ -331,9 +512,9 @@ of the network, and <em>can even be moved to other Reticulum networks</em> than
|
|||||||
still become reachable. To update it’s reachability, a destination simply needs to send an announce on any
|
still become reachable. To update it’s reachability, a destination simply needs to send an announce on any
|
||||||
networks it is part of. After a short while, it will be globally reachable in the network.</p>
|
networks it is part of. After a short while, it will be globally reachable in the network.</p>
|
||||||
<p>Seeing how <em>single</em> destinations are always tied to a private/public key pair leads us to the next topic.</p>
|
<p>Seeing how <em>single</em> destinations are always tied to a private/public key pair leads us to the next topic.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="understanding-identities">
|
<section id="understanding-identities">
|
||||||
<span id="identities"></span><h3>Identities<a class="headerlink" href="#understanding-identities" title="Permalink to this headline">¶</a></h3>
|
<span id="identities"></span><h3>Identities<a class="headerlink" href="#understanding-identities" title="Permalink to this heading">#</a></h3>
|
||||||
<p>In Reticulum, an <em>identity</em> does not necessarily represent a personal identity, but is an abstraction that
|
<p>In Reticulum, an <em>identity</em> does not necessarily represent a personal identity, but is an abstraction that
|
||||||
can represent any kind of <em>verifiable entity</em>. This could very well be a person, but it could also be the
|
can represent any kind of <em>verifiable entity</em>. This could very well be a person, but it could also be the
|
||||||
control interface of a machine, a program, robot, computer, sensor or something else entirely. In
|
control interface of a machine, a program, robot, computer, sensor or something else entirely. In
|
||||||
@@ -349,18 +530,18 @@ Destinations can then be created by this identity to allow communication to reac
|
|||||||
In all cases it is of great importance to store the private keys associated with any
|
In all cases it is of great importance to store the private keys associated with any
|
||||||
Reticulum Identity securely and privately, since obtaining access to the identity keys equals
|
Reticulum Identity securely and privately, since obtaining access to the identity keys equals
|
||||||
obtaining access and controlling reachability to any destinations created by that identity.</p>
|
obtaining access and controlling reachability to any destinations created by that identity.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="getting-further">
|
<section id="getting-further">
|
||||||
<span id="understanding-gettingfurther"></span><h3>Getting Further<a class="headerlink" href="#getting-further" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-gettingfurther"></span><h3>Getting Further<a class="headerlink" href="#getting-further" title="Permalink to this heading">#</a></h3>
|
||||||
<p>The above functions and principles form the core of Reticulum, and would suffice to create
|
<p>The above functions and principles form the core of Reticulum, and would suffice to create
|
||||||
functional networked applications in local clusters, for example over radio links where all interested
|
functional networked applications in local clusters, for example over radio links where all interested
|
||||||
nodes can directly hear each other. But to be truly useful, we need a way to direct traffic over multiple
|
nodes can directly hear each other. But to be truly useful, we need a way to direct traffic over multiple
|
||||||
hops in the network.</p>
|
hops in the network.</p>
|
||||||
<p>In the following sections, two concepts that allow this will be introduced, <em>paths</em> and <em>links</em>.</p>
|
<p>In the following sections, two concepts that allow this will be introduced, <em>paths</em> and <em>links</em>.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="reticulum-transport">
|
<section id="reticulum-transport">
|
||||||
<span id="understanding-transport"></span><h2>Reticulum Transport<a class="headerlink" href="#reticulum-transport" title="Permalink to this headline">¶</a></h2>
|
<span id="understanding-transport"></span><h2>Reticulum Transport<a class="headerlink" href="#reticulum-transport" title="Permalink to this heading">#</a></h2>
|
||||||
<p>The methods of routing used in traditional networks are fundamentally incompatible with the physical medium
|
<p>The methods of routing used in traditional networks are fundamentally incompatible with the physical medium
|
||||||
types and circumstances that Reticulum was designed to handle. These mechanisms mostly assume trust at the physical layer,
|
types and circumstances that Reticulum was designed to handle. These mechanisms mostly assume trust at the physical layer,
|
||||||
and often needs a lot more bandwidth than Reticulum can assume is available. Since Reticulum is designed to
|
and often needs a lot more bandwidth than Reticulum can assume is available. Since Reticulum is designed to
|
||||||
@@ -370,10 +551,10 @@ implement the concept of <em>paths</em> that allow discovery of how to get infor
|
|||||||
destination. It is important to note that no single node in a Reticulum network knows the complete
|
destination. It is important to note that no single node in a Reticulum network knows the complete
|
||||||
path to a destination. Every Transport node participating in a Reticulum network will only
|
path to a destination. Every Transport node participating in a Reticulum network will only
|
||||||
know the most direct way to get a packet one hop closer to it’s destination.</p>
|
know the most direct way to get a packet one hop closer to it’s destination.</p>
|
||||||
<div class="section" id="node-types">
|
<section id="node-types">
|
||||||
<span id="understanding-nodetypes"></span><h3>Node Types<a class="headerlink" href="#node-types" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-nodetypes"></span><h3>Node Types<a class="headerlink" href="#node-types" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Currently, Reticulum distinguishes between two types of network nodes. All nodes on a Reticulum network
|
<p>Currently, Reticulum distinguishes between two types of network nodes. All nodes on a Reticulum network
|
||||||
are <em>Reticulum Instances</em>, and some are alo <em>Transport Nodes</em>. If a system running Reticulum is fixed in
|
are <em>Reticulum Instances</em>, and some are also <em>Transport Nodes</em>. If a system running Reticulum is fixed in
|
||||||
one place, and is intended to be kept available most of the time, it is a good contender to be a <em>Transport Node</em>.</p>
|
one place, and is intended to be kept available most of the time, it is a good contender to be a <em>Transport Node</em>.</p>
|
||||||
<p>Any Reticulum Instance can become a Transport Node by enabling it in the configuration.
|
<p>Any Reticulum Instance can become a Transport Node by enabling it in the configuration.
|
||||||
This distinction is made by the user configuring the node, and is used to determine what nodes on the
|
This distinction is made by the user configuring the node, and is used to determine what nodes on the
|
||||||
@@ -381,9 +562,9 @@ network will help forward traffic, and what nodes rely on other nodes for wider
|
|||||||
<p>If a node is an <em>Instance</em> it should be given the configuration directive <code class="docutils literal notranslate"><span class="pre">enable_transport</span> <span class="pre">=</span> <span class="pre">No</span></code>, which
|
<p>If a node is an <em>Instance</em> it should be given the configuration directive <code class="docutils literal notranslate"><span class="pre">enable_transport</span> <span class="pre">=</span> <span class="pre">No</span></code>, which
|
||||||
is the default setting.</p>
|
is the default setting.</p>
|
||||||
<p>If it is a <em>Transport Node</em>, it should be given the configuration directive <code class="docutils literal notranslate"><span class="pre">enable_transport</span> <span class="pre">=</span> <span class="pre">Yes</span></code>.</p>
|
<p>If it is a <em>Transport Node</em>, it should be given the configuration directive <code class="docutils literal notranslate"><span class="pre">enable_transport</span> <span class="pre">=</span> <span class="pre">Yes</span></code>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="the-announce-mechanism-in-detail">
|
<section id="the-announce-mechanism-in-detail">
|
||||||
<span id="understanding-announce"></span><h3>The Announce Mechanism in Detail<a class="headerlink" href="#the-announce-mechanism-in-detail" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-announce"></span><h3>The Announce Mechanism in Detail<a class="headerlink" href="#the-announce-mechanism-in-detail" title="Permalink to this heading">#</a></h3>
|
||||||
<p>When an <em>announce</em> for a destination is transmitted by from a Reticulum instance, it will be forwarded by
|
<p>When an <em>announce</em> for a destination is transmitted by from a Reticulum instance, it will be forwarded by
|
||||||
any transport node receiving it, but according to some specific rules:</p>
|
any transport node receiving it, but according to some specific rules:</p>
|
||||||
<ul>
|
<ul>
|
||||||
@@ -446,9 +627,9 @@ and quickly converging end-to-end connectivity for their local, slower segments.
|
|||||||
<p>In general, even extremely complex networks, that utilize the maximum 128 hops will converge to full
|
<p>In general, even extremely complex networks, that utilize the maximum 128 hops will converge to full
|
||||||
end-to-end connectivity in about one minute, given there is enough bandwidth available to process
|
end-to-end connectivity in about one minute, given there is enough bandwidth available to process
|
||||||
the required amount of announces.</p>
|
the required amount of announces.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="reaching-the-destination">
|
<section id="reaching-the-destination">
|
||||||
<span id="understanding-paths"></span><h3>Reaching the Destination<a class="headerlink" href="#reaching-the-destination" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-paths"></span><h3>Reaching the Destination<a class="headerlink" href="#reaching-the-destination" title="Permalink to this heading">#</a></h3>
|
||||||
<p>In networks with changing topology and trustless connectivity, nodes need a way to establish
|
<p>In networks with changing topology and trustless connectivity, nodes need a way to establish
|
||||||
<em>verified connectivity</em> with each other. Since the network is assumed to be trustless, Reticulum
|
<em>verified connectivity</em> with each other. Since the network is assumed to be trustless, Reticulum
|
||||||
must provide a way to guarantee that the peer you are communicating with is actually who you
|
must provide a way to guarantee that the peer you are communicating with is actually who you
|
||||||
@@ -478,8 +659,7 @@ packet.</div>
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
<div class="line">A new ephemeral key is used for every packet sent in this way, and forward secrecy is guaranteed on a
|
<div class="line">A new ephemeral key is used for every packet sent in this way.</div>
|
||||||
per packet level.</div>
|
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
@@ -493,7 +673,7 @@ public signing key.</div>
|
|||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
<div class="line">In case the packet is addressed to a <em>group</em> destination type, the packet will be encrypted with the
|
<div class="line">In case the packet is addressed to a <em>group</em> destination type, the packet will be encrypted with the
|
||||||
pre-shared AES-128 key associated with the destination. In case the packet is addressed to a <em>plain</em>
|
pre-shared AES-128 key associated with the destination. In case the packet is addressed to a <em>plain</em>
|
||||||
destination type, the payload data will not be encrypted. Neither of these two destination types offer
|
destination type, the payload data will not be encrypted. Neither of these two destination types can offer
|
||||||
forward secrecy. In general, it is recommended to always use the <em>single</em> destination type, unless it is
|
forward secrecy. In general, it is recommended to always use the <em>single</em> destination type, unless it is
|
||||||
strictly necessary to use one of the others.</div>
|
strictly necessary to use one of the others.</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -539,19 +719,24 @@ link, and is only revealed to the verified destination, and no intermediaries.</
|
|||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>In a moment, we will discuss the details of how this methodology is implemented, but let’s first
|
<p>In a moment, we will discuss the details of how this methodology is
|
||||||
recap what purposes this methodology serves. We first ensure that the node answering our request
|
implemented, but let’s first recap what purposes this methodology serves. We
|
||||||
is actually the one we want to communicate with, and not a malicious actor pretending to be so.
|
first ensure that the node answering our request is actually the one we want to
|
||||||
At the same time we establish an efficient encrypted channel. The setup of this is relatively cheap in
|
communicate with, and not a malicious actor pretending to be so. At the same
|
||||||
terms of bandwidth, so it can be used just for a short exchange, and then recreated as needed, which will
|
time we establish an efficient encrypted channel. The setup of this is
|
||||||
also rotate encryption keys. The link can also be kept alive for longer periods of time, if this is
|
relatively cheap in terms of bandwidth, so it can be used just for a short
|
||||||
more suitable to the application. The procedure also inserts the <em>link id</em> , a hash calculated from the link request packet, into the memory of forwarding nodes, which means that the communicating nodes can thereafter reach each other simply by referring to this <em>link id</em>.</p>
|
exchange, and then recreated as needed, which will also rotate encryption keys.
|
||||||
<p>The combined bandwidth cost of setting up a link is 3 packets totalling 265 bytes (more info in the
|
The link can also be kept alive for longer periods of time, if this is more
|
||||||
|
suitable to the application. The procedure also inserts the <em>link id</em> , a hash
|
||||||
|
calculated from the link request packet, into the memory of forwarding nodes,
|
||||||
|
which means that the communicating nodes can thereafter reach each other simply
|
||||||
|
by referring to this <em>link id</em>.</p>
|
||||||
|
<p>The combined bandwidth cost of setting up a link is 3 packets totalling 297 bytes (more info in the
|
||||||
<a class="reference internal" href="#understanding-packetformat"><span class="std std-ref">Binary Packet Format</span></a> section). The amount of bandwidth used on keeping
|
<a class="reference internal" href="#understanding-packetformat"><span class="std std-ref">Binary Packet Format</span></a> section). The amount of bandwidth used on keeping
|
||||||
a link open is practically negligible, at 0.45 bits per second. Even on a slow 1200 bits per second packet
|
a link open is practically negligible, at 0.45 bits per second. Even on a slow 1200 bits per second packet
|
||||||
radio channel, 100 concurrent links will still leave 96% channel capacity for actual data.</p>
|
radio channel, 100 concurrent links will still leave 96% channel capacity for actual data.</p>
|
||||||
<div class="section" id="link-establishment-in-detail">
|
<section id="link-establishment-in-detail">
|
||||||
<h4>Link Establishment in Detail<a class="headerlink" href="#link-establishment-in-detail" title="Permalink to this headline">¶</a></h4>
|
<h4>Link Establishment in Detail<a class="headerlink" href="#link-establishment-in-detail" title="Permalink to this heading">#</a></h4>
|
||||||
<p>After exploring the basics of the announce mechanism, finding a path through the network, and an overview
|
<p>After exploring the basics of the announce mechanism, finding a path through the network, and an overview
|
||||||
of the link establishment procedure, this section will go into greater detail about the Reticulum link
|
of the link establishment procedure, this section will go into greater detail about the Reticulum link
|
||||||
establishment process.</p>
|
establishment process.</p>
|
||||||
@@ -597,7 +782,7 @@ channel, once it has been established.</div>
|
|||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
<div class="line">A <em>link proof</em> packet is now constructed and transmitted over the network. This packet is
|
<div class="line">A <em>link proof</em> packet is now constructed and transmitted over the network. This packet is
|
||||||
addressed to the <em>link id</em> of the <em>link</em>. It contains the following data: The newly generated X25519
|
addressed to the <em>link id</em> of the <em>link</em>. It contains the following data: The newly generated X25519
|
||||||
public key <em>LKr</em> and an Ed25519 signature of the <em>link id</em> and <em>LKr</em> made by the signing key of
|
public key <em>LKr</em> and an Ed25519 signature of the <em>link id</em> and <em>LKr</em> made by the <em>original signing key</em> of
|
||||||
the addressed destination.</div>
|
the addressed destination.</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
@@ -605,8 +790,10 @@ the addressed destination.</div>
|
|||||||
<div class="line">By verifying this <em>link proof</em> packet, all nodes that originally transported the <em>link request</em>
|
<div class="line">By verifying this <em>link proof</em> packet, all nodes that originally transported the <em>link request</em>
|
||||||
packet to the destination from the originator can now verify that the intended destination received
|
packet to the destination from the originator can now verify that the intended destination received
|
||||||
the request and accepted it, and that the path they chose for forwarding the request was valid.
|
the request and accepted it, and that the path they chose for forwarding the request was valid.
|
||||||
In sucessfully carrying out this verification, the transporting nodes marks the link as active.
|
In successfully carrying out this verification, the transporting nodes marks the link as active.
|
||||||
An abstract bi-directional communication channel has now been established along a path in the network.</div>
|
An abstract bi-directional communication channel has now been established along a path in the network.
|
||||||
|
Packets can now be exchanged bi-directionally from either end of the link simply by adressing the
|
||||||
|
packets to the <em>link id</em> of the link.</div>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li><div class="line-block">
|
<li><div class="line-block">
|
||||||
@@ -621,10 +808,10 @@ that is used to encrypt the channel. Information can now be exchanged reliably a
|
|||||||
reveal any identifying information about itself. The link initiator remains completely anonymous.</p>
|
reveal any identifying information about itself. The link initiator remains completely anonymous.</p>
|
||||||
<p>When using <em>links</em>, Reticulum will automatically verify all data sent over the link, and can also
|
<p>When using <em>links</em>, Reticulum will automatically verify all data sent over the link, and can also
|
||||||
automate retransmissions if <em>Resources</em> are used.</p>
|
automate retransmissions if <em>Resources</em> are used.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="resources">
|
<section id="resources">
|
||||||
<span id="understanding-resources"></span><h3>Resources<a class="headerlink" href="#resources" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-resources"></span><h3>Resources<a class="headerlink" href="#resources" title="Permalink to this heading">#</a></h3>
|
||||||
<p>For exchanging small amounts of data over a Reticulum network, the <a class="reference internal" href="reference.html#api-packet"><span class="std std-ref">Packet</span></a> interface
|
<p>For exchanging small amounts of data over a Reticulum network, the <a class="reference internal" href="reference.html#api-packet"><span class="std std-ref">Packet</span></a> interface
|
||||||
is sufficient, but for exchanging data that would require many packets, an efficient way to coordinate
|
is sufficient, but for exchanging data that would require many packets, an efficient way to coordinate
|
||||||
the transfer is needed.</p>
|
the transfer is needed.</p>
|
||||||
@@ -635,10 +822,10 @@ the transfer, integrity verification and reassembling the data on the other end.
|
|||||||
<p><a class="reference internal" href="reference.html#api-resource"><span class="std std-ref">Resources</span></a> are programmatically very simple to use, and only requires a few lines
|
<p><a class="reference internal" href="reference.html#api-resource"><span class="std std-ref">Resources</span></a> are programmatically very simple to use, and only requires a few lines
|
||||||
of codes to reliably transfer any amount of data. They can be used to transfer data stored in memory,
|
of codes to reliably transfer any amount of data. They can be used to transfer data stored in memory,
|
||||||
or stream data directly from files.</p>
|
or stream data directly from files.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="reference-setup">
|
<section id="reference-setup">
|
||||||
<span id="understanding-referencesystem"></span><h2>Reference Setup<a class="headerlink" href="#reference-setup" title="Permalink to this headline">¶</a></h2>
|
<span id="understanding-referencesystem"></span><h2>Reference Setup<a class="headerlink" href="#reference-setup" title="Permalink to this heading">#</a></h2>
|
||||||
<p>This section will detail a recommended <em>Reference Setup</em> for Reticulum. It is important to
|
<p>This section will detail a recommended <em>Reference Setup</em> for Reticulum. It is important to
|
||||||
note that Reticulum is designed to be usable on more or less any computing device, and over more
|
note that Reticulum is designed to be usable on more or less any computing device, and over more
|
||||||
or less any medium that allows you to send and receive data, which satisfies some very low
|
or less any medium that allows you to send and receive data, which satisfies some very low
|
||||||
@@ -704,20 +891,20 @@ get or make such a device is available on the <a class="reference external" href
|
|||||||
even if you have none of the hardware already, and need to purchase everything.</p>
|
even if you have none of the hardware already, and need to purchase everything.</p>
|
||||||
<p>This reference setup is of course just a recommendation for getting started easily, and you should
|
<p>This reference setup is of course just a recommendation for getting started easily, and you should
|
||||||
tailor it to your own specific needs, or whatever hardware you have available.</p>
|
tailor it to your own specific needs, or whatever hardware you have available.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="protocol-specifics">
|
<section id="protocol-specifics">
|
||||||
<span id="understanding-protocolspecifics"></span><h2>Protocol Specifics<a class="headerlink" href="#protocol-specifics" title="Permalink to this headline">¶</a></h2>
|
<span id="understanding-protocolspecifics"></span><h2>Protocol Specifics<a class="headerlink" href="#protocol-specifics" title="Permalink to this heading">#</a></h2>
|
||||||
<p>This chapter will detail protocol specific information that is essential to the implementation of
|
<p>This chapter will detail protocol specific information that is essential to the implementation of
|
||||||
Reticulum, but non critical in understanding how the protocol works on a general level. It should be
|
Reticulum, but non critical in understanding how the protocol works on a general level. It should be
|
||||||
treated more as a reference than as essential reading.</p>
|
treated more as a reference than as essential reading.</p>
|
||||||
<div class="section" id="packet-prioritisation">
|
<section id="packet-prioritisation">
|
||||||
<h3>Packet Prioritisation<a class="headerlink" href="#packet-prioritisation" title="Permalink to this headline">¶</a></h3>
|
<h3>Packet Prioritisation<a class="headerlink" href="#packet-prioritisation" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Currently, Reticulum is completely priority-agnostic regarding general traffic. All traffic is handled
|
<p>Currently, Reticulum is completely priority-agnostic regarding general traffic. All traffic is handled
|
||||||
on a first-come, first-serve basis. Announce re-transmission are handled according to the re-transmission
|
on a first-come, first-serve basis. Announce re-transmission are handled according to the re-transmission
|
||||||
times and priorities described earlier in this chapter.</p>
|
times and priorities described earlier in this chapter.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="interface-access-codes">
|
<section id="interface-access-codes">
|
||||||
<h3>Interface Access Codes<a class="headerlink" href="#interface-access-codes" title="Permalink to this headline">¶</a></h3>
|
<h3>Interface Access Codes<a class="headerlink" href="#interface-access-codes" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Reticulum can create named virtual networks, and networks that are only accessible by knowing a preshared
|
<p>Reticulum can create named virtual networks, and networks that are only accessible by knowing a preshared
|
||||||
passphrase. The configuration of this is detailed in the <a class="reference internal" href="interfaces.html#interfaces-options"><span class="std std-ref">Common Interface Options</span></a>
|
passphrase. The configuration of this is detailed in the <a class="reference internal" href="interfaces.html#interfaces-options"><span class="std std-ref">Common Interface Options</span></a>
|
||||||
section. To implement these feature, Reticulum uses the concept of Interface Access Codes, that are calculated
|
section. To implement these feature, Reticulum uses the concept of Interface Access Codes, that are calculated
|
||||||
@@ -730,9 +917,9 @@ Configured IFAC length can be inspected for all interfaces with the <code class=
|
|||||||
<p>Upon receipt, the interface will check that the signature matches the expected value, and drop the packet if it
|
<p>Upon receipt, the interface will check that the signature matches the expected value, and drop the packet if it
|
||||||
does not. This ensures that only packets sent with the correct naming and/or passphrase parameters are allowed to
|
does not. This ensures that only packets sent with the correct naming and/or passphrase parameters are allowed to
|
||||||
pass onto the network.</p>
|
pass onto the network.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="wire-format">
|
<section id="wire-format">
|
||||||
<span id="understanding-packetformat"></span><h3>Wire Format<a class="headerlink" href="#wire-format" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-packetformat"></span><h3>Wire Format<a class="headerlink" href="#wire-format" title="Permalink to this heading">#</a></h3>
|
||||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>== Reticulum Wire Format ======
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>== Reticulum Wire Format ======
|
||||||
|
|
||||||
A Reticulum packet is composed of the following fields:
|
A Reticulum packet is composed of the following fields:
|
||||||
@@ -818,7 +1005,7 @@ proof 11
|
|||||||
| | | | | | | |
|
| | | | | | | |
|
||||||
00000000 00000111 [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
00000000 00000111 [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
||||||
|| | | | |
|
|| | | | |
|
||||||
|| | | | +-- Hops = 0
|
|| | | | +-- Hops = 7
|
||||||
|| | | +------- Packet Type = DATA
|
|| | | +------- Packet Type = DATA
|
||||||
|| | +--------- Destination Type = SINGLE
|
|| | +--------- Destination Type = SINGLE
|
||||||
|| +----------- Propagation Type = BROADCAST
|
|| +----------- Propagation Type = BROADCAST
|
||||||
@@ -833,7 +1020,7 @@ proof 11
|
|||||||
| | | | | | | | | |
|
| | | | | | | | | |
|
||||||
10000000 00000111 [IFAC, N bytes] [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
10000000 00000111 [IFAC, N bytes] [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
|
||||||
|| | | | |
|
|| | | | |
|
||||||
|| | | | +-- Hops = 0
|
|| | | | +-- Hops = 7
|
||||||
|| | | +------- Packet Type = DATA
|
|| | | +------- Packet Type = DATA
|
||||||
|| | +--------- Destination Type = SINGLE
|
|| | +--------- Destination Type = SINGLE
|
||||||
|| +----------- Propagation Type = BROADCAST
|
|| +----------- Propagation Type = BROADCAST
|
||||||
@@ -850,25 +1037,25 @@ wire size counting all fields including headers,
|
|||||||
but excluding any interface access codes.
|
but excluding any interface access codes.
|
||||||
|
|
||||||
- Path Request : 51 bytes
|
- Path Request : 51 bytes
|
||||||
- Announce : 157 bytes
|
- Announce : 167 bytes
|
||||||
- Link Request : 83 bytes
|
- Link Request : 83 bytes
|
||||||
- Link Proof : 83 bytes
|
- Link Proof : 115 bytes
|
||||||
- Link RTT packet : 99 bytes
|
- Link RTT packet : 99 bytes
|
||||||
- Link keepalive : 20 bytes
|
- Link keepalive : 20 bytes
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="announce-propagation-rules">
|
<section id="announce-propagation-rules">
|
||||||
<span id="understanding-announcepropagation"></span><h3>Announce Propagation Rules<a class="headerlink" href="#announce-propagation-rules" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-announcepropagation"></span><h3>Announce Propagation Rules<a class="headerlink" href="#announce-propagation-rules" title="Permalink to this heading">#</a></h3>
|
||||||
<p>The following table illustrates the rules for automatically propagating announces
|
<p>The following table illustrates the rules for automatically propagating announces
|
||||||
from one interface type to another, for all possible combinations. For the purpose
|
from one interface type to another, for all possible combinations. For the purpose
|
||||||
of announce propagation, the <em>Full</em> and <em>Gateway</em> modes are identical.</p>
|
of announce propagation, the <em>Full</em> and <em>Gateway</em> modes are identical.</p>
|
||||||
<img alt="_images/if_mode_graph_b.png" src="_images/if_mode_graph_b.png" />
|
<img alt="_images/if_mode_graph_b.png" src="_images/if_mode_graph_b.png" />
|
||||||
<p>See the <a class="reference internal" href="interfaces.html#interfaces-modes"><span class="std std-ref">Interface Modes</span></a> section for a conceptual overview
|
<p>See the <a class="reference internal" href="interfaces.html#interfaces-modes"><span class="std std-ref">Interface Modes</span></a> section for a conceptual overview
|
||||||
of the different interface modes, and how they are configured.</p>
|
of the different interface modes, and how they are configured.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="cryptographic-primitives">
|
<section id="cryptographic-primitives">
|
||||||
<span id="understanding-primitives"></span><h3>Cryptographic Primitives<a class="headerlink" href="#cryptographic-primitives" title="Permalink to this headline">¶</a></h3>
|
<span id="understanding-primitives"></span><h3>Cryptographic Primitives<a class="headerlink" href="#cryptographic-primitives" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Reticulum has been designed to use a simple suite of efficient, strong and modern
|
<p>Reticulum has been designed to use a simple suite of efficient, strong and modern
|
||||||
cryptographic primitives, with widely available implementations that can be used
|
cryptographic primitives, with widely available implementations that can be used
|
||||||
both on general-purpose CPUs and on microcontrollers. The necessary primitives are:</p>
|
both on general-purpose CPUs and on microcontrollers. The necessary primitives are:</p>
|
||||||
@@ -906,19 +1093,66 @@ testing and review as those from OpenSSL.</p>
|
|||||||
<p>If you want to use the internal pure-python primitives, it is <strong>highly advisable</strong> that you
|
<p>If you want to use the internal pure-python primitives, it is <strong>highly advisable</strong> that you
|
||||||
have a good understanding of the risks that this pose, and make an informed decision on whether
|
have a good understanding of the risks that this pose, and make an informed decision on whether
|
||||||
those risks are acceptable to you.</p>
|
those risks are acceptable to you.</p>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="hardware.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Communications Hardware</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="using.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Using Reticulum on Your System</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Understanding Reticulum</a><ul>
|
<li><a class="reference internal" href="#">Understanding Reticulum</a><ul>
|
||||||
<li><a class="reference internal" href="#motivation">Motivation</a></li>
|
<li><a class="reference internal" href="#motivation">Motivation</a></li>
|
||||||
<li><a class="reference internal" href="#goals">Goals</a></li>
|
<li><a class="reference internal" href="#goals">Goals</a></li>
|
||||||
@@ -955,52 +1189,21 @@ those risks are acceptable to you.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="using.html"
|
|
||||||
title="previous chapter">Using Reticulum on Your System</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="hardware.html"
|
|
||||||
title="next chapter">Communications Hardware</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/understanding.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="hardware.html" title="Communications Hardware"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="using.html" title="Using Reticulum on Your System"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Understanding Reticulum</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,54 +1,235 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Understanding Reticulum" href="understanding.html" /><link rel="prev" title="Getting Started Fast" href="gettingstartedfast.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>Using Reticulum on Your System - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>Using Reticulum on Your System — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Understanding Reticulum" href="understanding.html" />
|
|
||||||
<link rel="prev" title="Getting Started Fast" href="gettingstartedfast.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="understanding.html" title="Understanding Reticulum"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="gettingstartedfast.html" title="Getting Started Fast"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Using Reticulum on Your System</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="using-reticulum-on-your-system">
|
|
||||||
<span id="using-main"></span><h1>Using Reticulum on Your System<a class="headerlink" href="#using-reticulum-on-your-system" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
|
@media not print {
|
||||||
|
body[data-theme="dark"] {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="whatis.html">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="using-reticulum-on-your-system">
|
||||||
|
<span id="using-main"></span><h1>Using Reticulum on Your System<a class="headerlink" href="#using-reticulum-on-your-system" title="Permalink to this heading">#</a></h1>
|
||||||
<p>Reticulum is not installed as a driver or kernel module, as one might expect
|
<p>Reticulum is not installed as a driver or kernel module, as one might expect
|
||||||
of a networking stack. Instead, Reticulum is distributed as a Python module.
|
of a networking stack. Instead, Reticulum is distributed as a Python module.
|
||||||
This means that no special privileges are required to install or use it. It
|
This means that no special privileges are required to install or use it. It
|
||||||
is also very light-weight, and easy to transfer to and install on new systems.
|
is also very light-weight, and easy to transfer to, and install on new systems.</p>
|
||||||
Any program or application that uses Reticulum will automatically load and
|
<p>When you have Reticulum installed, any program or application that uses Reticulum
|
||||||
initialise Reticulum when it starts.</p>
|
will automatically load and initialise Reticulum when it starts, if it is not
|
||||||
|
already running.</p>
|
||||||
<p>In many cases, this approach is sufficient. When any program needs to use
|
<p>In many cases, this approach is sufficient. When any program needs to use
|
||||||
Reticulum, it is loaded, initialised, interfaces are brought up, and the
|
Reticulum, it is loaded, initialised, interfaces are brought up, and the
|
||||||
program can now communicate over any Reticulum networks available. If another
|
program can now communicate over any Reticulum networks available. If another
|
||||||
@@ -56,20 +237,30 @@ program starts up and also wants access to the same Reticulum network, the
|
|||||||
instance is simply shared. This works for any number of programs running
|
instance is simply shared. This works for any number of programs running
|
||||||
concurrently, and is very easy to use, but depending on your use case, there
|
concurrently, and is very easy to use, but depending on your use case, there
|
||||||
are other options.</p>
|
are other options.</p>
|
||||||
<div class="section" id="configuration-data">
|
<section id="configuration-data">
|
||||||
<h2>Configuration & Data<a class="headerlink" href="#configuration-data" title="Permalink to this headline">¶</a></h2>
|
<h2>Configuration & Data<a class="headerlink" href="#configuration-data" title="Permalink to this heading">#</a></h2>
|
||||||
<p>A Reticulum stores all information that it needs to function in a single file-
|
<p>Reticulum stores all information that it needs to function in a single file-system
|
||||||
system directory. By default, this directory is <code class="docutils literal notranslate"><span class="pre">~/.reticulum</span></code>, but you can
|
directory. When Reticulum is started, it will look for a valid configuration
|
||||||
use any directory you wish. You can also run multiple separate Reticulum
|
directory in the following places:</p>
|
||||||
instances on the same physical system, in complete isolation from each other,
|
<ul class="simple">
|
||||||
or connected together.</p>
|
<li><p><code class="docutils literal notranslate"><span class="pre">/etc/reticulum</span></code></p></li>
|
||||||
|
<li><p><code class="docutils literal notranslate"><span class="pre">~/.config/reticulum</span></code></p></li>
|
||||||
|
<li><p><code class="docutils literal notranslate"><span class="pre">~/.reticulum</span></code></p></li>
|
||||||
|
</ul>
|
||||||
|
<p>If no existing configuration directory is found, the directory <code class="docutils literal notranslate"><span class="pre">~/.reticulum</span></code>
|
||||||
|
is created, and the default configuration will be automatically created here.
|
||||||
|
You can move it to one of the other locations if you wish.</p>
|
||||||
|
<p>It is also possible to use completely arbitrary configuration directories by
|
||||||
|
specifying the relevant command-line parameters when running Reticulum-based
|
||||||
|
programs. You can also run multiple separate Reticulum instances on the same
|
||||||
|
physical system, either in isolation from each other, or connected together.</p>
|
||||||
<p>In most cases, a single physical system will only need to run one Reticulum
|
<p>In most cases, a single physical system will only need to run one Reticulum
|
||||||
instance. This can either be launched at boot, as a system service, or simply
|
instance. This can either be launched at boot, as a system service, or simply
|
||||||
be brought up when a program needs it. In either case, any number of programs
|
be brought up when a program needs it. In either case, any number of programs
|
||||||
running on the same system will automatically share the same Reticulum instance,
|
running on the same system will automatically share the same Reticulum instance,
|
||||||
if the configuration allows for it, which it does by default.</p>
|
if the configuration allows for it, which it does by default.</p>
|
||||||
<p>The entire configuration of Reticulum is found in the <code class="docutils literal notranslate"><span class="pre">~/.reticulum/config</span></code>
|
<p>The entire configuration of Reticulum is found in the <code class="docutils literal notranslate"><span class="pre">~/.reticulum/config</span></code>
|
||||||
file. When Reticulum is first started on a new system, a basic, functional
|
file. When Reticulum is first started on a new system, a basic, but fully functional
|
||||||
configuration file is created. The default configuration looks like this:</p>
|
configuration file is created. The default configuration looks like this:</p>
|
||||||
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is the default Reticulum config file.</span>
|
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># This is the default Reticulum config file.</span>
|
||||||
<span class="c1"># You should probably edit it to include any additional,</span>
|
<span class="c1"># You should probably edit it to include any additional,</span>
|
||||||
@@ -166,9 +357,9 @@ order to communicate with other systems. It is a good idea to read the comments
|
|||||||
and explanations in the above default config. It will teach you the basic
|
and explanations in the above default config. It will teach you the basic
|
||||||
concepts you need to understand to configure your network. Once you have done that,
|
concepts you need to understand to configure your network. Once you have done that,
|
||||||
take a look at the <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">Interfaces</span></a> chapter of this manual.</p>
|
take a look at the <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">Interfaces</span></a> chapter of this manual.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="included-utility-programs">
|
<section id="included-utility-programs">
|
||||||
<h2>Included Utility Programs<a class="headerlink" href="#included-utility-programs" title="Permalink to this headline">¶</a></h2>
|
<h2>Included Utility Programs<a class="headerlink" href="#included-utility-programs" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum includes a range of useful utilities, both for managing your Reticulum
|
<p>Reticulum includes a range of useful utilities, both for managing your Reticulum
|
||||||
networks, and for carrying out common tasks over Reticulum networks, such as
|
networks, and for carrying out common tasks over Reticulum networks, such as
|
||||||
transferring files to remote systems, and executing commands and programs remotely.</p>
|
transferring files to remote systems, and executing commands and programs remotely.</p>
|
||||||
@@ -176,8 +367,8 @@ transferring files to remote systems, and executing commands and programs remote
|
|||||||
Reticulum to stay available all the time, for example if you are hosting
|
Reticulum to stay available all the time, for example if you are hosting
|
||||||
a transport node, you might want to run Reticulum as a separate service that
|
a transport node, you might want to run Reticulum as a separate service that
|
||||||
other programs, applications and services can utilise.</p>
|
other programs, applications and services can utilise.</p>
|
||||||
<div class="section" id="the-rnsd-utility">
|
<section id="the-rnsd-utility">
|
||||||
<h3>The rnsd Utility<a class="headerlink" href="#the-rnsd-utility" title="Permalink to this headline">¶</a></h3>
|
<h3>The rnsd Utility<a class="headerlink" href="#the-rnsd-utility" title="Permalink to this heading">#</a></h3>
|
||||||
<p>It is very easy to run Reticulum as a service. Simply run the included <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> command.
|
<p>It is very easy to run Reticulum as a service. Simply run the included <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> command.
|
||||||
When <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> is running, it will keep all configured interfaces open, handle transport if
|
When <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> is running, it will keep all configured interfaces open, handle transport if
|
||||||
it is enabled, and allow any other programs to immediately utilise the
|
it is enabled, and allow any other programs to immediately utilise the
|
||||||
@@ -204,9 +395,9 @@ optional arguments:
|
|||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
<p>You can easily add <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as an always-on service by <a class="reference internal" href="#using-systemd"><span class="std std-ref">configuring a service</span></a>.</p>
|
<p>You can easily add <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as an always-on service by <a class="reference internal" href="#using-systemd"><span class="std std-ref">configuring a service</span></a>.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="the-rnstatus-utility">
|
<section id="the-rnstatus-utility">
|
||||||
<h3>The rnstatus Utility<a class="headerlink" href="#the-rnstatus-utility" title="Permalink to this headline">¶</a></h3>
|
<h3>The rnstatus Utility<a class="headerlink" href="#the-rnstatus-utility" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Using the <code class="docutils literal notranslate"><span class="pre">rnstatus</span></code> utility, you can view the status of configured Reticulum
|
<p>Using the <code class="docutils literal notranslate"><span class="pre">rnstatus</span></code> utility, you can view the status of configured Reticulum
|
||||||
interfaces, similar to the <code class="docutils literal notranslate"><span class="pre">ifconfig</span></code> program.</p>
|
interfaces, similar to the <code class="docutils literal notranslate"><span class="pre">ifconfig</span></code> program.</p>
|
||||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnstatus
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnstatus
|
||||||
@@ -258,9 +449,9 @@ optional arguments:
|
|||||||
-v, --verbose
|
-v, --verbose
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="the-rnpath-utility">
|
<section id="the-rnpath-utility">
|
||||||
<h3>The rnpath Utility<a class="headerlink" href="#the-rnpath-utility" title="Permalink to this headline">¶</a></h3>
|
<h3>The rnpath Utility<a class="headerlink" href="#the-rnpath-utility" title="Permalink to this heading">#</a></h3>
|
||||||
<p>With the <code class="docutils literal notranslate"><span class="pre">rnpath</span></code> utility, you can look up and view paths for
|
<p>With the <code class="docutils literal notranslate"><span class="pre">rnpath</span></code> utility, you can look up and view paths for
|
||||||
destinations on the Reticulum network.</p>
|
destinations on the Reticulum network.</p>
|
||||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnpath
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rnpath
|
||||||
@@ -289,9 +480,9 @@ optional arguments:
|
|||||||
-v, --verbose
|
-v, --verbose
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="the-rnprobe-utility">
|
<section id="the-rnprobe-utility">
|
||||||
<h3>The rnprobe Utility<a class="headerlink" href="#the-rnprobe-utility" title="Permalink to this headline">¶</a></h3>
|
<h3>The rnprobe Utility<a class="headerlink" href="#the-rnprobe-utility" title="Permalink to this heading">#</a></h3>
|
||||||
<p>The <code class="docutils literal notranslate"><span class="pre">rnprobe</span></code> utility lets you probe a destination for connectivity, similar
|
<p>The <code class="docutils literal notranslate"><span class="pre">rnprobe</span></code> utility lets you probe a destination for connectivity, similar
|
||||||
to the <code class="docutils literal notranslate"><span class="pre">ping</span></code> program. Please note that probes will only be answered if the
|
to the <code class="docutils literal notranslate"><span class="pre">ping</span></code> program. Please note that probes will only be answered if the
|
||||||
specified destination is configured to send proofs for received packets. Many
|
specified destination is configured to send proofs for received packets. Many
|
||||||
@@ -320,9 +511,9 @@ optional arguments:
|
|||||||
-v, --verbose
|
-v, --verbose
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="the-rncp-utility">
|
<section id="the-rncp-utility">
|
||||||
<h3>The rncp Utility<a class="headerlink" href="#the-rncp-utility" title="Permalink to this headline">¶</a></h3>
|
<h3>The rncp Utility<a class="headerlink" href="#the-rncp-utility" title="Permalink to this heading">#</a></h3>
|
||||||
<p>The <code class="docutils literal notranslate"><span class="pre">rncp</span></code> utility is a simple file transfer tool. Using it, you can transfer
|
<p>The <code class="docutils literal notranslate"><span class="pre">rncp</span></code> utility is a simple file transfer tool. Using it, you can transfer
|
||||||
files through Reticulum.</p>
|
files through Reticulum.</p>
|
||||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rncp on the receiving system, specifying which identities
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span># Run rncp on the receiving system, specifying which identities
|
||||||
@@ -357,9 +548,9 @@ optional arguments:
|
|||||||
-v, --verbose
|
-v, --verbose
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="the-rnx-utility">
|
<section id="the-rnx-utility">
|
||||||
<h3>The rnx Utility<a class="headerlink" href="#the-rnx-utility" title="Permalink to this headline">¶</a></h3>
|
<h3>The rnx Utility<a class="headerlink" href="#the-rnx-utility" title="Permalink to this heading">#</a></h3>
|
||||||
<p>The <code class="docutils literal notranslate"><span class="pre">rnx</span></code> utility is a basic remote command execution program. It allows you to
|
<p>The <code class="docutils literal notranslate"><span class="pre">rnx</span></code> utility is a basic remote command execution program. It allows you to
|
||||||
execute commands on remote systems over Reticulum, and to view returned command
|
execute commands on remote systems over Reticulum, and to view returned command
|
||||||
output.</p>
|
output.</p>
|
||||||
@@ -413,15 +604,15 @@ optional arguments:
|
|||||||
--version show program's version number and exit
|
--version show program's version number and exit
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="improving-system-configuration">
|
<section id="improving-system-configuration">
|
||||||
<h2>Improving System Configuration<a class="headerlink" href="#improving-system-configuration" title="Permalink to this headline">¶</a></h2>
|
<h2>Improving System Configuration<a class="headerlink" href="#improving-system-configuration" title="Permalink to this heading">#</a></h2>
|
||||||
<p>If you are setting up a system for permanent use with Reticulum, there is a
|
<p>If you are setting up a system for permanent use with Reticulum, there is a
|
||||||
few system configuration changes that can make this easier to administrate.
|
few system configuration changes that can make this easier to administrate.
|
||||||
These changes will be detailed here.</p>
|
These changes will be detailed here.</p>
|
||||||
<div class="section" id="fixed-serial-port-names">
|
<section id="fixed-serial-port-names">
|
||||||
<h3>Fixed Serial Port Names<a class="headerlink" href="#fixed-serial-port-names" title="Permalink to this headline">¶</a></h3>
|
<h3>Fixed Serial Port Names<a class="headerlink" href="#fixed-serial-port-names" title="Permalink to this heading">#</a></h3>
|
||||||
<p>On a Reticulum instance with several serial port based interfaces, it can be
|
<p>On a Reticulum instance with several serial port based interfaces, it can be
|
||||||
beneficial to use the fixed device names for the serial ports, instead
|
beneficial to use the fixed device names for the serial ports, instead
|
||||||
of the dynamically allocated shorthands such as <code class="docutils literal notranslate"><span class="pre">/dev/ttyUSB0</span></code>. Under most
|
of the dynamically allocated shorthands such as <code class="docutils literal notranslate"><span class="pre">/dev/ttyUSB0</span></code>. Under most
|
||||||
@@ -447,9 +638,9 @@ Here is an example of a packet radio TNC configured as such:</p>
|
|||||||
<p>Using this methodology avoids potential naming mix-ups where physical devices
|
<p>Using this methodology avoids potential naming mix-ups where physical devices
|
||||||
might be plugged and unplugged in different orders, or when device name
|
might be plugged and unplugged in different orders, or when device name
|
||||||
assignment varies from one boot to another.</p>
|
assignment varies from one boot to another.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="reticulum-as-a-system-service">
|
<section id="reticulum-as-a-system-service">
|
||||||
<span id="using-systemd"></span><h3>Reticulum as a System Service<a class="headerlink" href="#reticulum-as-a-system-service" title="Permalink to this headline">¶</a></h3>
|
<span id="using-systemd"></span><h3>Reticulum as a System Service<a class="headerlink" href="#reticulum-as-a-system-service" title="Permalink to this heading">#</a></h3>
|
||||||
<p>Instead of starting Reticulum manually, you can install <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as a system
|
<p>Instead of starting Reticulum manually, you can install <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> as a system
|
||||||
service and have it start automatically at boot.</p>
|
service and have it start automatically at boot.</p>
|
||||||
<p>If you installed Reticulum with <code class="docutils literal notranslate"><span class="pre">pip</span></code>, the <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> program will most likely
|
<p>If you installed Reticulum with <code class="docutils literal notranslate"><span class="pre">pip</span></code>, the <code class="docutils literal notranslate"><span class="pre">rnsd</span></code> program will most likely
|
||||||
@@ -491,19 +682,66 @@ WantedBy=multi-user.target
|
|||||||
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>sudo systemctl enable rnsd
|
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>sudo systemctl enable rnsd
|
||||||
</pre></div>
|
</pre></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
</div>
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="understanding.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Understanding Reticulum</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="gettingstartedfast.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Getting Started Fast</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">Using Reticulum on Your System</a><ul>
|
<li><a class="reference internal" href="#">Using Reticulum on Your System</a><ul>
|
||||||
<li><a class="reference internal" href="#configuration-data">Configuration & Data</a></li>
|
<li><a class="reference internal" href="#configuration-data">Configuration & Data</a></li>
|
||||||
<li><a class="reference internal" href="#included-utility-programs">Included Utility Programs</a><ul>
|
<li><a class="reference internal" href="#included-utility-programs">Included Utility Programs</a><ul>
|
||||||
@@ -524,52 +762,21 @@ WantedBy=multi-user.target
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="gettingstartedfast.html"
|
|
||||||
title="previous chapter">Getting Started Fast</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="understanding.html"
|
|
||||||
title="next chapter">Understanding Reticulum</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/using.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="understanding.html" title="Understanding Reticulum"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="gettingstartedfast.html" title="Getting Started Fast"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">Using Reticulum on Your System</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -1,64 +1,267 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="en">
|
||||||
|
<head><meta charset="utf-8"/>
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1"/>
|
||||||
|
<meta name="color-scheme" content="light dark"><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
|
||||||
|
<link rel="index" title="Index" href="genindex.html" /><link rel="search" title="Search" href="search.html" /><link rel="next" title="Getting Started Fast" href="gettingstartedfast.html" /><link rel="prev" title="Reticulum Network Stack Manual" href="index.html" />
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<meta name="generator" content="sphinx-5.2.2, furo 2022.09.29"/>
|
||||||
|
<title>What is Reticulum? - Reticulum Network Stack 0.4.2 beta documentation</title>
|
||||||
<html>
|
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
||||||
<head>
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo.css?digest=d81277517bee4d6b0349d71bb2661d4890b5617c" />
|
||||||
<meta charset="utf-8" />
|
<link rel="stylesheet" type="text/css" href="_static/copybutton.css" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
<link rel="stylesheet" type="text/css" href="_static/styles/furo-extensions.css?digest=30d1aed668e5c3a91c3e3bf6a60b675221979f0e" />
|
||||||
<title>What is Reticulum? — Reticulum Network Stack 0.3.9 beta documentation</title>
|
<link rel="stylesheet" type="text/css" href="_static/custom.css" />
|
||||||
<link rel="stylesheet" type="text/css" href="_static/pygments.css" />
|
|
||||||
<link rel="stylesheet" type="text/css" href="_static/classic.css" />
|
|
||||||
|
|
||||||
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
|
||||||
<script src="_static/jquery.js"></script>
|
|
||||||
<script src="_static/underscore.js"></script>
|
|
||||||
<script src="_static/doctools.js"></script>
|
|
||||||
|
|
||||||
<link rel="index" title="Index" href="genindex.html" />
|
|
||||||
<link rel="search" title="Search" href="search.html" />
|
|
||||||
<link rel="next" title="Getting Started Fast" href="gettingstartedfast.html" />
|
|
||||||
<link rel="prev" title="Reticulum Network Stack Manual" href="index.html" />
|
|
||||||
</head><body>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
|
||||||
<h3>Navigation</h3>
|
|
||||||
<ul>
|
|
||||||
<li class="right" style="margin-right: 10px">
|
|
||||||
<a href="genindex.html" title="General Index"
|
|
||||||
accesskey="I">index</a></li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="gettingstartedfast.html" title="Getting Started Fast"
|
|
||||||
accesskey="N">next</a> |</li>
|
|
||||||
<li class="right" >
|
|
||||||
<a href="index.html" title="Reticulum Network Stack Manual"
|
|
||||||
accesskey="P">previous</a> |</li>
|
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">What is Reticulum?</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="document">
|
|
||||||
<div class="documentwrapper">
|
<style>
|
||||||
<div class="bodywrapper">
|
body {
|
||||||
<div class="body" role="main">
|
--color-code-background: #f8f8f8;
|
||||||
|
--color-code-foreground: black;
|
||||||
<div class="section" id="what-is-reticulum">
|
|
||||||
<h1>What is Reticulum?<a class="headerlink" href="#what-is-reticulum" title="Permalink to this headline">¶</a></h1>
|
}
|
||||||
<p>Reticulum is a cryptography-based networking stack for building wide-area networks with readily available hardware, that can continue to operate even with extremely low bandwidth and very high latency.</p>
|
@media not print {
|
||||||
<p>Reticulum allows you to build wide-area networks with off-the-shelf tools, and offers end-to-end encryption, autoconfiguring cryptographically backed multi-hop transport, efficient addressing, unforgeable packet acknowledgements and more.</p>
|
body[data-theme="dark"] {
|
||||||
<p>Reticulum is a complete networking stack, and does not need IP or higher layers, although it is easy to utilise IP (with TCP or UDP) as the underlying carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the Internet or private IP networks. Reticulum is built directly on cryptographic principles, allowing resilience and stable functionality in open and trustless networks.</p>
|
--color-code-background: #202020;
|
||||||
<p>No kernel modules or drivers are required. Reticulum runs completely in userland, and can run on practically any system that runs Python 3. Reticulum runs well even on small single-board computers like the Pi Zero.</p>
|
--color-code-foreground: #d0d0d0;
|
||||||
<div class="section" id="current-status">
|
--color-background-primary: #202b38;
|
||||||
<h2>Current Status<a class="headerlink" href="#current-status" title="Permalink to this headline">¶</a></h2>
|
--color-background-secondary: #161f27;
|
||||||
<p>Reticulum should currently be considered beta software. All core protocol features are implemented and functioning, but additions will probably occur as real-world use is explored. There will be bugs. The API and wire-format can be considered stable at the moment, but could change if absolutely warranted.</p>
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
@media (prefers-color-scheme: dark) {
|
||||||
|
body:not([data-theme="light"]) {
|
||||||
|
--color-code-background: #202020;
|
||||||
|
--color-code-foreground: #d0d0d0;
|
||||||
|
--color-background-primary: #202b38;
|
||||||
|
--color-background-secondary: #161f27;
|
||||||
|
--color-foreground-primary: #dbdbdb;
|
||||||
|
--color-foreground-secondary: #a9b1ba;
|
||||||
|
--color-brand-primary: #41adff;
|
||||||
|
--color-background-hover: #161f27;
|
||||||
|
--color-api-name: #ffbe85;
|
||||||
|
--color-api-pre-name: #efae75;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style></head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
document.body.dataset.theme = localStorage.getItem("theme") || "auto";
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" style="display: none;">
|
||||||
|
<symbol id="svg-toc" viewBox="0 0 24 24">
|
||||||
|
<title>Contents</title>
|
||||||
|
<svg stroke="currentColor" fill="currentColor" stroke-width="0" viewBox="0 0 1024 1024">
|
||||||
|
<path d="M408 442h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8zm-8 204c0 4.4 3.6 8 8 8h480c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H408c-4.4 0-8 3.6-8 8v56zm504-486H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zm0 632H120c-4.4 0-8 3.6-8 8v56c0 4.4 3.6 8 8 8h784c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8zM115.4 518.9L271.7 642c5.8 4.6 14.4.5 14.4-6.9V388.9c0-7.4-8.5-11.5-14.4-6.9L115.4 505.1a8.74 8.74 0 0 0 0 13.8z"/>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-menu" viewBox="0 0 24 24">
|
||||||
|
<title>Menu</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-menu">
|
||||||
|
<line x1="3" y1="12" x2="21" y2="12"></line>
|
||||||
|
<line x1="3" y1="6" x2="21" y2="6"></line>
|
||||||
|
<line x1="3" y1="18" x2="21" y2="18"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-arrow-right" viewBox="0 0 24 24">
|
||||||
|
<title>Expand</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather-chevron-right">
|
||||||
|
<polyline points="9 18 15 12 9 6"></polyline>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun" viewBox="0 0 24 24">
|
||||||
|
<title>Light mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="feather-sun">
|
||||||
|
<circle cx="12" cy="12" r="5"></circle>
|
||||||
|
<line x1="12" y1="1" x2="12" y2="3"></line>
|
||||||
|
<line x1="12" y1="21" x2="12" y2="23"></line>
|
||||||
|
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"></line>
|
||||||
|
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"></line>
|
||||||
|
<line x1="1" y1="12" x2="3" y2="12"></line>
|
||||||
|
<line x1="21" y1="12" x2="23" y2="12"></line>
|
||||||
|
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"></line>
|
||||||
|
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"></line>
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-moon" viewBox="0 0 24 24">
|
||||||
|
<title>Dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-moon">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none" />
|
||||||
|
<path d="M12 3c.132 0 .263 0 .393 0a7.5 7.5 0 0 0 7.92 12.446a9 9 0 1 1 -8.313 -12.454z" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
<symbol id="svg-sun-half" viewBox="0 0 24 24">
|
||||||
|
<title>Auto light/dark mode</title>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor"
|
||||||
|
stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round" class="icon-tabler-shadow">
|
||||||
|
<path stroke="none" d="M0 0h24v24H0z" fill="none"/>
|
||||||
|
<circle cx="12" cy="12" r="9" />
|
||||||
|
<path d="M13 12h5" />
|
||||||
|
<path d="M13 15h4" />
|
||||||
|
<path d="M13 18h1" />
|
||||||
|
<path d="M13 9h4" />
|
||||||
|
<path d="M13 6h1" />
|
||||||
|
</svg>
|
||||||
|
</symbol>
|
||||||
|
</svg>
|
||||||
|
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__navigation" id="__navigation">
|
||||||
|
<input type="checkbox" class="sidebar-toggle" name="__toc" id="__toc">
|
||||||
|
<label class="overlay sidebar-overlay" for="__navigation">
|
||||||
|
<div class="visually-hidden">Hide navigation sidebar</div>
|
||||||
|
</label>
|
||||||
|
<label class="overlay toc-overlay" for="__toc">
|
||||||
|
<div class="visually-hidden">Hide table of contents sidebar</div>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div class="page">
|
||||||
|
<header class="mobile-header">
|
||||||
|
<div class="header-left">
|
||||||
|
<label class="nav-overlay-icon" for="__navigation">
|
||||||
|
<div class="visually-hidden">Toggle site navigation sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-menu"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<div class="header-center">
|
||||||
|
<a href="index.html"><div class="brand">Reticulum Network Stack 0.4.2 beta documentation</div></a>
|
||||||
|
</div>
|
||||||
|
<div class="header-right">
|
||||||
|
<div class="theme-toggle-container theme-toggle-header">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-header-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
</header>
|
||||||
|
<aside class="sidebar-drawer">
|
||||||
|
<div class="sidebar-container">
|
||||||
|
|
||||||
|
<div class="sidebar-sticky"><a class="sidebar-brand centered" href="index.html">
|
||||||
|
|
||||||
|
<div class="sidebar-logo-container">
|
||||||
|
<img class="sidebar-logo" src="_static/rns_logo_512.png" alt="Logo"/>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<span class="sidebar-brand-text">Reticulum Network Stack 0.4.2 beta 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">
|
||||||
|
<input type="hidden" name="check_keywords" value="yes">
|
||||||
|
<input type="hidden" name="area" value="default">
|
||||||
|
</form>
|
||||||
|
<div id="searchbox"></div><div class="sidebar-scroll"><div class="sidebar-tree">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1 current current-page"><a class="current reference internal" href="#">What is Reticulum?</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="gettingstartedfast.html">Getting Started Fast</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="using.html">Using Reticulum on Your System</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="understanding.html">Understanding Reticulum</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="hardware.html">Communications Hardware</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="interfaces.html">Supported Interfaces</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="networks.html">Building Networks</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="examples.html">Code Examples</a></li>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="support.html">Support Reticulum</a></li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="reference.html">API Reference</a></li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="what-does-reticulum-offer">
|
</div>
|
||||||
<h2>What does Reticulum Offer?<a class="headerlink" href="#what-does-reticulum-offer" title="Permalink to this headline">¶</a></h2>
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</aside>
|
||||||
|
<div class="main">
|
||||||
|
<div class="content">
|
||||||
|
<div class="article-container">
|
||||||
|
<a href="#" class="back-to-top muted-link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
|
||||||
|
<path d="M13 20h-2V8l-5.5 5.5-1.42-1.42L12 4.16l7.92 7.92-1.42 1.42L13 8v12z"></path>
|
||||||
|
</svg>
|
||||||
|
<span>Back to top</span>
|
||||||
|
</a>
|
||||||
|
<div class="content-icon-container">
|
||||||
|
<div class="theme-toggle-container theme-toggle-content">
|
||||||
|
<button class="theme-toggle">
|
||||||
|
<div class="visually-hidden">Toggle Light / Dark / Auto color theme</div>
|
||||||
|
<svg class="theme-icon-when-auto"><use href="#svg-sun-half"></use></svg>
|
||||||
|
<svg class="theme-icon-when-dark"><use href="#svg-moon"></use></svg>
|
||||||
|
<svg class="theme-icon-when-light"><use href="#svg-sun"></use></svg>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
<label class="toc-overlay-icon toc-content-icon" for="__toc">
|
||||||
|
<div class="visually-hidden">Toggle table of contents sidebar</div>
|
||||||
|
<i class="icon"><svg><use href="#svg-toc"></use></svg></i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
<article role="main">
|
||||||
|
<section id="what-is-reticulum">
|
||||||
|
<h1>What is Reticulum?<a class="headerlink" href="#what-is-reticulum" title="Permalink to this heading">#</a></h1>
|
||||||
|
<p>Reticulum is a cryptography-based networking stack for building both local and
|
||||||
|
wide-area networks with readily available hardware, that can continue to operate
|
||||||
|
under adverse conditions, such as extremely low bandwidth and very high latency.</p>
|
||||||
|
<p>Reticulum allows you to build wide-area networks with off-the-shelf tools, and
|
||||||
|
offers end-to-end encryption, forward secrecy, autoconfiguring cryptographically
|
||||||
|
backed multi-hop transport, efficient addressing, unforgeable packet
|
||||||
|
acknowledgements and more.</p>
|
||||||
|
<p>From a users perspective, Reticulum allows the creation of applications that
|
||||||
|
respect and empower the autonomy and sovereignty of communities and individuals.
|
||||||
|
Reticulum enables secure digital communication that cannot be subjected to
|
||||||
|
outside control, manipulation or censorship.</p>
|
||||||
|
<p>Reticulum enables the construction of both small and potentially planetary-scale
|
||||||
|
networks, without any need for hierarchical or beaureucratic structures to control
|
||||||
|
or manage them, while ensuring individuals and communities full sovereignty
|
||||||
|
over their own network segments.</p>
|
||||||
|
<p>Reticulum is a complete networking stack, and does not need IP or higher
|
||||||
|
layers, although it is easy to utilise IP (with TCP or UDP) as the underlying
|
||||||
|
carrier for Reticulum. It is therefore trivial to tunnel Reticulum over the
|
||||||
|
Internet or private IP networks. Reticulum is built directly on cryptographic
|
||||||
|
principles, allowing resilience and stable functionality in open and trustless
|
||||||
|
networks.</p>
|
||||||
|
<p>No kernel modules or drivers are required. Reticulum runs completely in
|
||||||
|
userland, and can run on practically any system that runs Python 3. Reticulum
|
||||||
|
runs well even on small single-board computers like the Pi Zero.</p>
|
||||||
|
<section id="current-status">
|
||||||
|
<h2>Current Status<a class="headerlink" href="#current-status" title="Permalink to this heading">#</a></h2>
|
||||||
|
<p><strong>Please know!</strong> Reticulum should currently be considered beta software. All core protocol
|
||||||
|
features are implemented and functioning, but additions will probably occur as
|
||||||
|
real-world use is explored. <em>There will be bugs</em>. The API and wire-format can be
|
||||||
|
considered stable at the moment, but could change if absolutely warranted.</p>
|
||||||
|
</section>
|
||||||
|
<section id="what-does-reticulum-offer">
|
||||||
|
<h2>What does Reticulum Offer?<a class="headerlink" href="#what-does-reticulum-offer" title="Permalink to this heading">#</a></h2>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p>Coordination-less globally unique adressing and identification</p></li>
|
<li><p>Coordination-less globally unique addressing and identification</p></li>
|
||||||
<li><p>Fully self-configuring multi-hop routing</p></li>
|
<li><p>Fully self-configuring multi-hop routing</p></li>
|
||||||
<li><p>Complete initiator anonymity, communicate without revealing your identity</p></li>
|
<li><p>Complete initiator anonymity, communicate without revealing your identity</p></li>
|
||||||
<li><p>Asymmetric encryption based on X25519, and Ed25519 signatures as a basis for all communication</p></li>
|
<li><p>Asymmetric encryption based on X25519, and Ed25519 signatures as a basis for all communication</p></li>
|
||||||
<li><p>Forward Secrecy by using ephemereal Elliptic Curve Diffie-Hellman keys on Curve25519</p></li>
|
<li><p>Forward Secrecy by using ephemeral Elliptic Curve Diffie-Hellman keys on Curve25519</p></li>
|
||||||
<li><p>Reticulum uses the <a class="reference external" href="https://github.com/fernet/spec/blob/master/Spec.md">Fernet</a> specification for on-the-wire / over-the-air encryption</p>
|
<li><p>Reticulum uses the <a class="reference external" href="https://github.com/fernet/spec/blob/master/Spec.md">Fernet</a> specification for on-the-wire / over-the-air encryption</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>All keys are ephemeral and derived from an ECDH key exchange on Curve25519</p></li>
|
<li><p>All keys are ephemeral and derived from an ECDH key exchange on Curve25519</p></li>
|
||||||
@@ -72,7 +275,7 @@
|
|||||||
<li><p>An intuitive and developer-friendly API</p></li>
|
<li><p>An intuitive and developer-friendly API</p></li>
|
||||||
<li><p>Efficient link establishment</p>
|
<li><p>Efficient link establishment</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>Total bandwidth cost of setting up a link is only 3 packets, totalling 265 bytes</p></li>
|
<li><p>Total bandwidth cost of setting up a link is only 3 packets, totalling 297 bytes</p></li>
|
||||||
<li><p>Low cost of keeping links open at only 0.44 bits per second</p></li>
|
<li><p>Low cost of keeping links open at only 0.44 bits per second</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
@@ -86,9 +289,9 @@
|
|||||||
<li><p>Authentication and virtual network segmentation on all supported interface types</p></li>
|
<li><p>Authentication and virtual network segmentation on all supported interface types</p></li>
|
||||||
<li><p>Flexible scalability allowing extremely low-bandwidth networks to co-exist and interoperate with large, high-bandwidth networks</p></li>
|
<li><p>Flexible scalability allowing extremely low-bandwidth networks to co-exist and interoperate with large, high-bandwidth networks</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="where-can-reticulum-be-used">
|
<section id="where-can-reticulum-be-used">
|
||||||
<h2>Where can Reticulum be Used?<a class="headerlink" href="#where-can-reticulum-be-used" title="Permalink to this headline">¶</a></h2>
|
<h2>Where can Reticulum be Used?<a class="headerlink" href="#where-can-reticulum-be-used" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Over practically any medium that can support at least a half-duplex channel
|
<p>Over practically any medium that can support at least a half-duplex channel
|
||||||
with 500 bits per second throughput, and an MTU of 500 bytes. Data radios,
|
with 500 bits per second throughput, and an MTU of 500 bytes. Data radios,
|
||||||
modems, LoRa radios, serial lines, AX.25 TNCs, amateur radio digital modes,
|
modems, LoRa radios, serial lines, AX.25 TNCs, amateur radio digital modes,
|
||||||
@@ -99,7 +302,7 @@ has been designed as an example transceiver that is very suitable for
|
|||||||
Reticulum. It is possible to build it yourself, to transform a common LoRa
|
Reticulum. It is possible to build it yourself, to transform a common LoRa
|
||||||
development board into one, or it can be purchased as a complete transceiver.</p>
|
development board into one, or it can be purchased as a complete transceiver.</p>
|
||||||
<p>Reticulum can also be encapsulated over existing IP networks, so there’s
|
<p>Reticulum can also be encapsulated over existing IP networks, so there’s
|
||||||
nothing stopping you from using it over wired ethernet or your local WiFi
|
nothing stopping you from using it over wired Ethernet or your local WiFi
|
||||||
network, where it’ll work just as well. In fact, one of the strengths of
|
network, where it’ll work just as well. In fact, one of the strengths of
|
||||||
Reticulum is how easily it allows you to connect different mediums into a
|
Reticulum is how easily it allows you to connect different mediums into a
|
||||||
self-configuring, resilient and encrypted mesh.</p>
|
self-configuring, resilient and encrypted mesh.</p>
|
||||||
@@ -108,17 +311,17 @@ LoRa radio, a packet radio TNC and a WiFi network. Once the interfaces are
|
|||||||
added, Reticulum will take care of the rest, and any device on the WiFi
|
added, Reticulum will take care of the rest, and any device on the WiFi
|
||||||
network can communicate with nodes on the LoRa and packet radio sides of the
|
network can communicate with nodes on the LoRa and packet radio sides of the
|
||||||
network, and vice versa.</p>
|
network, and vice versa.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="interface-types-and-devices">
|
<section id="interface-types-and-devices">
|
||||||
<h2>Interface Types and Devices<a class="headerlink" href="#interface-types-and-devices" title="Permalink to this headline">¶</a></h2>
|
<h2>Interface Types and Devices<a class="headerlink" href="#interface-types-and-devices" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum implements a range of generalised interface types that covers the communications hardware that Reticulum can run over. If your hardware is not supported, it’s relatively simple to implement an interface class. Currently, Reticulum can use the following devices and communication mediums:</p>
|
<p>Reticulum implements a range of generalised interface types that covers the communications hardware that Reticulum can run over. If your hardware is not supported, it’s relatively simple to implement an interface class. Currently, Reticulum can use the following devices and communication mediums:</p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
<li><p>Any ethernet device</p>
|
<li><p>Any Ethernet device</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><p>WiFi devices</p></li>
|
<li><p>WiFi devices</p></li>
|
||||||
<li><p>Wired ethernet devices</p></li>
|
<li><p>Wired Ethernet devices</p></li>
|
||||||
<li><p>Fibre-optic transceivers</p></li>
|
<li><p>Fibre-optic transceivers</p></li>
|
||||||
<li><p>Data radios with ethernet ports</p></li>
|
<li><p>Data radios with Ethernet ports</p></li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
<li><p>LoRa using <a class="reference external" href="https://unsigned.io/rnode">RNode</a></p>
|
<li><p>LoRa using <a class="reference external" href="https://unsigned.io/rnode">RNode</a></p>
|
||||||
@@ -146,22 +349,74 @@ network, and vice versa.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>For a full list and more details, see the <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">Supported Interfaces</span></a> chapter.</p>
|
<p>For a full list and more details, see the <a class="reference internal" href="interfaces.html#interfaces-main"><span class="std std-ref">Supported Interfaces</span></a> chapter.</p>
|
||||||
</div>
|
</section>
|
||||||
<div class="section" id="caveat-emptor">
|
<section id="caveat-emptor">
|
||||||
<h2>Caveat Emptor<a class="headerlink" href="#caveat-emptor" title="Permalink to this headline">¶</a></h2>
|
<h2>Caveat Emptor<a class="headerlink" href="#caveat-emptor" title="Permalink to this heading">#</a></h2>
|
||||||
<p>Reticulum is an experimental networking stack, and should be considered as such. While it has been built with cryptography best-practices very foremost in mind, it has not been externally security audited, and there could very well be privacy-breaking bugs. To be considered secure, Reticulum needs a thourough security review by independt cryptographers and security researchers. If you want to help out, or help sponsor an audit, please do get in touch.</p>
|
<p>Reticulum is an experimental networking stack, and should be considered as
|
||||||
</div>
|
such. While it has been built with cryptography best-practices very foremost in
|
||||||
</div>
|
mind, it has not been externally security audited, and there could very well be
|
||||||
|
privacy-breaking bugs. To be considered secure, Reticulum needs a thorough
|
||||||
|
security review by independent cryptographers and security researchers. If you
|
||||||
|
want to help out, or help sponsor an audit, please do get in touch.</p>
|
||||||
|
</section>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</article>
|
||||||
<div class="clearer"></div>
|
</div>
|
||||||
|
<footer>
|
||||||
|
|
||||||
|
<div class="related-pages">
|
||||||
|
<a class="next-page" href="gettingstartedfast.html">
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Next</span>
|
||||||
|
</div>
|
||||||
|
<div class="title">Getting Started Fast</div>
|
||||||
|
</div>
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
</a>
|
||||||
|
<a class="prev-page" href="index.html">
|
||||||
|
<svg class="furo-related-icon"><use href="#svg-arrow-right"></use></svg>
|
||||||
|
<div class="page-info">
|
||||||
|
<div class="context">
|
||||||
|
<span>Previous</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="title">Home</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
<div class="bottom-of-page">
|
||||||
|
<div class="left-details">
|
||||||
|
<div class="copyright">
|
||||||
|
Copyright © 2022, Mark Qvist
|
||||||
|
</div>
|
||||||
|
Generated with <a href="https://www.sphinx-doc.org/">Sphinx</a> and
|
||||||
|
<a href="https://github.com/pradyunsg/furo">Furo</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="right-details">
|
||||||
|
<div class="icons">
|
||||||
|
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<div class="sphinxsidebar" role="navigation" aria-label="main navigation">
|
</footer>
|
||||||
<div class="sphinxsidebarwrapper">
|
</div>
|
||||||
<h3><a href="index.html">Table of Contents</a></h3>
|
<aside class="toc-drawer">
|
||||||
<ul>
|
|
||||||
|
|
||||||
|
<div class="toc-sticky toc-scroll">
|
||||||
|
<div class="toc-title-container">
|
||||||
|
<span class="toc-title">
|
||||||
|
On this page
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<div class="toc-tree-container">
|
||||||
|
<div class="toc-tree">
|
||||||
|
<ul>
|
||||||
<li><a class="reference internal" href="#">What is Reticulum?</a><ul>
|
<li><a class="reference internal" href="#">What is Reticulum?</a><ul>
|
||||||
<li><a class="reference internal" href="#current-status">Current Status</a></li>
|
<li><a class="reference internal" href="#current-status">Current Status</a></li>
|
||||||
<li><a class="reference internal" href="#what-does-reticulum-offer">What does Reticulum Offer?</a></li>
|
<li><a class="reference internal" href="#what-does-reticulum-offer">What does Reticulum Offer?</a></li>
|
||||||
@@ -172,52 +427,21 @@ network, and vice versa.</p>
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
<h4>Previous topic</h4>
|
</div>
|
||||||
<p class="topless"><a href="index.html"
|
|
||||||
title="previous chapter">Reticulum Network Stack Manual</a></p>
|
|
||||||
<h4>Next topic</h4>
|
|
||||||
<p class="topless"><a href="gettingstartedfast.html"
|
|
||||||
title="next chapter">Getting Started Fast</a></p>
|
|
||||||
<div role="note" aria-label="source link">
|
|
||||||
<h3>This Page</h3>
|
|
||||||
<ul class="this-page-menu">
|
|
||||||
<li><a href="_sources/whatis.rst.txt"
|
|
||||||
rel="nofollow">Show Source</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div id="searchbox" style="display: none" role="search">
|
|
||||||
<h3 id="searchlabel">Quick search</h3>
|
|
||||||
<div class="searchformwrapper">
|
|
||||||
<form class="search" action="search.html" method="get">
|
|
||||||
<input type="text" name="q" aria-labelledby="searchlabel" />
|
|
||||||
<input type="submit" value="Go" />
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<script>$('#searchbox').show(0);</script>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearer"></div>
|
|
||||||
</div>
|
|
||||||
<div class="related" role="navigation" aria-label="related navigation">
|
</aside>
|
||||||
<h3>Navigation</h3>
|
</div>
|
||||||
<ul>
|
</div><script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
|
||||||
<li class="right" style="margin-right: 10px">
|
<script src="_static/jquery.js"></script>
|
||||||
<a href="genindex.html" title="General Index"
|
<script src="_static/underscore.js"></script>
|
||||||
>index</a></li>
|
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/doctools.js"></script>
|
||||||
<a href="gettingstartedfast.html" title="Getting Started Fast"
|
<script src="_static/sphinx_highlight.js"></script>
|
||||||
>next</a> |</li>
|
<script src="_static/scripts/furo.js"></script>
|
||||||
<li class="right" >
|
<script src="_static/clipboard.min.js"></script>
|
||||||
<a href="index.html" title="Reticulum Network Stack Manual"
|
<script src="_static/copybutton.js"></script>
|
||||||
>previous</a> |</li>
|
</body>
|
||||||
<li class="nav-item nav-item-0"><a href="index.html">Reticulum Network Stack 0.3.9 beta documentation</a> »</li>
|
|
||||||
<li class="nav-item nav-item-this"><a href="">What is Reticulum?</a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="footer" role="contentinfo">
|
|
||||||
© Copyright 2022, Mark Qvist.
|
|
||||||
Created using <a href="https://www.sphinx-doc.org/">Sphinx</a> 4.0.1.
|
|
||||||
</div>
|
|
||||||
</body>
|
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
h3 {
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
code.literal {
|
||||||
|
padding-left: 0.25rem !important;
|
||||||
|
padding-right: 0.25rem !important;
|
||||||
|
padding-top: 0.25rem !important;
|
||||||
|
padding-bottom: 0.15rem !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
img[src*="if_mode_graph_b.png"] {
|
||||||
|
background-color: rgb(169, 177, 186);
|
||||||
|
}
|
||||||
|
|
||||||
|
dt.sig {
|
||||||
|
margin-bottom: 0.75rem;
|
||||||
|
margin-top: 1.75rem;
|
||||||
|
}
|
||||||