diff --git a/docs/Reticulum-Manual-en-v1-1-4.epub b/docs/Reticulum-Manual-en-v1-1-4.epub new file mode 100644 index 0000000..8ca3ff2 Binary files /dev/null and b/docs/Reticulum-Manual-en-v1-1-4.epub differ diff --git a/docs/Reticulum-Manual-en-v1-1-4.pdf b/docs/Reticulum-Manual-en-v1-1-4.pdf new file mode 100644 index 0000000..8cb7221 Binary files /dev/null and b/docs/Reticulum-Manual-en-v1-1-4.pdf differ diff --git a/docs/Reticulum-Manual-ru-v1-0-1.pdf b/docs/Reticulum-Manual-ru-v1-0-1.pdf new file mode 100644 index 0000000..90e64af Binary files /dev/null and b/docs/Reticulum-Manual-ru-v1-0-1.pdf differ diff --git a/docs/Reticulum-Manual-ru-v1-1-3.pdf b/docs/Reticulum-Manual-ru-v1-1-3.pdf new file mode 100644 index 0000000..e07837f Binary files /dev/null and b/docs/Reticulum-Manual-ru-v1-1-3.pdf differ diff --git a/docs/Reticulum-Manual-ru-v1-1-4.epub b/docs/Reticulum-Manual-ru-v1-1-4.epub new file mode 100644 index 0000000..139c066 Binary files /dev/null and b/docs/Reticulum-Manual-ru-v1-1-4.epub differ diff --git a/docs/Reticulum-Manual-ru-v1-1-4.pdf b/docs/Reticulum-Manual-ru-v1-1-4.pdf new file mode 100644 index 0000000..7394f1a Binary files /dev/null and b/docs/Reticulum-Manual-ru-v1-1-4.pdf differ diff --git a/docs/_images/board_heltec32v20.png b/docs/_images/board_heltec32v20.png new file mode 100644 index 0000000..9f16786 Binary files /dev/null and b/docs/_images/board_heltec32v20.png differ diff --git a/docs/_images/board_heltec32v30.png b/docs/_images/board_heltec32v30.png new file mode 100644 index 0000000..3799666 Binary files /dev/null and b/docs/_images/board_heltec32v30.png differ diff --git a/docs/_images/board_heltec32v4.png b/docs/_images/board_heltec32v4.png new file mode 100644 index 0000000..64b5a88 Binary files /dev/null and b/docs/_images/board_heltec32v4.png differ diff --git a/docs/_images/board_opencomxl.png b/docs/_images/board_opencomxl.png new file mode 100644 index 0000000..c3b78bd Binary files /dev/null and b/docs/_images/board_opencomxl.png differ diff --git a/docs/_images/board_rak4631.png b/docs/_images/board_rak4631.png new file mode 100644 index 0000000..194a5b8 Binary files /dev/null and b/docs/_images/board_rak4631.png differ diff --git a/docs/_images/board_rnodev2.png b/docs/_images/board_rnodev2.png new file mode 100644 index 0000000..84efb21 Binary files /dev/null and b/docs/_images/board_rnodev2.png differ diff --git a/docs/_images/board_t114.png b/docs/_images/board_t114.png new file mode 100644 index 0000000..ba7cbdc Binary files /dev/null and b/docs/_images/board_t114.png differ diff --git a/docs/_images/board_t3s3.png b/docs/_images/board_t3s3.png new file mode 100644 index 0000000..04bcafb Binary files /dev/null and b/docs/_images/board_t3s3.png differ diff --git a/docs/_images/board_t3v10.png b/docs/_images/board_t3v10.png new file mode 100644 index 0000000..01f01bd Binary files /dev/null and b/docs/_images/board_t3v10.png differ diff --git a/docs/_images/board_t3v20.png b/docs/_images/board_t3v20.png new file mode 100644 index 0000000..369586a Binary files /dev/null and b/docs/_images/board_t3v20.png differ diff --git a/docs/_images/board_t3v21.png b/docs/_images/board_t3v21.png new file mode 100644 index 0000000..28a62df Binary files /dev/null and b/docs/_images/board_t3v21.png differ diff --git a/docs/_images/board_tbeam.png b/docs/_images/board_tbeam.png new file mode 100644 index 0000000..dcad0f0 Binary files /dev/null and b/docs/_images/board_tbeam.png differ diff --git a/docs/_images/board_tbeam_supreme.png b/docs/_images/board_tbeam_supreme.png new file mode 100644 index 0000000..fcaacc4 Binary files /dev/null and b/docs/_images/board_tbeam_supreme.png differ diff --git a/docs/_images/board_tdeck.png b/docs/_images/board_tdeck.png new file mode 100644 index 0000000..9eac1a0 Binary files /dev/null and b/docs/_images/board_tdeck.png differ diff --git a/docs/_images/board_techo.png b/docs/_images/board_techo.png new file mode 100644 index 0000000..3958628 Binary files /dev/null and b/docs/_images/board_techo.png differ diff --git a/docs/_images/if_mode_graph_b.png b/docs/_images/if_mode_graph_b.png new file mode 100644 index 0000000..6606b60 Binary files /dev/null and b/docs/_images/if_mode_graph_b.png differ diff --git a/docs/_images/meshchat_1.webp b/docs/_images/meshchat_1.webp new file mode 100644 index 0000000..87b0ddb Binary files /dev/null and b/docs/_images/meshchat_1.webp differ diff --git a/docs/_images/nomadnet_3.png b/docs/_images/nomadnet_3.png new file mode 100644 index 0000000..4a8c0de Binary files /dev/null and b/docs/_images/nomadnet_3.png differ diff --git a/docs/_images/radio_is5ac.png b/docs/_images/radio_is5ac.png new file mode 100644 index 0000000..e3988a6 Binary files /dev/null and b/docs/_images/radio_is5ac.png differ diff --git a/docs/_images/radio_rblhg5.png b/docs/_images/radio_rblhg5.png new file mode 100644 index 0000000..59bd6c9 Binary files /dev/null and b/docs/_images/radio_rblhg5.png differ diff --git a/docs/_images/sideband_devices.webp b/docs/_images/sideband_devices.webp new file mode 100644 index 0000000..a90154b Binary files /dev/null and b/docs/_images/sideband_devices.webp differ diff --git a/docs/_static/basic.css b/docs/_static/basic.css new file mode 100644 index 0000000..4738b2e --- /dev/null +++ b/docs/_static/basic.css @@ -0,0 +1,906 @@ +/* + * Sphinx stylesheet -- basic theme. + */ + +/* -- main layout ----------------------------------------------------------- */ + +div.clearer { + clear: both; +} + +div.section::after { + display: block; + content: ''; + clear: left; +} + +/* -- relbar ---------------------------------------------------------------- */ + +div.related { + width: 100%; + font-size: 90%; +} + +div.related h3 { + display: none; +} + +div.related ul { + margin: 0; + padding: 0 0 0 10px; + list-style: none; +} + +div.related li { + display: inline; +} + +div.related li.right { + float: right; + margin-right: 5px; +} + +/* -- sidebar --------------------------------------------------------------- */ + +div.sphinxsidebarwrapper { + padding: 10px 5px 0 10px; +} + +div.sphinxsidebar { + float: left; + width: 230px; + margin-left: -100%; + font-size: 90%; + word-wrap: break-word; + overflow-wrap : break-word; +} + +div.sphinxsidebar ul { + list-style: none; +} + +div.sphinxsidebar ul ul, +div.sphinxsidebar ul.want-points { + margin-left: 20px; + list-style: square; +} + +div.sphinxsidebar ul ul { + margin-top: 0; + margin-bottom: 0; +} + +div.sphinxsidebar form { + margin-top: 10px; +} + +div.sphinxsidebar input { + border: 1px solid #98dbcc; + font-family: sans-serif; + font-size: 1em; +} + +div.sphinxsidebar #searchbox form.search { + overflow: hidden; +} + +div.sphinxsidebar #searchbox input[type="text"] { + float: left; + width: 80%; + padding: 0.25em; + box-sizing: border-box; +} + +div.sphinxsidebar #searchbox input[type="submit"] { + float: left; + width: 20%; + border-left: none; + padding: 0.25em; + box-sizing: border-box; +} + + +img { + border: 0; + max-width: 100%; +} + +/* -- search page ----------------------------------------------------------- */ + +ul.search { + margin-top: 10px; +} + +ul.search li { + padding: 5px 0; +} + +ul.search li a { + font-weight: bold; +} + +ul.search li p.context { + color: #888; + margin: 2px 0 0 30px; + text-align: left; +} + +ul.keywordmatches li.goodmatch a { + font-weight: bold; +} + +/* -- index page ------------------------------------------------------------ */ + +table.contentstable { + width: 90%; + margin-left: auto; + margin-right: auto; +} + +table.contentstable p.biglink { + line-height: 150%; +} + +a.biglink { + font-size: 1.3em; +} + +span.linkdescr { + font-style: italic; + padding-top: 5px; + font-size: 90%; +} + +/* -- general index --------------------------------------------------------- */ + +table.indextable { + width: 100%; +} + +table.indextable td { + text-align: left; + vertical-align: top; +} + +table.indextable ul { + margin-top: 0; + margin-bottom: 0; + list-style-type: none; +} + +table.indextable > tbody > tr > td > ul { + padding-left: 0em; +} + +table.indextable tr.pcap { + height: 10px; +} + +table.indextable tr.cap { + margin-top: 10px; + background-color: #f2f2f2; +} + +img.toggler { + margin-right: 3px; + margin-top: 3px; + cursor: pointer; +} + +div.modindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +div.genindex-jumpbox { + border-top: 1px solid #ddd; + border-bottom: 1px solid #ddd; + margin: 1em 0 1em 0; + padding: 0.4em; +} + +/* -- domain module index --------------------------------------------------- */ + +table.modindextable td { + padding: 2px; + border-collapse: collapse; +} + +/* -- general body styles --------------------------------------------------- */ + +div.body { + min-width: 360px; + max-width: 800px; +} + +div.body p, div.body dd, div.body li, div.body blockquote { + -moz-hyphens: auto; + -ms-hyphens: auto; + -webkit-hyphens: auto; + hyphens: auto; +} + +a.headerlink { + visibility: hidden; +} + +a:visited { + color: #551A8B; +} + +h1:hover > a.headerlink, +h2:hover > a.headerlink, +h3:hover > a.headerlink, +h4:hover > a.headerlink, +h5:hover > a.headerlink, +h6:hover > a.headerlink, +dt:hover > a.headerlink, +caption:hover > a.headerlink, +p.caption:hover > a.headerlink, +div.code-block-caption:hover > a.headerlink { + visibility: visible; +} + +div.body p.caption { + text-align: inherit; +} + +div.body td { + text-align: left; +} + +.first { + margin-top: 0 !important; +} + +p.rubric { + margin-top: 30px; + font-weight: bold; +} + +img.align-left, figure.align-left, .figure.align-left, object.align-left { + clear: left; + float: left; + margin-right: 1em; +} + +img.align-right, figure.align-right, .figure.align-right, object.align-right { + clear: right; + float: right; + margin-left: 1em; +} + +img.align-center, figure.align-center, .figure.align-center, object.align-center { + display: block; + margin-left: auto; + margin-right: auto; +} + +img.align-default, figure.align-default, .figure.align-default { + display: block; + margin-left: auto; + margin-right: auto; +} + +.align-left { + text-align: left; +} + +.align-center { + text-align: center; +} + +.align-default { + text-align: center; +} + +.align-right { + text-align: right; +} + +/* -- sidebars -------------------------------------------------------------- */ + +div.sidebar, +aside.sidebar { + margin: 0 0 0.5em 1em; + border: 1px solid #ddb; + padding: 7px; + background-color: #ffe; + width: 40%; + float: right; + clear: right; + overflow-x: auto; +} + +p.sidebar-title { + font-weight: bold; +} + +nav.contents, +aside.topic, +div.admonition, div.topic, blockquote { + clear: left; +} + +/* -- topics ---------------------------------------------------------------- */ + +nav.contents, +aside.topic, +div.topic { + border: 1px solid #ccc; + padding: 7px; + margin: 10px 0 10px 0; +} + +p.topic-title { + font-size: 1.1em; + font-weight: bold; + margin-top: 10px; +} + +/* -- admonitions ----------------------------------------------------------- */ + +div.admonition { + margin-top: 10px; + margin-bottom: 10px; + padding: 7px; +} + +div.admonition dt { + font-weight: bold; +} + +p.admonition-title { + margin: 0px 10px 5px 0px; + font-weight: bold; +} + +div.body p.centered { + text-align: center; + margin-top: 25px; +} + +/* -- content of sidebars/topics/admonitions -------------------------------- */ + +div.sidebar > :last-child, +aside.sidebar > :last-child, +nav.contents > :last-child, +aside.topic > :last-child, +div.topic > :last-child, +div.admonition > :last-child { + margin-bottom: 0; +} + +div.sidebar::after, +aside.sidebar::after, +nav.contents::after, +aside.topic::after, +div.topic::after, +div.admonition::after, +blockquote::after { + display: block; + content: ''; + clear: both; +} + +/* -- tables ---------------------------------------------------------------- */ + +table.docutils { + margin-top: 10px; + margin-bottom: 10px; + border: 0; + border-collapse: collapse; +} + +table.align-center { + margin-left: auto; + margin-right: auto; +} + +table.align-default { + margin-left: auto; + margin-right: auto; +} + +table caption span.caption-number { + font-style: italic; +} + +table caption span.caption-text { +} + +table.docutils td, table.docutils th { + padding: 1px 8px 1px 5px; + border-top: 0; + border-left: 0; + border-right: 0; + border-bottom: 1px solid #aaa; +} + +th { + text-align: left; + padding-right: 5px; +} + +table.citation { + border-left: solid 1px gray; + margin-left: 1px; +} + +table.citation td { + border-bottom: none; +} + +th > :first-child, +td > :first-child { + margin-top: 0px; +} + +th > :last-child, +td > :last-child { + margin-bottom: 0px; +} + +/* -- figures --------------------------------------------------------------- */ + +div.figure, figure { + margin: 0.5em; + padding: 0.5em; +} + +div.figure p.caption, figcaption { + padding: 0.3em; +} + +div.figure p.caption span.caption-number, +figcaption span.caption-number { + font-style: italic; +} + +div.figure p.caption span.caption-text, +figcaption span.caption-text { +} + +/* -- field list styles ----------------------------------------------------- */ + +table.field-list td, table.field-list th { + border: 0 !important; +} + +.field-list ul { + margin: 0; + padding-left: 1em; +} + +.field-list p { + margin: 0; +} + +.field-name { + -moz-hyphens: manual; + -ms-hyphens: manual; + -webkit-hyphens: manual; + hyphens: manual; +} + +/* -- hlist styles ---------------------------------------------------------- */ + +table.hlist { + margin: 1em 0; +} + +table.hlist td { + vertical-align: top; +} + +/* -- object description styles --------------------------------------------- */ + +.sig { + font-family: 'Consolas', 'Menlo', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', monospace; +} + +.sig-name, code.descname { + background-color: transparent; + font-weight: bold; +} + +.sig-name { + font-size: 1.1em; +} + +code.descname { + font-size: 1.2em; +} + +.sig-prename, code.descclassname { + background-color: transparent; +} + +.optional { + font-size: 1.3em; +} + +.sig-paren { + font-size: larger; +} + +.sig-param.n { + font-style: italic; +} + +/* C++ specific styling */ + +.sig-inline.c-texpr, +.sig-inline.cpp-texpr { + font-family: unset; +} + +.sig.c .k, .sig.c .kt, +.sig.cpp .k, .sig.cpp .kt { + color: #0033B3; +} + +.sig.c .m, +.sig.cpp .m { + color: #1750EB; +} + +.sig.c .s, .sig.c .sc, +.sig.cpp .s, .sig.cpp .sc { + color: #067D17; +} + + +/* -- other body styles ----------------------------------------------------- */ + +ol.arabic { + list-style: decimal; +} + +ol.loweralpha { + list-style: lower-alpha; +} + +ol.upperalpha { + list-style: upper-alpha; +} + +ol.lowerroman { + list-style: lower-roman; +} + +ol.upperroman { + list-style: upper-roman; +} + +:not(li) > ol > li:first-child > :first-child, +:not(li) > ul > li:first-child > :first-child { + margin-top: 0px; +} + +:not(li) > ol > li:last-child > :last-child, +:not(li) > ul > li:last-child > :last-child { + margin-bottom: 0px; +} + +ol.simple ol p, +ol.simple ul p, +ul.simple ol p, +ul.simple ul p { + margin-top: 0; +} + +ol.simple > li:not(:first-child) > p, +ul.simple > li:not(:first-child) > p { + margin-top: 0; +} + +ol.simple p, +ul.simple p { + margin-bottom: 0; +} + +aside.footnote > span, +div.citation > span { + float: left; +} +aside.footnote > span:last-of-type, +div.citation > span:last-of-type { + padding-right: 0.5em; +} +aside.footnote > p { + margin-left: 2em; +} +div.citation > p { + margin-left: 4em; +} +aside.footnote > p:last-of-type, +div.citation > p:last-of-type { + margin-bottom: 0em; +} +aside.footnote > p:last-of-type:after, +div.citation > p:last-of-type:after { + content: ""; + clear: both; +} + +dl.field-list { + display: grid; + grid-template-columns: fit-content(30%) auto; +} + +dl.field-list > dt { + font-weight: bold; + word-break: break-word; + padding-left: 0.5em; + padding-right: 5px; +} + +dl.field-list > dd { + padding-left: 0.5em; + margin-top: 0em; + margin-left: 0em; + margin-bottom: 0em; +} + +dl { + margin-bottom: 15px; +} + +dd > :first-child { + margin-top: 0px; +} + +dd ul, dd table { + margin-bottom: 10px; +} + +dd { + margin-top: 3px; + margin-bottom: 10px; + margin-left: 30px; +} + +.sig dd { + margin-top: 0px; + margin-bottom: 0px; +} + +.sig dl { + margin-top: 0px; + margin-bottom: 0px; +} + +dl > dd:last-child, +dl > dd:last-child > :last-child { + margin-bottom: 0; +} + +dt:target, span.highlighted { + background-color: #fbe54e; +} + +rect.highlighted { + fill: #fbe54e; +} + +dl.glossary dt { + font-weight: bold; + font-size: 1.1em; +} + +.versionmodified { + font-style: italic; +} + +.system-message { + background-color: #fda; + padding: 5px; + border: 3px solid red; +} + +.footnote:target { + background-color: #ffa; +} + +.line-block { + display: block; + margin-top: 1em; + margin-bottom: 1em; +} + +.line-block .line-block { + margin-top: 0; + margin-bottom: 0; + margin-left: 1.5em; +} + +.guilabel, .menuselection { + font-family: sans-serif; +} + +.accelerator { + text-decoration: underline; +} + +.classifier { + font-style: oblique; +} + +.classifier:before { + font-style: normal; + margin: 0 0.5em; + content: ":"; + display: inline-block; +} + +abbr, acronym { + border-bottom: dotted 1px; + cursor: help; +} + +/* -- code displays --------------------------------------------------------- */ + +pre { + overflow: auto; + overflow-y: hidden; /* fixes display issues on Chrome browsers */ +} + +pre, div[class*="highlight-"] { + clear: both; +} + +span.pre { + -moz-hyphens: none; + -ms-hyphens: none; + -webkit-hyphens: none; + hyphens: none; + white-space: nowrap; +} + +div[class*="highlight-"] { + margin: 1em 0; +} + +td.linenos pre { + border: 0; + background-color: transparent; + color: #aaa; +} + +table.highlighttable { + display: block; +} + +table.highlighttable tbody { + display: block; +} + +table.highlighttable tr { + display: flex; +} + +table.highlighttable td { + margin: 0; + padding: 0; +} + +table.highlighttable td.linenos { + padding-right: 0.5em; +} + +table.highlighttable td.code { + flex: 1; + overflow: hidden; +} + +.highlight .hll { + display: block; +} + +div.highlight pre, +table.highlighttable pre { + margin: 0; +} + +div.code-block-caption + div { + margin-top: 0; +} + +div.code-block-caption { + margin-top: 1em; + padding: 2px 5px; + font-size: small; +} + +div.code-block-caption code { + background-color: transparent; +} + +table.highlighttable td.linenos, +span.linenos, +div.highlight span.gp { /* gp: Generic.Prompt */ + user-select: none; + -webkit-user-select: text; /* Safari fallback only */ + -webkit-user-select: none; /* Chrome/Safari */ + -moz-user-select: none; /* Firefox */ + -ms-user-select: none; /* IE10+ */ +} + +div.code-block-caption span.caption-number { + padding: 0.1em 0.3em; + font-style: italic; +} + +div.code-block-caption span.caption-text { +} + +div.literal-block-wrapper { + margin: 1em 0; +} + +code.xref, a code { + background-color: transparent; + font-weight: bold; +} + +h1 code, h2 code, h3 code, h4 code, h5 code, h6 code { + background-color: transparent; +} + +.viewcode-link { + float: right; +} + +.viewcode-back { + float: right; + font-family: sans-serif; +} + +div.viewcode-block:target { + margin: -1px -10px; + padding: 0 10px; +} + +/* -- math display ---------------------------------------------------------- */ + +img.math { + vertical-align: middle; +} + +div.body div.math p { + text-align: center; +} + +span.eqno { + float: right; +} + +span.eqno a.headerlink { + position: absolute; + z-index: 1; +} + +div.math:hover a.headerlink { + visibility: visible; +} + +/* -- printout stylesheet --------------------------------------------------- */ + +@media print { + div.document, + div.documentwrapper, + div.bodywrapper { + margin: 0 !important; + width: 100%; + } + + div.sphinxsidebar, + div.related, + div.footer, + #top-link { + display: none; + } +} \ No newline at end of file diff --git a/docs/_static/check-solid.svg b/docs/_static/check-solid.svg new file mode 100644 index 0000000..92fad4b --- /dev/null +++ b/docs/_static/check-solid.svg @@ -0,0 +1,4 @@ + + + + diff --git a/docs/_static/clipboard.min.js b/docs/_static/clipboard.min.js new file mode 100644 index 0000000..54b3c46 --- /dev/null +++ b/docs/_static/clipboard.min.js @@ -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 + + + + diff --git a/docs/_static/copybutton.css b/docs/_static/copybutton.css new file mode 100644 index 0000000..f1916ec --- /dev/null +++ b/docs/_static/copybutton.css @@ -0,0 +1,94 @@ +/* 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; +} + +/* Show the copybutton */ +.highlight:hover button.copybtn, button.copybtn.success { + 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: + * + *

Short

+ */ + .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; + } +} diff --git a/docs/_static/copybutton.js b/docs/_static/copybutton.js new file mode 100644 index 0000000..2ea7ff3 --- /dev/null +++ b/docs/_static/copybutton.js @@ -0,0 +1,248 @@ +// 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': 'Copier 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 = ` + ${messages[locale]['copy_success']} + + +` + +// If the user specified their own SVG use that, otherwise use the default +let iconCopy = ``; +if (!iconCopy) { + iconCopy = ` + ${messages[locale]['copy_to_clipboard']} + + + +` +} + +/** + * 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 a moment, then changes it back +// We want the timeout of our `success` class to be a bit shorter than the +// tooltip and icon change, so that we can hide the icon before changing back. +var timeoutIcon = 2000; +var timeoutSuccessClass = 1500; + +const temporarilyChangeTooltip = (el, oldText, newText) => { + el.setAttribute('data-tooltip', newText) + el.classList.add('success') + // Remove success a little bit sooner than we change the tooltip + // So that we can use CSS to hide the copybutton first + setTimeout(() => el.classList.remove('success'), timeoutSuccessClass) + setTimeout(() => el.setAttribute('data-tooltip', oldText), timeoutIcon) +} + +// Changes the copy button icon for two seconds, then changes it back +const temporarilyChangeIcon = (el) => { + el.innerHTML = iconCheck; + setTimeout(() => {el.innerHTML = iconCopy}, timeoutIcon) +} + +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 COPYBUTTON_SELECTOR = 'div.highlight pre'; + const codeCells = document.querySelectorAll(COPYBUTTON_SELECTOR) + codeCells.forEach((codeCell, index) => { + const id = codeCellId(index) + codeCell.setAttribute('id', id) + + const clipboardButton = id => + `` + codeCell.insertAdjacentHTML('afterend', clipboardButton(id)) + }) + +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// 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); + + // get filtered text + let exclude = '.linenos'; + + let text = filterText(target, exclude); + return formatCopyText(text, '', 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) \ No newline at end of file diff --git a/docs/_static/copybutton_funcs.js b/docs/_static/copybutton_funcs.js new file mode 100644 index 0000000..dbe1aaa --- /dev/null +++ b/docs/_static/copybutton_funcs.js @@ -0,0 +1,73 @@ +function escapeRegExp(string) { + return string.replace(/[.*+?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string +} + +/** + * Removes excluded text from a Node. + * + * @param {Node} target Node to filter. + * @param {string} exclude CSS selector of nodes to exclude. + * @returns {DOMString} Text from `target` with text removed. + */ +export function filterText(target, exclude) { + const clone = target.cloneNode(true); // clone as to not modify the live DOM + if (exclude) { + // remove excluded nodes + clone.querySelectorAll(exclude).forEach(node => node.remove()); + } + return clone.innerText; +} + +// 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 +} diff --git a/docs/_static/custom.css b/docs/_static/custom.css new file mode 100644 index 0000000..603b20f --- /dev/null +++ b/docs/_static/custom.css @@ -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; +} diff --git a/docs/_static/debug.css b/docs/_static/debug.css new file mode 100644 index 0000000..74d4aec --- /dev/null +++ b/docs/_static/debug.css @@ -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; +} diff --git a/docs/_static/doctools.js b/docs/_static/doctools.js new file mode 100644 index 0000000..0398ebb --- /dev/null +++ b/docs/_static/doctools.js @@ -0,0 +1,149 @@ +/* + * Base JavaScript utilities for all Sphinx HTML documentation. + */ +"use strict"; + +const BLACKLISTED_KEY_CONTROL_ELEMENTS = new Set([ + "TEXTAREA", + "INPUT", + "SELECT", + "BUTTON", +]); + +const _ready = (callback) => { + if (document.readyState !== "loading") { + callback(); + } else { + document.addEventListener("DOMContentLoaded", callback); + } +}; + +/** + * Small JavaScript module for the documentation. + */ +const Documentation = { + init: () => { + Documentation.initDomainIndexTable(); + Documentation.initOnKeyListeners(); + }, + + /** + * i18n support + */ + TRANSLATIONS: {}, + PLURAL_EXPR: (n) => (n === 1 ? 0 : 1), + LOCALE: "unknown", + + // gettext and ngettext don't access this so that the functions + // can safely bound to a different name (_ = Documentation.gettext) + gettext: (string) => { + const translated = Documentation.TRANSLATIONS[string]; + switch (typeof translated) { + case "undefined": + return string; // no translation + case "string": + return translated; // translation exists + default: + return translated[0]; // (singular, plural) translation tuple exists + } + }, + + ngettext: (singular, plural, n) => { + const translated = Documentation.TRANSLATIONS[singular]; + if (typeof translated !== "undefined") + return translated[Documentation.PLURAL_EXPR(n)]; + return n === 1 ? singular : plural; + }, + + addTranslations: (catalog) => { + Object.assign(Documentation.TRANSLATIONS, catalog.messages); + Documentation.PLURAL_EXPR = new Function( + "n", + `return (${catalog.plural_expr})` + ); + Documentation.LOCALE = catalog.locale; + }, + + /** + * helper function to focus on search bar + */ + focusSearchBar: () => { + document.querySelectorAll("input[name=q]")[0]?.focus(); + }, + + /** + * Initialise the domain index toggle buttons + */ + initDomainIndexTable: () => { + const toggler = (el) => { + const idNumber = el.id.substr(7); + const toggledRows = document.querySelectorAll(`tr.cg-${idNumber}`); + 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 { + el.src = `${el.src.substr(0, el.src.length - 8)}minus.png`; + toggledRows.forEach((el) => (el.style.display = "")); + } + }; + + const togglerElements = document.querySelectorAll("img.toggler"); + togglerElements.forEach((el) => + el.addEventListener("click", (event) => toggler(event.currentTarget)) + ); + togglerElements.forEach((el) => (el.style.display = "")); + if (DOCUMENTATION_OPTIONS.COLLAPSE_INDEX) togglerElements.forEach(toggler); + }, + + initOnKeyListeners: () => { + // only install a listener if it is really needed + if ( + !DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS && + !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.altKey || event.ctrlKey || event.metaKey) return; + + if (!event.shiftKey) { + switch (event.key) { + case "ArrowLeft": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + const prevLink = document.querySelector('link[rel="prev"]'); + if (prevLink && prevLink.href) { + window.location.href = prevLink.href; + event.preventDefault(); + } + break; + case "ArrowRight": + if (!DOCUMENTATION_OPTIONS.NAVIGATION_WITH_KEYS) break; + + 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 +const _ = Documentation.gettext; + +_ready(Documentation.init); diff --git a/docs/_static/documentation_options.js b/docs/_static/documentation_options.js new file mode 100644 index 0000000..d0fab5f --- /dev/null +++ b/docs/_static/documentation_options.js @@ -0,0 +1,13 @@ +const DOCUMENTATION_OPTIONS = { + VERSION: '1.0.5', + LANGUAGE: 'en', + COLLAPSE_INDEX: false, + BUILDER: 'html', + FILE_SUFFIX: '.html', + LINK_SUFFIX: '.html', + HAS_SOURCE: true, + SOURCELINK_SUFFIX: '.txt', + NAVIGATION_WITH_KEYS: false, + SHOW_SEARCH_SUMMARY: true, + ENABLE_SEARCH_SHORTCUTS: true, +}; \ No newline at end of file diff --git a/docs/_static/file.png b/docs/_static/file.png new file mode 100644 index 0000000..a858a41 Binary files /dev/null and b/docs/_static/file.png differ diff --git a/docs/_static/language_data.js b/docs/_static/language_data.js new file mode 100644 index 0000000..c7fe6c6 --- /dev/null +++ b/docs/_static/language_data.js @@ -0,0 +1,192 @@ +/* + * This script contains the language-specific data used by searchtools.js, + * namely the list of stopwords, stemmer, scorer and splitter. + */ + +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, if available */ + +/** + * Porter Stemmer + */ +var Stemmer = function() { + + var step2list = { + ational: 'ate', + tional: 'tion', + enci: 'ence', + anci: 'ance', + izer: 'ize', + bli: 'ble', + alli: 'al', + entli: 'ent', + eli: 'e', + ousli: 'ous', + ization: 'ize', + ation: 'ate', + ator: 'ate', + alism: 'al', + iveness: 'ive', + fulness: 'ful', + ousness: 'ous', + aliti: 'al', + iviti: 'ive', + biliti: 'ble', + logi: 'log' + }; + + var step3list = { + icate: 'ic', + ative: '', + alize: 'al', + iciti: 'ic', + ical: 'ic', + ful: '', + ness: '' + }; + + var c = "[^aeiou]"; // consonant + var v = "[aeiouy]"; // vowel + var C = c + "[^aeiouy]*"; // consonant sequence + var V = v + "[aeiou]*"; // vowel sequence + + var mgr0 = "^(" + C + ")?" + V + C; // [C]VC... is m>0 + var meq1 = "^(" + C + ")?" + V + C + "(" + V + ")?$"; // [C]VC[V] is m=1 + var mgr1 = "^(" + C + ")?" + V + C + V + C; // [C]VCVC... is m>1 + var s_v = "^(" + C + ")?" + v; // vowel in stem + + this.stemWord = function (w) { + var stem; + var suffix; + var firstch; + var origword = w; + + if (w.length < 3) + return w; + + var re; + var re2; + var re3; + var re4; + + firstch = w.substr(0,1); + if (firstch == "y") + w = firstch.toUpperCase() + w.substr(1); + + // Step 1a + re = /^(.+?)(ss|i)es$/; + re2 = /^(.+?)([^s])s$/; + + if (re.test(w)) + w = w.replace(re,"$1$2"); + else if (re2.test(w)) + w = w.replace(re2,"$1$2"); + + // Step 1b + re = /^(.+?)eed$/; + re2 = /^(.+?)(ed|ing)$/; + if (re.test(w)) { + var fp = re.exec(w); + re = new RegExp(mgr0); + if (re.test(fp[1])) { + re = /.$/; + w = w.replace(re,""); + } + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1]; + re2 = new RegExp(s_v); + if (re2.test(stem)) { + w = stem; + re2 = /(at|bl|iz)$/; + re3 = new RegExp("([^aeiouylsz])\\1$"); + re4 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re2.test(w)) + w = w + "e"; + else if (re3.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + else if (re4.test(w)) + w = w + "e"; + } + } + + // Step 1c + re = /^(.+?)y$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(s_v); + if (re.test(stem)) + w = stem + "i"; + } + + // Step 2 + re = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step2list[suffix]; + } + + // Step 3 + re = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + suffix = fp[2]; + re = new RegExp(mgr0); + if (re.test(stem)) + w = stem + step3list[suffix]; + } + + // Step 4 + re = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/; + re2 = /^(.+?)(s|t)(ion)$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + if (re.test(stem)) + w = stem; + } + else if (re2.test(w)) { + var fp = re2.exec(w); + stem = fp[1] + fp[2]; + re2 = new RegExp(mgr1); + if (re2.test(stem)) + w = stem; + } + + // Step 5 + re = /^(.+?)e$/; + if (re.test(w)) { + var fp = re.exec(w); + stem = fp[1]; + re = new RegExp(mgr1); + re2 = new RegExp(meq1); + re3 = new RegExp("^" + C + v + "[^aeiouwxy]$"); + if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) + w = stem; + } + re = /ll$/; + re2 = new RegExp(mgr1); + if (re.test(w) && re2.test(w)) { + re = /.$/; + w = w.replace(re,""); + } + + // and turn initial Y back to y + if (firstch == "y") + w = firstch.toLowerCase() + w.substr(1); + return w; + } +} + diff --git a/docs/_static/minus.png b/docs/_static/minus.png new file mode 100644 index 0000000..d96755f Binary files /dev/null and b/docs/_static/minus.png differ diff --git a/docs/_static/plus.png b/docs/_static/plus.png new file mode 100644 index 0000000..7107cec Binary files /dev/null and b/docs/_static/plus.png differ diff --git a/docs/_static/pygments.css b/docs/_static/pygments.css new file mode 100644 index 0000000..9d1083b --- /dev/null +++ b/docs/_static/pygments.css @@ -0,0 +1,250 @@ +.highlight pre { line-height: 125%; } +.highlight td.linenos .normal { 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; } +.highlight td.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: #fdf2e2 } +.highlight { background: #f2f2f2; color: #1E1E1E } +.highlight .c { color: #515151 } /* Comment */ +.highlight .err { color: #D71835 } /* Error */ +.highlight .k { color: #8045E5 } /* Keyword */ +.highlight .l { color: #7F4707 } /* Literal */ +.highlight .n { color: #1E1E1E } /* Name */ +.highlight .o { color: #163 } /* Operator */ +.highlight .p { color: #1E1E1E } /* Punctuation */ +.highlight .ch { color: #515151 } /* Comment.Hashbang */ +.highlight .cm { color: #515151 } /* Comment.Multiline */ +.highlight .cp { color: #515151 } /* Comment.Preproc */ +.highlight .cpf { color: #515151 } /* Comment.PreprocFile */ +.highlight .c1 { color: #515151 } /* Comment.Single */ +.highlight .cs { color: #515151 } /* Comment.Special */ +.highlight .gd { color: #00749C } /* Generic.Deleted */ +.highlight .ge { font-style: italic } /* Generic.Emph */ +.highlight .gh { color: #00749C } /* Generic.Heading */ +.highlight .gs { font-weight: bold } /* Generic.Strong */ +.highlight .gu { color: #00749C } /* Generic.Subheading */ +.highlight .kc { color: #8045E5 } /* Keyword.Constant */ +.highlight .kd { color: #8045E5 } /* Keyword.Declaration */ +.highlight .kn { color: #8045E5 } /* Keyword.Namespace */ +.highlight .kp { color: #8045E5 } /* Keyword.Pseudo */ +.highlight .kr { color: #8045E5 } /* Keyword.Reserved */ +.highlight .kt { color: #7F4707 } /* Keyword.Type */ +.highlight .ld { color: #7F4707 } /* Literal.Date */ +.highlight .m { color: #7F4707 } /* Literal.Number */ +.highlight .s { color: #163 } /* Literal.String */ +.highlight .na { color: #7F4707 } /* Name.Attribute */ +.highlight .nb { color: #7F4707 } /* Name.Builtin */ +.highlight .nc { color: #00749C } /* Name.Class */ +.highlight .no { color: #00749C } /* Name.Constant */ +.highlight .nd { color: #7F4707 } /* Name.Decorator */ +.highlight .ni { color: #163 } /* Name.Entity */ +.highlight .ne { color: #8045E5 } /* Name.Exception */ +.highlight .nf { color: #00749C } /* Name.Function */ +.highlight .nl { color: #7F4707 } /* Name.Label */ +.highlight .nn { color: #1E1E1E } /* Name.Namespace */ +.highlight .nx { color: #1E1E1E } /* Name.Other */ +.highlight .py { color: #00749C } /* Name.Property */ +.highlight .nt { color: #00749C } /* Name.Tag */ +.highlight .nv { color: #D71835 } /* Name.Variable */ +.highlight .ow { color: #8045E5 } /* Operator.Word */ +.highlight .pm { color: #1E1E1E } /* Punctuation.Marker */ +.highlight .w { color: #1E1E1E } /* Text.Whitespace */ +.highlight .mb { color: #7F4707 } /* Literal.Number.Bin */ +.highlight .mf { color: #7F4707 } /* Literal.Number.Float */ +.highlight .mh { color: #7F4707 } /* Literal.Number.Hex */ +.highlight .mi { color: #7F4707 } /* Literal.Number.Integer */ +.highlight .mo { color: #7F4707 } /* Literal.Number.Oct */ +.highlight .sa { color: #163 } /* Literal.String.Affix */ +.highlight .sb { color: #163 } /* Literal.String.Backtick */ +.highlight .sc { color: #163 } /* Literal.String.Char */ +.highlight .dl { color: #163 } /* Literal.String.Delimiter */ +.highlight .sd { color: #163 } /* Literal.String.Doc */ +.highlight .s2 { color: #163 } /* Literal.String.Double */ +.highlight .se { color: #163 } /* Literal.String.Escape */ +.highlight .sh { color: #163 } /* Literal.String.Heredoc */ +.highlight .si { color: #163 } /* Literal.String.Interpol */ +.highlight .sx { color: #163 } /* Literal.String.Other */ +.highlight .sr { color: #D71835 } /* Literal.String.Regex */ +.highlight .s1 { color: #163 } /* Literal.String.Single */ +.highlight .ss { color: #00749C } /* Literal.String.Symbol */ +.highlight .bp { color: #7F4707 } /* Name.Builtin.Pseudo */ +.highlight .fm { color: #00749C } /* Name.Function.Magic */ +.highlight .vc { color: #D71835 } /* Name.Variable.Class */ +.highlight .vg { color: #D71835 } /* Name.Variable.Global */ +.highlight .vi { color: #D71835 } /* Name.Variable.Instance */ +.highlight .vm { color: #7F4707 } /* Name.Variable.Magic */ +.highlight .il { color: #7F4707 } /* 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: #FF3A3A; 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: #FF3A3A } /* Generic.Deleted */ +body[data-theme="dark"] .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ +body[data-theme="dark"] .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body[data-theme="dark"] .highlight .gr { color: #FF3A3A } /* Generic.Error */ +body[data-theme="dark"] .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ +body[data-theme="dark"] .highlight .gi { color: #589819 } /* Generic.Inserted */ +body[data-theme="dark"] .highlight .go { color: #CCC } /* Generic.Output */ +body[data-theme="dark"] .highlight .gp { color: #AAA } /* Generic.Prompt */ +body[data-theme="dark"] .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ +body[data-theme="dark"] .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ +body[data-theme="dark"] .highlight .gt { color: #FF3A3A } /* 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: #BBB } /* 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: #BBB } /* 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: #666 } /* 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: #FF3A3A; 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: #FF3A3A } /* Generic.Deleted */ +body:not([data-theme="light"]) .highlight .ge { color: #D0D0D0; font-style: italic } /* Generic.Emph */ +body:not([data-theme="light"]) .highlight .ges { color: #D0D0D0; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ +body:not([data-theme="light"]) .highlight .gr { color: #FF3A3A } /* Generic.Error */ +body:not([data-theme="light"]) .highlight .gh { color: #FFF; font-weight: bold } /* Generic.Heading */ +body:not([data-theme="light"]) .highlight .gi { color: #589819 } /* Generic.Inserted */ +body:not([data-theme="light"]) .highlight .go { color: #CCC } /* Generic.Output */ +body:not([data-theme="light"]) .highlight .gp { color: #AAA } /* Generic.Prompt */ +body:not([data-theme="light"]) .highlight .gs { color: #D0D0D0; font-weight: bold } /* Generic.Strong */ +body:not([data-theme="light"]) .highlight .gu { color: #FFF; text-decoration: underline } /* Generic.Subheading */ +body:not([data-theme="light"]) .highlight .gt { color: #FF3A3A } /* 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: #BBB } /* 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: #BBB } /* 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: #666 } /* 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 */ +} +} \ No newline at end of file diff --git a/docs/_static/rns_logo_512.png b/docs/_static/rns_logo_512.png new file mode 100644 index 0000000..ba3940a Binary files /dev/null and b/docs/_static/rns_logo_512.png differ diff --git a/docs/_static/scripts/furo-extensions.js b/docs/_static/scripts/furo-extensions.js new file mode 100644 index 0000000..e69de29 diff --git a/docs/_static/scripts/furo.js b/docs/_static/scripts/furo.js new file mode 100644 index 0000000..87e1767 --- /dev/null +++ b/docs/_static/scripts/furo.js @@ -0,0 +1,3 @@ +/*! For license information please see furo.js.LICENSE.txt */ +(()=>{var t={856: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)=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(856),e=n.n(t),o=null,r=null,c=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;(function(t){t>0?r.classList.add("scrolled"):r.classList.remove("scrolled")})(n=t),function(t){t<64?document.documentElement.classList.remove("show-back-to-top"):tc&&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);const e=r.getBoundingClientRect();return e.top+e.height+2.5*t+1}})}document.addEventListener("DOMContentLoaded",function(){document.body.parentNode.classList.remove("no-js"),r=document.querySelector("header"),o=document.querySelector(".toc-scroll"),l()})})()})(); +//# sourceMappingURL=furo.js.map \ No newline at end of file diff --git a/docs/_static/scripts/furo.js.map b/docs/_static/scripts/furo.js.map new file mode 100644 index 0000000..3b316f3 --- /dev/null +++ b/docs/_static/scripts/furo.js.map @@ -0,0 +1 @@ +{"version":3,"file":"scripts/furo.js","mappings":";iCAAA,MAQWA,SAWS,IAAX,EAAAC,EACH,EAAAA,EACkB,oBAAXC,OACLA,OACAC,KAbO,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,EAVgB,CAWrC,EAOIK,EAAe,SAAUR,GAC3B,IAAIS,EAAW,EACf,GAAIT,EAAKU,aACP,KAAOV,GACLS,GAAYT,EAAKW,UACjBX,EAAOA,EAAKU,aAGhB,OAAOD,GAAY,EAAIA,EAAW,CACpC,EAMIG,EAAe,SAAUC,GACvBA,GACFA,EAASC,KAAK,SAAUC,EAAOC,GAG7B,OAFcR,EAAaO,EAAME,SACnBT,EAAaQ,EAAMC,UACF,EACxB,CACT,EAEJ,EAwCIC,EAAW,SAAUlB,EAAME,EAAUiB,GACvC,IAAIC,EAASpB,EAAKqB,wBACd1B,EAnCU,SAAUO,GAExB,MAA+B,mBAApBA,EAASP,OACX2B,WAAWpB,EAASP,UAItB2B,WAAWpB,EAASP,OAC7B,CA2Be4B,CAAUrB,GACvB,OAAIiB,EAEAK,SAASJ,EAAOD,OAAQ,KACvB/B,EAAOqC,aAAeC,SAASC,gBAAgBC,cAG7CJ,SAASJ,EAAOS,IAAK,KAAOlC,CACrC,EAMImC,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,aAkC7B,EAmBIU,EAAY,SAAUzB,EAAUX,GAClC,IAAIqC,EAAO1B,EAASA,EAAS2B,OAAS,GACtC,GAbgB,SAAUC,EAAMvC,GAChC,SAAI4B,MAAgBZ,EAASuB,EAAKxB,QAASf,GAAU,GAEvD,CAUMwC,CAAYH,EAAMrC,GAAW,OAAOqC,EACxC,IAAK,IAAII,EAAI9B,EAAS2B,OAAS,EAAGG,GAAK,EAAGA,IACxC,GAAIzB,EAASL,EAAS8B,GAAG1B,QAASf,GAAW,OAAOW,EAAS8B,EAEjE,EAOIC,EAAmB,SAAUC,EAAK3C,GAEpC,GAAKA,EAAST,QAAWoD,EAAIC,WAA7B,CAGA,IAAIC,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUC,OAAOhD,EAASR,aAG7BkD,EAAiBG,EAAI7C,GAV0B,CAWjD,EAOIiD,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,IAjBM,CAmBpB,EAOIoD,EAAiB,SAAUT,EAAK3C,GAElC,GAAKA,EAAST,OAAd,CAGA,IAAIsD,EAAKF,EAAIC,WAAWE,QAAQ,MAC3BD,IAGLA,EAAGE,UAAUM,IAAIrD,EAASR,aAG1B4D,EAAeP,EAAI7C,GAVS,CAW9B,EA6LA,OA1JkB,SAAUsD,EAAUC,GAKpC,IACIC,EAAU7C,EAAU8C,EAASC,EAAS1D,EADtC2D,EAAa,CAUjBA,MAAmB,WAEjBH,EAAWhC,SAASoC,iBAAiBN,GAGrC3C,EAAW,GAGXkD,MAAMC,UAAUC,QAAQC,KAAKR,EAAU,SAAUjB,GAE/C,IAAIxB,EAAUS,SAASyC,eACrBC,mBAAmB3B,EAAK4B,KAAKC,OAAO,KAEjCrD,GAGLJ,EAAS0D,KAAK,CACZ1B,IAAKJ,EACLxB,QAASA,GAEb,GAGAL,EAAaC,EACf,EAKAgD,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,IAjBM,CAmBpB,CAqEIuE,CAASD,EAAQtE,GAGjByD,EAAUa,GAfJb,IACFR,EAAWQ,EAASzD,GACpByD,EAAU,KAchB,GAMIe,EAAgB,SAAUvE,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,sBAAsBf,EAAWgB,OACpD,EAMIC,EAAgB,SAAU3E,GAExByD,GACFxE,EAAOuF,qBAAqBf,GAI9BA,EAAUxE,EAAOwF,sBAAsB,WACrChE,EAAaC,GACbgD,EAAWgB,QACb,EACF,EAkDA,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,IACb,EAOEA,EA3XS,WACX,IAAI+E,EAAS,CAAC,EAOd,OANAlB,MAAMC,UAAUC,QAAQC,KAAKgB,UAAW,SAAUC,GAChD,IAAK,IAAIC,KAAOD,EAAK,CACnB,IAAKA,EAAIE,eAAeD,GAAM,OAC9BH,EAAOG,GAAOD,EAAIC,EACpB,CACF,GACOH,CACT,CAkXeK,CAAOhG,EAAUmE,GAAW,CAAC,GAGxCI,EAAW0B,QAGX1B,EAAWgB,SAGXzF,EAAOoG,iBAAiB,SAAUd,GAAe,GAC7CxE,EAASN,QACXR,EAAOoG,iBAAiB,SAAUV,GAAe,GAS9CjB,CACT,CAOF,CArcW4B,CAAQvG,EAChB,UAFM,SAEN,oB,GCXDwG,EAA2B,CAAC,EAGhC,SAASC,EAAoBC,GAE5B,IAAIC,EAAeH,EAAyBE,GAC5C,QAAqBE,IAAjBD,EACH,OAAOA,EAAaE,QAGrB,IAAIC,EAASN,EAAyBE,GAAY,CAGjDG,QAAS,CAAC,GAOX,OAHAE,EAAoBL,GAAU1B,KAAK8B,EAAOD,QAASC,EAAQA,EAAOD,QAASJ,GAGpEK,EAAOD,OACf,CCrBAJ,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,EAChB,CAAE,MAAOC,GACR,GAAsB,iBAAX3H,OAAqB,OAAOA,MACxC,CACA,CAPuB,GCAxBuG,EAAoBa,EAAI,CAACrB,EAAK6B,IAAUP,OAAOzC,UAAUqB,eAAenB,KAAKiB,EAAK6B,G,yCCK9EC,EAAY,KACZC,EAAS,KACTC,EAAgBzF,SAASC,gBAAgByF,UA4E7C,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,UA0B5B,CAmDA,SAASlC,KART,WAEE,MAAM2C,EAAUxG,SAASyG,uBAAuB,gBAChDpE,MAAMqE,KAAKF,GAASjE,QAASoE,IAC3BA,EAAI7C,iBAAiB,QAAS6B,IAElC,CAGEiB,GA/CF,WAEE,IAAIC,EAA6B,EAC7BC,GAAU,EAEdpJ,OAAOoG,iBAAiB,SAAU,SAAUuB,GAC1CwB,EAA6BnJ,OAAOqJ,QAE/BD,IACHpJ,OAAOwF,sBAAsB,WAzDnC,IAAuB8D,GArDvB,SAAgCA,GAC1BA,EAAY,EACdxB,EAAOjE,UAAUM,IAAI,YAErB2D,EAAOjE,UAAUC,OAAO,WAE5B,EAgDEyF,CADqBD,EA0DDH,GAvGtB,SAAmCG,GAC7BA,EAXmB,GAYrBhH,SAASC,gBAAgBsB,UAAUC,OAAO,oBAEtCwF,EAAYvB,EACdzF,SAASC,gBAAgBsB,UAAUM,IAAI,oBAC9BmF,EAAYvB,GACrBzF,SAASC,gBAAgBsB,UAAUC,OAAO,oBAG9CiE,EAAgBuB,CAClB,CAoCEE,CAA0BF,GAlC5B,SAA6BA,GACT,OAAdzB,IAKa,GAAbyB,EACFzB,EAAU4B,SAAS,EAAG,GAGtB9G,KAAKC,KAAK0G,IACV3G,KAAK+G,MAAMpH,SAASC,gBAAgBS,aAAehD,OAAOqC,aAE1DwF,EAAU4B,SAAS,EAAG5B,EAAU7E,cAGhBV,SAASqH,cAAc,mBAc3C,CAKEC,CAAoBN,GAwDdF,GAAU,CACZ,GAEAA,GAAU,EAEd,GACApJ,OAAO6J,QACT,CA8BEC,GA3BkB,OAAdjC,GAKJ,IAAI,IAAJ,CAAY,cAAe,CACzBrH,QAAQ,EACRuJ,WAAW,EACX5J,SAAU,iBACVI,OAAQ,KACN,IAAIyJ,EAAM9H,WAAW+H,iBAAiB3H,SAASC,iBAAiB2H,UAChE,MAAMC,EAAarC,EAAO7F,wBAC1B,OAAOkI,EAAW1H,IAAM0H,EAAWC,OAAS,IAAMJ,EAAM,IAiB9D,CAcA1H,SAAS8D,iBAAiB,mBAT1B,WACE9D,SAASS,KAAKW,WAAWG,UAAUC,OAAO,SAE1CgE,EAASxF,SAASqH,cAAc,UAChC9B,EAAYvF,SAASqH,cAAc,eAEnCxD,GACF,E","sources":["webpack:///./src/furo/assets/scripts/gumshoe-patched.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/global","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///./src/furo/assets/scripts/furo.js"],"sourcesContent":["/*!\n * gumshoejs v5.1.2 (patched by @pradyunsg)\n * A simple, framework-agnostic scrollspy script.\n * (c) 2019 Chris Ferdinandi\n * MIT License\n * http://github.com/cferdinandi/gumshoe\n */\n\n(function (root, factory) {\n if (typeof define === \"function\" && define.amd) {\n define([], function () {\n return factory(root);\n });\n } else if (typeof exports === \"object\") {\n module.exports = factory(root);\n } else {\n root.Gumshoe = factory(root);\n }\n})(\n typeof global !== \"undefined\"\n ? global\n : typeof window !== \"undefined\"\n ? window\n : this,\n function (window) {\n \"use strict\";\n\n //\n // Defaults\n //\n\n var defaults = {\n // Active classes\n navClass: \"active\",\n contentClass: \"active\",\n\n // Nested navigation\n nested: false,\n nestedClass: \"active\",\n\n // Offset & reflow\n offset: 0,\n reflow: false,\n\n // Event support\n events: true,\n };\n\n //\n // Methods\n //\n\n /**\n * Merge two or more objects together.\n * @param {Object} objects The objects to merge together\n * @returns {Object} Merged values of defaults and options\n */\n var extend = function () {\n var merged = {};\n Array.prototype.forEach.call(arguments, function (obj) {\n for (var key in obj) {\n if (!obj.hasOwnProperty(key)) return;\n merged[key] = obj[key];\n }\n });\n return merged;\n };\n\n /**\n * Emit a custom event\n * @param {String} type The event type\n * @param {Node} elem The element to attach the event to\n * @param {Object} detail Any details to pass along with the event\n */\n var emitEvent = function (type, elem, detail) {\n // Make sure events are enabled\n if (!detail.settings.events) return;\n\n // Create a new event\n var event = new CustomEvent(type, {\n bubbles: true,\n cancelable: true,\n detail: detail,\n });\n\n // Dispatch the event\n elem.dispatchEvent(event);\n };\n\n /**\n * Get an element's distance from the top of the Document.\n * @param {Node} elem The element\n * @return {Number} Distance from the top in pixels\n */\n var getOffsetTop = function (elem) {\n var location = 0;\n if (elem.offsetParent) {\n while (elem) {\n location += elem.offsetTop;\n elem = elem.offsetParent;\n }\n }\n return location >= 0 ? location : 0;\n };\n\n /**\n * Sort content from first to last in the DOM\n * @param {Array} contents The content areas\n */\n var sortContents = function (contents) {\n if (contents) {\n contents.sort(function (item1, item2) {\n var offset1 = getOffsetTop(item1.content);\n var offset2 = getOffsetTop(item2.content);\n if (offset1 < offset2) return -1;\n return 1;\n });\n }\n };\n\n /**\n * Get the offset to use for calculating position\n * @param {Object} settings The settings for this instantiation\n * @return {Float} The number of pixels to offset the calculations\n */\n var getOffset = function (settings) {\n // if the offset is a function run it\n if (typeof settings.offset === \"function\") {\n return parseFloat(settings.offset());\n }\n\n // Otherwise, return it as-is\n return parseFloat(settings.offset);\n };\n\n /**\n * Get the document element's height\n * @private\n * @returns {Number}\n */\n var getDocumentHeight = function () {\n return Math.max(\n document.body.scrollHeight,\n document.documentElement.scrollHeight,\n document.body.offsetHeight,\n document.documentElement.offsetHeight,\n document.body.clientHeight,\n document.documentElement.clientHeight,\n );\n };\n\n /**\n * Determine if an element is in view\n * @param {Node} elem The element\n * @param {Object} settings The settings for this instantiation\n * @param {Boolean} bottom If true, check if element is above bottom of viewport instead\n * @return {Boolean} Returns true if element is in the viewport\n */\n var isInView = function (elem, settings, bottom) {\n var bounds = elem.getBoundingClientRect();\n var offset = getOffset(settings);\n if (bottom) {\n return (\n parseInt(bounds.bottom, 10) <\n (window.innerHeight || document.documentElement.clientHeight)\n );\n }\n return parseInt(bounds.top, 10) <= offset;\n };\n\n /**\n * Check if at the bottom of the viewport\n * @return {Boolean} If true, page is at the bottom of the viewport\n */\n var isAtBottom = function () {\n if (\n Math.ceil(window.innerHeight + window.pageYOffset) >=\n getDocumentHeight()\n )\n return true;\n return false;\n };\n\n /**\n * Check if the last item should be used (even if not at the top of the page)\n * @param {Object} item The last item\n * @param {Object} settings The settings for this instantiation\n * @return {Boolean} If true, use the last item\n */\n var useLastItem = function (item, settings) {\n if (isAtBottom() && isInView(item.content, settings, true)) return true;\n return false;\n };\n\n /**\n * Get the active content\n * @param {Array} contents The content areas\n * @param {Object} settings The settings for this instantiation\n * @return {Object} The content area and matching navigation link\n */\n var getActive = function (contents, settings) {\n var last = contents[contents.length - 1];\n if (useLastItem(last, settings)) return last;\n for (var i = contents.length - 1; i >= 0; i--) {\n if (isInView(contents[i].content, settings)) return contents[i];\n }\n };\n\n /**\n * Deactivate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var deactivateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested || !nav.parentNode) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Remove the active class\n li.classList.remove(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n deactivateNested(li, settings);\n };\n\n /**\n * Deactivate a nav and content area\n * @param {Object} items The nav item and content to deactivate\n * @param {Object} settings The settings for this instantiation\n */\n var deactivate = function (items, settings) {\n // Make sure there are items to deactivate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Remove the active class from the nav and content\n li.classList.remove(settings.navClass);\n items.content.classList.remove(settings.contentClass);\n\n // Deactivate any parent navs in a nested navigation\n deactivateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeDeactivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Activate parent navs in a nested navigation\n * @param {Node} nav The starting navigation element\n * @param {Object} settings The settings for this instantiation\n */\n var activateNested = function (nav, settings) {\n // If nesting isn't activated, bail\n if (!settings.nested) return;\n\n // Get the parent navigation\n var li = nav.parentNode.closest(\"li\");\n if (!li) return;\n\n // Add the active class\n li.classList.add(settings.nestedClass);\n\n // Apply recursively to any parent navigation elements\n activateNested(li, settings);\n };\n\n /**\n * Activate a nav and content area\n * @param {Object} items The nav item and content to activate\n * @param {Object} settings The settings for this instantiation\n */\n var activate = function (items, settings) {\n // Make sure there are items to activate\n if (!items) return;\n\n // Get the parent list item\n var li = items.nav.closest(\"li\");\n if (!li) return;\n\n // Add the active class to the nav and content\n li.classList.add(settings.navClass);\n items.content.classList.add(settings.contentClass);\n\n // Activate any parent navs in a nested navigation\n activateNested(li, settings);\n\n // Emit a custom event\n emitEvent(\"gumshoeActivate\", li, {\n link: items.nav,\n content: items.content,\n settings: settings,\n });\n };\n\n /**\n * Create the Constructor object\n * @param {String} selector The selector to use for navigation items\n * @param {Object} options User options and settings\n */\n var Constructor = function (selector, options) {\n //\n // Variables\n //\n\n var publicAPIs = {};\n var navItems, contents, current, timeout, settings;\n\n //\n // Methods\n //\n\n /**\n * Set variables from DOM elements\n */\n publicAPIs.setup = function () {\n // Get all nav items\n navItems = document.querySelectorAll(selector);\n\n // Create contents array\n contents = [];\n\n // Loop through each item, get it's matching content, and push to the array\n Array.prototype.forEach.call(navItems, function (item) {\n // Get the content for the nav item\n var content = document.getElementById(\n decodeURIComponent(item.hash.substr(1)),\n );\n if (!content) return;\n\n // Push to the contents array\n contents.push({\n nav: item,\n content: content,\n });\n });\n\n // Sort contents by the order they appear in the DOM\n sortContents(contents);\n };\n\n /**\n * Detect which content is currently active\n */\n publicAPIs.detect = function () {\n // Get the active content\n var active = getActive(contents, settings);\n\n // if there's no active content, deactivate and bail\n if (!active) {\n if (current) {\n deactivate(current, settings);\n current = null;\n }\n return;\n }\n\n // If the active content is the one currently active, do nothing\n if (current && active.content === current.content) return;\n\n // Deactivate the current content and activate the new content\n deactivate(current, settings);\n activate(active, settings);\n\n // Update the currently active content\n current = active;\n };\n\n /**\n * Detect the active content on scroll\n * Debounced for performance\n */\n var scrollHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(publicAPIs.detect);\n };\n\n /**\n * Update content sorting on resize\n * Debounced for performance\n */\n var resizeHandler = function (event) {\n // If there's a timer, cancel it\n if (timeout) {\n window.cancelAnimationFrame(timeout);\n }\n\n // Setup debounce callback\n timeout = window.requestAnimationFrame(function () {\n sortContents(contents);\n publicAPIs.detect();\n });\n };\n\n /**\n * Destroy the current instantiation\n */\n publicAPIs.destroy = function () {\n // Undo DOM changes\n if (current) {\n deactivate(current, settings);\n }\n\n // Remove event listeners\n window.removeEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.removeEventListener(\"resize\", resizeHandler, false);\n }\n\n // Reset variables\n contents = null;\n navItems = null;\n current = null;\n timeout = null;\n settings = null;\n };\n\n /**\n * Initialize the current instantiation\n */\n var init = function () {\n // Merge user options into defaults\n settings = extend(defaults, options || {});\n\n // Setup variables based on the current DOM\n publicAPIs.setup();\n\n // Find the currently active content\n publicAPIs.detect();\n\n // Setup event listeners\n window.addEventListener(\"scroll\", scrollHandler, false);\n if (settings.reflow) {\n window.addEventListener(\"resize\", resizeHandler, false);\n }\n };\n\n //\n // Initialize and return the public APIs\n //\n\n init();\n return publicAPIs;\n };\n\n //\n // Return the Constructor\n //\n\n return Constructor;\n },\n);\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","import Gumshoe from \"./gumshoe-patched.js\";\n\n////////////////////////////////////////////////////////////////////////////////\n// Scroll Handling\n////////////////////////////////////////////////////////////////////////////////\nvar tocScroll = null;\nvar header = null;\nvar lastScrollTop = document.documentElement.scrollTop;\nconst GO_TO_TOP_OFFSET = 64;\n\nfunction scrollHandlerForHeader(positionY) {\n if (positionY > 0) {\n header.classList.add(\"scrolled\");\n } else {\n header.classList.remove(\"scrolled\");\n }\n}\n\nfunction scrollHandlerForBackToTop(positionY) {\n if (positionY < GO_TO_TOP_OFFSET) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n } else {\n if (positionY < lastScrollTop) {\n document.documentElement.classList.add(\"show-back-to-top\");\n } else if (positionY > lastScrollTop) {\n document.documentElement.classList.remove(\"show-back-to-top\");\n }\n }\n lastScrollTop = positionY;\n}\n\nfunction scrollHandlerForTOC(positionY) {\n if (tocScroll === null) {\n return;\n }\n\n // top of page.\n if (positionY == 0) {\n tocScroll.scrollTo(0, 0);\n } else if (\n // bottom of page.\n Math.ceil(positionY) >=\n Math.floor(document.documentElement.scrollHeight - window.innerHeight)\n ) {\n tocScroll.scrollTo(0, tocScroll.scrollHeight);\n } else {\n // somewhere in the middle.\n const current = document.querySelector(\".scroll-current\");\n if (current == null) {\n return;\n }\n\n // https://github.com/pypa/pip/issues/9159 This breaks scroll behaviours.\n // // scroll the currently \"active\" heading in toc, into view.\n // const rect = current.getBoundingClientRect();\n // if (0 > rect.top) {\n // current.scrollIntoView(true); // the argument is \"alignTop\"\n // } else if (rect.bottom > window.innerHeight) {\n // current.scrollIntoView(false);\n // }\n }\n}\n\nfunction scrollHandler(positionY) {\n scrollHandlerForHeader(positionY);\n scrollHandlerForBackToTop(positionY);\n scrollHandlerForTOC(positionY);\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Theme Toggle\n////////////////////////////////////////////////////////////////////////////////\nfunction setTheme(mode) {\n if (mode !== \"light\" && mode !== \"dark\" && mode !== \"auto\") {\n console.error(`Got invalid theme mode: ${mode}. Resetting to auto.`);\n mode = \"auto\";\n }\n\n document.body.dataset.theme = mode;\n localStorage.setItem(\"theme\", mode);\n console.log(`Changed to ${mode} mode.`);\n}\n\nfunction cycleThemeOnce() {\n const currentTheme = localStorage.getItem(\"theme\") || \"auto\";\n const prefersDark = window.matchMedia(\"(prefers-color-scheme: dark)\").matches;\n\n if (prefersDark) {\n // Auto (dark) -> Light -> Dark\n if (currentTheme === \"auto\") {\n setTheme(\"light\");\n } else if (currentTheme == \"light\") {\n setTheme(\"dark\");\n } else {\n setTheme(\"auto\");\n }\n } else {\n // Auto (light) -> Dark -> Light\n if (currentTheme === \"auto\") {\n setTheme(\"dark\");\n } else if (currentTheme == \"dark\") {\n setTheme(\"light\");\n } else {\n setTheme(\"auto\");\n }\n }\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Setup\n////////////////////////////////////////////////////////////////////////////////\nfunction setupScrollHandler() {\n // Taken from https://developer.mozilla.org/en-US/docs/Web/API/Document/scroll_event\n let last_known_scroll_position = 0;\n let ticking = false;\n\n window.addEventListener(\"scroll\", function (e) {\n last_known_scroll_position = window.scrollY;\n\n if (!ticking) {\n window.requestAnimationFrame(function () {\n scrollHandler(last_known_scroll_position);\n ticking = false;\n });\n\n ticking = true;\n }\n });\n window.scroll();\n}\n\nfunction setupScrollSpy() {\n if (tocScroll === null) {\n return;\n }\n\n // Scrollspy -- highlight table on contents, based on scroll\n new Gumshoe(\".toc-tree a\", {\n reflow: true,\n recursive: true,\n navClass: \"scroll-current\",\n offset: () => {\n let rem = parseFloat(getComputedStyle(document.documentElement).fontSize);\n const headerRect = header.getBoundingClientRect();\n return headerRect.top + headerRect.height + 2.5 * rem + 1;\n },\n });\n}\n\nfunction setupTheme() {\n // Attach event handlers for toggling themes\n const buttons = document.getElementsByClassName(\"theme-toggle\");\n Array.from(buttons).forEach((btn) => {\n btn.addEventListener(\"click\", cycleThemeOnce);\n });\n}\n\nfunction setup() {\n setupTheme();\n setupScrollHandler();\n setupScrollSpy();\n}\n\n////////////////////////////////////////////////////////////////////////////////\n// Main entrypoint\n////////////////////////////////////////////////////////////////////////////////\nfunction main() {\n document.body.parentNode.classList.remove(\"no-js\");\n\n header = document.querySelector(\"header\");\n tocScroll = document.querySelector(\".toc-scroll\");\n\n setup();\n}\n\ndocument.addEventListener(\"DOMContentLoaded\", main);\n"],"names":["root","g","window","this","defaults","navClass","contentClass","nested","nestedClass","offset","reflow","events","emitEvent","type","elem","detail","settings","event","CustomEvent","bubbles","cancelable","dispatchEvent","getOffsetTop","location","offsetParent","offsetTop","sortContents","contents","sort","item1","item2","content","isInView","bottom","bounds","getBoundingClientRect","parseFloat","getOffset","parseInt","innerHeight","document","documentElement","clientHeight","top","isAtBottom","Math","ceil","pageYOffset","max","body","scrollHeight","offsetHeight","getActive","last","length","item","useLastItem","i","deactivateNested","nav","parentNode","li","closest","classList","remove","deactivate","items","link","activateNested","add","selector","options","navItems","current","timeout","publicAPIs","querySelectorAll","Array","prototype","forEach","call","getElementById","decodeURIComponent","hash","substr","push","active","activate","scrollHandler","cancelAnimationFrame","requestAnimationFrame","detect","resizeHandler","destroy","removeEventListener","merged","arguments","obj","key","hasOwnProperty","extend","setup","addEventListener","factory","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","n","getter","__esModule","d","a","definition","o","Object","defineProperty","enumerable","get","globalThis","Function","e","prop","tocScroll","header","lastScrollTop","scrollTop","cycleThemeOnce","currentTheme","localStorage","getItem","mode","matchMedia","matches","console","error","dataset","theme","setItem","log","buttons","getElementsByClassName","from","btn","setupTheme","last_known_scroll_position","ticking","scrollY","positionY","scrollHandlerForHeader","scrollHandlerForBackToTop","scrollTo","floor","querySelector","scrollHandlerForTOC","scroll","setupScrollHandler","recursive","rem","getComputedStyle","fontSize","headerRect","height"],"sourceRoot":""} \ No newline at end of file diff --git a/docs/_static/searchtools.js b/docs/_static/searchtools.js new file mode 100644 index 0000000..91f4be5 --- /dev/null +++ b/docs/_static/searchtools.js @@ -0,0 +1,635 @@ +/* + * Sphinx JavaScript utilities for the full-text search. + */ +"use strict"; + +/** + * Simple result scoring code. + */ +if (typeof Scorer === "undefined") { + var Scorer = { + // Implement the following function to further tweak the score for each result + // The function takes a result array [docname, title, anchor, descr, score, filename] + // and returns the new score. + /* + score: result => { + const [docname, title, anchor, descr, score, filename, kind] = result + return score + }, + */ + + // query matches the full name of an object + objNameMatch: 11, + // or matches in the last dotted part of the object name + objPartialMatch: 6, + // Additive scores depending on the priority of the object + objPrio: { + 0: 15, // used to be importantResults + 1: 5, // used to be objectResults + 2: -5, // used to be unimportantResults + }, + // Used when the priority is not in the mapping. + objPrioDefault: 0, + + // query found in title + title: 15, + partialTitle: 7, + // query found in terms + term: 5, + partialTerm: 2, + }; +} + +// Global search result kind enum, used by themes to style search results. +class SearchResultKind { + static get index() { return "index"; } + static get object() { return "object"; } + static get text() { return "text"; } + static get title() { return "title"; } +} + +const _removeChildren = (element) => { + while (element && element.lastChild) element.removeChild(element.lastChild); +}; + +/** + * 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, highlightTerms) => { + const docBuilder = DOCUMENTATION_OPTIONS.BUILDER; + const docFileSuffix = DOCUMENTATION_OPTIONS.FILE_SUFFIX; + const docLinkSuffix = DOCUMENTATION_OPTIONS.LINK_SUFFIX; + const showSearchSummary = DOCUMENTATION_OPTIONS.SHOW_SEARCH_SUMMARY; + const contentRoot = document.documentElement.dataset.content_root; + + const [docName, title, anchor, descr, score, _filename, kind] = item; + + let listItem = document.createElement("li"); + // Add a class representing the item's type: + // can be used by a theme's CSS selector for styling + // See SearchResultKind for the class names. + listItem.classList.add(`kind-${kind}`); + 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 = contentRoot + dirname; + linkUrl = requestUrl; + } else { + // normal html builders + requestUrl = contentRoot + 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 + ")"; + // highlight search terms in the description + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + } + else if (showSearchSummary) + fetch(requestUrl) + .then((responseData) => responseData.text()) + .then((data) => { + if (data) + listItem.appendChild( + Search.makeSearchSummary(data, searchTerms, anchor) + ); + // highlight search terms in the summary + if (SPHINX_HIGHLIGHT_ENABLED) // set in sphinx_highlight.js + highlightTerms.forEach((term) => _highlightText(listItem, term, "highlighted")); + }); + 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 = Documentation.ngettext( + "Search finished, found one page matching the search query.", + "Search finished, found ${resultCount} pages matching the search query.", + resultCount, + ).replace('${resultCount}', resultCount); +}; +const _displayNextItem = ( + results, + resultCount, + searchTerms, + highlightTerms, +) => { + // 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, highlightTerms); + setTimeout( + () => _displayNextItem(results, resultCount, searchTerms, highlightTerms), + 5 + ); + } + // search finished, update title and status message + else _finishSearch(resultCount); +}; +// Helper function used by query() to order search results. +// Each input is an array of [docname, title, anchor, descr, score, filename, kind]. +// Order the results by score (in opposite order of appearance, since the +// `_displayNextItem` function uses pop() to retrieve items) and then alphabetically. +const _orderResultsByScoreThenName = (a, b) => { + const leftScore = a[4]; + const rightScore = b[4]; + if (leftScore === rightScore) { + // same score: sort alphabetically + const leftTitle = a[1].toLowerCase(); + const rightTitle = b[1].toLowerCase(); + if (leftTitle === rightTitle) return 0; + return leftTitle > rightTitle ? -1 : 1; // inverted is intentional + } + return leftScore > rightScore ? 1 : -1; +}; + +/** + * 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 + */ +const Search = { + _index: null, + _queued_query: null, + _pulse_status: -1, + + htmlToText: (htmlString, anchor) => { + const htmlElement = new DOMParser().parseFromString(htmlString, 'text/html'); + for (const removalQuery of [".headerlink", "script", "style"]) { + htmlElement.querySelectorAll(removalQuery).forEach((el) => { el.remove() }); + } + if (anchor) { + const anchorContent = htmlElement.querySelector(`[role="main"] ${anchor}`); + if (anchorContent) return anchorContent.textContent; + + console.warn( + `Anchored content block not found. Sphinx search tries to obtain it via DOM query '[role=main] ${anchor}'. Check your theme or template.` + ); + } + + // if anchor not specified or not found, fall back to main content + const docContent = htmlElement.querySelector('[role="main"]'); + if (docContent) return docContent.textContent; + + console.warn( + "Content block not found. Sphinx search tries to obtain it via DOM query '[role=main]'. Check your theme or template." + ); + return ""; + }, + + init: () => { + const query = new URLSearchParams(window.location.search).get("q"); + document + .querySelectorAll('input[name="q"]') + .forEach((el) => (el.value = query)); + if (query) Search.performSearch(query); + }, + + loadIndex: (url) => + (document.body.appendChild(document.createElement("script")).src = url), + + setIndex: (index) => { + Search._index = index; + if (Search._queued_query !== null) { + const query = Search._queued_query; + Search._queued_query = null; + Search.query(query); + } + }, + + hasIndex: () => Search._index !== null, + + deferQuery: (query) => (Search._queued_query = query), + + stopPulse: () => (Search._pulse_status = -1), + + startPulse: () => { + if (Search._pulse_status >= 0) return; + + const pulse = () => { + Search._pulse_status = (Search._pulse_status + 1) % 4; + Search.dots.innerText = ".".repeat(Search._pulse_status); + if (Search._pulse_status >= 0) window.setTimeout(pulse, 500); + }; + pulse(); + }, + + /** + * perform a search for something (or wait until index is loaded) + */ + performSearch: (query) => { + // create the required interface elements + const searchText = document.createElement("h2"); + searchText.textContent = _("Searching"); + const searchSummary = document.createElement("p"); + searchSummary.classList.add("search-summary"); + searchSummary.innerText = ""; + const searchList = document.createElement("ul"); + searchList.setAttribute("role", "list"); + searchList.classList.add("search"); + + const out = document.getElementById("search-results"); + 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! + if (Search.hasIndex()) Search.query(query); + else Search.deferQuery(query); + }, + + _parseQuery: (query) => { + // stem the search terms and add them to the correct list + const stemmer = new Stemmer(); + const searchTerms = new Set(); + const excludedTerms = new Set(); + const highlightTerms = new Set(); + const objectTerms = new Set(splitQuery(query.toLowerCase().trim())); + splitQuery(query.trim()).forEach((queryTerm) => { + const queryTermLower = queryTerm.toLowerCase(); + + // maybe skip this "word" + // stopwords array is from language_data.js + if ( + stopwords.indexOf(queryTermLower) !== -1 || + queryTerm.match(/^\d+$/) + ) + return; + + // stem the word + let word = stemmer.stemWord(queryTermLower); + // select the correct list + if (word[0] === "-") excludedTerms.add(word.substr(1)); + else { + searchTerms.add(word); + highlightTerms.add(queryTermLower); + } + }); + + if (SPHINX_HIGHLIGHT_ENABLED) { // set in sphinx_highlight.js + localStorage.setItem("sphinx_highlight_terms", [...highlightTerms].join(" ")) + } + + // console.debug("SEARCH: searching for:"); + // console.info("required: ", [...searchTerms]); + // console.info("excluded: ", [...excludedTerms]); + + return [query, searchTerms, excludedTerms, highlightTerms, objectTerms]; + }, + + /** + * execute search (requires search index to be loaded) + */ + _performSearch: (query, searchTerms, excludedTerms, highlightTerms, objectTerms) => { + 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; + + // Collect multiple result groups to be sorted separately and then ordered. + // Each is an array of [docname, title, anchor, descr, score, filename, kind]. + const normalResults = []; + const nonMainIndexResults = []; + + _removeChildren(document.getElementById("search-progress")); + + const queryLower = query.toLowerCase().trim(); + for (const [title, foundTitles] of Object.entries(allTitles)) { + if (title.toLowerCase().trim().includes(queryLower) && (queryLower.length >= title.length/2)) { + for (const [file, id] of foundTitles) { + const score = Math.round(Scorer.title * queryLower.length / title.length); + const boost = titles[file] === title ? 1 : 0; // add a boost for document titles + normalResults.push([ + docNames[file], + titles[file] !== title ? `${titles[file]} > ${title}` : title, + id !== null ? "#" + id : "", + null, + score + boost, + filenames[file], + SearchResultKind.title, + ]); + } + } + } + + // 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, isMain] of foundEntries) { + const score = Math.round(100 * queryLower.length / entry.length); + const result = [ + docNames[file], + titles[file], + id ? "#" + id : "", + null, + score, + filenames[file], + SearchResultKind.index, + ]; + if (isMain) { + normalResults.push(result); + } else { + nonMainIndexResults.push(result); + } + } + } + } + + // lookup as object + objectTerms.forEach((term) => + normalResults.push(...Search.performObjectSearch(term, objectTerms)) + ); + + // lookup as search terms in fulltext + normalResults.push(...Search.performTermsSearch(searchTerms, excludedTerms)); + + // let the scorer override scores with a custom scoring function + if (Scorer.score) { + normalResults.forEach((item) => (item[4] = Scorer.score(item))); + nonMainIndexResults.forEach((item) => (item[4] = Scorer.score(item))); + } + + // Sort each group of results by score and then alphabetically by name. + normalResults.sort(_orderResultsByScoreThenName); + nonMainIndexResults.sort(_orderResultsByScoreThenName); + + // Combine the result groups in (reverse) order. + // Non-main index entries are typically arbitrary cross-references, + // so display them after other results. + let results = [...nonMainIndexResults, ...normalResults]; + + // 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; + }, []); + + return results.reverse(); + }, + + query: (query) => { + const [searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms] = Search._parseQuery(query); + const results = Search._performSearch(searchQuery, searchTerms, excludedTerms, highlightTerms, objectTerms); + + // for debugging + //Search.lastresults = results.slice(); // a copy + // console.info("search results:", Search.lastresults); + + // print the results + _displayNextItem(results, results.length, searchTerms, highlightTerms); + }, + + /** + * search for object names + */ + performObjectSearch: (object, objectTerms) => { + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const objects = Search._index.objects; + const objNames = Search._index.objnames; + const titles = Search._index.titles; + + const results = []; + + const objectSearchCallback = (prefix, match) => { + const name = match[4] + const fullname = (prefix ? prefix + "." : "") + name; + const fullnameLower = fullname.toLowerCase(); + if (fullnameLower.indexOf(object) < 0) return; + + let score = 0; + const 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.slice(-1)[0] === object) + score += Scorer.objNameMatch; + else if (parts.slice(-1)[0].indexOf(object) > -1) + score += Scorer.objPartialMatch; // matches in last name + + const objName = objNames[match[1]][2]; + 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]], + SearchResultKind.object, + ]); + }; + Object.keys(objects).forEach((prefix) => + objects[prefix].forEach((array) => + objectSearchCallback(prefix, array) + ) + ); + return results; + }, + + /** + * search for full-text terms in the index + */ + performTermsSearch: (searchTerms, excludedTerms) => { + // prepare search + const terms = Search._index.terms; + const titleTerms = Search._index.titleterms; + const filenames = Search._index.filenames; + const docNames = Search._index.docnames; + const titles = Search._index.titles; + + const scoreMap = new Map(); + const fileMap = new Map(); + + // perform the search on the required terms + searchTerms.forEach((word) => { + const files = []; + // find documents, if any, containing the query word in their text/title term indices + // use Object.hasOwnProperty to avoid mismatching against prototype properties + const arr = [ + { files: terms.hasOwnProperty(word) ? terms[word] : undefined, score: Scorer.term }, + { files: titleTerms.hasOwnProperty(word) ? titleTerms[word] : undefined, score: Scorer.title }, + ]; + // add support for partial matches + if (word.length > 2) { + const escapedWord = _escapeRegExp(word); + if (!terms.hasOwnProperty(word)) { + Object.keys(terms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: terms[term], score: Scorer.partialTerm }); + }); + } + if (!titleTerms.hasOwnProperty(word)) { + Object.keys(titleTerms).forEach((term) => { + if (term.match(escapedWord)) + arr.push({ files: titleTerms[term], score: Scorer.partialTitle }); + }); + } + } + + // no match but word was a required one + if (arr.every((record) => record.files === undefined)) return; + + // found search word in contents + arr.forEach((record) => { + if (record.files === undefined) return; + + let recordFiles = record.files; + if (recordFiles.length === undefined) recordFiles = [recordFiles]; + files.push(...recordFiles); + + // set score for the word in each file + recordFiles.forEach((file) => { + if (!scoreMap.has(file)) scoreMap.set(file, new Map()); + const fileScores = scoreMap.get(file); + fileScores.set(word, record.score); + }); + }); + + // create the mapping + files.forEach((file) => { + if (!fileMap.has(file)) fileMap.set(file, [word]); + else if (fileMap.get(file).indexOf(word) === -1) fileMap.get(file).push(word); + }); + }); + + // now check if the files don't contain excluded terms + const results = []; + for (const [file, wordList] of fileMap) { + // check if all requirements are matched + + // as search terms with length < 3 are discarded + const filteredTermCount = [...searchTerms].filter( + (term) => term.length > 2 + ).length; + if ( + wordList.length !== searchTerms.size && + wordList.length !== filteredTermCount + ) + continue; + + // ensure that none of the excluded terms is in the search result + if ( + [...excludedTerms].some( + (term) => + terms[term] === file || + titleTerms[term] === file || + (terms[term] || []).includes(file) || + (titleTerms[term] || []).includes(file) + ) + ) + break; + + // select one (max) score for the file. + const score = Math.max(...wordList.map((w) => scoreMap.get(file).get(w))); + // add result to the result list + results.push([ + docNames[file], + titles[file], + "", + null, + score, + filenames[file], + SearchResultKind.text, + ]); + } + return results; + }, + + /** + * helper function to return a node containing the + * search summary for a given text. keywords is a list + * of stemmed words. + */ + makeSearchSummary: (htmlText, keywords, anchor) => { + const text = Search.htmlToText(htmlText, anchor); + if (text === "") return null; + + const textLower = text.toLowerCase(); + const actualStartPosition = [...keywords] + .map((k) => textLower.indexOf(k.toLowerCase())) + .filter((i) => i > -1) + .slice(-1)[0]; + const startWithContext = Math.max(actualStartPosition - 120, 0); + + const top = startWithContext === 0 ? "" : "..."; + const tail = startWithContext + 240 < text.length ? "..." : ""; + + let summary = document.createElement("p"); + summary.classList.add("context"); + summary.textContent = top + text.substr(startWithContext, 240).trim() + tail; + + return summary; + }, +}; + +_ready(Search.init); diff --git a/docs/_static/skeleton.css b/docs/_static/skeleton.css new file mode 100644 index 0000000..467c878 --- /dev/null +++ b/docs/_static/skeleton.css @@ -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; + } +} diff --git a/docs/_static/sphinx_highlight.js b/docs/_static/sphinx_highlight.js new file mode 100644 index 0000000..8a96c69 --- /dev/null +++ b/docs/_static/sphinx_highlight.js @@ -0,0 +1,154 @@ +/* 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))); + const rest = document.createTextNode(val.substr(pos + text.length)); + parent.insertBefore( + span, + parent.insertBefore( + rest, + node.nextSibling + ) + ); + node.nodeValue = val.substr(0, pos); + /* There may be more occurrences of search term in this node. So call this + * function recursively on the remaining fragment. + */ + _highlight(rest, addItems, text, className); + + 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( + '" + ) + ); + }, + + /** + * 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(() => { + /* Do not call highlightSearchWords() when we are on the search page. + * It will highlight words from the *previous* search query. + */ + if (typeof Search === "undefined") SphinxHighlight.highlightSearchWords(); + SphinxHighlight.initEscapeListener(); +}); diff --git a/docs/_static/styles/furo-extensions.css b/docs/_static/styles/furo-extensions.css new file mode 100644 index 0000000..2d74267 --- /dev/null +++ b/docs/_static/styles/furo-extensions.css @@ -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;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 0s}.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);--tabs--label-border:transparent;--tabs--label-border--hover:var(--color-foreground-muted);--tabs--label-border--active:var(--color-brand-content);--tabs--label-border--active--hover:var(--color-brand-content)}[role=main] .container{max-width:none;padding-left:0;padding-right:0}.shadow.docutils{border:none;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)!important}.sphinx-bs .card{background-color:var(--color-background-secondary);color:var(--color-foreground)} +/*# sourceMappingURL=furo-extensions.css.map*/ \ No newline at end of file diff --git a/docs/_static/styles/furo.css b/docs/_static/styles/furo.css new file mode 100644 index 0000000..592d5bf --- /dev/null +++ b/docs/_static/styles/furo.css @@ -0,0 +1,2 @@ +/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */html{line-height:1.15;-webkit-text-size-adjust:100%}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)}a,blockquote,dl,ol,p,pre,table,ul{page-break-inside:avoid}caption,figure,h1,h2,h3,h4,h5,h6,img{page-break-after:avoid;page-break-inside:avoid}dl,ol,ul{page-break-before:avoid}}.visually-hidden{height:1px!important;margin:-1px!important;overflow:hidden!important;padding:0!important;position:absolute!important;width:1px!important;clip:rect(0,0,0,0)!important;background:var(--color-background-primary);border:0!important;color:var(--color-foreground-primary);white-space:nowrap!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-stack--headings:var(--font-stack);--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,');--icon-pencil:url('data:image/svg+xml;charset=utf-8,');--icon-abstract:url('data:image/svg+xml;charset=utf-8,');--icon-info:url('data:image/svg+xml;charset=utf-8,');--icon-flame:url('data:image/svg+xml;charset=utf-8,');--icon-question:url('data:image/svg+xml;charset=utf-8,');--icon-warning:url('data:image/svg+xml;charset=utf-8,');--icon-failure:url('data:image/svg+xml;charset=utf-8,');--icon-spark:url('data:image/svg+xml;charset=utf-8,');--color-admonition-title--caution:#ff9100;--color-admonition-title-background--caution:rgba(255,145,0,.2);--color-admonition-title--warning:#ff9100;--color-admonition-title-background--warning:rgba(255,145,0,.2);--color-admonition-title--danger:#ff5252;--color-admonition-title-background--danger:rgba(255,82,82,.2);--color-admonition-title--attention:#ff5252;--color-admonition-title-background--attention:rgba(255,82,82,.2);--color-admonition-title--error:#ff5252;--color-admonition-title-background--error:rgba(255,82,82,.2);--color-admonition-title--hint:#00c852;--color-admonition-title-background--hint:rgba(0,200,82,.2);--color-admonition-title--tip:#00c852;--color-admonition-title-background--tip:rgba(0,200,82,.2);--color-admonition-title--important:#00bfa5;--color-admonition-title-background--important:rgba(0,191,165,.2);--color-admonition-title--note:#00b0ff;--color-admonition-title-background--note:rgba(0,176,255,.2);--color-admonition-title--seealso:#448aff;--color-admonition-title-background--seealso:rgba(68,138,255,.2);--color-admonition-title--admonition-todo:grey;--color-admonition-title-background--admonition-todo:hsla(0,0%,50%,.2);--color-admonition-title:#651fff;--color-admonition-title-background:rgba(101,31,255,.2);--icon-admonition-default:var(--icon-abstract);--color-topic-title:#14b8a6;--color-topic-title-background:rgba(20,184,166,.2);--icon-topic-default:var(--icon-pencil);--color-problematic:#b30000;--color-foreground-primary:#000;--color-foreground-secondary:#5a5c63;--color-foreground-muted:#6b6f76;--color-foreground-border:#878787;--color-background-primary:#fff;--color-background-secondary:#f8f9fb;--color-background-hover:#efeff4;--color-background-hover--transparent:#efeff400;--color-background-border:#eeebee;--color-background-item:#ccc;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#0a4bff;--color-brand-content:#2757dd;--color-brand-visited:#872ee0;--color-api-background:var(--color-background-hover--transparent);--color-api-background-hover:var(--color-background-hover);--color-api-overall:var(--color-foreground-secondary);--color-api-name:var(--color-problematic);--color-api-pre-name:var(--color-problematic);--color-api-paren:var(--color-foreground-secondary);--color-api-keyword:var(--color-foreground-primary);--color-api-added:#21632c;--color-api-added-border:#38a84d;--color-api-changed:#046172;--color-api-changed-border:#06a1bc;--color-api-deprecated:#605706;--color-api-deprecated-border:#f0d90f;--color-api-removed:#b30000;--color-api-removed-border:#ff5c5c;--color-highlight-on-target:#ffc;--color-inline-code-background:var(--color-background-secondary);--color-highlighted-background:#def;--color-highlighted-text:var(--color-foreground-primary);--color-guilabel-background:#ddeeff80;--color-guilabel-border:#bedaf580;--color-guilabel-text:var(--color-foreground-primary);--color-admonition-background:transparent;--color-table-header-background:var(--color-background-secondary);--color-table-border:var(--color-background-border);--color-card-border:var(--color-background-secondary);--color-card-background:transparent;--color-card-marginals-background:var(--color-background-secondary);--color-header-background:var(--color-background-primary);--color-header-border:var(--color-background-border);--color-header-text:var(--color-foreground-primary);--color-sidebar-background:var(--color-background-secondary);--color-sidebar-background-border:var(--color-background-border);--color-sidebar-brand-text:var(--color-foreground-primary);--color-sidebar-caption-text:var(--color-foreground-muted);--color-sidebar-link-text:var(--color-foreground-secondary);--color-sidebar-link-text--top-level:var(--color-brand-primary);--color-sidebar-item-background:var(--color-sidebar-background);--color-sidebar-item-background--current:var( --color-sidebar-item-background );--color-sidebar-item-background--hover:linear-gradient(90deg,var(--color-background-hover--transparent) 0%,var(--color-background-hover) var(--sidebar-item-spacing-horizontal),var(--color-background-hover) 100%);--color-sidebar-item-expander-background:transparent;--color-sidebar-item-expander-background--hover:var( --color-background-hover );--color-sidebar-search-text:var(--color-foreground-primary);--color-sidebar-search-background:var(--color-background-secondary);--color-sidebar-search-background--focus:var(--color-background-primary);--color-sidebar-search-border:var(--color-background-border);--color-sidebar-search-icon:var(--color-foreground-muted);--color-toc-background:var(--color-background-primary);--color-toc-title-text:var(--color-foreground-muted);--color-toc-item-text:var(--color-foreground-secondary);--color-toc-item-text--hover:var(--color-foreground-primary);--color-toc-item-text--active:var(--color-brand-primary);--color-content-foreground:var(--color-foreground-primary);--color-content-background:transparent;--color-link:var(--color-brand-content);--color-link-underline:var(--color-background-border);--color-link--hover:var(--color-brand-content);--color-link-underline--hover:var(--color-foreground-border);--color-link--visited:var(--color-brand-visited);--color-link-underline--visited:var(--color-background-border);--color-link--visited--hover:var(--color-brand-visited);--color-link-underline--visited--hover:var(--color-foreground-border)}.only-light{display:block!important}html body .only-dark{display:none!important}@media not print{body[data-theme=dark]{--color-problematic:#ee5151;--color-foreground-primary:#cfd0d0;--color-foreground-secondary:#9ca0a5;--color-foreground-muted:#81868d;--color-foreground-border:#666;--color-background-primary:#131416;--color-background-secondary:#1a1c1e;--color-background-hover:#1e2124;--color-background-hover--transparent:#1e212400;--color-background-border:#303335;--color-background-item:#444;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#3d94ff;--color-brand-content:#5ca5ff;--color-brand-visited:#b27aeb;--color-highlighted-background:#083563;--color-guilabel-background:#08356380;--color-guilabel-border:#13395f80;--color-api-keyword:var(--color-foreground-secondary);--color-highlight-on-target:#330;--color-api-added:#3db854;--color-api-added-border:#267334;--color-api-changed:#09b0ce;--color-api-changed-border:#056d80;--color-api-deprecated:#b1a10b;--color-api-deprecated-border:#6e6407;--color-api-removed:#ff7575;--color-api-removed-border:#b03b3b;--color-admonition-background:#18181a;--color-card-border:var(--color-background-secondary);--color-card-background:#18181a;--color-card-marginals-background:var(--color-background-hover)}html body[data-theme=dark] .only-light{display:none!important}body[data-theme=dark] .only-dark{display:block!important}@media(prefers-color-scheme:dark){body:not([data-theme=light]){--color-problematic:#ee5151;--color-foreground-primary:#cfd0d0;--color-foreground-secondary:#9ca0a5;--color-foreground-muted:#81868d;--color-foreground-border:#666;--color-background-primary:#131416;--color-background-secondary:#1a1c1e;--color-background-hover:#1e2124;--color-background-hover--transparent:#1e212400;--color-background-border:#303335;--color-background-item:#444;--color-announcement-background:#000000dd;--color-announcement-text:#eeebee;--color-brand-primary:#3d94ff;--color-brand-content:#5ca5ff;--color-brand-visited:#b27aeb;--color-highlighted-background:#083563;--color-guilabel-background:#08356380;--color-guilabel-border:#13395f80;--color-api-keyword:var(--color-foreground-secondary);--color-highlight-on-target:#330;--color-api-added:#3db854;--color-api-added-border:#267334;--color-api-changed:#09b0ce;--color-api-changed-border:#056d80;--color-api-deprecated:#b1a10b;--color-api-deprecated-border:#6e6407;--color-api-removed:#ff7575;--color-api-removed-border:#b03b3b;--color-admonition-background:#18181a;--color-card-border:var(--color-background-secondary);--color-card-background:#18181a;--color-card-marginals-background:var(--color-background-hover)}html body:not([data-theme=light]) .only-light{display:none!important}body:not([data-theme=light]) .only-dark{display:block!important}}}body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-light{display:block}@media(prefers-color-scheme:dark){body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-dark{display:block}body[data-theme=auto] .theme-toggle svg.theme-icon-when-auto-light{display:none}}body[data-theme=dark] .theme-toggle svg.theme-icon-when-dark,body[data-theme=light] .theme-toggle svg.theme-icon-when-light{display:block}body{font-family:var(--font-stack)}code,kbd,pre,samp{font-family:var(--font-stack--monospace)}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}article{line-height:1.5}h1,h2,h3,h4,h5,h6{border-radius:.5rem;font-family:var(--font-stack--headings);font-weight:700;line-height:1.25;margin:.5rem -.5rem;padding-left:.5rem;padding-right:.5rem}h1+p,h2+p,h3+p,h4+p,h5+p,h6+p{margin-top:0}h1{font-size:2.5em;margin-bottom:1rem}h1,h2{margin-top:1.75rem}h2{font-size:2em}h3{font-size:1.5em}h4{font-size:1.25em}h5{font-size:1.125em}h6{font-size:1em}small{font-size:80%;opacity:75%}p{margin-bottom:.75rem;margin-top:.5rem}hr.docutils{background-color:var(--color-background-border);border:0;height:1px;margin:2rem 0;padding:0}.centered{text-align:center}a{color:var(--color-link);text-decoration:underline;text-decoration-color:var(--color-link-underline)}a:visited{color:var(--color-link--visited);text-decoration-color:var(--color-link-underline--visited)}a:visited:hover{color:var(--color-link--visited--hover);text-decoration-color:var(--color-link-underline--visited--hover)}a:hover{color:var(--color-link--hover);text-decoration-color:var(--color-link-underline--hover)}a.muted-link{color:inherit}a.muted-link:hover{color:var(--color-link--hover);text-decoration-color:var(--color-link-underline--hover)}a.muted-link:hover:visited{color:var(--color-link--visited--hover);text-decoration-color:var(--color-link-underline--visited--hover)}html{overflow-x:hidden;overflow-y:scroll;scroll-behavior:smooth}.sidebar-scroll,.toc-scroll,article[role=main] *{scrollbar-color:var(--color-foreground-border) transparent;scrollbar-width:thin}body,html{height:100%}.skip-to-content,body,html{background:var(--color-background-primary);color:var(--color-foreground-primary)}.skip-to-content{border-radius:1rem;left:.25rem;padding:1rem;position:fixed;top:.25rem;transform:translateY(-200%);transition:transform .3s ease-in-out;z-index:40}.skip-to-content:focus-within{transform:translateY(0)}article{background:var(--color-content-background);color:var(--color-content-foreground);overflow-wrap:break-word}.page{display:flex;min-height:100%}.mobile-header{background-color:var(--color-header-background);border-bottom:1px solid var(--color-header-border);color:var(--color-header-text);display:none;height:var(--header-height);width:100%;z-index:10}.mobile-header.scrolled{border-bottom:none;box-shadow:0 0 .2rem rgba(0,0,0,.1),0 .2rem .4rem rgba(0,0,0,.2)}.mobile-header .header-center a{color:var(--color-header-text);text-decoration:none}.main{display:flex;flex:1}.sidebar-drawer{background:var(--color-sidebar-background);border-right:1px solid var(--color-sidebar-background-border);box-sizing:border-box;display:flex;justify-content:flex-end;min-width:15em;width:calc(50% - 26em)}.sidebar-container,.toc-drawer{box-sizing:border-box;width:15em}.toc-drawer{background:var(--color-toc-background);padding-right:1rem}.sidebar-sticky,.toc-sticky{display:flex;flex-direction:column;height:min(100%,100vh);height:100vh;position:sticky;top:0}.sidebar-scroll,.toc-scroll{flex-grow:1;flex-shrink:1;overflow:auto;scroll-behavior:smooth}.content{display:flex;flex-direction:column;justify-content:space-between;padding:0 3em;width:46em}.icon{display:inline-block;height:1rem;width:1rem}.icon svg{height:100%;width:100%}.announcement{align-items:center;background-color:var(--color-announcement-background);color:var(--color-announcement-text);display:flex;height:var(--header-height);overflow-x:auto}.announcement+.page{min-height:calc(100% - var(--header-height))}.announcement-content{box-sizing:border-box;min-width:100%;padding:.5rem;text-align:center;white-space:nowrap}.announcement-content a{color:var(--color-announcement-text);text-decoration-color:var(--color-announcement-text)}.announcement-content a:hover{color:var(--color-announcement-text);text-decoration-color:var(--color-link--hover)}.no-js .theme-toggle-container{display:none}.theme-toggle-container{display:flex}.theme-toggle{background:transparent;border:none;cursor:pointer;display:flex;padding:0}.theme-toggle svg{color:var(--color-foreground-primary);display:none;height:1.25rem;width:1.25rem}.theme-toggle-header{align-items:center;display:flex;justify-content:center}.nav-overlay-icon,.toc-overlay-icon{cursor:pointer;display:none}.nav-overlay-icon .icon,.toc-overlay-icon .icon{color:var(--color-foreground-secondary);height:1.5rem;width:1.5rem}.nav-overlay-icon,.toc-header-icon{align-items:center;justify-content:center}.toc-content-icon{height:1.5rem;width:1.5rem}.content-icon-container{display:flex;float:right;gap:.5rem;margin-bottom:1rem;margin-left:1rem;margin-top:1.5rem}.content-icon-container .edit-this-page svg,.content-icon-container .view-this-page svg{color:inherit;height:1.25rem;width:1.25rem}.sidebar-toggle{display:none;position:absolute}.sidebar-toggle[name=__toc]{left:20px}.sidebar-toggle:checked{left:40px}.overlay{background-color:rgba(0,0,0,.54);height:0;opacity:0;position:fixed;top:0;transition:width 0s,height 0s,opacity .25s ease-out;width:0}.sidebar-overlay{z-index:20}.toc-overlay{z-index:40}.sidebar-drawer{transition:left .25s ease-in-out;z-index:30}.toc-drawer{transition:right .25s ease-in-out;z-index:50}#__navigation:checked~.sidebar-overlay{height:100%;opacity:1;width:100%}#__navigation:checked~.page .sidebar-drawer{left:0;top:0}#__toc:checked~.toc-overlay{height:100%;opacity:1;width:100%}#__toc:checked~.page .toc-drawer{right:0;top:0}.back-to-top{background:var(--color-background-primary);border-radius:1rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 1px 0 hsla(220,9%,46%,.502);display:none;font-size:.8125rem;left:0;margin-left:50%;padding:.5rem .75rem .5rem .5rem;position:fixed;text-decoration:none;top:1rem;transform:translateX(-50%);z-index:10}.back-to-top svg{height:1rem;width:1rem;fill:currentColor;display:inline-block}.back-to-top span{margin-left:.25rem}.show-back-to-top .back-to-top{align-items:center;display:flex}@media(min-width:97em){html{font-size:110%}}@media(max-width:82em){.toc-content-icon{display:flex}.toc-drawer{border-left:1px solid var(--color-background-muted);height:100vh;position:fixed;right:-15em;top:0}.toc-tree{border-left:none;font-size:var(--toc-font-size--mobile)}.sidebar-drawer{width:calc(50% - 18.5em)}}@media(max-width:67em){.content{margin-left:auto;margin-right:auto;padding:0 1em}}@media(max-width:63em){.nav-overlay-icon{display:flex}.sidebar-drawer{height:100vh;left:-15em;position:fixed;top:0;width:15em}.theme-toggle-header,.toc-header-icon{display:flex}.theme-toggle-content,.toc-content-icon{display:none}.mobile-header{align-items:center;display:flex;justify-content:space-between;position:sticky;top:0}.mobile-header .header-left,.mobile-header .header-right{display:flex;height:var(--header-height);padding:0 var(--header-padding)}.mobile-header .header-left label,.mobile-header .header-right label{height:100%;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:100%}.nav-overlay-icon .icon,.theme-toggle svg{height:1.5rem;width:1.5rem}:target{scroll-margin-top:calc(var(--header-height) + 2.5rem)}.back-to-top{top:calc(var(--header-height) + .5rem)}.page{flex-direction:column;justify-content:center}}@media(max-width:48em){.content{overflow-x:auto;width:100%}}@media(max-width:46em){article[role=main] aside.sidebar{float:none;margin:1rem 0;width:100%}}.admonition,.topic{background:var(--color-admonition-background);border-radius:.2rem;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1);font-size:var(--admonition-font-size);margin:1rem auto;overflow:hidden;padding:0 .5rem .5rem;page-break-inside:avoid}.admonition>:nth-child(2),.topic>:nth-child(2){margin-top:0}.admonition>:last-child,.topic>:last-child{margin-bottom:0}.admonition p.admonition-title,p.topic-title{font-size:var(--admonition-title-font-size);font-weight:500;line-height:1.3;margin:0 -.5rem .5rem;padding:.4rem .5rem .4rem 2rem;position:relative}.admonition p.admonition-title:before,p.topic-title:before{content:"";height:1rem;left:.5rem;position:absolute;width:1rem}p.admonition-title{background-color:var(--color-admonition-title-background)}p.admonition-title:before{background-color:var(--color-admonition-title);-webkit-mask-image:var(--icon-admonition-default);mask-image:var(--icon-admonition-default);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}p.topic-title{background-color:var(--color-topic-title-background)}p.topic-title:before{background-color:var(--color-topic-title);-webkit-mask-image:var(--icon-topic-default);mask-image:var(--icon-topic-default);-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}.admonition{border-left:.2rem solid var(--color-admonition-title)}.admonition.caution{border-left-color:var(--color-admonition-title--caution)}.admonition.caution>.admonition-title{background-color:var(--color-admonition-title-background--caution)}.admonition.caution>.admonition-title:before{background-color:var(--color-admonition-title--caution);-webkit-mask-image:var(--icon-spark);mask-image:var(--icon-spark)}.admonition.warning{border-left-color:var(--color-admonition-title--warning)}.admonition.warning>.admonition-title{background-color:var(--color-admonition-title-background--warning)}.admonition.warning>.admonition-title:before{background-color:var(--color-admonition-title--warning);-webkit-mask-image:var(--icon-warning);mask-image:var(--icon-warning)}.admonition.danger{border-left-color:var(--color-admonition-title--danger)}.admonition.danger>.admonition-title{background-color:var(--color-admonition-title-background--danger)}.admonition.danger>.admonition-title:before{background-color:var(--color-admonition-title--danger);-webkit-mask-image:var(--icon-spark);mask-image:var(--icon-spark)}.admonition.attention{border-left-color:var(--color-admonition-title--attention)}.admonition.attention>.admonition-title{background-color:var(--color-admonition-title-background--attention)}.admonition.attention>.admonition-title:before{background-color:var(--color-admonition-title--attention);-webkit-mask-image:var(--icon-warning);mask-image:var(--icon-warning)}.admonition.error{border-left-color:var(--color-admonition-title--error)}.admonition.error>.admonition-title{background-color:var(--color-admonition-title-background--error)}.admonition.error>.admonition-title:before{background-color:var(--color-admonition-title--error);-webkit-mask-image:var(--icon-failure);mask-image:var(--icon-failure)}.admonition.hint{border-left-color:var(--color-admonition-title--hint)}.admonition.hint>.admonition-title{background-color:var(--color-admonition-title-background--hint)}.admonition.hint>.admonition-title:before{background-color:var(--color-admonition-title--hint);-webkit-mask-image:var(--icon-question);mask-image:var(--icon-question)}.admonition.tip{border-left-color:var(--color-admonition-title--tip)}.admonition.tip>.admonition-title{background-color:var(--color-admonition-title-background--tip)}.admonition.tip>.admonition-title:before{background-color:var(--color-admonition-title--tip);-webkit-mask-image:var(--icon-info);mask-image:var(--icon-info)}.admonition.important{border-left-color:var(--color-admonition-title--important)}.admonition.important>.admonition-title{background-color:var(--color-admonition-title-background--important)}.admonition.important>.admonition-title:before{background-color:var(--color-admonition-title--important);-webkit-mask-image:var(--icon-flame);mask-image:var(--icon-flame)}.admonition.note{border-left-color:var(--color-admonition-title--note)}.admonition.note>.admonition-title{background-color:var(--color-admonition-title-background--note)}.admonition.note>.admonition-title:before{background-color:var(--color-admonition-title--note);-webkit-mask-image:var(--icon-pencil);mask-image:var(--icon-pencil)}.admonition.seealso{border-left-color:var(--color-admonition-title--seealso)}.admonition.seealso>.admonition-title{background-color:var(--color-admonition-title-background--seealso)}.admonition.seealso>.admonition-title:before{background-color:var(--color-admonition-title--seealso);-webkit-mask-image:var(--icon-info);mask-image:var(--icon-info)}.admonition.admonition-todo{border-left-color:var(--color-admonition-title--admonition-todo)}.admonition.admonition-todo>.admonition-title{background-color:var(--color-admonition-title-background--admonition-todo)}.admonition.admonition-todo>.admonition-title:before{background-color:var(--color-admonition-title--admonition-todo);-webkit-mask-image:var(--icon-pencil);mask-image:var(--icon-pencil)}.admonition-todo>.admonition-title{text-transform:uppercase}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd{margin-left:2rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd>:first-child{margin-top:.125rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list,dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) dd>:last-child{margin-bottom:.75rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list>dt{font-size:var(--font-size--small);text-transform:uppercase}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd:empty{margin-bottom:.5rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul{margin-left:-1.2rem}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul>li>p:nth-child(2){margin-top:0}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple) .field-list dd>ul>li>p+p:last-child:empty{margin-bottom:0;margin-top:0}dl[class]:not(.option-list):not(.field-list):not(.footnote):not(.glossary):not(.simple)>dt{color:var(--color-api-overall)}.sig:not(.sig-inline){background:var(--color-api-background);border-radius:.25rem;font-family:var(--font-stack--monospace);font-size:var(--api-font-size);font-weight:700;margin-left:-.25rem;margin-right:-.25rem;padding:.25rem .5rem .25rem 3em;text-indent:-2.5em;transition:background .1s ease-out}.sig:not(.sig-inline):hover{background:var(--color-api-background-hover)}.sig:not(.sig-inline) a.reference .viewcode-link{font-weight:400;width:4.25rem}em.property{font-style:normal}em.property:first-child{color:var(--color-api-keyword)}.sig-name{color:var(--color-api-name)}.sig-prename{color:var(--color-api-pre-name);font-weight:400}.sig-paren{color:var(--color-api-paren)}.sig-param{font-style:normal}div.deprecated,div.versionadded,div.versionchanged,div.versionremoved{border-left:.1875rem solid;border-radius:.125rem;padding-left:.75rem}div.deprecated p,div.versionadded p,div.versionchanged p,div.versionremoved p{margin-bottom:.125rem;margin-top:.125rem}div.versionadded{border-color:var(--color-api-added-border)}div.versionadded .versionmodified{color:var(--color-api-added)}div.versionchanged{border-color:var(--color-api-changed-border)}div.versionchanged .versionmodified{color:var(--color-api-changed)}div.deprecated{border-color:var(--color-api-deprecated-border)}div.deprecated .versionmodified{color:var(--color-api-deprecated)}div.versionremoved{border-color:var(--color-api-removed-border)}div.versionremoved .versionmodified{color:var(--color-api-removed)}.viewcode-back,.viewcode-link{float:right;text-align:right}.line-block{margin-bottom:.75rem;margin-top:.5rem}.line-block .line-block{margin-bottom:0;margin-top:0;padding-left:1rem}.code-block-caption,article p.caption,table>caption{font-size:var(--font-size--small);text-align:center}.toctree-wrapper.compound .caption,.toctree-wrapper.compound :not(.caption)>.caption-text{font-size:var(--font-size--small);margin-bottom:0;text-align:initial;text-transform:uppercase}.toctree-wrapper.compound>ul{margin-bottom:0;margin-top:0}.sig-inline,code.literal{background:var(--color-inline-code-background);border-radius:.2em;font-size:var(--font-size--small--2);padding:.1em .2em}pre.literal-block .sig-inline,pre.literal-block code.literal{font-size:inherit;padding:0}p .sig-inline,p code.literal{border:1px solid var(--color-background-border)}.sig-inline{font-family:var(--font-stack--monospace)}div[class*=" highlight-"],div[class^=highlight-]{display:flex;margin:1em 0}div[class*=" highlight-"] .table-wrapper,div[class^=highlight-] .table-wrapper,pre{margin:0;padding:0}pre{overflow:auto}article[role=main] .highlight pre{line-height:1.5}.highlight pre,pre.literal-block{font-size:var(--code-font-size);padding:.625rem .875rem}pre.literal-block{background-color:var(--color-code-background);border-radius:.2rem;color:var(--color-code-foreground);margin-bottom:1rem;margin-top:1rem}.highlight{border-radius:.2rem;width:100%}.highlight .gp,.highlight span.linenos{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.highlight .hll{display:block;margin-left:-.875rem;margin-right:-.875rem;padding-left:.875rem;padding-right:.875rem}.code-block-caption{background-color:var(--color-code-background);border-bottom:1px solid;border-radius:.25rem;border-bottom-left-radius:0;border-bottom-right-radius:0;border-color:var(--color-background-border);color:var(--color-code-foreground);display:flex;font-weight:300;padding:.625rem .875rem}.code-block-caption+div[class]{margin-top:0}.code-block-caption+div[class]>.highlight{border-top-left-radius:0;border-top-right-radius:0}.highlighttable{display:block;width:100%}.highlighttable tbody{display:block}.highlighttable tr{display:flex}.highlighttable td.linenos{background-color:var(--color-code-background);border-bottom-left-radius:.2rem;border-top-left-radius:.2rem;color:var(--color-code-foreground);padding:.625rem 0 .625rem .875rem}.highlighttable .linenodiv{box-shadow:-.0625rem 0 var(--color-foreground-border) inset;font-size:var(--code-font-size);padding-right:.875rem}.highlighttable td.code{display:block;flex:1;overflow:hidden;padding:0}.highlighttable td.code .highlight{border-bottom-left-radius:0;border-top-left-radius:0}.highlight span.linenos{box-shadow:-.0625rem 0 var(--color-foreground-border) inset;display:inline-block;margin-right:.875rem;padding-left:0;padding-right:.875rem}.footnote-reference{font-size:var(--font-size--small--4);vertical-align:super}dl.footnote.brackets{color:var(--color-foreground-secondary);display:grid;font-size:var(--font-size--small);grid-template-columns:max-content auto}dl.footnote.brackets dt{margin:0}dl.footnote.brackets dt>.fn-backref{margin-left:.25rem}dl.footnote.brackets dt:after{content:":"}dl.footnote.brackets dt .brackets:before{content:"["}dl.footnote.brackets dt .brackets:after{content:"]"}dl.footnote.brackets dd{margin:0;padding:0 1rem}aside.footnote{color:var(--color-foreground-secondary);font-size:var(--font-size--small)}aside.footnote>span,div.citation>span{float:left;font-weight:500;padding-right:.25rem}aside.footnote>:not(span),div.citation>p{margin-left:2rem}img{box-sizing:border-box;height:auto;max-width:100%}article .figure,article figure{border-radius:.2rem;margin:0}article .figure :last-child,article figure :last-child{margin-bottom:0}article .align-left{clear:left;float:left;margin:0 1rem 1rem}article .align-right{clear:right;float:right;margin:0 1rem 1rem}article .align-center,article .align-default{display:block;margin-left:auto;margin-right:auto;text-align:center}article table.align-default{display:table;text-align:initial}.domainindex-jumpbox,.genindex-jumpbox{border-bottom:1px solid var(--color-background-border);border-top:1px solid var(--color-background-border);padding:.25rem}.domainindex-section h2,.genindex-section h2{margin-bottom:.5rem;margin-top:.75rem}.domainindex-section ul,.genindex-section ul{margin-bottom:0;margin-top:0}ol,ul{margin-bottom:1rem;margin-top:1rem;padding-left:1.2rem}ol li>p:first-child,ul li>p:first-child{margin-bottom:.25rem;margin-top:.25rem}ol li>p:last-child,ul li>p:last-child{margin-top:.25rem}ol li>ol,ol li>ul,ul li>ol,ul li>ul{margin-bottom:.5rem;margin-top:.5rem}ol.arabic{list-style:decimal}ol.loweralpha{list-style:lower-alpha}ol.upperalpha{list-style:upper-alpha}ol.lowerroman{list-style:lower-roman}ol.upperroman{list-style:upper-roman}.simple li>ol,.simple li>ul,.toctree-wrapper li>ol,.toctree-wrapper li>ul{margin-bottom:0;margin-top:0}.field-list dt,.option-list dt,dl.footnote dt,dl.glossary dt,dl.simple dt,dl:not([class]) dt{font-weight:500;margin-top:.25rem}.field-list dt+dt,.option-list dt+dt,dl.footnote dt+dt,dl.glossary dt+dt,dl.simple dt+dt,dl:not([class]) dt+dt{margin-top:0}.field-list dt .classifier:before,.option-list dt .classifier:before,dl.footnote dt .classifier:before,dl.glossary dt .classifier:before,dl.simple dt .classifier:before,dl:not([class]) dt .classifier:before{content:":";margin-left:.2rem;margin-right:.2rem}.field-list dd ul,.field-list dd>p:first-child,.option-list dd ul,.option-list dd>p:first-child,dl.footnote dd ul,dl.footnote dd>p:first-child,dl.glossary dd ul,dl.glossary dd>p:first-child,dl.simple dd ul,dl.simple dd>p:first-child,dl:not([class]) dd ul,dl:not([class]) dd>p:first-child{margin-top:.125rem}.field-list dd ul,.option-list dd ul,dl.footnote dd ul,dl.glossary dd ul,dl.simple dd ul,dl:not([class]) dd ul{margin-bottom:.125rem}.math-wrapper{overflow-x:auto;width:100%}div.math{position:relative;text-align:center}div.math .headerlink,div.math:focus .headerlink{display:none}div.math:hover .headerlink{display:inline-block}div.math span.eqno{position:absolute;right:.5rem;top:50%;transform:translateY(-50%);z-index:1}abbr[title]{cursor:help}.problematic{color:var(--color-problematic)}kbd:not(.compound){background-color:var(--color-background-secondary);border:1px solid var(--color-foreground-border);border-radius:.2rem;box-shadow:0 .0625rem 0 rgba(0,0,0,.2),inset 0 0 0 .125rem var(--color-background-primary);color:var(--color-foreground-primary);display:inline-block;font-size:var(--font-size--small--3);margin:0 .2rem;padding:0 .2rem;vertical-align:text-bottom}blockquote{background:var(--color-background-secondary);border-left:4px solid var(--color-background-border);margin-left:0;margin-right:0;padding:.5rem 1rem}blockquote .attribution{font-weight:600;text-align:right}blockquote.highlights,blockquote.pull-quote{font-size:1.25em}blockquote.epigraph,blockquote.pull-quote{border-left-width:0;border-radius:.5rem}blockquote.highlights{background:transparent;border-left-width:0}p .reference img{vertical-align:middle}p.rubric{font-size:1.125em;font-weight:700;line-height:1.25}dd p.rubric{font-size:var(--font-size--small);font-weight:inherit;line-height:inherit;text-transform:uppercase}article .sidebar{background-color:var(--color-background-secondary);border:1px solid var(--color-background-border);border-radius:.2rem;clear:right;float:right;margin-left:1rem;margin-right:0;width:30%}article .sidebar>*{padding-left:1rem;padding-right:1rem}article .sidebar>ol,article .sidebar>ul{padding-left:2.2rem}article .sidebar .sidebar-title{border-bottom:1px solid var(--color-background-border);font-weight:500;margin:0;padding:.5rem 1rem}[role=main] .table-wrapper.container{margin-bottom:.5rem;margin-top:1rem;overflow-x:auto;padding:.2rem .2rem .75rem;width:100%}table.docutils{border-collapse:collapse;border-radius:.2rem;border-spacing:0;box-shadow:0 .2rem .5rem rgba(0,0,0,.05),0 0 .0625rem rgba(0,0,0,.1)}table.docutils th{background:var(--color-table-header-background)}table.docutils td,table.docutils th{border-bottom:1px solid var(--color-table-border);border-left:1px solid var(--color-table-border);border-right:1px solid var(--color-table-border);padding:0 .25rem}table.docutils td p,table.docutils th p{margin:.25rem}table.docutils td:first-child,table.docutils th:first-child{border-left:none}table.docutils td:last-child,table.docutils th:last-child{border-right:none}table.docutils td.text-left,table.docutils th.text-left{text-align:left}table.docutils td.text-right,table.docutils th.text-right{text-align:right}table.docutils td.text-center,table.docutils th.text-center{text-align:center}:target{scroll-margin-top:2.5rem}@media(max-width:67em){:target{scroll-margin-top:calc(2.5rem + var(--header-height))}section>span:target{scroll-margin-top:calc(2.8rem + var(--header-height))}}.headerlink{font-weight:100;-webkit-user-select:none;-moz-user-select:none;user-select:none}.code-block-caption>.headerlink,dl dt>.headerlink,figcaption p>.headerlink,h1>.headerlink,h2>.headerlink,h3>.headerlink,h4>.headerlink,h5>.headerlink,h6>.headerlink,p.caption>.headerlink,table>caption>.headerlink{margin-left:.5rem;visibility:hidden}.code-block-caption:hover>.headerlink,dl dt:hover>.headerlink,figcaption p:hover>.headerlink,h1:hover>.headerlink,h2:hover>.headerlink,h3:hover>.headerlink,h4:hover>.headerlink,h5:hover>.headerlink,h6:hover>.headerlink,p.caption:hover>.headerlink,table>caption:hover>.headerlink{visibility:visible}.code-block-caption>.toc-backref,dl dt>.toc-backref,figcaption p>.toc-backref,h1>.toc-backref,h2>.toc-backref,h3>.toc-backref,h4>.toc-backref,h5>.toc-backref,h6>.toc-backref,p.caption>.toc-backref,table>caption>.toc-backref{color:inherit;text-decoration-line:none}figure:hover>figcaption>p>.headerlink,table:hover>caption>.headerlink{visibility:visible}:target>h1:first-of-type,:target>h2:first-of-type,:target>h3:first-of-type,:target>h4:first-of-type,:target>h5:first-of-type,:target>h6:first-of-type,span:target~h1:first-of-type,span:target~h2:first-of-type,span:target~h3:first-of-type,span:target~h4:first-of-type,span:target~h5:first-of-type,span:target~h6:first-of-type{background-color:var(--color-highlight-on-target)}:target>h1:first-of-type code.literal,:target>h2:first-of-type code.literal,:target>h3:first-of-type code.literal,:target>h4:first-of-type code.literal,:target>h5:first-of-type code.literal,:target>h6:first-of-type code.literal,span:target~h1:first-of-type code.literal,span:target~h2:first-of-type code.literal,span:target~h3:first-of-type code.literal,span:target~h4:first-of-type code.literal,span:target~h5:first-of-type code.literal,span:target~h6:first-of-type code.literal{background-color:transparent}.literal-block-wrapper:target .code-block-caption,.this-will-duplicate-information-and-it-is-still-useful-here li :target,figure:target,table:target>caption{background-color:var(--color-highlight-on-target)}dt:target{background-color:var(--color-highlight-on-target)!important}.footnote-reference:target,.footnote>dt:target+dd{background-color:var(--color-highlight-on-target)}.guilabel{background-color:var(--color-guilabel-background);border:1px solid var(--color-guilabel-border);border-radius:.5em;color:var(--color-guilabel-text);font-size:.9em;padding:0 .3em}footer{display:flex;flex-direction:column;font-size:var(--font-size--small);margin-top:2rem}.bottom-of-page{align-items:center;border-top:1px solid var(--color-background-border);color:var(--color-foreground-secondary);display:flex;justify-content:space-between;line-height:1.5;margin-top:1rem;padding-bottom:1rem;padding-top:1rem}@media(max-width:46em){.bottom-of-page{flex-direction:column-reverse;gap:.25rem;text-align:center}}.bottom-of-page .left-details{font-size:var(--font-size--small)}.bottom-of-page .right-details{display:flex;flex-direction:column;gap:.25rem;text-align:right}.bottom-of-page .icons{display:flex;font-size:1rem;gap:.25rem;justify-content:flex-end}.bottom-of-page .icons a{text-decoration:none}.bottom-of-page .icons img,.bottom-of-page .icons svg{font-size:1.125rem;height:1em;width:1em}.related-pages a{align-items:center;display:flex;text-decoration:none}.related-pages a:hover .page-info .title{color:var(--color-link);text-decoration:underline;text-decoration-color:var(--color-link-underline)}.related-pages a svg.furo-related-icon,.related-pages a svg.furo-related-icon>use{color:var(--color-foreground-border);flex-shrink:0;height:.75rem;margin:0 .5rem;width:.75rem}.related-pages a.next-page{clear:right;float:right;max-width:50%;text-align:right}.related-pages a.prev-page{clear:left;float:left;max-width:50%}.related-pages a.prev-page svg{transform:rotate(180deg)}.page-info{display:flex;flex-direction:column;overflow-wrap:anywhere}.next-page .page-info{align-items:flex-end}.page-info .context{align-items:center;color:var(--color-foreground-muted);display:flex;font-size:var(--font-size--small);padding-bottom:.1rem;text-decoration:none}ul.search{list-style:none;padding-left:0}ul.search li{border-bottom:1px solid var(--color-background-border);padding:1rem 0}[role=main] .highlighted{background-color:var(--color-highlighted-background);color:var(--color-highlighted-text)}.sidebar-brand{display:flex;flex-direction:column;flex-shrink:0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-decoration:none}.sidebar-brand-text{color:var(--color-sidebar-brand-text);font-size:1.5rem;overflow-wrap:break-word}.sidebar-brand-text,.sidebar-logo-container{margin:var(--sidebar-item-spacing-vertical) 0}.sidebar-logo{display:block;margin:0 auto;max-width:100%}.sidebar-search-container{align-items:center;background:var(--color-sidebar-search-background);display:flex;margin-top:var(--sidebar-search-space-above);position:relative}.sidebar-search-container:focus-within,.sidebar-search-container:hover{background:var(--color-sidebar-search-background--focus)}.sidebar-search-container:before{background-color:var(--color-sidebar-search-icon);content:"";height:var(--sidebar-search-icon-size);left:var(--sidebar-item-spacing-horizontal);-webkit-mask-image:var(--icon-search);mask-image:var(--icon-search);position:absolute;width:var(--sidebar-search-icon-size)}.sidebar-search{background:transparent;border:none;border-bottom:1px solid var(--color-sidebar-search-border);border-top:1px solid var(--color-sidebar-search-border);box-sizing:border-box;color:var(--color-sidebar-search-foreground);padding:var(--sidebar-search-input-spacing-vertical) var(--sidebar-search-input-spacing-horizontal) var(--sidebar-search-input-spacing-vertical) calc(var(--sidebar-item-spacing-horizontal) + var(--sidebar-search-input-spacing-horizontal) + var(--sidebar-search-icon-size));width:100%;z-index:10}.sidebar-search:focus{outline:none}.sidebar-search::-moz-placeholder{font-size:var(--sidebar-search-input-font-size)}.sidebar-search::placeholder{font-size:var(--sidebar-search-input-font-size)}#searchbox .highlight-link{margin:0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal) 0;text-align:center}#searchbox .highlight-link a{color:var(--color-sidebar-search-icon);font-size:var(--font-size--small--2)}.sidebar-tree{font-size:var(--sidebar-item-font-size);margin-bottom:var(--sidebar-item-spacing-vertical);margin-top:var(--sidebar-tree-space-above)}.sidebar-tree ul{display:flex;flex-direction:column;list-style:none;margin-bottom:0;margin-top:0;padding:0}.sidebar-tree li{margin:0;position:relative}.sidebar-tree li>ul{margin-left:var(--sidebar-item-spacing-horizontal)}.sidebar-tree .icon,.sidebar-tree .reference{color:var(--color-sidebar-link-text)}.sidebar-tree .reference{box-sizing:border-box;display:inline-block;height:100%;line-height:var(--sidebar-item-line-height);overflow-wrap:anywhere;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-decoration:none;width:100%}.sidebar-tree .reference:hover{background:var(--color-sidebar-item-background--hover);color:var(--color-sidebar-link-text)}.sidebar-tree .reference.external:after{color:var(--color-sidebar-link-text);content:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23607d8b' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 24 24'%3E%3Cpath stroke='none' d='M0 0h24v24H0z'/%3E%3Cpath d='M11 7H6a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h9a2 2 0 0 0 2-2v-5M10 14 20 4M15 4h5v5'/%3E%3C/svg%3E");margin:0 .25rem;vertical-align:middle}.sidebar-tree .current-page>.reference{font-weight:700}.sidebar-tree label{align-items:center;cursor:pointer;display:flex;height:var(--sidebar-item-height);justify-content:center;position:absolute;right:0;top:0;-webkit-user-select:none;-moz-user-select:none;user-select:none;width:var(--sidebar-expander-width)}.sidebar-tree .caption,.sidebar-tree :not(.caption)>.caption-text{color:var(--color-sidebar-caption-text);font-size:var(--sidebar-caption-font-size);font-weight:700;margin:var(--sidebar-caption-space-above) 0 0 0;padding:var(--sidebar-item-spacing-vertical) var(--sidebar-item-spacing-horizontal);text-transform:uppercase}.sidebar-tree li.has-children>.reference{padding-right:var(--sidebar-expander-width)}.sidebar-tree .toctree-l1>.reference,.sidebar-tree .toctree-l1>label .icon{color:var(--color-sidebar-link-text--top-level)}.sidebar-tree label{background:var(--color-sidebar-item-expander-background)}.sidebar-tree label:hover{background:var(--color-sidebar-item-expander-background--hover)}.sidebar-tree .current>.reference{background:var(--color-sidebar-item-background--current)}.sidebar-tree .current>.reference:hover{background:var(--color-sidebar-item-background--hover)}.toctree-checkbox{display:none;position:absolute}.toctree-checkbox~ul{display:none}.toctree-checkbox~label .icon svg{transform:rotate(90deg)}.toctree-checkbox:checked~ul{display:block}.toctree-checkbox:checked~label .icon svg{transform:rotate(-90deg)}.toc-title-container{padding:var(--toc-title-padding);padding-top:var(--toc-spacing-vertical)}.toc-title{color:var(--color-toc-title-text);font-size:var(--toc-title-font-size);padding-left:var(--toc-spacing-horizontal);text-transform:uppercase}.no-toc{display:none}.toc-tree-container{padding-bottom:var(--toc-spacing-vertical)}.toc-tree{border-left:1px solid var(--color-background-border);font-size:var(--toc-font-size);line-height:1.3;padding-left:calc(var(--toc-spacing-horizontal) - var(--toc-item-spacing-horizontal))}.toc-tree>ul>li:first-child{padding-top:0}.toc-tree>ul>li:first-child>ul{padding-left:0}.toc-tree>ul>li:first-child>a{display:none}.toc-tree ul{list-style-type:none;margin-bottom:0;margin-top:0;padding-left:var(--toc-item-spacing-horizontal)}.toc-tree li{padding-top:var(--toc-item-spacing-vertical)}.toc-tree li.scroll-current>.reference{color:var(--color-toc-item-text--active);font-weight:700}.toc-tree a.reference{color:var(--color-toc-item-text);overflow-wrap:anywhere;text-decoration:none}.toc-scroll{max-height:100vh;overflow-y:scroll}.contents:not(.this-will-duplicate-information-and-it-is-still-useful-here){background:rgba(255,0,0,.25);color:var(--color-problematic)}.contents:not(.this-will-duplicate-information-and-it-is-still-useful-here):before{content:"ERROR: Adding a table of contents in Furo-based documentation is unnecessary, and does not work well with existing styling. Add a 'this-will-duplicate-information-and-it-is-still-useful-here' class, if you want an escape hatch."}.text-align\:left>p{text-align:left}.text-align\:center>p{text-align:center}.text-align\:right>p{text-align:right} +/*# sourceMappingURL=furo.css.map*/ \ No newline at end of file diff --git a/docs/examples.html b/docs/examples.html new file mode 100644 index 0000000..e16b3fe --- /dev/null +++ b/docs/examples.html @@ -0,0 +1,3998 @@ + + + + + + + + + + + + + + + Code Examples - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Code Examples +

+

+ 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. +

+
+ +

+ Minimal +

+

+ The Minimal example demonstrates the bare-minimum setup required to + connect to 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 program. +

+
+
+
##########################################################
+# This RNS example demonstrates a minimal setup, that    #
+# will start up the Reticulum Network Stack, generate a  #
+# new destination, and let the user send an announce.    #
+##########################################################
+
+import argparse
+import sys
+import RNS
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this basic example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+# This initialisation is executed when the program is started
+def program_setup(configpath):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our example
+    identity = RNS.Identity()
+
+    # Using the identity we just created, we create a destination.
+    # Destinations are endpoints in Reticulum, that can be addressed
+    # and communicated with. Destinations can also announce their
+    # existence, which will let the network know they are reachable
+    # and automatically create paths to them, from anywhere else
+    # in the network.
+    destination = RNS.Destination(
+        identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "minimalsample"
+    )
+
+    # We configure the destination to automatically prove all
+    # packets addressed to it. By doing this, RNS will automatically
+    # generate a proof for each incoming packet and transmit it
+    # back to the sender of that packet. This will let anyone that
+    # tries to communicate with the destination know whether their
+    # communication was received correctly.
+    destination.set_proof_strategy(RNS.Destination.PROVE_ALL)
+
+    # Everything's ready!
+    # Let's hand over control to the announce loop
+    announceLoop(destination)
+
+
+def announceLoop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Minimal example "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, hit enter to manually send an announce (Ctrl-C to quit)"
+    )
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program gets run at startup,
+# and parses input from the user, and then starts
+# the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(
+            description="Minimal example to start Reticulum and create a destination"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        program_setup(configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Minimal.py. +

+
+
+ +

+ Announce +

+

+ The Announce example builds upon the previous example by exploring how + to announce a destination on the network, and how to let your program receive + notifications about announces from relevant destinations. +

+
+
+
##########################################################
+# This RNS example demonstrates setting up announce      #
+# callbacks, which will let an application receive a     #
+# notification when an announce relevant for it arrives  #
+##########################################################
+
+import argparse
+import random
+import sys
+import RNS
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this basic example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+# We initialise two lists of strings to use as app_data
+fruits = ["Peach", "Quince", "Date", "Tangerine", "Pomelo", "Carambola", "Grape"]
+noble_gases = ["Helium", "Neon", "Argon", "Krypton", "Xenon", "Radon", "Oganesson"]
+
+# This initialisation is executed when the program is started
+def program_setup(configpath):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our example
+    identity = RNS.Identity()
+
+    # Using the identity we just created, we create two destinations
+    # in the "example_utilities.announcesample" application space.
+    #
+    # Destinations are endpoints in Reticulum, that can be addressed
+    # and communicated with. Destinations can also announce their
+    # existence, which will let the network know they are reachable
+    # and automatically create paths to them, from anywhere else
+    # in the network.
+    destination_1 = RNS.Destination(
+        identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "announcesample",
+        "fruits"
+    )
+
+    destination_2 = RNS.Destination(
+        identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "announcesample",
+        "noble_gases"
+    )
+
+    # We configure the destinations to automatically prove all
+    # packets addressed to it. By doing this, RNS will automatically
+    # generate a proof for each incoming packet and transmit it
+    # back to the sender of that packet. This will let anyone that
+    # tries to communicate with the destination know whether their
+    # communication was received correctly.
+    destination_1.set_proof_strategy(RNS.Destination.PROVE_ALL)
+    destination_2.set_proof_strategy(RNS.Destination.PROVE_ALL)
+
+    # We create an announce handler and configure it to only ask for
+    # announces from "example_utilities.announcesample.fruits".
+    # Try changing the filter and see what happens.
+    announce_handler = ExampleAnnounceHandler(
+        aspect_filter="example_utilities.announcesample.fruits"
+    )
+
+    # We register the announce handler with Reticulum
+    RNS.Transport.register_announce_handler(announce_handler)
+
+    # Everything's ready!
+    # Let's hand over control to the announce loop
+    announceLoop(destination_1, destination_2)
+
+
+def announceLoop(destination_1, destination_2):
+    # Let the user know that everything is ready
+    RNS.log("Announce example running, hit enter to manually send an announce (Ctrl-C to quit)")
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+
+        # Randomly select a fruit
+        fruit = fruits[random.randint(0,len(fruits)-1)]
+
+        # Send the announce including the app data
+        destination_1.announce(app_data=fruit.encode("utf-8"))
+        RNS.log(
+            "Sent announce from "+
+            RNS.prettyhexrep(destination_1.hash)+
+            " ("+destination_1.name+")"
+        )
+
+        # Randomly select a noble gas
+        noble_gas = noble_gases[random.randint(0,len(noble_gases)-1)]
+
+        # Send the announce including the app data
+        destination_2.announce(app_data=noble_gas.encode("utf-8"))
+        RNS.log(
+            "Sent announce from "+
+            RNS.prettyhexrep(destination_2.hash)+
+            " ("+destination_2.name+")"
+        )
+
+# We will need to define an announce handler class that
+# Reticulum can message when an announce arrives.
+class ExampleAnnounceHandler:
+    # The initialisation method takes the optional
+    # aspect_filter argument. If aspect_filter is set to
+    # None, all announces will be passed to the instance.
+    # If only some announces are wanted, it can be set to
+    # an aspect string.
+    def __init__(self, aspect_filter=None):
+        self.aspect_filter = aspect_filter
+
+    # This method will be called by Reticulums Transport
+    # system when an announce arrives that matches the
+    # configured aspect filter. Filters must be specific,
+    # and cannot use wildcards.
+    def received_announce(self, destination_hash, announced_identity, app_data):
+        RNS.log(
+            "Received an announce from "+
+            RNS.prettyhexrep(destination_hash)
+        )
+
+        if app_data:
+            RNS.log(
+                "The announce contained the following app data: "+
+                app_data.decode("utf-8")
+            )
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program gets run at startup,
+# and parses input from the user, and then starts
+# the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(
+            description="Reticulum example that demonstrates announces and announce handlers"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        program_setup(configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Announce.py. +

+
+
+ +

+ Broadcast +

+

+ The Broadcast example explores how to transmit plaintext broadcast + messages over the network. +

+
+
+
##########################################################
+# This RNS example demonstrates broadcasting unencrypted #
+# information to any listening destinations.             #
+##########################################################
+
+import sys
+import argparse
+import RNS
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this basic example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+# This initialisation is executed when the program is started
+def program_setup(configpath, channel=None):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # If the user did not select a "channel" we use
+    # a default one called "public_information".
+    # This "channel" is added to the destination name-
+    # space, so the user can select different broadcast
+    # channels.
+    if channel == None:
+        channel = "public_information"
+
+    # We create a PLAIN destination. This is an uncencrypted endpoint
+    # that anyone can listen to and send information to.
+    broadcast_destination = RNS.Destination(
+        None,
+        RNS.Destination.IN,
+        RNS.Destination.PLAIN,
+        APP_NAME,
+        "broadcast",
+        channel
+    )
+
+    # We specify a callback that will get called every time
+    # the destination receives data.
+    broadcast_destination.set_packet_callback(packet_callback)
+
+    # Everything's ready!
+    # Let's hand over control to the main loop
+    broadcastLoop(broadcast_destination)
+
+def packet_callback(data, packet):
+    # Simply print out the received data
+    print("")
+    print("Received data: "+data.decode("utf-8")+"\r\n> ", end="")
+    sys.stdout.flush()
+
+def broadcastLoop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Broadcast example "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, enter text and hit enter to broadcast (Ctrl-C to quit)"
+    )
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will send the information
+    # that the user entered into the prompt.
+    while True:
+        print("> ", end="")
+        entered = input()
+
+        if entered != "":
+            data    = entered.encode("utf-8")
+            packet  = RNS.Packet(destination, data)
+            packet.send()
+
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program gets run at startup,
+# and parses input from the user, and then starts
+# the program.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(
+            description="Reticulum example demonstrating sending and receiving broadcasts"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "--channel",
+            action="store",
+            default=None,
+            help="broadcast channel name",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        if args.channel:
+            channelarg = args.channel
+        else:
+            channelarg = None
+
+        program_setup(configarg, channelarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Broadcast.py. +

+
+
+ +

Echo

+

+ The Echo example demonstrates communication between two destinations + using the Packet interface. +

+
+
+
##########################################################
+# This RNS example demonstrates a simple client/server   #
+# echo utility. A client can send an echo request to the #
+# server, and the server will respond by proving receipt #
+# of the packet.                                         #
+##########################################################
+
+import argparse
+import sys
+import RNS
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this echo example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+
+##########################################################
+#### Server Part #########################################
+##########################################################
+
+# This initialisation is executed when the users chooses
+# to run as a server
+def server(configpath):
+    global reticulum
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our echo server
+    server_identity = RNS.Identity()
+
+    # We create a destination that clients can query. We want
+    # to be able to verify echo replies to our clients, so we
+    # create a "single" destination that can receive encrypted
+    # messages. This way the client can send a request and be
+    # certain that no-one else than this destination was able
+    # to read it. 
+    echo_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "echo",
+        "request"
+    )
+
+    # We configure the destination to automatically prove all
+    # packets addressed to it. By doing this, RNS will automatically
+    # generate a proof for each incoming packet and transmit it
+    # back to the sender of that packet.
+    echo_destination.set_proof_strategy(RNS.Destination.PROVE_ALL)
+
+    # Tell the destination which function in our program to
+    # run when a packet is received. We do this so we can
+    # print a log message when the server receives a request
+    echo_destination.set_packet_callback(server_callback)
+
+    # Everything's ready!
+    # Let's Wait for client requests or user input
+    announceLoop(echo_destination)
+
+
+def announceLoop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Echo server "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, hit enter to manually send an announce (Ctrl-C to quit)"
+    )
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+
+def server_callback(message, packet):
+    global reticulum
+
+    # Tell the user that we received an echo request, and
+    # that we are going to send a reply to the requester.
+    # Sending the proof is handled automatically, since we
+    # set up the destination to prove all incoming packets.
+
+    reception_stats = ""
+    if reticulum.is_connected_to_shared_instance:
+        reception_rssi = reticulum.get_packet_rssi(packet.packet_hash)
+        reception_snr  = reticulum.get_packet_snr(packet.packet_hash)
+
+        if reception_rssi != None:
+            reception_stats += " [RSSI "+str(reception_rssi)+" dBm]"
+
+        if reception_snr != None:
+            reception_stats += " [SNR "+str(reception_snr)+" dBm]"
+
+    else:
+        if packet.rssi != None:
+            reception_stats += " [RSSI "+str(packet.rssi)+" dBm]"
+
+        if packet.snr != None:
+            reception_stats += " [SNR "+str(packet.snr)+" dB]"
+
+    RNS.log("Received packet from echo client, proof sent"+reception_stats)
+
+
+##########################################################
+#### Client Part #########################################
+##########################################################
+
+# This initialisation is executed when the users chooses
+# to run as a client
+def client(destination_hexhash, configpath, timeout=None):
+    global reticulum
+
+    # We need a binary representation of the destination
+    # hash that was entered on the command line
+    try:
+        dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
+        if len(destination_hexhash) != dest_len:
+            raise ValueError(
+                "Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
+            )
+
+        destination_hash = bytes.fromhex(destination_hexhash)
+    except Exception as e:
+        RNS.log("Invalid destination entered. Check your input!")
+        RNS.log(str(e)+"\n")
+        sys.exit(0)
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # We override the loglevel to provide feedback when
+    # an announce is received
+    if RNS.loglevel < RNS.LOG_INFO:
+        RNS.loglevel = RNS.LOG_INFO
+
+    # Tell the user that the client is ready!
+    RNS.log(
+        "Echo client ready, hit enter to send echo request to "+
+        destination_hexhash+
+        " (Ctrl-C to quit)"
+    )
+
+    # We enter a loop that runs until the user exits.
+    # If the user hits enter, we will try to send an
+    # echo request to the destination specified on the
+    # command line.
+    while True:
+        input()
+
+        # Let's first check if RNS knows a path to the destination.
+        # If it does, we'll load the server identity and create a packet
+        if RNS.Transport.has_path(destination_hash):
+
+            # To address the server, we need to know it's public
+            # key, so we check if Reticulum knows this destination.
+            # This is done by calling the "recall" method of the
+            # Identity module. If the destination is known, it will
+            # return an Identity instance that can be used in
+            # outgoing destinations.
+            server_identity = RNS.Identity.recall(destination_hash)
+
+            # We got the correct identity instance from the
+            # recall method, so let's create an outgoing
+            # destination. We use the naming convention:
+            # example_utilities.echo.request
+            # This matches the naming we specified in the
+            # server part of the code.
+            request_destination = RNS.Destination(
+                server_identity,
+                RNS.Destination.OUT,
+                RNS.Destination.SINGLE,
+                APP_NAME,
+                "echo",
+                "request"
+            )
+
+            # The destination is ready, so let's create a packet.
+            # We set the destination to the request_destination
+            # that was just created, and the only data we add
+            # is a random hash.
+            echo_request = RNS.Packet(request_destination, RNS.Identity.get_random_hash())
+
+            # Send the packet! If the packet is successfully
+            # sent, it will return a PacketReceipt instance.
+            packet_receipt = echo_request.send()
+
+            # If the user specified a timeout, we set this
+            # timeout on the packet receipt, and configure
+            # a callback function, that will get called if
+            # the packet times out.
+            if timeout != None:
+                packet_receipt.set_timeout(timeout)
+                packet_receipt.set_timeout_callback(packet_timed_out)
+
+            # We can then set a delivery callback on the receipt.
+            # This will get automatically called when a proof for
+            # this specific packet is received from the destination.
+            packet_receipt.set_delivery_callback(packet_delivered)
+
+            # Tell the user that the echo request was sent
+            RNS.log("Sent echo request to "+RNS.prettyhexrep(request_destination.hash))
+        else:
+            # If we do not know this destination, tell the
+            # user to wait for an announce to arrive.
+            RNS.log("Destination is not yet known. Requesting path...")
+            RNS.log("Hit enter to manually retry once an announce is received.")
+            RNS.Transport.request_path(destination_hash)
+
+# This function is called when our reply destination
+# receives a proof packet.
+def packet_delivered(receipt):
+    global reticulum
+
+    if receipt.status == RNS.PacketReceipt.DELIVERED:
+        rtt = receipt.get_rtt()
+        if (rtt >= 1):
+            rtt = round(rtt, 3)
+            rttstring = str(rtt)+" seconds"
+        else:
+            rtt = round(rtt*1000, 3)
+            rttstring = str(rtt)+" milliseconds"
+
+        reception_stats = ""
+        if reticulum.is_connected_to_shared_instance:
+            reception_rssi = reticulum.get_packet_rssi(receipt.proof_packet.packet_hash)
+            reception_snr  = reticulum.get_packet_snr(receipt.proof_packet.packet_hash)
+
+            if reception_rssi != None:
+                reception_stats += " [RSSI "+str(reception_rssi)+" dBm]"
+
+            if reception_snr != None:
+                reception_stats += " [SNR "+str(reception_snr)+" dB]"
+
+        else:
+            if receipt.proof_packet != None:
+                if receipt.proof_packet.rssi != None:
+                    reception_stats += " [RSSI "+str(receipt.proof_packet.rssi)+" dBm]"
+
+                if receipt.proof_packet.snr != None:
+                    reception_stats += " [SNR "+str(receipt.proof_packet.snr)+" dB]"
+
+        RNS.log(
+            "Valid reply received from "+
+            RNS.prettyhexrep(receipt.destination.hash)+
+            ", round-trip time is "+rttstring+
+            reception_stats
+        )
+
+# This function is called if a packet times out.
+def packet_timed_out(receipt):
+    if receipt.status == RNS.PacketReceipt.FAILED:
+        RNS.log("Packet "+RNS.prettyhexrep(receipt.hash)+" timed out")
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program gets run at startup,
+# and parses input from the user, and then starts
+# the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(description="Simple echo server and client utility")
+
+        parser.add_argument(
+            "-s",
+            "--server",
+            action="store_true",
+            help="wait for incoming packets from clients"
+        )
+
+        parser.add_argument(
+            "-t",
+            "--timeout",
+            action="store",
+            metavar="s",
+            default=None,
+            help="set a reply timeout in seconds",
+            type=float
+        )
+
+        parser.add_argument("--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "destination",
+            nargs="?",
+            default=None,
+            help="hexadecimal hash of the server destination",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.server:
+            configarg=None
+            if args.config:
+                configarg = args.config
+            server(configarg)
+        else:
+            if args.config:
+                configarg = args.config
+            else:
+                configarg = None
+
+            if args.timeout:
+                timeoutarg = float(args.timeout)
+            else:
+                timeoutarg = None
+
+            if (args.destination == None):
+                print("")
+                parser.print_help()
+                print("")
+            else:
+                client(args.destination, configarg, timeout=timeoutarg)
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Echo.py. +

+
+ +
+ +

+ Identification +

+

+ The Identify example explores identifying an intiator of a link, once + the link has been established. +

+
+
+
##########################################################
+# This RNS example demonstrates how to set up a link to  #
+# a destination, and identify the initiator to it's peer #
+##########################################################
+
+import os
+import sys
+import time
+import argparse
+import RNS
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this echo example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+##########################################################
+#### Server Part #########################################
+##########################################################
+
+# A reference to the latest client link that connected
+latest_client_link = None
+
+# This initialisation is executed when the users chooses
+# to run as a server
+def server(configpath):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our link example
+    server_identity = RNS.Identity()
+
+    # We create a destination that clients can connect to. We
+    # want clients to create links to this destination, so we
+    # need to create a "single" destination type.
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "identifyexample"
+    )
+
+    # We configure a function that will get called every time
+    # a new client creates a link to this destination.
+    server_destination.set_link_established_callback(client_connected)
+
+    # Everything's ready!
+    # Let's Wait for client requests or user input
+    server_loop(server_destination)
+
+def server_loop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Link identification example "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, waiting for a connection."
+    )
+
+    RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+# When a client establishes a link to our server
+# destination, this function will be called with
+# a reference to the link.
+def client_connected(link):
+    global latest_client_link
+
+    RNS.log("Client connected")
+    link.set_link_closed_callback(client_disconnected)
+    link.set_packet_callback(server_packet_received)
+    link.set_remote_identified_callback(remote_identified)
+    latest_client_link = link
+
+def client_disconnected(link):
+    RNS.log("Client disconnected")
+
+def remote_identified(link, identity):
+    RNS.log("Remote identified as: "+str(identity))
+
+def server_packet_received(message, packet):
+    global latest_client_link
+
+    # Get the originating identity for display
+    remote_peer =  "unidentified peer"
+    if packet.link.get_remote_identity() != None:
+        remote_peer = str(packet.link.get_remote_identity())
+
+    # When data is received over any active link,
+    # it will all be directed to the last client
+    # that connected.
+    text = message.decode("utf-8")
+
+    RNS.log("Received data from "+remote_peer+": "+text)
+
+    reply_text = "I received \""+text+"\" over the link from "+remote_peer
+    reply_data = reply_text.encode("utf-8")
+    RNS.Packet(latest_client_link, reply_data).send()
+
+
+##########################################################
+#### Client Part #########################################
+##########################################################
+
+# A reference to the server link
+server_link = None
+
+# A reference to the client identity
+client_identity = None
+
+# This initialisation is executed when the users chooses
+# to run as a client
+def client(destination_hexhash, configpath):
+    global client_identity
+    # We need a binary representation of the destination
+    # hash that was entered on the command line
+    try:
+        dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
+        if len(destination_hexhash) != dest_len:
+            raise ValueError(
+                "Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
+            )
+
+        destination_hash = bytes.fromhex(destination_hexhash)
+    except:
+        RNS.log("Invalid destination entered. Check your input!\n")
+        sys.exit(0)
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Create a new client identity
+    client_identity = RNS.Identity()
+    RNS.log(
+        "Client created new identity "+
+        str(client_identity)
+    )
+
+    # Check if we know a path to the destination
+    if not RNS.Transport.has_path(destination_hash):
+        RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...")
+        RNS.Transport.request_path(destination_hash)
+        while not RNS.Transport.has_path(destination_hash):
+            time.sleep(0.1)
+
+    # Recall the server identity
+    server_identity = RNS.Identity.recall(destination_hash)
+
+    # Inform the user that we'll begin connecting
+    RNS.log("Establishing link with server...")
+
+    # When the server identity is known, we set
+    # up a destination
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.OUT,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "identifyexample"
+    )
+
+    # And create a link
+    link = RNS.Link(server_destination)
+
+    # We set a callback that will get executed
+    # every time a packet is received over the
+    # link
+    link.set_packet_callback(client_packet_received)
+
+    # We'll also set up functions to inform the
+    # user when the link is established or closed
+    link.set_link_established_callback(link_established)
+    link.set_link_closed_callback(link_closed)
+
+    # Everything is set up, so let's enter a loop
+    # for the user to interact with the example
+    client_loop()
+
+def client_loop():
+    global server_link
+
+    # Wait for the link to become active
+    while not server_link:
+        time.sleep(0.1)
+
+    should_quit = False
+    while not should_quit:
+        try:
+            print("> ", end=" ")
+            text = input()
+
+            # Check if we should quit the example
+            if text == "quit" or text == "q" or text == "exit":
+                should_quit = True
+                server_link.teardown()
+
+            # If not, send the entered text over the link
+            if text != "":
+                data = text.encode("utf-8")
+                if len(data) <= RNS.Link.MDU:
+                    RNS.Packet(server_link, data).send()
+                else:
+                    RNS.log(
+                        "Cannot send this packet, the data size of "+
+                        str(len(data))+" bytes exceeds the link packet MDU of "+
+                        str(RNS.Link.MDU)+" bytes",
+                        RNS.LOG_ERROR
+                    )
+
+        except Exception as e:
+            RNS.log("Error while sending data over the link: "+str(e))
+            should_quit = True
+            server_link.teardown()
+
+# This function is called when a link
+# has been established with the server
+def link_established(link):
+    # We store a reference to the link
+    # instance for later use
+    global server_link, client_identity
+    server_link = link
+
+    # Inform the user that the server is
+    # connected
+    RNS.log("Link established with server, identifying to remote peer...")
+
+    link.identify(client_identity)
+
+# When a link is closed, we'll inform the
+# user, and exit the program
+def link_closed(link):
+    if link.teardown_reason == RNS.Link.TIMEOUT:
+        RNS.log("The link timed out, exiting now")
+    elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
+        RNS.log("The link was closed by the server, exiting now")
+    else:
+        RNS.log("Link closed, exiting now")
+
+    time.sleep(1.5)
+    sys.exit(0)
+
+# When a packet is received over the link, we
+# simply print out the data.
+def client_packet_received(message, packet):
+    text = message.decode("utf-8")
+    RNS.log("Received data on the link: "+text)
+    print("> ", end=" ")
+    sys.stdout.flush()
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program runs at startup,
+# and parses input of from the user, and then
+# starts up the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(description="Simple link example")
+
+        parser.add_argument(
+            "-s",
+            "--server",
+            action="store_true",
+            help="wait for incoming link requests from clients"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "destination",
+            nargs="?",
+            default=None,
+            help="hexadecimal hash of the server destination",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        if args.server:
+            server(configarg)
+        else:
+            if (args.destination == None):
+                print("")
+                parser.print_help()
+                print("")
+            else:
+                client(args.destination, configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Identify.py. +

+
+
+ +

+ Requests & Responses +

+

+ The Request example explores sending requests and receiving responses. +

+
+
+
##########################################################
+# This RNS example demonstrates how to perform requests  #
+# and receive responses over a link.                     #
+##########################################################
+
+import os
+import sys
+import time
+import random
+import argparse
+import RNS
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this echo example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+##########################################################
+#### Server Part #########################################
+##########################################################
+
+# A reference to the latest client link that connected
+latest_client_link = None
+
+def random_text_generator(path, data, request_id, link_id, remote_identity, requested_at):
+    RNS.log("Generating response to request "+RNS.prettyhexrep(request_id)+" on link "+RNS.prettyhexrep(link_id))
+    texts = ["They looked up", "On each full moon", "Becky was upset", "I’ll stay away from it", "The pet shop stocks everything"]
+    return texts[random.randint(0, len(texts)-1)]
+
+# This initialisation is executed when the users chooses
+# to run as a server
+def server(configpath):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our link example
+    server_identity = RNS.Identity()
+
+    # We create a destination that clients can connect to. We
+    # want clients to create links to this destination, so we
+    # need to create a "single" destination type.
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "requestexample"
+    )
+
+    # We configure a function that will get called every time
+    # a new client creates a link to this destination.
+    server_destination.set_link_established_callback(client_connected)
+
+    # We register a request handler for handling incoming
+    # requests over any established links.
+    server_destination.register_request_handler(
+        "/random/text",
+        response_generator = random_text_generator,
+        allow = RNS.Destination.ALLOW_ALL
+    )
+
+    # Everything's ready!
+    # Let's Wait for client requests or user input
+    server_loop(server_destination)
+
+def server_loop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Request example "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, waiting for a connection."
+    )
+
+    RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+# When a client establishes a link to our server
+# destination, this function will be called with
+# a reference to the link.
+def client_connected(link):
+    global latest_client_link
+
+    RNS.log("Client connected")
+    link.set_link_closed_callback(client_disconnected)
+    latest_client_link = link
+
+def client_disconnected(link):
+    RNS.log("Client disconnected")
+
+
+##########################################################
+#### Client Part #########################################
+##########################################################
+
+# A reference to the server link
+server_link = None
+
+# This initialisation is executed when the users chooses
+# to run as a client
+def client(destination_hexhash, configpath):
+    # We need a binary representation of the destination
+    # hash that was entered on the command line
+    try:
+        dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
+        if len(destination_hexhash) != dest_len:
+            raise ValueError(
+                "Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
+            )
+
+        destination_hash = bytes.fromhex(destination_hexhash)
+    except:
+        RNS.log("Invalid destination entered. Check your input!\n")
+        sys.exit(0)
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Check if we know a path to the destination
+    if not RNS.Transport.has_path(destination_hash):
+        RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...")
+        RNS.Transport.request_path(destination_hash)
+        while not RNS.Transport.has_path(destination_hash):
+            time.sleep(0.1)
+
+    # Recall the server identity
+    server_identity = RNS.Identity.recall(destination_hash)
+
+    # Inform the user that we'll begin connecting
+    RNS.log("Establishing link with server...")
+
+    # When the server identity is known, we set
+    # up a destination
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.OUT,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "requestexample"
+    )
+
+    # And create a link
+    link = RNS.Link(server_destination)
+
+    # We'll set up functions to inform the
+    # user when the link is established or closed
+    link.set_link_established_callback(link_established)
+    link.set_link_closed_callback(link_closed)
+
+    # Everything is set up, so let's enter a loop
+    # for the user to interact with the example
+    client_loop()
+
+def client_loop():
+    global server_link
+
+    # Wait for the link to become active
+    while not server_link:
+        time.sleep(0.1)
+
+    should_quit = False
+    while not should_quit:
+        try:
+            print("> ", end=" ")
+            text = input()
+
+            # Check if we should quit the example
+            if text == "quit" or text == "q" or text == "exit":
+                should_quit = True
+                server_link.teardown()
+
+            else:
+                server_link.request(
+                    "/random/text",
+                    data = None,
+                    response_callback = got_response,
+                    failed_callback = request_failed
+                )
+
+
+        except Exception as e:
+            RNS.log("Error while sending request over the link: "+str(e))
+            should_quit = True
+            server_link.teardown()
+
+def got_response(request_receipt):
+    request_id = request_receipt.request_id
+    response = request_receipt.response
+
+    RNS.log("Got response for request "+RNS.prettyhexrep(request_id)+": "+str(response))
+
+def request_received(request_receipt):
+    RNS.log("The request "+RNS.prettyhexrep(request_receipt.request_id)+" was received by the remote peer.")
+
+def request_failed(request_receipt):
+    RNS.log("The request "+RNS.prettyhexrep(request_receipt.request_id)+" failed.")
+
+
+# This function is called when a link
+# has been established with the server
+def link_established(link):
+    # We store a reference to the link
+    # instance for later use
+    global server_link
+    server_link = link
+
+    # Inform the user that the server is
+    # connected
+    RNS.log("Link established with server, hit enter to perform a request, or type in \"quit\" to quit")
+
+# When a link is closed, we'll inform the
+# user, and exit the program
+def link_closed(link):
+    if link.teardown_reason == RNS.Link.TIMEOUT:
+        RNS.log("The link timed out, exiting now")
+    elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
+        RNS.log("The link was closed by the server, exiting now")
+    else:
+        RNS.log("Link closed, exiting now")
+
+    time.sleep(1.5)
+    sys.exit(0)
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program runs at startup,
+# and parses input of from the user, and then
+# starts up the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(description="Simple request/response example")
+
+        parser.add_argument(
+            "-s",
+            "--server",
+            action="store_true",
+            help="wait for incoming requests from clients"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "destination",
+            nargs="?",
+            default=None,
+            help="hexadecimal hash of the server destination",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        if args.server:
+            server(configarg)
+        else:
+            if (args.destination == None):
+                print("")
+                parser.print_help()
+                print("")
+            else:
+                client(args.destination, configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Request.py. +

+
+
+ +

+ Channel +

+

+ The Channel example explores using a + Channel + to send structured data between peers of a + Link. +

+
+
+
##########################################################
+# This RNS example demonstrates how to set up a link to  #
+# a destination, and pass structured messages over it    #
+# using a channel.                                       #
+##########################################################
+
+import os
+import sys
+import time
+import argparse
+from datetime import datetime
+
+import RNS
+from RNS.vendor import umsgpack
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this echo example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+##########################################################
+#### Shared Objects ######################################
+##########################################################
+
+# Channel data must be structured in a subclass of
+# MessageBase. This ensures that the channel will be able
+# to serialize and deserialize the object and multiplex it
+# with other objects. Both ends of a link will need the
+# same object definitions to be able to communicate over
+# a channel.
+#
+# Note: The objects we wish to use over the channel must
+# be registered with the channel, and each link has a
+# different channel instance. See the client_connected
+# and link_established functions in this example to see
+# how message types are registered.
+
+# Let's make a simple message class called StringMessage
+# that will convey a string with a timestamp.
+
+class StringMessage(RNS.MessageBase):
+    # The MSGTYPE class variable needs to be assigned a
+    # 2 byte integer value. This identifier allows the
+    # channel to look up your message's constructor when a
+    # message arrives over the channel.
+    #
+    # MSGTYPE must be unique across all message types we
+    # register with the channel. MSGTYPEs >= 0xf000 are
+    # reserved for the system.
+    MSGTYPE = 0x0101
+
+    # The constructor of our object must be callable with
+    # no arguments. We can have parameters, but they must
+    # have a default assignment.
+    #
+    # This is needed so the channel can create an empty
+    # version of our message into which the incoming
+    # message can be unpacked.
+    def __init__(self, data=None):
+        self.data = data
+        self.timestamp = datetime.now()
+
+    # Finally, our message needs to implement functions
+    # the channel can call to pack and unpack our message
+    # to/from the raw packet payload. We'll use the
+    # umsgpack package bundled with RNS. We could also use
+    # the struct package bundled with Python if we wanted
+    # more control over the structure of the packed bytes.
+    #
+    # Also note that packed message objects must fit
+    # entirely in one packet. The number of bytes
+    # available for message payloads can be queried from
+    # the channel using the Channel.MDU property. The
+    # channel MDU is slightly less than the link MDU due
+    # to encoding the message header.
+
+    # The pack function encodes the message contents into
+    # a byte stream.
+    def pack(self) -> bytes:
+        return umsgpack.packb((self.data, self.timestamp))
+
+    # And the unpack function decodes a byte stream into
+    # the message contents.
+    def unpack(self, raw):
+        self.data, self.timestamp = umsgpack.unpackb(raw)
+
+
+##########################################################
+#### Server Part #########################################
+##########################################################
+
+# A reference to the latest client link that connected
+latest_client_link = None
+
+# This initialisation is executed when the users chooses
+# to run as a server
+def server(configpath):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our link example
+    server_identity = RNS.Identity()
+
+    # We create a destination that clients can connect to. We
+    # want clients to create links to this destination, so we
+    # need to create a "single" destination type.
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "channelexample"
+    )
+
+    # We configure a function that will get called every time
+    # a new client creates a link to this destination.
+    server_destination.set_link_established_callback(client_connected)
+
+    # Everything's ready!
+    # Let's Wait for client requests or user input
+    server_loop(server_destination)
+
+def server_loop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Channel example "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, waiting for a connection."
+    )
+
+    RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+# When a client establishes a link to our server
+# destination, this function will be called with
+# a reference to the link.
+def client_connected(link):
+    global latest_client_link
+    latest_client_link = link
+
+    RNS.log("Client connected")
+    link.set_link_closed_callback(client_disconnected)
+
+    # Register message types and add callback to channel
+    channel = link.get_channel()
+    channel.register_message_type(StringMessage)
+    channel.add_message_handler(server_message_received)
+
+def client_disconnected(link):
+    RNS.log("Client disconnected")
+
+def server_message_received(message):
+    """
+    A message handler
+    @param message: An instance of a subclass of MessageBase
+    @return: True if message was handled
+    """
+    global latest_client_link
+    # When a message is received over any active link,
+    # the replies will all be directed to the last client
+    # that connected.
+
+    # In a message handler, any deserializable message
+    # that arrives over the link's channel will be passed
+    # to all message handlers, unless a preceding handler indicates it
+    # has handled the message.
+    #
+    #
+    if isinstance(message, StringMessage):
+        RNS.log("Received data on the link: " + message.data + " (message created at " + str(message.timestamp) + ")")
+
+        reply_message = StringMessage("I received \""+message.data+"\" over the link")
+        latest_client_link.get_channel().send(reply_message)
+
+        # Incoming messages are sent to each message
+        # handler added to the channel, in the order they
+        # were added.
+        # If any message handler returns True, the message
+        # is considered handled and any subsequent
+        # handlers are skipped.
+        return True
+
+
+##########################################################
+#### Client Part #########################################
+##########################################################
+
+# A reference to the server link
+server_link = None
+
+# This initialisation is executed when the users chooses
+# to run as a client
+def client(destination_hexhash, configpath):
+    # We need a binary representation of the destination
+    # hash that was entered on the command line
+    try:
+        dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
+        if len(destination_hexhash) != dest_len:
+            raise ValueError(
+                "Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
+            )
+
+        destination_hash = bytes.fromhex(destination_hexhash)
+    except:
+        RNS.log("Invalid destination entered. Check your input!\n")
+        sys.exit(0)
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Check if we know a path to the destination
+    if not RNS.Transport.has_path(destination_hash):
+        RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...")
+        RNS.Transport.request_path(destination_hash)
+        while not RNS.Transport.has_path(destination_hash):
+            time.sleep(0.1)
+
+    # Recall the server identity
+    server_identity = RNS.Identity.recall(destination_hash)
+
+    # Inform the user that we'll begin connecting
+    RNS.log("Establishing link with server...")
+
+    # When the server identity is known, we set
+    # up a destination
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.OUT,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "channelexample"
+    )
+
+    # And create a link
+    link = RNS.Link(server_destination)
+
+    # We'll also set up functions to inform the
+    # user when the link is established or closed
+    link.set_link_established_callback(link_established)
+    link.set_link_closed_callback(link_closed)
+
+    # Everything is set up, so let's enter a loop
+    # for the user to interact with the example
+    client_loop()
+
+def client_loop():
+    global server_link
+
+    # Wait for the link to become active
+    while not server_link:
+        time.sleep(0.1)
+
+    should_quit = False
+    while not should_quit:
+        try:
+            print("> ", end=" ")
+            text = input()
+
+            # Check if we should quit the example
+            if text == "quit" or text == "q" or text == "exit":
+                should_quit = True
+                server_link.teardown()
+
+            # If not, send the entered text over the link
+            if text != "":
+                message = StringMessage(text)
+                packed_size = len(message.pack())
+                channel = server_link.get_channel()
+                if channel.is_ready_to_send():
+                    if packed_size <= channel.mdu:
+                        channel.send(message)
+                    else:
+                        RNS.log(
+                            "Cannot send this packet, the data size of "+
+                            str(packed_size)+" bytes exceeds the link packet MDU of "+
+                            str(channel.MDU)+" bytes",
+                            RNS.LOG_ERROR
+                        )
+                else:
+                    RNS.log("Channel is not ready to send, please wait for " +
+                            "pending messages to complete.", RNS.LOG_ERROR)
+
+        except Exception as e:
+            RNS.log("Error while sending data over the link: "+str(e))
+            should_quit = True
+            server_link.teardown()
+
+# This function is called when a link
+# has been established with the server
+def link_established(link):
+    # We store a reference to the link
+    # instance for later use
+    global server_link
+    server_link = link
+
+    # Register messages and add handler to channel
+    channel = link.get_channel()
+    channel.register_message_type(StringMessage)
+    channel.add_message_handler(client_message_received)
+
+    # Inform the user that the server is
+    # connected
+    RNS.log("Link established with server, enter some text to send, or \"quit\" to quit")
+
+# When a link is closed, we'll inform the
+# user, and exit the program
+def link_closed(link):
+    if link.teardown_reason == RNS.Link.TIMEOUT:
+        RNS.log("The link timed out, exiting now")
+    elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
+        RNS.log("The link was closed by the server, exiting now")
+    else:
+        RNS.log("Link closed, exiting now")
+
+    time.sleep(1.5)
+    sys.exit(0)
+
+# When a packet is received over the channel, we
+# simply print out the data.
+def client_message_received(message):
+    if isinstance(message, StringMessage):
+        RNS.log("Received data on the link: " + message.data + " (message created at " + str(message.timestamp) + ")")
+        print("> ", end=" ")
+        sys.stdout.flush()
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program runs at startup,
+# and parses input of from the user, and then
+# starts up the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(description="Simple channel example")
+
+        parser.add_argument(
+            "-s",
+            "--server",
+            action="store_true",
+            help="wait for incoming link requests from clients"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "destination",
+            nargs="?",
+            default=None,
+            help="hexadecimal hash of the server destination",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        if args.server:
+            server(configarg)
+        else:
+            if (args.destination == None):
+                print("")
+                parser.print_help()
+                print("")
+            else:
+                client(args.destination, configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Channel.py. +

+
+
+

+ Buffer +

+

+ The Buffer example explores using buffered readers and writers to send + binary data between peers of a + Link. +

+
+
+
##########################################################
+# This RNS example demonstrates how to set up a link to  #
+# a destination, and pass binary data over it using a    #
+# channel buffer.                                        #
+##########################################################
+from __future__ import annotations
+import os
+import sys
+import time
+import argparse
+from datetime import datetime
+
+import RNS
+from RNS.vendor import umsgpack
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this echo example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+
+##########################################################
+#### Server Part #########################################
+##########################################################
+
+# A reference to the latest client link that connected
+latest_client_link = None
+
+# A reference to the latest buffer object
+latest_buffer = None
+
+# This initialisation is executed when the users chooses
+# to run as a server
+def server(configpath):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our example
+    server_identity = RNS.Identity()
+
+    # We create a destination that clients can connect to. We
+    # want clients to create links to this destination, so we
+    # need to create a "single" destination type.
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "bufferexample"
+    )
+
+    # We configure a function that will get called every time
+    # a new client creates a link to this destination.
+    server_destination.set_link_established_callback(client_connected)
+
+    # Everything's ready!
+    # Let's Wait for client requests or user input
+    server_loop(server_destination)
+
+def server_loop(destination):
+    # Let the user know that everything is ready
+    RNS.log(
+        "Link buffer example "+
+        RNS.prettyhexrep(destination.hash)+
+        " running, waiting for a connection."
+    )
+
+    RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+# When a client establishes a link to our server
+# destination, this function will be called with
+# a reference to the link.
+def client_connected(link):
+    global latest_client_link, latest_buffer
+    latest_client_link = link
+
+    RNS.log("Client connected")
+    link.set_link_closed_callback(client_disconnected)
+
+    # If a new connection is received, the old reader
+    # needs to be disconnected.
+    if latest_buffer:
+        latest_buffer.close()
+
+
+    # Create buffer objects.
+    #   The stream_id parameter to these functions is
+    #   a bit like a file descriptor, except that it
+    #   is unique to the *receiver*.
+    #
+    #   In this example, both the reader and the writer
+    #   use stream_id = 0, but there are actually two
+    #   separate unidirectional streams flowing in
+    #   opposite directions.
+    #
+    channel = link.get_channel()
+    latest_buffer = RNS.Buffer.create_bidirectional_buffer(0, 0, channel, server_buffer_ready)
+
+def client_disconnected(link):
+    RNS.log("Client disconnected")
+
+def server_buffer_ready(ready_bytes: int):
+    """
+    Callback from buffer when buffer has data available
+
+    :param ready_bytes: The number of bytes ready to read
+    """
+    global latest_buffer
+
+    data = latest_buffer.read(ready_bytes)
+    data = data.decode("utf-8")
+
+    RNS.log("Received data over the buffer: " + data)
+
+    reply_message = "I received \""+data+"\" over the buffer"
+    reply_message = reply_message.encode("utf-8")
+    latest_buffer.write(reply_message)
+    latest_buffer.flush()
+
+
+
+
+##########################################################
+#### Client Part #########################################
+##########################################################
+
+# A reference to the server link
+server_link = None
+
+# A reference to the buffer object, needed to share the
+# object from the link connected callback to the client
+# loop.
+buffer = None
+
+# This initialisation is executed when the users chooses
+# to run as a client
+def client(destination_hexhash, configpath):
+    # We need a binary representation of the destination
+    # hash that was entered on the command line
+    try:
+        dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
+        if len(destination_hexhash) != dest_len:
+            raise ValueError(
+                "Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
+            )
+
+        destination_hash = bytes.fromhex(destination_hexhash)
+    except:
+        RNS.log("Invalid destination entered. Check your input!\n")
+        sys.exit(0)
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Check if we know a path to the destination
+    if not RNS.Transport.has_path(destination_hash):
+        RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...")
+        RNS.Transport.request_path(destination_hash)
+        while not RNS.Transport.has_path(destination_hash):
+            time.sleep(0.1)
+
+    # Recall the server identity
+    server_identity = RNS.Identity.recall(destination_hash)
+
+    # Inform the user that we'll begin connecting
+    RNS.log("Establishing link with server...")
+
+    # When the server identity is known, we set
+    # up a destination
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.OUT,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "bufferexample"
+    )
+
+    # And create a link
+    link = RNS.Link(server_destination)
+
+    # We'll also set up functions to inform the
+    # user when the link is established or closed
+    link.set_link_established_callback(link_established)
+    link.set_link_closed_callback(link_closed)
+
+    # Everything is set up, so let's enter a loop
+    # for the user to interact with the example
+    client_loop()
+
+def client_loop():
+    global server_link
+
+    # Wait for the link to become active
+    while not server_link:
+        time.sleep(0.1)
+
+    should_quit = False
+    while not should_quit:
+        try:
+            print("> ", end=" ")
+            text = input()
+
+            # Check if we should quit the example
+            if text == "quit" or text == "q" or text == "exit":
+                should_quit = True
+                server_link.teardown()
+            else:
+                # Otherwise, encode the text and write it to the buffer.
+                text = text.encode("utf-8")
+                buffer.write(text)
+                # Flush the buffer to force the data to be sent.
+                buffer.flush()
+
+
+        except Exception as e:
+            RNS.log("Error while sending data over the link buffer: "+str(e))
+            should_quit = True
+            server_link.teardown()
+
+# This function is called when a link
+# has been established with the server
+def link_established(link):
+    # We store a reference to the link
+    # instance for later use
+    global server_link, buffer
+    server_link = link
+
+    # Create buffer, see server_client_connected() for
+    # more detail about setting up the buffer.
+    channel = link.get_channel()
+    buffer = RNS.Buffer.create_bidirectional_buffer(0, 0, channel, client_buffer_ready)
+
+    # Inform the user that the server is
+    # connected
+    RNS.log("Link established with server, enter some text to send, or \"quit\" to quit")
+
+# When a link is closed, we'll inform the
+# user, and exit the program
+def link_closed(link):
+    if link.teardown_reason == RNS.Link.TIMEOUT:
+        RNS.log("The link timed out, exiting now")
+    elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
+        RNS.log("The link was closed by the server, exiting now")
+    else:
+        RNS.log("Link closed, exiting now")
+
+    time.sleep(1.5)
+    sys.exit(0)
+
+# When the buffer has new data, read it and write it to the terminal.
+def client_buffer_ready(ready_bytes: int):
+    global buffer
+    data = buffer.read(ready_bytes)
+    RNS.log("Received data over the link buffer: " + data.decode("utf-8"))
+    print("> ", end=" ")
+    sys.stdout.flush()
+
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program runs at startup,
+# and parses input of from the user, and then
+# starts up the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(description="Simple buffer example")
+
+        parser.add_argument(
+            "-s",
+            "--server",
+            action="store_true",
+            help="wait for incoming link requests from clients"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "destination",
+            nargs="?",
+            default=None,
+            help="hexadecimal hash of the server destination",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        if args.server:
+            server(configarg)
+        else:
+            if (args.destination == None):
+                print("")
+                parser.print_help()
+                print("")
+            else:
+                client(args.destination, configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Buffer.py. +

+
+
+ +

+ Filetransfer +

+

+ The Filetransfer example implements a basic file-server program that + allow clients to connect and download files. The program uses the Resource + interface to efficiently pass files of any size over a Reticulum + Link. +

+
+
+
##########################################################
+# This RNS example demonstrates a simple filetransfer    #
+# server and client program. The server will serve a     #
+# directory of files, and the clients can list and       #
+# download files from the server.                        #
+#                                                        #
+# Please note that using RNS Resources for large file    #
+# transfers is not recommended, since compression,       #
+# encryption and hashmap sequencing can take a long time #
+# on systems with slow CPUs, which will probably result  #
+# in the client timing out before the resource sender    #
+# can complete preparing the resource.                   #
+#                                                        #
+# If you need to transfer large files, use the Bundle    #
+# class instead, which will automatically slice the data #
+# into chunks suitable for packing as a Resource.        #
+##########################################################
+
+import os
+import sys
+import time
+import threading
+import argparse
+import RNS
+import RNS.vendor.umsgpack as umsgpack
+
+# Let's define an app name. We'll use this for all
+# destinations we create. Since this echo example
+# is part of a range of example utilities, we'll put
+# them all within the app namespace "example_utilities"
+APP_NAME = "example_utilities"
+
+# We'll also define a default timeout, in seconds
+APP_TIMEOUT = 45.0
+
+##########################################################
+#### Server Part #########################################
+##########################################################
+
+serve_path = None
+
+# This initialisation is executed when the users chooses
+# to run as a server
+def server(configpath, path):
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+    # Randomly create a new identity for our file server
+    server_identity = RNS.Identity()
+
+    global serve_path
+    serve_path = path
+
+    # We create a destination that clients can connect to. We
+    # want clients to create links to this destination, so we
+    # need to create a "single" destination type.
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.IN,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "filetransfer",
+        "server"
+    )
+
+    # We configure a function that will get called every time
+    # a new client creates a link to this destination.
+    server_destination.set_link_established_callback(client_connected)
+
+    # Everything's ready!
+    # Let's Wait for client requests or user input
+    announceLoop(server_destination)
+
+def announceLoop(destination):
+    # Let the user know that everything is ready
+    RNS.log("File server "+RNS.prettyhexrep(destination.hash)+" running")
+    RNS.log("Hit enter to manually send an announce (Ctrl-C to quit)")
+
+    # We enter a loop that runs until the users exits.
+    # If the user hits enter, we will announce our server
+    # destination on the network, which will let clients
+    # know how to create messages directed towards it.
+    while True:
+        entered = input()
+        destination.announce()
+        RNS.log("Sent announce from "+RNS.prettyhexrep(destination.hash))
+
+# Here's a convenience function for listing all files
+# in our served directory
+def list_files():
+    # We add all entries from the directory that are
+    # actual files, and does not start with "."
+    global serve_path
+    return [file for file in os.listdir(serve_path) if os.path.isfile(os.path.join(serve_path, file)) and file[:1] != "."]
+
+# When a client establishes a link to our server
+# destination, this function will be called with
+# a reference to the link. We then send the client
+# a list of files hosted on the server.
+def client_connected(link):
+    # Check if the served directory still exists
+    if os.path.isdir(serve_path):
+        RNS.log("Client connected, sending file list...")
+
+        link.set_link_closed_callback(client_disconnected)
+
+        # We pack a list of files for sending in a packet
+        data = umsgpack.packb(list_files())
+
+        # Check the size of the packed data
+        if len(data) <= RNS.Link.MDU:
+            # If it fits in one packet, we will just
+            # send it as a single packet over the link.
+            list_packet = RNS.Packet(link, data)
+            list_receipt = list_packet.send()
+            list_receipt.set_timeout(APP_TIMEOUT)
+            list_receipt.set_delivery_callback(list_delivered)
+            list_receipt.set_timeout_callback(list_timeout)
+        else:
+            RNS.log("Too many files in served directory!", RNS.LOG_ERROR)
+            RNS.log("You should implement a function to split the filelist over multiple packets.", RNS.LOG_ERROR)
+            RNS.log("Hint: The client already supports it :)", RNS.LOG_ERROR)
+
+        # After this, we're just going to keep the link
+        # open until the client requests a file. We'll
+        # configure a function that get's called when
+        # the client sends a packet with a file request.
+        link.set_packet_callback(client_request)
+    else:
+        RNS.log("Client connected, but served path no longer exists!", RNS.LOG_ERROR)
+        link.teardown()
+
+def client_disconnected(link):
+    RNS.log("Client disconnected")
+
+def client_request(message, packet):
+    global serve_path
+
+    try:
+        filename = message.decode("utf-8")
+    except Exception as e:
+        filename = None
+
+    if filename in list_files():
+        try:
+            # If we have the requested file, we'll
+            # read it and pack it as a resource
+            RNS.log("Client requested \""+filename+"\"")
+            file = open(os.path.join(serve_path, filename), "rb")
+
+            file_resource = RNS.Resource(
+                file,
+                packet.link,
+                callback=resource_sending_concluded
+            )
+
+            file_resource.filename = filename
+        except Exception as e:
+            # If somethign went wrong, we close
+            # the link
+            RNS.log("Error while reading file \""+filename+"\"", RNS.LOG_ERROR)
+            packet.link.teardown()
+            raise e
+    else:
+        # If we don't have it, we close the link
+        RNS.log("Client requested an unknown file")
+        packet.link.teardown()
+
+# This function is called on the server when a
+# resource transfer concludes.
+def resource_sending_concluded(resource):
+    if hasattr(resource, "filename"):
+        name = resource.filename
+    else:
+        name = "resource"
+
+    if resource.status == RNS.Resource.COMPLETE:
+        RNS.log("Done sending \""+name+"\" to client")
+    elif resource.status == RNS.Resource.FAILED:
+        RNS.log("Sending \""+name+"\" to client failed")
+
+def list_delivered(receipt):
+    RNS.log("The file list was received by the client")
+
+def list_timeout(receipt):
+    RNS.log("Sending list to client timed out, closing this link")
+    link = receipt.destination
+    link.teardown()
+
+##########################################################
+#### Client Part #########################################
+##########################################################
+
+# We store a global list of files available on the server
+server_files      = []
+
+# A reference to the server link
+server_link       = None
+
+# And a reference to the current download
+current_download  = None
+current_filename  = None
+
+# Variables to store download statistics
+download_started  = 0
+download_finished = 0
+download_time     = 0
+transfer_size     = 0
+file_size         = 0
+
+
+# This initialisation is executed when the users chooses
+# to run as a client
+def client(destination_hexhash, configpath):
+    # We need a binary representation of the destination
+    # hash that was entered on the command line
+    try:
+        dest_len = (RNS.Reticulum.TRUNCATED_HASHLENGTH//8)*2
+        if len(destination_hexhash) != dest_len:
+            raise ValueError(
+                "Destination length is invalid, must be {hex} hexadecimal characters ({byte} bytes).".format(hex=dest_len, byte=dest_len//2)
+            )
+
+        destination_hash = bytes.fromhex(destination_hexhash)
+    except:
+        RNS.log("Invalid destination entered. Check your input!\n")
+        sys.exit(0)
+
+    # We must first initialise Reticulum
+    reticulum = RNS.Reticulum(configpath)
+
+
+    # Check if we know a path to the destination
+    if not RNS.Transport.has_path(destination_hash):
+        RNS.log("Destination is not yet known. Requesting path and waiting for announce to arrive...")
+        RNS.Transport.request_path(destination_hash)
+        while not RNS.Transport.has_path(destination_hash):
+            time.sleep(0.1)
+
+    # Recall the server identity
+    server_identity = RNS.Identity.recall(destination_hash)
+
+    # Inform the user that we'll begin connecting
+    RNS.log("Establishing link with server...")
+
+    # When the server identity is known, we set
+    # up a destination
+    server_destination = RNS.Destination(
+        server_identity,
+        RNS.Destination.OUT,
+        RNS.Destination.SINGLE,
+        APP_NAME,
+        "filetransfer",
+        "server"
+    )
+
+    # We also want to automatically prove incoming packets
+    server_destination.set_proof_strategy(RNS.Destination.PROVE_ALL)
+
+    # And create a link
+    link = RNS.Link(server_destination)
+
+    # We expect any normal data packets on the link
+    # to contain a list of served files, so we set
+    # a callback accordingly
+    link.set_packet_callback(filelist_received)
+
+    # We'll also set up functions to inform the
+    # user when the link is established or closed
+    link.set_link_established_callback(link_established)
+    link.set_link_closed_callback(link_closed)
+
+    # And set the link to automatically begin
+    # downloading advertised resources
+    link.set_resource_strategy(RNS.Link.ACCEPT_ALL)
+    link.set_resource_started_callback(download_began)
+    link.set_resource_concluded_callback(download_concluded)
+
+    menu()
+
+# Requests the specified file from the server
+def download(filename):
+    global server_link, menu_mode, current_filename, transfer_size, download_started
+    current_filename = filename
+    download_started = 0
+    transfer_size    = 0
+
+    # We just create a packet containing the
+    # requested filename, and send it down the
+    # link. We also specify we don't need a
+    # packet receipt.
+    request_packet = RNS.Packet(server_link, filename.encode("utf-8"), create_receipt=False)
+    request_packet.send()
+
+    print("")
+    print(("Requested \""+filename+"\" from server, waiting for download to begin..."))
+    menu_mode = "download_started"
+
+# This function runs a simple menu for the user
+# to select which files to download, or quit
+menu_mode = None
+def menu():
+    global server_files, server_link
+    # Wait until we have a filelist
+    while len(server_files) == 0:
+        time.sleep(0.1)
+    RNS.log("Ready!")
+    time.sleep(0.5)
+
+    global menu_mode
+    menu_mode = "main"
+    should_quit = False
+    while (not should_quit):
+        print_menu()
+
+        while not menu_mode == "main":
+            # Wait
+            time.sleep(0.25)
+
+        user_input = input()
+        if user_input == "q" or user_input == "quit" or user_input == "exit":
+            should_quit = True
+            print("")
+        else:
+            if user_input in server_files:
+                download(user_input)
+            else:
+                try:
+                    if 0 <= int(user_input) < len(server_files):
+                        download(server_files[int(user_input)])
+                except:
+                    pass
+
+    if should_quit:
+        server_link.teardown()
+
+# Prints out menus or screens for the
+# various states of the client program.
+# It's simple and quite uninteresting.
+# I won't go into detail here. Just
+# strings basically.
+def print_menu():
+    global menu_mode, download_time, download_started, download_finished, transfer_size, file_size
+
+    if menu_mode == "main":
+        clear_screen()
+        print_filelist()
+        print("")
+        print("Select a file to download by entering name or number, or q to quit")
+        print(("> "), end=' ')
+    elif menu_mode == "download_started":
+        download_began = time.time()
+        while menu_mode == "download_started":
+            time.sleep(0.1)
+            if time.time() > download_began+APP_TIMEOUT:
+                print("The download timed out")
+                time.sleep(1)
+                server_link.teardown()
+
+    if menu_mode == "downloading":
+        print("Download started")
+        print("")
+        while menu_mode == "downloading":
+            global current_download
+            percent = round(current_download.get_progress() * 100.0, 1)
+            print(("\rProgress: "+str(percent)+" %   "), end=' ')
+            sys.stdout.flush()
+            time.sleep(0.1)
+
+    if menu_mode == "save_error":
+        print(("\rProgress: 100.0 %"), end=' ')
+        sys.stdout.flush()
+        print("")
+        print("Could not write downloaded file to disk")
+        current_download.status = RNS.Resource.FAILED
+        menu_mode = "download_concluded"
+
+    if menu_mode == "download_concluded":
+        if current_download.status == RNS.Resource.COMPLETE:
+            print(("\rProgress: 100.0 %"), end=' ')
+            sys.stdout.flush()
+
+            # Print statistics
+            hours, rem = divmod(download_time, 3600)
+            minutes, seconds = divmod(rem, 60)
+            timestring = "{:0>2}:{:0>2}:{:05.2f}".format(int(hours),int(minutes),seconds)
+            print("")
+            print("")
+            print("--- Statistics -----")
+            print("\tTime taken       : "+timestring)
+            print("\tFile size        : "+size_str(file_size))
+            print("\tData transferred : "+size_str(transfer_size))
+            print("\tEffective rate   : "+size_str(file_size/download_time, suffix='b')+"/s")
+            print("\tTransfer rate    : "+size_str(transfer_size/download_time, suffix='b')+"/s")
+            print("")
+            print("The download completed! Press enter to return to the menu.")
+            print("")
+            input()
+
+        else:
+            print("")
+            print("The download failed! Press enter to return to the menu.")
+            input()
+
+        current_download = None
+        menu_mode = "main"
+        print_menu()
+
+# This function prints out a list of files
+# on the connected server.
+def print_filelist():
+    global server_files
+    print("Files on server:")
+    for index,file in enumerate(server_files):
+        print("\t("+str(index)+")\t"+file)
+
+def filelist_received(filelist_data, packet):
+    global server_files, menu_mode
+    try:
+        # Unpack the list and extend our
+        # local list of available files
+        filelist = umsgpack.unpackb(filelist_data)
+        for file in filelist:
+            if not file in server_files:
+                server_files.append(file)
+
+        # If the menu is already visible,
+        # we'll update it with what was
+        # just received
+        if menu_mode == "main":
+            print_menu()
+    except:
+        RNS.log("Invalid file list data received, closing link")
+        packet.link.teardown()
+
+# This function is called when a link
+# has been established with the server
+def link_established(link):
+    # We store a reference to the link
+    # instance for later use
+    global server_link
+    server_link = link
+
+    # Inform the user that the server is
+    # connected
+    RNS.log("Link established with server")
+    RNS.log("Waiting for filelist...")
+
+    # And set up a small job to check for
+    # a potential timeout in receiving the
+    # file list
+    thread = threading.Thread(target=filelist_timeout_job, daemon=True)
+    thread.start()
+
+# This job just sleeps for the specified
+# time, and then checks if the file list
+# was received. If not, the program will
+# exit.
+def filelist_timeout_job():
+    time.sleep(APP_TIMEOUT)
+
+    global server_files
+    if len(server_files) == 0:
+        RNS.log("Timed out waiting for filelist, exiting")
+        sys.exit(0)
+
+
+# When a link is closed, we'll inform the
+# user, and exit the program
+def link_closed(link):
+    if link.teardown_reason == RNS.Link.TIMEOUT:
+        RNS.log("The link timed out, exiting now")
+    elif link.teardown_reason == RNS.Link.DESTINATION_CLOSED:
+        RNS.log("The link was closed by the server, exiting now")
+    else:
+        RNS.log("Link closed, exiting now")
+
+    time.sleep(1.5)
+    sys.exit(0)
+
+# When RNS detects that the download has
+# started, we'll update our menu state
+# so the user can be shown a progress of
+# the download.
+def download_began(resource):
+    global menu_mode, current_download, download_started, transfer_size, file_size
+    current_download = resource
+
+    if download_started == 0:
+        download_started = time.time()
+
+    transfer_size += resource.size
+    file_size = resource.total_size
+
+    menu_mode = "downloading"
+
+# When the download concludes, successfully
+# or not, we'll update our menu state and 
+# inform the user about how it all went.
+def download_concluded(resource):
+    global menu_mode, current_filename, download_started, download_finished, download_time
+    download_finished = time.time()
+    download_time = download_finished - download_started
+
+    saved_filename = current_filename
+
+    if resource.status == RNS.Resource.COMPLETE:
+        counter = 0
+        while os.path.isfile(saved_filename):
+            counter += 1
+            saved_filename = current_filename+"."+str(counter)
+
+        try:
+            file = open(saved_filename, "wb")
+            file.write(resource.data.read())
+            file.close()
+            menu_mode = "download_concluded"
+        except:
+            menu_mode = "save_error"
+    else:
+        menu_mode = "download_concluded"
+
+# A convenience function for printing a human-
+# readable file size
+def size_str(num, suffix='B'):
+    units = ['','Ki','Mi','Gi','Ti','Pi','Ei','Zi']
+    last_unit = 'Yi'
+
+    if suffix == 'b':
+        num *= 8
+        units = ['','K','M','G','T','P','E','Z']
+        last_unit = 'Y'
+
+    for unit in units:
+        if abs(num) < 1024.0:
+            return "%3.2f %s%s" % (num, unit, suffix)
+        num /= 1024.0
+    return "%.2f %s%s" % (num, last_unit, suffix)
+
+# A convenience function for clearing the screen
+def clear_screen():
+    os.system('cls' if os.name=='nt' else 'clear')
+
+##########################################################
+#### Program Startup #####################################
+##########################################################
+
+# This part of the program runs at startup,
+# and parses input of from the user, and then
+# starts up the desired program mode.
+if __name__ == "__main__":
+    try:
+        parser = argparse.ArgumentParser(
+            description="Simple file transfer server and client utility"
+        )
+
+        parser.add_argument(
+            "-s",
+            "--serve",
+            action="store",
+            metavar="dir",
+            help="serve a directory of files to clients"
+        )
+
+        parser.add_argument(
+            "--config",
+            action="store",
+            default=None,
+            help="path to alternative Reticulum config directory",
+            type=str
+        )
+
+        parser.add_argument(
+            "destination",
+            nargs="?",
+            default=None,
+            help="hexadecimal hash of the server destination",
+            type=str
+        )
+
+        args = parser.parse_args()
+
+        if args.config:
+            configarg = args.config
+        else:
+            configarg = None
+
+        if args.serve:
+            if os.path.isdir(args.serve):
+                server(configarg, args.serve)
+            else:
+                RNS.log("The specified directory does not exist")
+        else:
+            if (args.destination == None):
+                print("")
+                parser.print_help()
+                print("")
+            else:
+                client(args.destination, configarg)
+
+    except KeyboardInterrupt:
+        print("")
+        sys.exit(0)
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/Filetransfer.py. +

+
+
+ +

+ Custom Interfaces +

+

+ The ExampleInterface demonstrates creating custom interfaces for + Reticulum. Any number of custom interfaces can be loaded and utilised by + Reticulum, and will be fully on-par with natively included interfaces, including + all supported + interface modes + and + common configuration options. +

+
+
+
# This example illustrates creating a custom interface
+# definition, that can be loaded and used by Reticulum at
+# runtime. Any number of custom interfaces can be created
+# and loaded. To use the interface place it in the folder
+# ~/.reticulum/interfaces, and add an interface entry to
+# your Reticulum configuration file similar to this:
+
+#  [[Example Custom Interface]]
+#    type = ExampleInterface
+#    enabled = no
+#    mode = gateway
+#    port = /dev/ttyUSB0
+#    speed = 115200
+#    databits = 8
+#    parity = none
+#    stopbits = 1
+
+from time import sleep
+import sys
+import threading
+import time
+
+# This HDLC helper class is used by the interface
+# to delimit and packetize data over the physical
+# medium - in this case a serial connection.
+class HDLC():
+    # This example 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
+
+# Let's define our custom interface class. It must
+# be a sub-class of the RNS "Interface" class.
+class ExampleInterface(Interface):
+    # All interface classes must define a default
+    # IFAC size, used in IFAC setup when the user
+    # has not specified a custom IFAC size. This
+    # option is specified in bytes.
+    DEFAULT_IFAC_SIZE = 8
+
+    # The following properties are local to this
+    # particular interface implementation.
+    owner    = None
+    port     = None
+    speed    = None
+    databits = None
+    parity   = None
+    stopbits = None
+    serial   = None
+
+    # All Reticulum interfaces must have an __init__
+    # method that takes 2 positional arguments:
+    # The owner RNS Transport instance, and a dict
+    # of configuration values.
+    def __init__(self, owner, configuration):
+
+        # The following lines demonstrate handling
+        # potential dependencies required for the
+        # interface to function correctly.
+        import importlib
+        if importlib.util.find_spec('serial') != None:
+            import serial
+        else:
+            RNS.log("Using this interface requires a serial communication module to be installed.", RNS.LOG_CRITICAL)
+            RNS.log("You can install one with the command: python3 -m pip install pyserial", RNS.LOG_CRITICAL)
+            RNS.panic()
+
+        # We start out by initialising the super-class
+        super().__init__()
+
+        # To make sure the configuration data is in the
+        # correct format, we parse it through the following
+        # method on the generic Interface class. This step
+        # is required to ensure compatibility on all the
+        # platforms that Reticulum supports.
+        ifconf    = Interface.get_config_obj(configuration)
+
+        # Read the interface name from the configuration
+        # and set it on our interface instance.
+        name      = ifconf["name"]
+        self.name = name
+
+        # We read configuration parameters from the supplied
+        # configuration data, and provide default values in
+        # case any are missing.
+        port      = ifconf["port"] if "port" in ifconf else None
+        speed     = int(ifconf["speed"]) if "speed" in ifconf else 9600
+        databits  = int(ifconf["databits"]) if "databits" in ifconf else 8
+        parity    = ifconf["parity"] if "parity" in ifconf else "N"
+        stopbits  = int(ifconf["stopbits"]) if "stopbits" in ifconf else 1
+
+        # In case no port is specified, we abort setup by
+        # raising an exception.
+        if port == None:
+            raise ValueError(f"No port specified for {self}")
+
+        # All interfaces must supply a hardware MTU value
+        # to the RNS Transport instance. This value should
+        # be the maximum data packet payload size that the
+        # underlying medium is capable of handling in all
+        # cases without any segmentation.
+        self.HW_MTU = 564
+
+        # We initially set the "online" property to false,
+        # since the interface has not actually been fully
+        # initialised and connected yet.
+        self.online   = False
+
+        # In this case, we can also set the indicated bit-
+        # rate of the interface to the serial port speed.
+        self.bitrate  = speed
+
+        # Configure internal properties on the interface
+        # according to the supplied configuration.
+        self.pyserial = serial
+        self.serial   = None
+        self.owner    = owner
+        self.port     = port
+        self.speed    = speed
+        self.databits = databits
+        self.parity   = serial.PARITY_NONE
+        self.stopbits = stopbits
+        self.timeout  = 100
+
+        if parity.lower() == "e" or parity.lower() == "even":
+            self.parity = serial.PARITY_EVEN
+
+        if parity.lower() == "o" or parity.lower() == "odd":
+            self.parity = serial.PARITY_ODD
+
+        # Since all required parameters are now configured,
+        # we will try opening the serial port.
+        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 opening the port succeeded, run any post-open
+        # configuration required.
+        if self.serial.is_open:
+            self.configure_device()
+        else:
+            raise IOError("Could not open serial port")
+
+    # Open the serial port with supplied configuration
+    # parameters and store a reference to the open port.
+    def open_port(self):
+        RNS.log("Opening serial port "+self.port+"...", RNS.LOG_VERBOSE)
+        self.serial = self.pyserial.Serial(
+            port = self.port,
+            baudrate = self.speed,
+            bytesize = self.databits,
+            parity = self.parity,
+            stopbits = self.stopbits,
+            xonxoff = False,
+            rtscts = False,
+            timeout = 0,
+            inter_byte_timeout = None,
+            write_timeout = None,
+            dsrdtr = False,
+        )
+
+    # The only thing required after opening the port
+    # is to wait a small amount of time for the
+    # hardware to initialise and then start a thread
+    # that reads any incoming data from the device.
+    def configure_device(self):
+        sleep(0.5)
+        thread = threading.Thread(target=self.read_loop)
+        thread.daemon = True
+        thread.start()
+        self.online = True
+        RNS.log("Serial port "+self.port+" is now open", RNS.LOG_VERBOSE)
+
+
+    # This method will be called from our read-loop
+    # whenever a full packet has been received over
+    # the underlying medium.
+    def process_incoming(self, data):
+        # Update our received bytes counter
+        self.rxb += len(data)
+
+        # And send the data packet to the Transport
+        # instance for processing.
+        self.owner.inbound(data, self)
+
+    # The running Reticulum Transport instance will
+    # call this method on the interface whenever the
+    # interface must transmit a packet.
+    def process_outgoing(self,data):
+        if self.online:
+            # First, escape and packetize the data
+            # according to HDLC framing.
+            data = bytes([HDLC.FLAG])+HDLC.escape(data)+bytes([HDLC.FLAG])
+
+            # Then write the framed data to the port
+            written = self.serial.write(data)
+
+            # Update the transmitted bytes counter
+            # and ensure that all data was written
+            self.txb += len(data)
+            if written != len(data):
+                raise IOError("Serial interface only wrote "+str(written)+" bytes of "+str(len(data)))
+
+    # This read loop runs in a thread and continously
+    # receives bytes from the underlying serial port.
+    # When a full packet has been received, it will
+    # be sent to the process_incoming methed, which
+    # will in turn pass it to the Transport instance.
+    def read_loop(self):
+        try:
+            in_frame = False
+            escape = False
+            data_buffer = b""
+            last_read_ms = int(time.time()*1000)
+
+            while self.serial.is_open:
+                if self.serial.in_waiting:
+                    byte = ord(self.serial.read(1))
+                    last_read_ms = int(time.time()*1000)
+
+                    if (in_frame and byte == HDLC.FLAG):
+                        in_frame = False
+                        self.process_incoming(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])
+
+                else:
+                    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()
+
+    # This method handles serial port disconnects.
+    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))
+
+    # Signal to Reticulum that this interface should
+    # not perform any ingress limiting.
+    def should_ingress_limit(self):
+        return False
+
+    # We must provide a string representation of this
+    # interface, that is used whenever the interface
+    # is printed in logs or external programs.
+    def __str__(self):
+        return "ExampleInterface["+self.name+"]"
+
+# Finally, register the defined interface class as the
+# target class for Reticulum to use as an interface
+interface_class = ExampleInterface
+
+
+
+

+ This example can also be found at + https://github.com/markqvist/Reticulum/blob/master/Examples/ExampleInterface.py. +

+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/forhumans.html b/docs/forhumans.html new file mode 100644 index 0000000..cbe20a0 --- /dev/null +++ b/docs/forhumans.html @@ -0,0 +1,468 @@ + + + + + + + + + + + + + + An Explanation of Reticulum for Human Beings - Reticulum Network Stack 1.1.3 + documentation + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+

+ An Explanation of Reticulum for Human Beings +

+
+
+
+
+ +
+
+ + Generated with Sphinx and + Furo +
+
+
+
+
+ +
+
+ + + + + + + + diff --git a/docs/genindex.html b/docs/genindex.html new file mode 100644 index 0000000..56bc7ed --- /dev/null +++ b/docs/genindex.html @@ -0,0 +1,1526 @@ + + + + + + + + + + + + Index - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+

Index

+
+ _ | A | + B | C | + D | E | + F | G | + H | I | + K | L | + M | N | + P | R | + S | T | + U | V +
+
+
+

_

+ + + + + + +
+ +
+
+ +
+

A

+ + + + + + + +
+ + + +
+
+ +
+

B

+ + + + + + +
+ +
+
+ +
+

C

+ + + + + + + +
+ + + +
+
+ +
+

D

+ + + + + + + +
+ + + +
+
+ +
+

E

+ + + + + + + +
+ + + +
+
+ +
+

F

+ + + + + + + +
+ + + +
+
+ +
+

G

+ + + + + + + +
+ + + +
+
+ +
+

H

+ + + + + + + +
+ + + +
+
+ +
+

I

+ + + + + + + +
+ + + +
+
+ +
+

K

+ + + + + + + +
+ + + +
+
+ +
+

L

+ + + + + + + +
+ + + +
+
+ +
+

M

+ + + + + + + +
+ + + +
+
+ +
+

N

+ + + + + + + +
+ + + +
+
+ +
+

P

+ + + + + + + +
+ + + +
+
+ +
+

R

+ + + + + + + +
+ + + +
+
+ +
+

S

+ + + + + + + +
+ + + +
+
+ +
+

T

+ + + + + + + +
+ + + +
+
+ +
+

U

+ + + + + + +
+ +
+
+ +
+

V

+ + + + + + +
+ +
+
+
+
+
+ +
+
+ + Официальный сайт проекта Reticulum.network
+ Официальный репозиторий на GitHub +
+
+
+
+
+ +
+
+ + + + + + + + diff --git a/docs/gettingstartedfast.html b/docs/gettingstartedfast.html new file mode 100644 index 0000000..f95d78d --- /dev/null +++ b/docs/gettingstartedfast.html @@ -0,0 +1,2222 @@ + + + + + + + + + + + + + + + Быстрый старт - Reticulum Network Stack 1.1.3 documentation + + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+

+ Быстрый старт +

+

+ Лучший способ начать работу с сетью Reticulum зависит от ваших целей. + В этом руководстве изложены разумные варианты начала для разных сценариев. +

+
+

+ Автономная установка Reticulum +

+

+ Если вы просто хотите установить Reticulum и сопутствующие утилиты, самый простой + способ — использовать менеджер пакетов: + pip +

+
+
+
pip install rns
+
+
+

+ Если pip еще не установлен, вы можете установить его с помощью менеджера пакетов вашей системы, + выполнив команду: + + sudo + apt + install + python3-pip, + + sudo + pamac + install + python-pip + или аналогичную. +

+

+ Вы также можете скачать готовые + + wheel‑пакеты Reticulum с GitHub или + других каналов выпуска и установить их офлайн с помощью + + pip: +

+
+
+
pip install ./rns-1.1.2-py3-none-any.whl
+
+
+

+ На платформах, где установка пользовательских пакетов через + pip ограничена, может потребоваться вручную разрешить её с помощью флага командной строки + --break-system-packages + при установке. Этот флаг не повредит никакие пакеты, + если только вы не устанавливали Reticulum напрямую через менеджер пакетов вашей операционной системы. +

+
+
+
pip install rns --break-system-packages
+
+
+

+ Более подробные инструкции по установке см. в разделе + Примечания по установке для конкретных платформ +

+

+ После завершения установки может быть полезно обратиться к главе + Использование Reticulum на вашей системе +

+
+

+ Решение проблем с зависимостями и установкой +

+

+ На некоторых платформах могут отсутствовать бинарные пакеты для всех зависимостей, и установка через + pip + может завершаться с ошибкой. + В таких случаях проблему обычно можно решить, + установив пакеты + development essentials для вашей платформы: +

+
+
+
# Debian / Ubuntu / Derivatives
+sudo apt install build-essential
+
+# Arch / Manjaro / Derivatives
+sudo pamac install base-devel
+
+# Fedora
+sudo dnf groupinstall "Development Tools" "Development Libraries"
+
+# openSUSE
+sudo zypper install -t pattern devel_basis
+
+
+
+

+ После установки базовых пакетов разработки + pip + должен быть в состоянии скомпилировать любые отсутствующие зависимости из исходного кода и + завершить установку даже на платформах, на которых нет готовых скомпилированных пакетов. +

+
+
+
+

+ Попробовать программу на базе Reticulum +

+

+ Если вы просто хотите попробовать использовать программу, построенную на Reticulum, существует + множество разных программ, которые обеспечивают базовую связь и различные другие полезные функции, + даже в сетях Reticulum с чрезвычайно низкой пропускной способностью. +

+
+
+

+ Использование встроенных утилит +

+

+ Reticulum поставляется с набором встроенных утилит, которые упрощают управление сетью, + проверку подключения и делают Reticulum доступным для других программ в вашей системе. +

+

+ Вы можете использовать + + rnsd + для запуска Reticulum в фоне или в режиме + foreground, + а утилиты + rnstatus, + rnpath + и + rnprobe + — для просмотра и запроса состояния сети и подключения. +

+

+ Чтобы узнать больше об этих утилитах, обратитесь к разделу + Использование Reticulum на вашей системе + в данном руководстве. +

+
+
+

+ Создание сети с помощью Reticulum +

+

+ Чтобы создать сеть, вам необходимо указать один или несколько + интерфейсов, которые будет использовать Reticulum. + Это делается в конфигурационном файле Reticulum, который по умолчанию находится в + ~/.reticulum/config. Вы можете получить пример конфигурационного файла со всеми опциями с помощью + rnsd + --exampleconfig. +

+

+ При первом запуске Reticulum создает файл конфигурации по умолчанию с одним активным интерфейсом. + Этот интерфейс по умолчанию использует существующие сети Ethernet и WiFi (если таковые имеются). +

+

+ Для дальнейшей связи вам необходимо будет добавить один или несколько интерфейсов. + В стандартной конфигурации содержится ряд примеров, + начиная от использования TCP через Интернет и заканчивая интерфейсами LoRa и Packet Radio. +

+

+ С Reticulum вам нужно только настроить интерфейсы, через которые вы хотите осуществлять связь. + Нет необходимости настраивать адресные пространства, подсети, таблицы маршрутизации + или другие вещи, привычные для традиционных сетей. +

+

+ Когда Reticulum определит, какие интерфейсы использовать, он автоматически определит + топологию сети и настроит передачу данных ко всем известным ему пунктам назначения. +

+

+ В ситуациях, когда у вас уже есть настроенная сеть WiFi или Ethernet и множество устройств, + которые хотят использовать одни и те же внешние + + сетевые пути + Reticulum (например, через LoRa), + часто достаточно позволить одной системе действовать в качестве шлюза Reticulum, + добавив любые внешние интерфейсы в конфигурацию этой системы, а затем включив на ней транспорт. + + Любое другое устройство в вашей локальной сети WiFi сможет подключиться к этой более широкой + сети Reticulum, используя только настройки по умолчанию (AutoInterface). +

+

+ Возможно, примеров в конфигурационном файле будет достаточно для начала работы. + Если вам нужна дополнительная информация, вы можете прочитать главы + Создание сетей + и + Настройка интерфейсов + данного руководства, но самое главное — начать с чтения следующего раздела + Настройка подключения, + поскольку он дает наиболее важное понимание того, + как обеспечить надежную связь с минимальными затратами на обслуживание. +

+
+
+ +

+ Настройка подключения +

+

+ Reticulum — это не услуга, на которую вы подписываетесь, и не единая глобальная сеть, + к которой вы “присоединяетесь”. + Это сетевой стек, набор инструментов для построения систем связи, + которые соответствуют вашим конкретным ценностям, требованиям и рабочей среде. + Способ, которым вы выбираете подключаться к другим узлам Reticulum, полностью зависит от вас. +

+

+ Одним из самых сильных преимуществ Reticulum является наличие множества инструментов + для создания, поддержания и оптимизации + связи. + Вы можете использовать эти инструменты по + отдельности или комбинировать их в сложных конфигурациях для достижения широкого спектра целей. +

+

+ Независимо от того, является ли вашей целью создание полностью частной сети, + изолированной от внешних сетей + + (air‑gapped) для вашей семьи; + построение устойчивой общественной mesh‑сети, способной выдержать крах инфраструктуры; + подключение к максимально большому количеству узлов; + или просто поддержание надежного зашифрованного соединения с конкретной организацией, + которая вам важна, Reticulum предоставляет механизмы, позволяющие это реализовать. +

+

+ Не существует «правильного» или «неправильного» способа построения сети Reticulum, + и вам не нужно быть сетевым инженером, чтобы начать работу. + Если информация передается так, как вы предполагали, и ваши требования к конфиденциальности и + безопасности выполняются, ваша конфигурация является успешной. + Reticulum разработан так, чтобы работать даже в самых сложных и трудных сценариях, + когда другие сетевые технологии оказываются бессильными. +

+
+

+ Ориентация в системе +

+

+ Когда вы впервые начинаете использовать Reticulum, вам необходимо найти способ + установить связь с одноранговыми узлами, с которыми вы хотите обмениваться данными + — это процесс инициализации связи. +

+
+

Важно

+

+ Распространенной ошибкой в современных сетях является зависимость от нескольких + централизованных, жестко запрограммированных точек входа. + Если каждый пользователь просто подключается к одному и тому же списку публичных IP-адресов, + указанных на веб-сайте, сеть становится уязвимой, централизованной и, в конечном итоге, + не способной обеспечить децентрализацию и отказоустойчивость. Здесь вы несете ответственность. +

+
+

+ Reticulum поощряет подход + органического роста. + Вместо того чтобы полагаться на постоянные статические соединения с удаленными серверами, + вы можете использовать + + временные bootstrap соединения для + непрерывного обнаружения более релевантной или локальной инфраструктуры. + После обнаружения ваша система может автоматически формировать более прочные и прямые связи + с этими одноранговыми узлами и отбрасывать временные bootstrap соединения. + В результате получается сеть, географически релевантная, устойчивая и эффективная. +

+

+ Можно просто добавить несколько общих точек входа в раздел + [interfaces] + конфигурации Reticulum и подключиться, + но лучшим вариантом будет включить + + обнаружение интерфейсов + и либо вручную выбрать соответствующие + локальные интерфейсы, либо включить автоматическое подключение к обнаруженным интерфейсам. +

+

+ В данном контексте важна + bootstrap only + опция для интерфейса. Это автоматический инструмент, для более эффективного распределения подключений. + Включив обнаружение интерфейса и автоматическое подключение, пометив интерфейс как + + bootstrap_only, + вы указываете Reticulum использовать этот интерфейс в первую очередь для поиска вариантов подключения, + а затем отключать его, как только будет найдено достаточное количество точек входа. + Это способствует формированию топологии сети, где приоритет отдаётся локальности и устойчивости, + а не простой централизации через несколько статических точек входа. +

+

+ Хорошие места для поиска + определений интерфейсов, которые можно использовать для начального + подключения, — это такие + веб-сайты, как + directory.rns.recipes + и + rmap.world. +

+
+
+

+ Создание личной инфраструктуры +

+

+ Вам не нужен дата‑центр, чтобы стать значимой частью экосистемы Reticulum. + На самом деле самые важные узлы сети часто оказываются самыми маленькими. +

+

+ Мы настоятельно советуем всем, включая домашних пользователей, + мыслить в терминах создания личной инфраструктуры. + Не подключайте каждый телефон, планшет и компьютер в доме напрямую к публичному интернет‑шлюзу. + Вместо этого переоборудуйте старый компьютер, Raspberry Pi или поддерживаемый роутер, + чтобы он действовал как ваш личный + транспортный узел: +

+
    +
  • +

    + Ваш локальный транспортный узел находится у вас дома, подключен к вашей WiFi сети и, + возможно, к радиоинтерфейсу (например, RNode). +

    +
  • +
  • +

    + Вы настраиваете этот узел с помощью интерфейса + bootstrap_only + (возможно, TCP-туннель к более широкой сети) и включаете обнаружение интерфейса. +

    +
  • +
  • +

    + Пока вы спите, работаете или готовите, ваш узел прослушивает сеть. + Он обнаруживает других участников местного сообщества, проверяет их сетевые идентификаторы + и автоматически устанавливает прямые соединения. +

    +
  • +
  • +

    + Ваши личные устройства теперь подключаются к вашему локальному узлу, + который является частью живой локальной mesh‑сети. + Ваш трафик проходит по локальным маршрутам, организованным другими реальными людьми сообщества, + + а не через удалённый сервер.
    + [Примечание переводчика: в Reticulum ваш трафик не проходит через центральный сервер (посредник). + Вместо этого он передаётся напрямую между соседними узлами сети (через локальные маршруты), + что делает связь более децентрализованной, быстрой и менее зависимой от удалённых серверов.] +

    +
  • +
+

+ Не ждите, пока другие создадут сети, которые вы хотите видеть. + Каждая сеть важна, возможно, даже больше всего те, которые поддерживают отдельные семьи и + частные лица. + Как только появится достаточное количество такой личной, локальной инфраструктуры, + их прямое соединение друг с другом, без прохождения через общедоступный Интернет, + станет неизбежным. +

+
+
+

+ Сочетание стратегий +

+

+ Нет необходимости придерживаться одной стратегии. + Наиболее надежные конфигурации часто сочетают в себе статические, + динамические и [автоматически] обнаруженные интерфейсы. +

+
    +
  • +

    + Статические интерфейсы: Вы поддерживаете постоянный интерфейс с + надежным другом или организацией, используя статическую конфигурацию. +

    +
  • +
  • +

    + Bootstrap‑ссылки: + Вы подключаете интерфейс + bootstrap_only + к общедоступному шлюзу в Интернете, + чтобы сканировать новые доступные узлы или восстановить связь + в случае сбоя других интерфейсов. +

    +
  • +
  • +

    + Локальная широкополосная связь: Вы запускаете + RNodeInterface + на общей частоте, что дает вам полностью независимый и + частный широкополосный доступ как к вашей собственной сети, + так и к другим узлам Reticulum по всему миру, без каких-либо «поставщиков услуг», + которые могли бы контролировать или отслеживать ваши взаимодействия с другими людьми. +

    +
  • +
+

+ Комбинируя эти методы, вы создаете систему, которая защищена от единичных точек отказа, + адаптируется к меняющимся условиям сети и лучше интегрируется в вашу физическую и + социальную реальность. +

+
+
+

+ Состояние сети и ответственность +

+

+ Участвуя в более широких сетях, которые вы открываете и создаете, вы неизбежно столкнетесь с + одноранговыми узлами, которые настроены неправильно, являются вредоносными или просто неисправны. + Для защиты своих ресурсов и ресурсов локальных одноранговых узлов вы можете использовать систему + управления + Blackhole. +

+

+ Независимо от того, блокируете ли вы спам‑идентификатор + вручную или подписываетесь + на чёрный список, поддерживаемый + + надёжным сетевым участником, + эти инструменты гарантируют, что ваша транспортная ёмкость используется для того, + что вы считаете корректным общением. + Это обеспечивает эффективность локального сегмента и улучшает состояние всей сети. +

+
+
+

+ Вклад в глобальную сеть Reticulum +

+

+ Если у вас есть возможность разместить стабильный узел с публичным IP-адресом, + рассмотрите возможность стать + + публичной точкой входа. + + Публикуя свой интерфейс как обнаруживаемый, + вы предоставляете потенциальную точку подключения для других, + помогая сети расти и охватывать новые области. +

+

+ Рекомендации по правильной настройке публичной точки входа смотрите в разделе + Размещение публичных точек входа. +

+
+
+
+

+ Подключение к распределенной магистрали +

+

+ Глобальная распределенная магистральная сеть транспортных узлов Reticulum управляется + добровольцами со всего мира. Эта сеть представляет собой гетерогенное собрание как публичных, + так и частных узлов, которые образуют некоординированную добровольную межсетевую + магистральную сеть, которая в настоящее время обеспечивает глобальные транспортные и + межсетевые возможности для Reticulum. +

+

+ В качестве хорошей отправной точки вы можете найти + определения интерфейсов для подключения ваших + собственных сетей к этой магистрали на таких веб-сайтах, как + directory.rns.recipes + и + rmap.world. +

+
+

Совет

+

+ Не полагайтесь только на одно подключение к распределенной магистрали для + повседневного использования. + Гораздо лучше настроить несколько резервных подключений и включить параметры обнаружения + интерфейсов, чтобы ваши узлы могли постоянно обнаруживать возможности пиринга + по мере развития сети. + Ознакомьтесь с разделом + Настройка подключения, + чтобы понять эти параметры. +

+
+
+
+ +

+ Размещение публичных точек входа +

+

+ Если вы хотите помочь в создании мощной глобальной магистральной сети, + вы можете разместить публичную (или частную) точку входа в сеть Reticulum через Интернет. + В этом разделе приведены некоторые полезные рекомендации. + После настройки публичной точки входа рекомендуется + сделать ее доступной для поиска через Reticulum. +

+

+ Вам понадобится физический или виртуальный компьютер с публичным IP-адресом, + к которому могут подключаться другие устройства в Интернете. +

+

+ Наиболее эффективным и производительным способом хостинга подключаемой точки входа, + поддерживающей множество пользователей, является использование + BackboneInterface. + Этот тип интерфейса полностью совместим с типами + TCPClientInterface + и + TCPServerInterface + но работает гораздо быстрее и использует меньше системных ресурсов, + что позволяет вашему устройству обрабатывать тысячи подключений даже на небольших системах. +

+

+ Также важно настроить подключаемый интерфейс в режиме + шлюза, + так как это значительно улучшит время сходимости сетей и + разрешение маршрута для всех, кто подключается к вашей точке входа. +

+
+
+
# В этом примере показан интерфейс магистральной сети,
+# настроенный для работы в качестве шлюза, через который пользователи
+# подключаются к публичной или частной сети.
+
+[[Public Gateway]]
+  type = BackboneInterface
+  enabled = yes
+  mode = gateway
+  listen_on = 0.0.0.0
+  port = 4242
+
+
+
+

+ Если же вы хотите создать частную точку входа (entry‑point) из Интернета, + вы можете использовать опции + ifac_name и passphrase + для защиты вашего интерфейса с помощью сетевого имени и пароля. +

+
+
+
# Частная точка входа, требующая предварительно согласованного
+# имени сети и пароля для подключения.
+
+[[Private Gateway]]
+  type = BackboneInterface
+  enabled = yes
+  mode = gateway
+  listen_on = 0.0.0.0
+  port = 4242
+  network_name = private_ret
+  passphrase = 2owjajquafIanPecAc
+
+
+
+

+ Если вы размещаете точку входа в операционной системе, которая не поддерживает + BackboneInterface, вы можете использовать + TCPServerInterface, хотя она будет менее производительной. +

+
+
+

+ Подключение экземпляров Reticulum через Интернет +

+

+ В настоящее время Reticulum предлагает три интерфейса, + подходящих для подключения экземпляров через Интернет: + Backbone, + TCP + and + I2P. + Каждый интерфейс предлагает свой набор функций, и пользователям Reticulum следует тщательно + выбирать интерфейс, который наилучшим образом соответствует их требованиям. +

+

+ TCPServerInterface + позволяет пользователям размещать экземпляр, доступный через TCP/IP. + Этот метод, как правило, быстрее, имеет меньшую задержку и более энергоэффективен, + чем использование + I2PInterface, + однако он также раскрывает больше данных о хосте сервера. +

+

+ BackboneInterface + — это очень быстрый и эффективный тип интерфейса, доступный в операционных системах POSIX, + предназначенный для одновременной обработки тысяч соединений с низкими затратами памяти, + вычислительных ресурсов и ввода-вывода. + Он полностью совместим с типами интерфейсов на основе TCP. +

+

+ TCP-соединения раскрывают IP-адрес вашего экземпляра и сервера любому, + кто может проверить соединение. Кто-то может использовать эту информацию, + чтобы определить ваше местоположение или личность. + Злоумышленники, проверяющие ваши пакеты, могут записывать метаданные пакетов, + такие как время передачи и размер пакета.
+ Несмотря на то, что Reticulum шифрует трафик, + TCP этого не делает, поэтому злоумышленник может использовать проверку пакетов, чтобы узнать, + что система работает под управлением Reticulum, и какие другие IP-адреса подключаются к ней. + Для хостинга общедоступного экземпляра через TCP также требуется общедоступный IP-адрес, + + который большинство интернет-соединений больше не предоставляют. +

+

+ I2PInterface + маршрутизирует сообщения через + + Invisible Internet Protocol (I2P). + Чтобы использовать этот интерфейс, пользователи должны также запустить + демон I2P параллельно с + rnsd. + Для постоянно включенных узлов I2P рекомендуется использовать + + i2pd. +

+

+ По умолчанию I2P шифрует и смешивает весь трафик, отправляемый через Интернет, + и скрывает IP-адреса как отправителя, так и получателя Reticulum. + Запуск узла I2P также будет ретранслировать зашифрованные пакеты других пользователей I2P, + что потребует дополнительных ресурсов пропускной способности и вычислительной мощности, + но также значительно усложнит атаки по времени и + другие формы глубокого анализа пакетов. +

+

+ I2P также позволяет пользователям размещать глобально доступные + экземпляры Reticulum с непубличных IP-адресов, за брандмауэрами и NAT. +

+

+ В целом рекомендуется использовать узел I2P, если вы хотите разместить общедоступный экземпляр, + сохранив при этом анонимность. + Если вам важнее производительность и немного более простая настройка, используйте TCP. +

+
+
+

+ Добавление радиоинтерфейсов +

+

+ После установки и запуска Reticulum вы можете добавить радиоинтерфейсы с любым + совместимым оборудованием, которое у вас есть. + Reticulum поддерживает широкий спектр радиооборудования, и если у вас уже есть + какое-либо оборудование, скорее всего, оно будет работать с Reticulum. + Информацию о том, как настроить это, см. в разделе + Интерфейсы + данного руководства. +

+

+ Если у вас еще нет оборудования для трансивера, вы можете легко и недорого собрать + RNode, + — универсальный цифровой радиотрансивер дальнего действия, + который легко интегрируется с Reticulum. +

+

+ Чтобы собрать его самостоятельно, необходимо установить пользовательскую прошивку на + поддерживаемую плату разработчика LoRa с помощью скрипта автоматической установки + или веб-программы для прошивки. Руководство см. в главе + + Коммуникационное оборудование. + Если вы предпочитаете приобрести готовое устройство, обратитесь к + списку поставщиков. +

+

+ Другие радиоинтерфейсы разрабатываются и становятся доступными для широкой аудитории сообщества Reticulum. + Более подробную информацию по этим темам можно найти в разделе + Системы обмена информацией на базе Reticulum. +

+

+ Если у вас есть коммуникационное оборудование, которое еще не поддерживается ни одним из + существующих типов интерфейсов, + можно легко написать (и, возможно, опубликовать) + пользовательский модуль интерфейса, + который сделает его совместимым с Reticulum. +

+
+
+

+ Создание и использование пользовательских интерфейсов +

+

+ Хотя Reticulum включает гибкий и широкий набор встроенных интерфейсов, они не охватывают каждый + возможный тип коммуникационного оборудования, + которое Reticulum потенциально может использовать для связи. +

+

+ Поэтому легко написать собственные модули интерфейсов, + которые можно загрузить во время выполнения и использовать наряду + со всеми встроенными типами интерфейсов. +

+

+ Для получения дополнительной информации по этой теме и примеров кода, + для дальнейшей работы см. главу + + Настройка интерфейсов. +

+
+
+

+ Разработка программы с Reticulum +

+

+ Если вы хотите разрабатывать программы, использующие Reticulum, + самый простой способ начать — установить последнюю версию Reticulum с помощью + pip: +

+
+
+
pip install rns
+
+
+

+ Эта команда установит Reticulum и все зависимости, после чего вы сможете импортировать и + использовать RNS в своих программах. + Далее, скорее всего, стоит ознакомиться с некоторыми + примерами программ. +

+

+ Весь API Reticulum задокументирован в главе + + API Reference данного руководства. + Прежде чем погружаться в детали, рекомендуется полностью прочитать руководство, + но минимум — начать с главы + + Понимание Reticulum. +

+
+
+ +

+ Инструкции по установке для конкретных платформ +

+

+ Некоторые платформы требуют немного другой процедуры установки или имеют различные особенности, + о которых стоит знать. Они перечислены здесь. +

+
+

+ Android +

+

+ Reticulum можно использовать на Android по-разному. + Самый простой способ начать — использовать приложение типа + Sideband. +

+

+ Если нужен больший контроль и дополнительные функции, + Reticulum и сопутствующие программы можно запускать + в + приложении Termux, + на момент написания доступно в + F-droid. +

+

+ Termux — это эмулятор терминала и среда Linux для устройств на базе Android, + которая включает в себя возможность использования множества различных программ и + библиотек, в том числе Reticulum. +

+

+ Чтобы использовать Reticulum в среде Termux, необходимо установить + python + и библиотеку + python-cryptography + с помощью + pkg, диспетчера пакетов, встроенного в Termux.
+ После этого Reticulum ставится через + pip. +

+

Выполните в Termux следующие команды:

+
+
+
# Сначала убедитесь, что индексы и пакеты обновлены.
+pkg update
+pkg upgrade
+
+# Затем установите Python и библиотеку python cryptography.
+pkg install python python-cryptography
+
+# Убедитесь, что pip обновлен, и установите модуль wheel.
+pip install wheel pip --upgrade
+
+# Установите Reticulum.
+pip install rns
+
+
+
+

+ Если по какой-то причине пакет + python-cryptography + недоступен для вашей платформы через диспетчер пакетов Termux, вы можете попробовать + скомпилировать его локально на своем устройстве с помощью следующей команды: +

+
+
+
# Сначала убедитесь, что индексы и пакеты обновлены.
+pkg update
+pkg upgrade
+
+# Затем установите зависимости для библиотеки криптографии.
+pkg install python build-essential openssl libffi rust
+
+# Убедитесь, что pip обновлен, и установите модуль wheel.
+pip install wheel pip --upgrade
+
+# Чтобы установщик мог скомпилировать модуль криптографии,
+# нам нужно сообщить ему, для какой платформы мы компилируем:
+export CARGO_BUILD_TARGET="aarch64-linux-android"
+
+# Запустите процесс установки модуля cryptography.
+# В зависимости от вашего устройства это может занять несколько минут,
+# поскольку модуль должен быть скомпилирован локально на вашем устройстве.
+pip install cryptography
+
+# Если вышеуказанная установка прошла успешно, теперь вы можете установить
+# Reticulum и любое связанное с ним программное обеспечение.
+pip install rns
+
+
+
+

+ Также можно включить Reticulum в приложения, скомпилированные и распространяемые + в виде APK-файлов для Android. + Подробное руководство и пример исходного кода будут добавлены сюда позднее. + До тех пор вы можете использовать + исходный код Sideband в качестве примера и отправной точки. +

+
+
+

+ ARM64 +

+

+ В некоторых архитектурах, включая + ARM64, + не все зависимости имеют предварительно скомпилированные + бинарные файлы. В таких системах может потребоваться установка + python3-dev(или аналогичного пакета) перед установкой Reticulum или программ, зависящих от Reticulum. +

+
+
+
# Установите Python и пакеты для разработки
+sudo apt update
+sudo apt install python3 python3-pip python3-dev
+
+# Установите Reticulum
+python3 -m pip install rns
+
+
+
+

+ После установки этих пакетов + pip сможет локально скомпилировать любые отсутствующие зависимости в вашей системе. +

+
+
+

+ Debian Bookworm +

+

+ В версиях Debian, выпущенных после апреля 2023 года, по умолчанию больше нельзя использовать + pip + для установки пакетов в систему. + К сожалению, вам нужно будет использовать вместо этого замену + pipx + которая помещает установленные пакеты в изолированную среду. + Это не должно негативно повлиять на Reticulum, но не будет работать для включения и + использования Reticulum в ваших собственных скриптах и программах. +

+
+
+
# Установите pipx
+sudo apt install pipx
+
+# Сделайте установленные программы доступными в командной строке
+pipx ensurepath
+
+# Установите Reticulum
+pipx install rns
+
+
+
+

+ В качестве альтернативы вы можете восстановить нормальное поведение + pip, + создав или отредактировав файл конфигурации, расположенный в + ~/.config/pip/pip.conf, и добавив следующий раздел: +

+
+
+
[global]
+break-system-packages = true
+
+
+
+

+ Для однократной установки Reticulum без глобальной активации опции + break-system-packages + можно использовать следующую команду: +

+
+
+
pip install
+rns --break-system-packages
+
+
+
+
+

Примечание

+

+ Директива + + + --break-system-packages + является несколько вводящей в заблуждение формулировкой. + Ее установка, конечно, не повредит никакие системные пакеты, а просто позволит устанавливать + пакеты + pip + для текущего пользователя и глобально для всей системы. + Хотя в редких случаях это может привести к конфликтам версий, + в целом это не создает никаких проблем, особенно в случае установки Reticulum. +

+
+
+
+

+ MacOS +

+

+ Для установки Reticulum на macOS необходимо иметь установленные Python и менеджер пакетов + pip. +

+

+ Системы под управлением macOS могут значительно различаться по наличию предустановленного Python, + а если он предустановлен, то по версии, а также по наличию и настройке пакетного менеджера + pip. + Если у вас есть сомнения, вы можете + загрузить и установить Python вручную. +

+

+ Если Python и + pip + доступны в вашей системе, просто откройте окно терминала и используйте одну из следующих команд: +

+
+
+
# Установите Reticulum и утилиты с помощью pip:
+pip3 install rns
+
+# В некоторых версиях может потребоваться использовать
+# параметр --break-system-packages для установки:
+pip3 install rns --break-system-packages
+
+
+
+
+

Примечание

+

+ Директива + + + --break-system-packages + является несколько вводящей в заблуждение формулировкой. + Ее установка, конечно, не повредит никакие системные пакеты, а просто позволит устанавливать + пакеты + pip + для текущего пользователя и глобально для всей системы. + Хотя в редких случаях это может привести к конфликтам версий, + в целом это не создает никаких проблем, особенно в случае установки Reticulum. +

+
+

+ Кроме того, некоторые комбинации версий macOS и Python требуют, чтобы вы вручную добавили каталог + установленных пакетов + pip + в переменную среды PATH прежде чем вы сможете использовать + установленные команды в терминале. + Обычно достаточно добавить следующую строку в скрипт инициализации оболочки + ~/.zshrc): +

+
+
+
export PATH=$PATH:~/Library/Python/3.9/bin
+
+
+
+

+ Настройте версию Python и расположение скрипта инициализации оболочки в соответствии с вашей системой. +

+
+
+

+ OpenWRT +

+

+ На системах + + OpenWRT с достаточным объемом памяти и хранилища можно установить Reticulum и + связанные утилиты с помощью диспетчера пакетов + opkg и pip. +

+
+

Примечание

+

+ На момент выпуска данного руководства ведется работа над созданием готовых + пакетов Reticulum для OpenWRT с полной + конфигурацией, интеграцией сервисов и + uci. + Для получения дополнительной информации см. репозитории + feed-reticulum + и + reticulum-openwrt. +

+
+

+ Чтобы установить Reticulum на OpenWRT, сначала войдите в сеанс командной строки, + а затем выполните следующие инструкции: +

+
+
+
# Установить зависимости
+opkg install python3 python3-pip python3-cryptography python3-pyserial
+
+# Установить Reticulum
+pip install rns
+
+# Запустить rnsd с включенной отладкой
+rnsd -vvv
+
+
+
+
+

Примечание

+

+ Вышеуказанные инструкции были проверены и протестированы только на OpenWRT 21.02. + Вероятно, что для других версий могут потребоваться слегка измененные команды установки + или названия пакетов. + Также необходимо иметь достаточно свободного места в overlay‑файловой системе и достаточно + свободной оперативной памяти для запуска Reticulum и связанных программ и утилит. +

+
+

+ В зависимости от конфигурации вашего устройства, вам может потребоваться настроить правила + брандмауэра для подключения Reticulum к вашему устройству и от него, чтобы оно работало. + Пока не будет готова + + полноценная упаковка, вам также придётся вручную создать службу или + скрипт автозапуска, чтобы Reticulum автоматически запускался при загрузке системы. +

+

+ Также обратите внимание, что для AutoInterface необходимо включить локальные + IPv6-адреса для всех Ethernet и WiFi-устройств, которые вы собираетесь использовать. + Если команда + ip a + показывает адрес, начинающийся с + fe80:: + для данного устройства, + AutoInterface + должен работать для этого устройства. +

+
+
+

+ Raspberry Pi +

+

+ В настоящее время рекомендуется использовать 64-разрядную версию ОС Raspberry Pi, + если вы хотите запустить Reticulum на компьютерах Raspberry Pi, + поскольку в 32-разрядных версиях не всегда доступны пакеты для некоторых зависимостей. + Если Python и менеджер пакетов pip еще не установлены, сначала установите их, + а затем установите Reticulum с помощью pip. +

+
+
+
# Установка зависимостей
+sudo apt install python3 python3-pip python3-cryptography python3-pyserial
+
+# Установка Reticulum
+pip install rns --break-system-packages
+
+
+
+
+

Примечание

+

+ Директива + + + --break-system-packages + является несколько вводящей в заблуждение формулировкой. + Ее установка, конечно, не повредит никакие системные пакеты, а просто позволит устанавливать + пакеты + pip + для текущего пользователя и глобально для всей системы. + Хотя в редких случаях это может привести к конфликтам версий, + в целом это не создает никаких проблем, особенно в случае установки Reticulum. +

+
+

+ Хотя Reticulum можно установить и запустить на 32-разрядных ОС Raspberry Pi, + для этого потребуется вручную настроить и установить + необходимые зависимости для сборки, что не описано в данном руководстве. +

+
+
+

+ RISC-V +

+

+ В некоторых архитектурах, включая + + RISC-V, + не все зависимости имеют предварительно скомпилированные бинарные файлы. + В таких системах может потребоваться установка + python3-dev + (или аналогичного пакета) + перед установкой Reticulum или программ, зависящих от Reticulum. +

+
+
+
# Установите Python и пакеты для разработки
+sudo apt update
+sudo apt install python3 python3-pip python3-dev
+
+# Установите Reticulum
+python3 -m pip install rns
+
+
+
+

+ После установки этих пакетов + pip + сможет локально скомпилировать любые отсутствующие зависимости в вашей системе. +

+
+
+

+ Ubuntu Lunar +

+

+ В версиях Ubuntu, выпущенных после апреля 2023 года, по умолчанию больше нельзя использовать + pip + для установки пакетов в вашу систему. + К сожалению, вам нужно будет использовать вместо этого замену + pipx, которая помещает + установленные пакеты в изолированную среду. + Это не должно негативно повлиять на Reticulum, + но не будет работать для включения и использования Reticulum в + ваших собственных скриптах и программах. +

+
+
+
# Установить pipx
+sudo apt install pipx
+
+# Сделать установленные программы доступными в командной строке
+pipx ensurepath
+
+# Установить Reticulum
+pipx install rns
+
+
+
+

+ В качестве альтернативы вы можете восстановить нормальное поведение + pip, + создав или отредактировав файл конфигурации, расположенный в + ~/.config/pip/pip.conf, + и добавив следующий раздел: +

+
+
+
[global]
+break-system-packages = true
+
+
+
+

+ Для однократной установки Reticulum без глобальной активации опции + break-system-packages, + можно использовать следующую команду: +

+
+
+
pip install rns --break-system-packages
+
+
+
+
+

Примечание

+

+ Директива + + + --break-system-packages + является несколько вводящей в заблуждение формулировкой. + Ее установка, конечно, не повредит никакие системные пакеты, а просто позволит устанавливать + пакеты + pip + для текущего пользователя и глобально для всей системы. + Хотя в редких случаях это может привести к конфликтам версий, + в целом это не создает никаких проблем, особенно в случае установки Reticulum. +

+
+
+
+

+ Windows +

+

+ В операционных системах Windows самый простой способ установить Reticulum — использовать менеджер + пакетов + pip + из командной строки (командная строка или Windows Powershell). +

+

+ Если у вас ещё не установлен Python, + скачайте и установите его. + На момент публикации данного руководства рекомендуется версия + Python 3.12.7. +

+

+ Важно! Когда установщик спросит, обязательно добавьте программу Python в переменные среды PATH. + Если вы этого не сделаете, вы не сможете использовать установщик + pip + или запускать включённые утилиты Reticulum (такие как + rnsd + и + rnstatus) из командной строки. +

+

+ После установки Python откройте командную строку или Windows Powershell и введите: +

+
+
+
pip install rns
+
+
+
+

+ Теперь вы можете использовать Reticulum и все входящие в него утилиты + непосредственно из вашего любимого интерфейса командной строки. +

+
+
+
+

+ Pure-Python Reticulum +

+
+

Предупреждение

+

+ Если вы используете пакет + rnspure + для запуска Reticulum в системах, которые не поддерживают + + PyCA/криптографию, важно прочитать и понять раздел + Криптографические примитивы + данного руководства. +

+
+

+ В некоторых редких случаях и на более редких типах систем установка одной или нескольких + зависимостей может быть невозможна. + В таких ситуациях можно использовать пакет + rnspure + вместо пакета + rns + или использовать + pip + с опцией командной строки + --no-dependencies.
+ Пакет + rnspure + не требует внешних зависимостей для установки. + Обратите внимание, что фактическое содержимое пакетов + rns + и + rnspure + полностью идентично. + + Единственное различие заключается в том, что пакет + rnspure + не содержит списка зависимостей, необходимых для установки. +

+

+ + Независимо от того, как Reticulum установлен и запущен, он будет загружать внешние зависимости + только в том случае, если они необходимы и доступны. + Если, например, вы хотите использовать Reticulum в системе, которая не поддерживает + pyserial, + это вполне возможно с помощью пакета rnspure, но Reticulum не сможет использовать + интерфейсы на основе последовательного соединения. + Все остальные доступные модули по-прежнему будут загружаться при необходимости. +

+
+
+
+
+ +
+ + +
+
+ + + + + + + + + + diff --git a/docs/hardware.html b/docs/hardware.html new file mode 100644 index 0000000..dfd73c9 --- /dev/null +++ b/docs/hardware.html @@ -0,0 +1,1497 @@ + + + + + + + + + + + + + + + Communications Hardware - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Communications Hardware +

+

+ One of the truly valuable aspects of Reticulum is the ability to use it over + almost any conceivable kind of communications medium. The + interface types + available for configuration in Reticulum are flexible enough to cover the use of + most wired and wireless communications hardware available, from decades-old packet + radio modems to modern millimeter-wave backhaul systems. +

+

+ If you already have or operate some kind of communications hardware, there is a + very good chance that it will work with Reticulum out of the box. In case it does + not, it is possible to provide the necessary glue with very little effort using + for example the + PipeInterface + or the + TCPClientInterface + in combination with code like + TCP KISS Server + by + simplyequipped. +

+

+ It is also very easy to write and load + custom interface modules + into Reticulum, allowing you to communicate with more or less anything you can + think of. +

+

+ While this broad support and flexibility is very useful, an abundance of options + can sometimes make it difficult to know where to begin, especially when you are + starting from scratch. +

+

+ This chapter will outline a few different sensible starting paths to get + real-world functional wireless communications up and running with minimal cost and + effort. Two fundamental devices categories will be covered, RNodes and + WiFi-based radios. Additionally, other common options will be briefly + described. +

+

+ Knowing how to employ just a few different types of hardware will make it possible + to build a wide range of useful networks with little effort. +

+
+

+ Combining Hardware Types +

+

+ 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 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 connectivity for client devices. +

+
+
+ +

+ RNode +

+

+ Reliable and general-purpose long-range digital radio transceiver systems are + 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 + this situation, the transceiver system RNode was designed. It is + important to note that RNode is not one specific device, from one particular + vendor, but an open plaform that anyone can use to build interoperable + digital transceivers suited to their needs and particular situations. +

+

+ An RNode is a general purpose, interoperable, low-power and long-range, + reliable, open and flexible radio communications device. Depending on its + components, it can operate on many different frequency bands, and use many + different modulation schemes, but most commonly, and for the purposes of this + chapter, we will limit the discussion to RNodes using LoRa modulation + in common ISM bands. +

+

+ 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 used for centrally + controlled IoT devices. RNodes use raw LoRa modulation, without any + additional protocol overhead. All high-level protocol functionality is handled + directly by Reticulum. +

+
+ +

+ Creating RNodes +

+

+ 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 + components, and a few open source software tools. While you can design and + build RNodes completely from scratch, to your exact desired specifications, + this chapter will explain the easiest possible approach to creating RNodes: + Using common LoRa development boards. This approach can be boiled down to two + simple steps: +

+
    +
  1. +

    + Obtain one or more + supported development boards +

    +
  2. +
  3. +

    + Install the RNode firmware with the + automated installer +

    +
  4. +
+

+ Once the firmware has been installed and provisioned by the install script, it + is ready to use with any software that supports RNodes, including Reticulum. + The device can be used with Reticulum by adding an + RNodeInterface + to the configuration. +

+
+
+ +

+ Supported Boards and Devices +

+

+ To create one or more RNodes, you will need to obtain supported development + boards or completed devices. The following boards and devices are supported by + the auto-installer. +

+
+ _images/board_tbeam_supreme.png + +
+

+ LilyGO T-Beam Supreme +

+
    +
  • +

    Transceiver IC Semtech SX1262 or SX1268

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_tbeam.png + +
+
+

+ LilyGO T-Beam +

+
    +
  • +

    + Transceiver IC Semtech SX1262, SX1268, SX1276 or SX1278 +

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_t3s3.png + +
+
+

+ LilyGO T3S3 +

+
    +
  • +

    + Transceiver IC Semtech SX1262, SX1268, SX1276 or SX1278 +

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_rak4631.png + +
+
+

+ RAK4631-based Boards +

+
    +
  • +

    Transceiver IC Semtech SX1262 or SX1268

    +
  • +
  • +

    Device Platform nRF52

    +
  • +
  • +

    + Manufacturer + RAK Wireless +

    +
  • +
+
+ _images/board_opencomxl.png + +
+
+

+ OpenCom XL +

+
    +
  • +

    + Transceiver ICs Semtech SX1262 and SX1280 (dual + transceiver) +

    +
  • +
  • +

    Device Platform nRF52

    +
  • +
  • +

    + Manufacturer + Liberated Embedded Systems +

    +
  • +
+
+ _images/board_rnodev2.png + +
+
+

+ Unsigned RNode v2.x +

+
    +
  • +

    Transceiver IC Semtech SX1276 or SX1278

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + unsigned.io +

    +
  • +
+
+ _images/board_t3v21.png + +
+
+

+ LilyGO LoRa32 v2.1 +

+
    +
  • +

    Transceiver IC Semtech SX1276 or SX1278

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_t3v20.png + +
+
+

+ LilyGO LoRa32 v2.0 +

+
    +
  • +

    Transceiver IC Semtech SX1276 or SX1278

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_t3v10.png + +
+
+

+ LilyGO LoRa32 v1.0 +

+
    +
  • +

    Transceiver IC Semtech SX1276 or SX1278

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_tdeck.png + +
+
+

+ LilyGO T-Deck +

+
    +
  • +

    Transceiver IC Semtech SX1262 or SX1268

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_techo.png + +
+
+

+ LilyGO T-Echo +

+
    +
  • +

    Transceiver IC Semtech SX1262 or SX1268

    +
  • +
  • +

    Device Platform nRF52

    +
  • +
  • +

    + Manufacturer + LilyGO +

    +
  • +
+
+ _images/board_t114.png + +
+
+

+ Heltec T114 +

+
    +
  • +

    Transceiver IC Semtech SX1262 or SX1268

    +
  • +
  • +

    Device Platform nRF52

    +
  • +
  • +

    + Manufacturer + Heltec Automation +

    +
  • +
+
+ _images/board_heltec32v4.png + +
+
+

+ Heltec LoRa32 v4.0 +

+
    +
  • +

    Transceiver IC Semtech SX1262

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + Heltec Automation +

    +
  • +
+
+ _images/board_heltec32v30.png + +
+
+

+ Heltec LoRa32 v3.0 +

+
    +
  • +

    Transceiver IC Semtech SX1262 or SX1268

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + Heltec Automation +

    +
  • +
+
+ _images/board_heltec32v20.png + +
+
+

+ Heltec LoRa32 v2.0 +

+
    +
  • +

    Transceiver IC Semtech SX1276 or SX1278

    +
  • +
  • +

    Device Platform ESP32

    +
  • +
  • +

    + Manufacturer + Heltec Automation +

    +
  • +
+
+
+
+
+ +

+ Installation +

+

+ Once you have obtained compatible boards, you can install the + RNode Firmware + using the + RNode Configuration Utility. If you have installed Reticulum on your system, the + rnodeconf + program will already be available. If not, make sure that + Python3 + and + pip + is installed on your system, and then install Reticulum with with + pip: +

+
+
+
pip install rns
+
+
+
+

+ Once installation has completed, it is time to start installing the firmware + on your devices. Run + rnodeconf + in auto-install mode like so: +

+
+
+
rnodeconf --autoinstall
+
+
+
+

+ The utility will guide you through the installation process by asking a series + of questions about your hardware. Simply follow the guide, and the utility + will auto-install and configure your devices. +

+
+
+ +

+ Usage with Reticulum +

+

+ When the devices have been installed and provisioned, you can use them with + Reticulum by adding the + relevant interface section + to the configuration file of Reticulum. In the configuraion you can specify + all interface parameters, such as serial port and on-air parameters. +

+
+
+
+

+ 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 WiFi interface will work with the + AutoInterface + in Reticulum. Most devices will behave like this by default, or allow it via + configuration options. +

+

+ This means that you can simply configure the physical links of the WiFi based + devices, and start communicating over them using Reticulum. It is not necessary + to enable any IP infrastructure such as DHCP servers, DNS or similar, as long as + at least Ethernet is available, and packets are passed transparently over the + physical WiFi-based devices. +

+ _images/radio_rblhg5.png + + _images/radio_is5ac.png + +

+ Below is a list of example WiFi (and similar) radios that work well for high + capacity Reticulum links over long distances: +

+ +

+ This list is by no means exhaustive, and only serves as a few examples of radio + hardware 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 running concurrently on such devices. +

+
+
+

+ Ethernet-based Hardware +

+

+ Reticulum can run over any kind of hardware that can provide a switched + Ethernet-based medium. This means that anything from a plain Ethernet switch, to + fiber-optic systems, to data radios with Ethernet interfaces can be used by + Reticulum. +

+

+ The Ethernet medium does not need to have any IP infrastructure such as DHCP + servers or routing set up, but in case such infrastructure does exist, Reticulum + will simply co-exist with. +

+

+ To use Reticulum over Ethernet-based mediums, it is generally enough to use the + included + AutoInterface. This interface also works over any kind of virtual networking adapter, such + as + tun + and + tap + devices in Linux. +

+
+
+

+ Serial Lines & Devices +

+

+ Using Reticulum over any kind of raw serial line is also possible with the + SerialInterface. This interface type is also useful for using Reticulum over communications + hardware that provides a serial port interface. +

+
+
+

+ Packet Radio Modems +

+

+ Any packet radio modem that provides a standard KISS interface over USB, serial + or TCP can be used with Reticulum. This includes virtual software modems such as + FreeDV TNC + and + Dire Wolf. +

+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/index.html b/docs/index.html new file mode 100644 index 0000000..23b66c6 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,1308 @@ + + + + + + + + + + + + + + Документация Reticulum Network Stack 1.1.4 + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+

+ Руководство по сетевому стеку Reticulum +

+

+ Данное руководство призвано предоставить вам всю необходимую информацию для понимания + принципов работы Reticulum, построения сетей или разработки программ с его использованием, + а также для участия в разработке самого Reticulum. +

+

+ Данное руководство также доступно в форматах + PDF + и + EPUB. +

+
+

+ Содержание +

+
+
+ +
+ +
+

+ Индексы и таблицы +

+ +
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/interfaces.html b/docs/interfaces.html new file mode 100644 index 0000000..d27a089 --- /dev/null +++ b/docs/interfaces.html @@ -0,0 +1,2500 @@ + + + + + + + + + + + + + + + Configuring Interfaces - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Configuring Interfaces +

+

+ 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 + network topologies you can create with Reticulum is more or less endless, but + common to them all is that you will need to define one or more + interfaces for Reticulum to use. +

+

+ The following sections describe the interfaces currently available in Reticulum, + and gives example configurations for the respective interface types. +

+

+ For a high-level overview of how networks can be formed over different interface + types, have a look at the + Building Networks + chapter of this manual. +

+
+ +

+ Custom Interfaces +

+

+ In addition to the built-in interface types, Reticulum is + fully extensible with custom, user- or community-supplied + interfaces, and creating custom interface modules is straightforward. Please see + the + custom interface + example for basic interface code to build upon. +

+
+
+ +

+ Auto Interface +

+

+ The + AutoInterface + enables communication with other discoverable Reticulum nodes over any kind of + local Ethernet or WiFi-based medium. Even though it uses IPv6 for peer + discovery, and UDP for packet transport, it does not need any + functional IP infrastructure like routers or DHCP servers, on your physical + network. +

+
+

Warning

+

+ If you have firewall software running on your computer, it + may block traffic required for + AutoInterface + to work. If this is the case, you will have to allow UDP traffic on port + 29716 + and + 42671. +

+
+

+ As long as there is at least some sort of switching medium present between peers + (a wired switch, a hub, a WiFi access point or similar, or simply two devices + connected directly by Ethernet cable), it will work without any configuration, + setup or intermediary devices. +

+

+ For + AutoInterface + peer discovery to work, it’s also required that link-local IPv6 support is + available on your system, which it should be by default in all current operating + systems, both desktop and mobile. +

+
+

Note

+

+ Almost all current Ethernet and WiFi hardware will work without any kind of + configuration or setup with + AutoInterface, but a small subset of devices turn on options that limit device-to-device + communication by default, resulting in + AutoInterface + peer discovery being blocked. This issue is most commonly seen on very cheap, + ISP-supplied WiFi routers, and can sometimes be turned off in the router + configuration. +

+
+
+
+
# This example demonstrates a bare-minimum setup
+# of an Auto Interface. It will allow communica-
+# tion with all other reachable devices on all
+# usable physical ethernet-based devices that
+# are available on the system.
+[[Default Interface]]
+  type = AutoInterface
+  enabled = yes
+
+# This example demonstrates an more specifically
+# configured Auto Interface, that only uses spe-
+# cific physical interfaces, and has a number of
+# other configuration options set.
+[[Default Interface]]
+  type = AutoInterface
+  enabled = yes
+
+  # You can create multiple isolated Reticulum
+  # networks on the same physical LAN by
+  # specifying different Group IDs.
+  group_id = reticulum
+
+  # You can also choose the multicast address type:
+  # temporary (default, Temporary Multicast Address)
+  # or permanent (Permanent Multicast Address)
+  multicast_address_type = permanent
+
+  # You can also select specifically which
+  # kernel networking devices to use.
+  devices = wlan0,eth1
+
+  # Or let AutoInterface use all suitable
+  # devices except for a list of ignored ones.
+  ignored_devices = tun0,eth0
+
+
+
+

+ If you are connected to the Internet with IPv6, and your provider will route + IPv6 multicast, you can potentially configure the Auto Interface to globally + autodiscover other Reticulum nodes within your selected Group ID. You can + specify the discovery scope by setting it to one of + link, + admin, + site, + organisation + or + global. +

+
+
+
[[Default Interface]]
+  type = AutoInterface
+  enabled = yes
+
+  # Configure global discovery
+
+  group_id = custom_network_name
+  discovery_scope = global
+
+  # Other configuration options
+
+  discovery_port = 48555
+  data_port = 49555
+
+
+
+
+
+ +

+ Backbone Interface +

+

+ The Backbone interface is a very fast and resource efficient interface type, + primarily intended for interconnecting Reticulum instances over many different + types of mediums. It uses a kernel-event I/O backend, and can handle thousands + of interfaces and/or clients with relatively low system resource utilisation. + This interface type is currently only supported on Linux and Android. +

+
+

Note

+

+ The Backbone Interface is fully compatible with the + TCPServerInterface + and + TCPClientInterface + types, and they can be used interchangably, and cross-connect with each other. + On systems that support + BackboneInterface, it is generally recommended to use it, unless you need specific options or + features that the TCP server and client interfaces provide. +

+
+

+ While the goal is to support all socket types and I/O devices provided + by the underlying operating system, the initial release only provides support + for TCP connections over IPv4 and IPv6. +

+

+ For all types of connections over a + BackboneInterface, Reticulum will gracefully handle intermittency, link loss, and connections + that come and go. +

+
+

+ Listeners +

+

+ The following examples illustrates various ways to set up + BackboneInterface + listeners. +

+
+
+
# This example demonstrates a backbone interface
+# that listens for incoming connections on the
+# specified IP address and port number.
+[[Backbone Listener]]
+  type = BackboneInterface
+  enabled = yes
+  listen_on = 0.0.0.0
+  port = 4242
+
+# Alternatively you can bind to a specific IP
+[[Backbone Listener]]
+  type = BackboneInterface
+  enabled = yes
+  listen_on = 10.0.0.88
+  port = 4242
+
+# Or a specific network device
+[[Backbone Listener]]
+  type = BackboneInterface
+  enabled = yes
+  device = eth0
+  port = 4242
+
+
+
+

+ If you are using the interface on a device which has both IPv4 and IPv6 + addresses available, you can use the + prefer_ipv6 + option to bind to the IPv6 address: +

+
+
+
# This example demonstrates a backbone interface
+# listening on the IPv6 address of a specified
+# kernel networking device.
+[[Backbone Listener]]
+  type = BackboneInterface
+  enabled = yes
+  prefer_ipv6 = yes
+  device = eth0
+  port = 4242
+
+
+
+

+ To use the + BackboneInterface + over + Yggdrasil, you can simply specify the Yggdrasil + tun + device and a listening port, like so: +

+
+
+
# This example demonstrates a backbone interface
+# listening for connections over Yggdrasil.
+[[Yggdrasil Backbone Interface]]
+  type = BackboneInterface
+  enabled = yes
+  device = tun0
+  port = 4343
+
+
+
+
+
+

+ Connecting Remotes +

+

+ The following examples illustrates various ways to connect to remote + BackboneInterface + listeners. As noted above, + BackboneInterface + interfaces can also connect to remote + TCPServerInterface, and as such these interface types can be used interchangably. +

+
+
+
# Here's an example of a backbone interface that
+# connects to a remote listener.
+[[Backbone Remote]]
+  type = BackboneInterface
+  enabled = yes
+  remote = amsterdam.connect.reticulum.network
+  target_port = 4251
+
+
+
+

+ To connect to remotes over + Yggdrasil, simply specify the target Yggdrasil IPv6 address and port, like so: +

+
+
+
[[Yggdrasil Remote]]
+    type = BackboneInterface
+    enabled = yes
+    target_host = 201:5d78:af73:5caf:a4de:a79f:3278:71e5
+    target_port = 4343
+
+
+
+
+
+
+ +

+ TCP Server Interface +

+

+ The TCP Server interface is suitable for allowing other peers to connect over + the Internet or private IPv4 and IPv6 networks. When a TCP server interface has + been configured, other Reticulum peers can connect to it with a TCP Client + interface. +

+
+
+
# This example demonstrates a TCP server interface.
+# It will listen for incoming connections on all IP
+# interfaces on port 4242.
+[[TCP Server Interface]]
+  type = TCPServerInterface
+  enabled = yes
+  listen_ip = 0.0.0.0
+  listen_port = 4242
+
+# Alternatively you can bind to a specific IP
+[[TCP Server Interface]]
+  type = TCPServerInterface
+  enabled = yes
+  listen_ip = 10.0.0.88
+  listen_port = 4242
+
+# Or a specific network device
+[[TCP Server Interface]]
+  type = TCPServerInterface
+  enabled = yes
+  device = eth0
+  listen_port = 4242
+
+
+
+

+ If you are using the interface on a device which has both IPv4 and IPv6 + addresses available, you can use the + prefer_ipv6 + option to bind to the IPv6 address: +

+
+
+
# This example demonstrates a TCP server interface.
+# It will listen for incoming connections on the
+# specified IP address and port number.
+
+[[TCP Server Interface]]
+  type = TCPServerInterface
+  enabled = yes
+  prefer_ipv6 = True
+  device = eth0
+  port = 4242
+
+
+
+

+ To use the TCP Server Interface over + Yggdrasil, you can simply specify the Yggdrasil + tun + device and a listening port, like so: +

+
+
+
[[Yggdrasil TCP Server Interface]]
+  type = TCPServerInterface
+  enabled = yes
+  device = tun0
+  listen_port = 4343
+
+
+
+
+

Note

+

+ The TCP interfaces support tunneling over I2P, but to do so reliably, you must + use the i2p_tunneled option: +

+
+
+
+
[[TCP Server on I2P]]
+  type = TCPServerInterface
+  enabled = yes
+  listen_ip = 127.0.0.1
+  listen_port = 5001
+  i2p_tunneled = yes
+
+
+
+

+ In almost all cases, it is easier to use the dedicated + I2PInterface, but for complete control, and using I2P routers running on external systems, + this option also exists. +

+
+
+ +

+ TCP Client Interface +

+

+ To connect to a TCP server interface, you can use the TCP client interface. Many + TCP Client interfaces from different peers can connect to the same TCP Server + interface at the same time. +

+

+ The TCP interface types can also tolerate intermittency in the IP link layer. + This means that Reticulum will gracefully handle IP links that go up and down, + and restore connectivity after a failure, once the other end of a TCP interface + reappears. +

+
+
+
# Here's an example of a TCP Client interface. The
+# target_host can be a hostname or an IPv4 or IPv6 address.
+[[TCP Client Interface]]
+  type = TCPClientInterface
+  enabled = yes
+  target_host = 127.0.0.1
+  target_port = 4242
+
+
+
+

+ To use the TCP Client Interface over + Yggdrasil, simply specify the target Yggdrasil IPv6 address and port, like so: +

+
+
+
[[Yggdrasil TCP Client Interface]]
+    type = TCPClientInterface
+    enabled = yes
+    target_host = 201:5d78:af73:5caf:a4de:a79f:3278:71e5
+    target_port = 4343
+
+
+
+

+ It is also possible to use this interface type to connect via other programs or + hardware devices that expose a KISS interface on a TCP port, for example + software-based soundmodems. To do this, use the + kiss_framing + option: +

+
+
+
# Here's an example of a TCP Client interface that connects
+# to a software TNC soundmodem on a KISS over TCP port.
+
+[[TCP KISS Interface]]
+  type = TCPClientInterface
+  enabled = yes
+  kiss_framing = True
+  target_host = 127.0.0.1
+  target_port = 8001
+
+
+
+

+ Caution! Only use the KISS framing option when connecting to + external devices and programs like soundmodems and similar over TCP. When using + the + TCPClientInterface + in conjunction with the + TCPServerInterface + you should never enable + kiss_framing, since this will disable internal reliability and recovery mechanisms that + greatly improves performance over unreliable and intermittent TCP links. +

+
+

Note

+

+ The TCP interfaces support tunneling over I2P, but to do so reliably, you must + use the i2p_tunneled option: +

+
+
+
+
[[TCP Client over I2P]]
+    type = TCPClientInterface
+    enabled = yes
+    target_host = 127.0.0.1
+    target_port = 5001
+    i2p_tunneled = yes
+
+
+
+
+
+ +

+ UDP Interface +

+

+ A UDP interface can be useful for communicating over IP networks, both private + and the internet. It can also allow broadcast communication over IP networks, so + it can provide an easy way to enable connectivity with all other peers on a + local area network. +

+
+

Warning

+

+ Using broadcast UDP traffic has performance implications, especially on WiFi. + If your goal is simply to enable easy communication with all peers in your + local Ethernet broadcast domain, the + Auto Interface + performs much better, and is even easier to use. +

+
+
+
+
# This example enables communication with other
+# local Reticulum peers over UDP.
+
+[[UDP Interface]]
+  type = UDPInterface
+  enabled = yes
+
+  listen_ip = 0.0.0.0
+  listen_port = 4242
+  forward_ip = 255.255.255.255
+  forward_port = 4242
+
+  # The above configuration will allow communication
+  # within the local broadcast domains of all local
+  # IP interfaces.
+
+  # Instead of specifying listen_ip, listen_port,
+  # forward_ip and forward_port, you can also bind
+  # to a specific network device like below.
+
+  # device = eth0
+  # port = 4242
+
+  # Assuming the eth0 device has the address
+  # 10.55.0.72/24, the above configuration would
+  # be equivalent to the following manual setup.
+  # Note that we are both listening and forwarding to
+  # the broadcast address of the network segments.
+
+  # listen_ip = 10.55.0.255
+  # listen_port = 4242
+  # forward_ip = 10.55.0.255
+  # forward_port = 4242
+
+  # You can of course also communicate only with
+  # a single IP address
+
+  # listen_ip = 10.55.0.15
+  # listen_port = 4242
+  # forward_ip = 10.55.0.16
+  # forward_port = 4242
+
+
+
+
+
+ +

+ I2P Interface +

+

+ The I2P interface lets you connect Reticulum instances over the + Invisible Internet Protocol. This can be especially useful in cases where you want to host a globally + reachable Reticulum instance, but do not have access to any public IP addresses, + have a frequently changing IP address, or have firewalls blocking inbound + traffic. +

+

+ Using the I2P interface, you will get a globally reachable, portable and + persistent I2P address that your Reticulum instance can be reached at. +

+

+ To use the I2P interface, you must have an I2P router running on your system. + The easiest way to achieve this is to download and install the + latest release + of the + i2pd + package. For more details about I2P, see the + geti2p.net website. +

+

+ When an I2P router is running on your system, you can simply add an I2P + interface to Reticulum: +

+
+
+
[[I2P]]
+  type = I2PInterface
+  enabled = yes
+  connectable = yes
+
+
+
+

+ On the first start, Reticulum will generate a new I2P address for the interface + and start listening for inbound traffic on it. This can take a while the first + time, especially if your I2P router was also just started, and is not yet + well-connected to the I2P network. When ready, you should see I2P base32 address + printed to your log file. You can also inspect the status of the interface using + the + rnstatus + utility. +

+

+ To connect to other Reticulum instances over I2P, just add a comma-separated + list of I2P base32 addresses to the + peers + option of the interface: +

+
+
+
[[I2P]]
+  type = I2PInterface
+  enabled = yes
+  connectable = yes
+  peers = 5urvjicpzi7q3ybztsef4i5ow2aq4soktfj7zedz53s47r54jnqq.b32.i2p
+
+
+
+

+ It can take anywhere from a few seconds to a few minutes to establish I2P + connections to the desired peers, so Reticulum handles the process in the + background, and will output relevant events to the log. +

+
+

Note

+

+ While the I2P interface is the simplest way to use Reticulum over I2P, it is + also possible to tunnel the TCP server and client interfaces over I2P + manually. This can be useful in situations where more control is needed, but + requires manual tunnel setup through the I2P daemon configuration. +

+
+

+ It is important to note that the two methods are + interchangably compatible. You can use the I2PInterface to connect to a + TCPServerInterface that was manually tunneled over I2P, for example. This offers + a high degree of flexibility in network setup, while retaining ease of use in + simpler use-cases. +

+
+
+ +

+ RNode LoRa Interface +

+

+ To use Reticulum over LoRa, the + RNode + interface can be used, and offers full control over LoRa parameters. +

+
+

Warning

+

+ Radio frequency spectrum is a legally controlled resource, and legislation + varies widely around the world. It is your responsibility to be aware of any + relevant regulation for your location, and to make decisions accordingly. +

+
+
+
+
# Here's an example of how to add a LoRa interface
+# using the RNode LoRa transceiver.
+
+[[RNode LoRa Interface]]
+  type = RNodeInterface
+
+  # Enable interface if you want use it!
+  enabled = yes
+
+  # Serial port for the device
+  port = /dev/ttyUSB0
+
+  # You can connect wirelessly to the
+  # RNode device if it supports WiFi.
+
+  # Connect by IP address
+  # port = tcp://10.0.0.1
+
+  # Or, connect by hostname
+  # port = tcp://rnodef3b9.local
+
+  # It is also possible to use BLE devices
+  # instead of wired serial ports. The
+  # target RNode must be paired with the
+  # host device before connecting. BLE
+  # devices can be connected by name,
+  # BLE MAC address or by any available.
+
+  # Connect to specific device by name
+  # port = ble://RNode 3B87
+
+  # Or by BLE MAC address
+  # port = ble://F4:12:73:29:4E:89
+
+  # Or connect to the first available,
+  # paired device
+  # port = ble://
+
+  # Set frequency to 867.2 MHz
+  frequency = 867200000
+
+  # Set LoRa bandwidth to 125 KHz
+  bandwidth = 125000
+
+  # Set TX power to 7 dBm (5 mW)
+  txpower = 7
+
+  # Select spreading factor 8. Valid
+  # range is 7 through 12, with 7
+  # being the fastest and 12 having
+  # the longest range.
+  spreadingfactor = 8
+
+  # Select coding rate 5. Valid range
+  # is 5 throough 8, with 5 being the
+  # fastest, and 8 the longest range.
+  codingrate = 5
+
+  # You can configure the RNode to send
+  # out identification on the channel with
+  # a set interval by configuring the
+  # following two parameters.
+
+  # id_callsign = MYCALL-0
+  # id_interval = 600
+
+  # For certain homebrew RNode interfaces
+  # with low amounts of RAM, using packet
+  # flow control can be useful. By default
+  # it is disabled.
+
+  # flow_control = False
+
+  # It is possible to limit the airtime
+  # utilisation of an RNode by using the
+  # following two configuration options.
+  # The short-term limit is applied in a
+  # window of approximately 15 seconds,
+  # and the long-term limit is enforced
+  # over a rolling 60 minute window. Both
+  # options are specified in percent.
+
+  # airtime_limit_long = 1.5
+  # airtime_limit_short = 33
+
+
+
+
+
+ +

+ RNode Multi Interface +

+

+ For RNodes that support multiple LoRa transceivers, the RNode Multi interface + can be used to configure sub-interfaces individually. +

+
+

Warning

+

+ Radio frequency spectrum is a legally controlled resource, and legislation + varies widely around the world. It is your responsibility to be aware of any + relevant regulation for your location, and to make decisions accordingly. +

+
+
+
+
# Here's an example of how to add an RNode Multi interface
+# using the RNode LoRa transceiver.
+
+[[RNode Multi Interface]]
+type = RNodeMultiInterface
+
+# Enable interface if you want to use it!
+enabled = yes
+
+# Serial port for the device
+port = /dev/ttyACM0
+
+# You can configure the RNode to send
+# out identification on the channel with
+# a set interval by configuring the
+# following two parameters.
+
+# id_callsign = MYCALL-0
+# id_interval = 600
+
+  # A subinterface
+  [[[High Datarate]]]
+    # Subinterfaces can be enabled and disabled in of themselves
+    enabled = yes
+
+    # Set frequency to 2.4GHz
+    frequency = 2400000000
+
+    # Set LoRa bandwidth to 1625 KHz
+    bandwidth = 1625000
+
+    # Set TX power to 0 dBm (0.12 mW)
+    txpower = 0
+
+    # The virtual port, only the manufacturer
+    # or the person who wrote the board config
+    # can tell you what it will be for which
+    # physical hardware interface
+    vport = 1
+
+    # Select spreading factor 5. Valid
+    # range is 5 through 12, with 5
+    # being the fastest and 12 having
+    # the longest range.
+    spreadingfactor = 5
+
+    # Select coding rate 5. Valid range
+    # is 5 throough 8, with 5 being the
+    # fastest, and 8 the longest range.
+    codingrate = 5
+
+    # It is possible to limit the airtime
+    # utilisation of an RNode by using the
+    # following two configuration options.
+    # The short-term limit is applied in a
+    # window of approximately 15 seconds,
+    # and the long-term limit is enforced
+    # over a rolling 60 minute window. Both
+    # options are specified in percent.
+
+    # airtime_limit_long = 100
+    # airtime_limit_short = 100
+
+  [[[Low Datarate]]]
+    # Subinterfaces can be enabled and disabled in of themselves
+    enabled = yes
+
+    # Set frequency to 865.6 MHz
+    frequency = 865600000
+
+    # The virtual port, only the manufacturer
+    # or the person who wrote the board config
+    # can tell you what it will be for which
+    # physical hardware interface
+    vport = 0
+
+    # Set LoRa bandwidth to 125 KHz
+    bandwidth = 125000
+
+    # Set TX power to 0 dBm (0.12 mW)
+    txpower = 0
+
+    # Select spreading factor 7. Valid
+    # range is 5 through 12, with 5
+    # being the fastest and 12 having
+    # the longest range.
+    spreadingfactor = 7
+
+    # Select coding rate 5. Valid range
+    # is 5 throough 8, with 5 being the
+    # fastest, and 8 the longest range.
+    codingrate = 5
+
+    # It is possible to limit the airtime
+    # utilisation of an RNode by using the
+    # following two configuration options.
+    # The short-term limit is applied in a
+    # window of approximately 15 seconds,
+    # and the long-term limit is enforced
+    # over a rolling 60 minute window. Both
+    # options are specified in percent.
+
+    # airtime_limit_long = 100
+    # airtime_limit_short = 100
+
+
+
+
+
+ +

+ Serial Interface +

+

+ Reticulum can be used over serial ports directly, or over any device with a + 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. +

+
+
+
[[Serial Interface]]
+  type = SerialInterface
+  enabled = yes
+
+  # Serial port for the device
+  port = /dev/ttyUSB0
+
+  # Set the serial baud-rate and other
+  # configuration parameters.
+  speed = 115200
+  databits = 8
+  parity = none
+  stopbits = 1
+
+
+
+
+
+ +

+ Pipe Interface +

+

+ 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 custom hardware or other systems. +

+
+
+
[[Pipe Interface]]
+  type = PipeInterface
+  enabled = yes
+
+  # External command to execute
+  command = netcat -l 5757
+
+  # Optional respawn delay, in seconds
+  respawn_delay = 5
+
+
+
+

+ Reticulum will write all packets to stdin of the + command + option, and will 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. +

+
+
+ +

+ KISS Interface +

+

+ With the KISS interface, you can use Reticulum over a variety of packet radio + modems and TNCs, including + OpenModem. KISS interfaces can also be configured to periodically send out beacons for + station identification purposes. +

+
+

Warning

+

+ Radio frequency spectrum is a legally controlled resource, and legislation + varies widely around the world. It is your responsibility to be aware of any + relevant regulation for your location, and to make decisions accordingly. +

+
+
+
+
[[Packet Radio KISS Interface]]
+  type = KISSInterface
+  enabled = yes
+
+  # Serial port for the device
+  port = /dev/ttyUSB1
+
+  # Set the serial baud-rate and other
+  # configuration parameters.
+  speed = 115200
+  databits = 8
+  parity = none
+  stopbits = 1
+
+  # Set the modem preamble.
+  preamble = 150
+
+  # Set the modem TX tail.
+  txtail = 10
+
+  # Configure CDMA parameters. These
+  # settings are reasonable defaults.
+  persistence = 200
+  slottime = 20
+
+  # You can configure the interface to send
+  # out identification on the channel with
+  # a set interval by configuring the
+  # following two parameters. The KISS
+  # interface will only ID if the set
+  # interval has elapsed since it's last
+  # actual transmission. The interval is
+  # configured in seconds.
+  # This option is commented out and not
+  # used by default.
+  # id_callsign = MYCALL-0
+  # id_interval = 600
+
+  # Whether to use KISS flow-control.
+  # This is useful for modems that have
+  # a small internal packet buffer, but
+  # support packet flow control instead.
+  flow_control = false
+
+
+
+
+
+ +

+ AX.25 KISS Interface +

+

+ If you’re using Reticulum on amateur radio spectrum, you might want to use the + AX.25 KISS interface. This way, Reticulum will automatically encapsulate it’s + traffic in AX.25 and also identify your stations transmissions with your + callsign and SSID. +

+

+ Only do this if you really need to! Reticulum doesn’t need the AX.25 layer for + anything, and it incurs extra overhead on every packet to encapsulate in AX.25. +

+

+ A more efficient way is to use the plain KISS interface with the beaconing + functionality described above. +

+
+

Warning

+

+ Radio frequency spectrum is a legally controlled resource, and legislation + varies widely around the world. It is your responsibility to be aware of any + relevant regulation for your location, and to make decisions accordingly. +

+
+
+
+
[[Packet Radio AX.25 KISS Interface]]
+  type = AX25KISSInterface
+
+  # Set the station callsign and SSID
+  callsign = NO1CLL
+  ssid = 0
+
+  # Enable interface if you want use it!
+  enabled = yes
+
+  # Serial port for the device
+  port = /dev/ttyUSB2
+
+  # Set the serial baud-rate and other
+  # configuration parameters.
+  speed = 115200
+  databits = 8
+  parity = none
+  stopbits = 1
+
+  # Set the modem preamble. A 150ms
+  # preamble should be a reasonable
+  # default, but may need to be
+  # increased for radios with slow-
+  # opening squelch and long TX/RX
+  # turnaround
+  preamble = 150
+
+  # Set the modem TX tail. In most
+  # cases this should be kept as low
+  # as possible to not waste airtime.
+  txtail = 10
+
+  # Configure CDMA parameters. These
+  # settings are reasonable defaults.
+  persistence = 200
+  slottime = 20
+
+  # Whether to use KISS flow-control.
+  # This is useful for modems with a
+  # small internal packet buffer.
+  flow_control = false
+
+
+
+
+
+ +

+ Common Interface Options +

+

+ A number of general configuration options are available on most interfaces. + These can be used to control various aspects of interface behaviour. +

+
+
+
    +
  • +
    +
    + The + enabled + option tells Reticulum whether or not to bring up the interface. + Defaults to + False. For any interface to be brought up, the + enabled + option must be set to + True + or + Yes. +
    +
    +
  • +
  • +
    +
    + The + mode + option allows selecting the high-level behaviour of the interface from + a number of options. +
    +
    +
    +
    +
      +
    • +

      + The default value is + full. In this mode, all discovery, meshing and transport + functionality is available. +

      +
    • +
    • +

      + In the + access_point + (or shorthand + ap) mode, the interface will operate as a network access point. + In this mode, announces will not be automatically broadcasted on + the interface, and paths to destinations on the interface will + have a much shorter expiry time. This mode is useful for + creating interfaces that are mostly quiet, unless when someone + is actually using them. An example of this could be a radio + interface serving a wide area, where users are expected to + connect momentarily, use the network, and then disappear again. +

      +
    • +
    +
    +
    +
  • +
  • +
    +
    + The + outgoing + option sets whether an interface is allowed to transmit. Defaults to + True. If set to + False + or + No + the interface will only receive data, and never transmit. +
    +
    +
  • +
  • +
    +
    + The + network_name + option sets the virtual network name for the interface. This allows + multiple separate network segments to exist on the same physical + channel or medium. +
    +
    +
  • +
  • +
    +
    + The + passphrase + option sets an authentication passphrase on the interface. This option + can be used in conjunction with the + network_name + option, or be used alone. +
    +
    +
  • +
  • +
    +
    + The + ifac_size + option allows customising the length of the Interface Authentication + Codes carried by each packet on named and/or authenticated network + segments. It is set by default to a size suitable for the interface in + question, but can be set to a custom size between 8 and 512 bits by + using this option. In normal usage, this option should not be changed + from the default. +
    +
    +
  • +
  • +
    +
    + The + announce_cap + option lets you configure the maximum bandwidth to allocate, at any + given time, to propagating announces and other network upkeep traffic. + It is configured at 2% by default, and should normally not need to be + changed. Can be set to any value between + 1 + and + 100. +
    +
    +
    +
    +

    + If an interface exceeds its announce cap, it will queue announces + for later transmission. Reticulum will always prioritise + propagating announces from nearby nodes first. This ensures that + the local topology is prioritised, and that slow networks are not + overwhelmed by interconnected fast networks. +

    +

    + Destinations that are rapidly re-announcing will be + down-prioritised further. Trying to get “first-in-line” by + announce spamming will have the exact opposite effect: Getting + moved to the back of the queue every time a new announce from the + excessively announcing destination is received. +

    +

    + This means that it is always beneficial to select a balanced + announce rate, and not announce more often than is actually + necesarry for your application to function. +

    +
    +
    +
  • +
  • +
    +
    + The + bitrate + option configures the interface bitrate. Reticulum will use interface + speeds reported by hardware, or try to guess a suitable rate when the + hardware doesn’t report any. In most cases, the automatically found + rate should be sufficient, but it can be configured by using the + bitrate + option, to set the interface speed in bits per second. +
    +
    +
  • +
+
+
+
+
+ +

+ Interface Modes +

+

+ The optional + mode + setting is available on all interfaces, and allows 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 are propagated, how long + paths are valid and how paths are discovered. +

+

+ Configuring modes on interfaces is not strictly necessary, but + can be useful when building or connecting to more complex networks. If your + Reticulum instance is not running a Transport Node, it is rarely useful to + configure interface modes, and in such cases interfaces should generally be left + in the default mode. +

+
+
+
    +
  • +
    +
    + The default mode is + full. In this mode, all discovery, meshing and transport functionality is + activated. +
    +
    +
  • +
  • +
    +
    + The + gateway + mode (or shorthand + gw) also has all discovery, meshing and transport functionality + available, but will additionally try to discover unknown paths on + behalf of other nodes residing on the + gateway + interface. If Reticulum receives a path request for an unknown + destination, from a node on a + gateway + interface, it will try to discover this path via all other active + interfaces, and forward the discovered path to the requestor if one is + found. +
    +
    +
    +
    + If you want to allow other nodes to widely resolve paths or connect to + a network via an interface, it might be useful to put it in this mode. + By creating a chain of + gateway + interfaces, other nodes will be able to immediately discover paths to + any destination along the chain. +
    +
    +
    +
    + Please note! It is the interface + facing the clients that must be put into + gateway + mode for this to work, not the interface facing the wider network (for + this, the + boundary + mode can be useful, though). +
    +
    +
  • +
  • +
    +
    + In the + access_point + (or shorthand + ap) mode, the interface will operate as a network access point. In this + mode, announces will not be automatically broadcasted on the + interface, and paths to destinations on the interface will have a much + shorter expiry time. In addition, path requests from clients on the + access point interface will be handled in the same way as the + gateway + interface. +
    +
    +
    +
    + This mode is useful for creating interfaces that remain quiet, until + someone actually starts using them. An example of this could be a + radio interface serving a wide area, where users are expected to + connect momentarily, use the network, and then disappear again. +
    +
    +
  • +
  • +
    +
    + The + roaming + mode should be used on interfaces that are roaming (physically + mobile), seen from the perspective of other nodes in the network. As + an example, if a vehicle is equipped with an external LoRa interface, + and an internal, WiFi-based interface, that serves devices that are + moving with the vehicle, the external LoRa interface should + be configured as + roaming, and the internal interface can be left in the default mode. With + transport enabled, such a setup will allow all internal devices to + reach each other, and all other devices that are available on the LoRa + side of the network, when they are in range. Devices on the LoRa side + of the network will also be able to reach devices internal to the + vehicle, when it is in range. Paths via + roaming + interfaces also expire faster. +
    +
    +
  • +
  • +
    +
    + The purpose of the + boundary + mode is to specify interfaces that establish connectivity with network + segments that are significantly different than the one this node + exists on. As an example, if a Reticulum instance is part of a + LoRa-based network, but also has a high-speed connection to a public + Transport Node available on the Internet, the interface connecting + over the Internet should be set to + boundary + mode. +
    +
    +
  • +
+
+
+

+ For a table describing the impact of all modes on announce propagation, please + see the + Announce Propagation Rules + section. +

+
+
+ +

+ Announce Rate Control +

+

+ The built-in announce control mechanisms and the default + announce_cap + 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 + announce_rate_target, + announce_rate_grace + and + announce_rate_penalty + options, this can be done on a per-interface basis, and moderates the + rate at which received announces are re-broadcasted to other interfaces. +

+
+
+
    +
  • +
    +
    + The + announce_rate_target + option sets the minimum amount of time, in seconds, that should pass + between received announces, for any one destination. As an example, + setting this value to + 3600 + means that announces received on this interface will only be + re-transmitted and propagated to other interfaces once every hour, no + matter how often they are received. +
    +
    +
  • +
  • +
    +
    + The optional + announce_rate_grace + defines the number of times a destination can violate the announce + rate before the target rate is enforced. +
    +
    +
  • +
  • +
    +
    + The optional + announce_rate_penalty + configures an extra amount of time that is added to the normal rate + target. As an example, if a penalty of + 7200 + seconds is defined, once the rate target is enforced, the destination + in question will only have its announces propagated every 3 hours, + until it lowers its actual announce rate to within the target. +
    +
    +
  • +
+
+
+

+ These mechanisms, in conjunction with the + annouce_cap + mechanisms mentioned above means that it is essential to select a balanced + announce strategy for your destinations. The more balanced you can make this + decision, the easier it will be for your destinations to make it into slower + networks that many hops away. Or you can prioritise only reaching high-capacity + networks with more frequent announces. +

+

+ Current statistics and information about announce rates can be viewed using the + rnpath -r + command. +

+

+ It is important to note that there is no one right or wrong way to set up + announce rates. Slower networks will naturally tend towards using less frequent + announces to conserve bandwidth, while very fast networks can support + applications that need very frequent announces. Reticulum implements these + mechanisms to ensure that a large span of network types can seamlessly + co-exist and interconnect. +

+
+
+ +

+ New Destination Rate Limiting +

+

+ On public interfaces, where anyone may connect and announce new destinations, it + can be useful to control the rate at which announces for + new destinations are processed. +

+

+ If a large influx of announces for newly created or previously unknown + destinations occur within a short amount of time, Reticulum will place these + announces on hold, so that announce traffic for known and previously established + destinations can continue to be processed without interruptions. +

+

+ After the burst subsides, and an additional waiting period has passed, the held + announces will be released at a slow rate, until the hold queue is cleared. This + also means, that should a node decide to connect to a public interface, announce + a large amount of bogus destinations, and then disconnect, these destination + will never make it into path tables and waste network bandwidth on retransmitted + announces. +

+

+ It’s important to note that the ingress control works at the + level of individual sub-interfaces. As an example, this means that one + client on a + TCP Server Interface + cannot disrupt processing of incoming announces for other connected clients on + the same + TCP Server Interface. All other clients on the same interface will still have new announces + processed without interruption. +

+

+ By default, Reticulum will handle this automatically, and ingress announce + control will be enabled on interface where it is sensible to do so. It should + generally not be neccessary to modify the ingress control configuration, but all + the parameters are exposed for configuration if needed. +

+
+
+
    +
  • +
    +
    + The + ingress_control + option tells Reticulum whether or not to enable announce ingress + control on the interface. Defaults to + True. +
    +
    +
  • +
  • +
    +
    + The + ic_new_time + option configures how long (in seconds) an interface is considered + newly spawned. Defaults to + 2*60*60 + seconds. This option is useful on publicly accessible interfaces that + spawn new sub-interfaces when a new client connects. +
    +
    +
  • +
  • +
    +
    + The + ic_burst_freq_new + option sets the maximum announce ingress frequency for newly spawned + interfaces. Defaults to + 3.5 + announces per second. +
    +
    +
  • +
  • +
    +
    + The + ic_burst_freq + option sets the maximum announce ingress frequency for other + interfaces. Defaults to + 12 + announces per second. +
    +
    +
    +
    +

    + If an interface exceeds its burst frequency, incoming announces + for unknown destinations will be temporarily held in a queue, and + not processed until later. +

    +
    +
    +
  • +
  • +
    +
    + The + ic_max_held_announces + option sets the maximum amount of unique announces that will be held + in the queue. Any additional unique announces will be dropped. + Defaults to + 256 + announces. +
    +
    +
  • +
  • +
    +
    + The + ic_burst_hold + option sets how much time (in seconds) must pass after the burst + frequency drops below its threshold, for the announce burst to be + considered cleared. Defaults to + 60 + seconds. +
    +
    +
  • +
  • +
    +
    + The + ic_burst_penalty + option sets how much time (in seconds) must pass after the burst is + considered cleared, before held announces can start being released + from the queue. Defaults to + 5*60 + seconds. +
    +
    +
  • +
  • +
    +
    + The + ic_held_release_interval + option sets how much time (in seconds) must pass between releasing + each held announce from the queue. Defaults to + 30 + seconds. +
    +
    +
  • +
+
+
+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/license.html b/docs/license.html new file mode 100644 index 0000000..4c612d1 --- /dev/null +++ b/docs/license.html @@ -0,0 +1,520 @@ + + + + + + + + + + + + + + + Reticulum License - Reticulum Network Stack 1.1.3 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Reticulum License +

+
+
+
Reticulum License
+
+Copyright (c) 2016-2026 Mark Qvist
+
+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 Software shall not be used in any kind of system which includes amongst
+  its functions the ability to purposefully do harm to human beings.
+
+- The Software shall not be used, directly or indirectly, in the creation of
+  an artificial intelligence, machine learning or language model training
+  dataset, including but not limited to any use that contributes to the
+  training or development of such a model or algorithm.
+
+- 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.
+
+
+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/networks.html b/docs/networks.html new file mode 100644 index 0000000..213daee --- /dev/null +++ b/docs/networks.html @@ -0,0 +1,780 @@ + + + + + + + + + + + + + + + Building Networks - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Building Networks +

+

+ 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 + 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 + Reticulum, you can simply add more segments to your network when it becomes + necessary, and Reticulum will handle the convergence of the entire network + automatically. +

+
+

+ Concepts & Overview +

+

+ There are important points that need to be kept in mind when building networks + with Reticulum: +

+
+
+
    +
  • +
    +
    + In a Reticulum network, any node can autonomously generate as many + addresses (called destinations in Reticulum terminology) as + it needs, which become globally reachable to the rest of the network. + There is no central point of control over the address space. +
    +
    +
  • +
  • +
    +
    + Reticulum was designed to handle both very small, and very large + networks. While the address space can support billions of endpoints, + Reticulum is also very useful when just a few devices needs to + communicate. +
    +
    +
  • +
  • +
    +
    + Low-bandwidth networks, like LoRa and packet radio, can interoperate + and interconnect with much larger and higher bandwidth networks + without issue. Reticulum automatically manages the flow of information + to and from various network segments, and when bandwidth is limited, + local traffic is prioritised. +
    +
    +
  • +
  • +
    +
    + Reticulum provides sender/initiator anonymity by default. There is no + way to filter traffic or discriminate it based on the source of the + traffic. +
    +
    +
  • +
  • +
    +
    + All traffic is encrypted using ephemeral keys generated by an Elliptic + Curve Diffie-Hellman key exchange on Curve25519. There is no way to + inspect traffic contents, and no way to prioritise or throttle certain + kinds of traffic. All transport and routing layers are thus completely + agnostic to traffic type, and will pass all traffic equally. +
    +
    +
  • +
  • +
    +
    + Reticulum can function both with and without infrastructure. When + transport nodes are available, they can route traffic over + multiple hops for other nodes, and will function as a distributed + cryptographic keystore. When there is no transport nodes available, + all nodes that are within communication range can still communicate. +
    +
    +
  • +
  • +
    +
    + Every node can become a transport node, simply by enabling it in it’s + configuration, but there is no need for every node on the network to + be a transport node. Letting every node be a transport node will in + most cases degrade the performance and reliability of the network. +
    +
    +
    +
    +

    + In general terms, if a node is stationary, well-connected and + kept running most of the time, it is a good candidate to be a + transport node. For optimal performance, a network should contain + the amount of transport nodes that provides connectivity to the + intended area / topography, and not many more than that. +

    +
    +
    +
  • +
  • +
    +
    + Reticulum is designed to work reliably in open, trustless + environments. This means you can use it to create open-access + networks, where participants can join and leave in a free and + unorganised manner. This property allows an entirely new, and so far, + mostly unexplored class of networked applications, where networks, and + the information flow within them can form and dissolve organically. +
    +
    +
  • +
  • +
    +
    + You can just as easily create closed networks, since Reticulum allows + you to add authentication to any interface. This means you can + restrict access on any interface type, even when using legacy devices, + such as modems. You can also mix authenticated and open interfaces on + the same system. See the + Common Interface Options + section of the + Interfaces + chapter of this manual for information on how to set up interface + authentication. +
    +
    +
  • +
+
+
+

+ Reticulum allows you to mix very different kinds of networking mediums into a + unified mesh, or to keep everything within one medium. You could build a + “virtual network” running entirely over the Internet, where all nodes + communicate over TCP and UDP “channels”. You could also build such a network + using other already-established communications channels as the underlying + carrier for Reticulum. +

+

+ However, most real-world networks will probably involve either some form of + wireless or direct hardline communications. To allow Reticulum to communicate + over any type of medium, you must specify it in the configuration file, by + default located at + ~/.reticulum/config. See the + Supported Interfaces + chapter of this manual for interface configuration examples. +

+

+ Any number of interfaces can be configured, and Reticulum will automatically + decide which are suitable to use in any given situation, depending on where + traffic needs to flow. +

+
+
+

+ Example Scenarios +

+

+ This section illustrates a few example scenarios, and how they would, in general + terms, be planned, implemented and configured. +

+
+

+ Interconnected LoRa Sites +

+

+ 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 locations are found, where the organisation can install equipment: + Site A, B and C. +

+

+ Since the amount of data that needs to be exchanged between users is mainly + text- based, the bandwidth requirements are low, and LoRa radios are chosen to + connect users to the network. +

+

+ Due to the hill-top locations found, there is radio line-of-sight between site + A and B, and also between site B and C. Because of this, the organisation does + not need to use the Internet to interconnect the sites, but purchases four + Point-to-Point WiFi based radios for interconnecting the sites. +

+

+ 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 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 this location. +

+

+ 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 radio. At site B, an interface for the LoRa radio, and one + interface for each WiFi radio is added to the Reticulum configuration file. + The transport node option is enabled in the configuration of all three + gateways. +

+

+ The network is now operational, and ready to serve users across all three + areas. The organisation prepares a LoRa radio that is supplied to the end + users, along with a Reticulum configuration file, that contains the right + parameters for communicating with the LoRa radios installed at the gateway + sites. +

+

+ Once users connect to the network, anyone will be able to communicate with + anyone else across all three sites. +

+
+
+

+ Bridging Over the Internet +

+

+ 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 previously installed are set up for the new communities at the new sites + D and E, but they are islanded from the core network, and only serve the local + users. +

+

+ After investigating the options, it is found that it is possible to install an + Internet connection at site A, and an interface on the Internet connection is + configured for Reticulum on the Raspberry Pi at site A. +

+

+ A member of the organisation at site D, named Dori, is willing to help by + sharing the Internet connection she already has in her home, and is able to + leave a Raspberry Pi running. A new Reticulum interface is configured on her + Pi, connecting to the newly enabled Internet interface on the gateway at site + A. Dori is now connected to both 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 traffic from site D can now reach + everyone at site A, B and C, and vice versa. +

+
+
+

+ Growth and Convergence +

+

+ 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 and communities that are out of reach for the LoRa radios and + WiFi backhauls. +

+

+ As more sites, gateways and users are connected, the amount of coordination + required is kept to a minimum. If one community wants to add connectivity to + the next one over, it can simply be done without having to involve everyone or + coordinate address space or routing tables. +

+

+ With the added geographical coverage, the operators at site A one day find + that 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 connected outliers are now an integral part of the network. +

+
+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/reference.html b/docs/reference.html new file mode 100644 index 0000000..6ccc9bd --- /dev/null +++ b/docs/reference.html @@ -0,0 +1,7310 @@ + + + + + + + + + + + + + + API Reference - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ API Reference +

+

+ 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. +

+

+

Reticulum

+

+
+
+ class RNS.Reticulum(configdir=None, + loglevel=None, + logdest=None, + verbosity=None, + require_shared_instance=False, + shared_instance_type=None) +
+
+

+ This class is used to initialise access to Reticulum within a program. You + must create exactly one instance of this class before carrying out any other + RNS operations, such as creating destinations or sending traffic. Every + independently executed program must create their own instance of the Reticulum + class, but Reticulum will automatically handle inter-program communication on + the same system, and expose all connected programs to external interfaces as + well. +

+

+ As soon as an instance of this class is created, Reticulum will start opening + and configuring any hardware devices specified in the supplied configuration. +

+

+ Currently the first running instance must be kept running while other local + instances are connected, as the first created instance will act as a master + instance that directly communicates with external hardware such as modems, + TNCs and radios. If a master instance is asked to exit, it will not exit until + all client processes have terminated (unless killed forcibly). +

+

+ If you are running Reticulum on a system with several different programs that + use RNS starting and terminating at different times, it will be advantageous + to run a master RNS instance as a daemon for other programs to use on demand. +

+
+
+ MTU = 500 +
+
+

+ The MTU that Reticulum adheres to, and will expect other peers to adhere + to. By default, the MTU is 500 bytes. In custom RNS network + implementations, it is possible to change this value, but doing so will + completely break compatibility with all other RNS networks. An identical + MTU is a prerequisite for peers to communicate in the same network. +

+

+ Unless you really know what you are doing, the MTU should be left at the + default value. +

+
+
+ +
+ +
+

+ Whether automatic link MTU discovery is enabled by default in this + release. Link MTU discovery significantly increases throughput over fast + links, but requires all intermediary hops to also support it. Support for + this feature was added in RNS version 0.9.0. This option will become + enabled by default in the near future. Please update your RNS instances. +

+
+
+ +
+
+ ANNOUNCE_CAP = 2 +
+
+

+ The maximum percentage of interface bandwidth that, at any given time, may + be used to propagate announces. If an announce was scheduled for + broadcasting on an interface, but doing so would exceed the allowed + bandwidth allocation, the announce will be queued for transmission when + there is bandwidth available. +

+

+ Reticulum will always prioritise propagating announces with fewer hops, + ensuring that distant, large networks with many peers on fast links don’t + overwhelm the capacity of smaller networks on slower mediums. If an + announce remains queued for an extended amount of time, it will eventually + be dropped. +

+

+ This value will be applied by default to all created interfaces, but it + can be configured individually on a per-interface basis. In general, the + global default setting should not be changed, and any alterations should + be made on a per-interface basis instead. +

+
+
+ +
+
+ MINIMUM_BITRATE = 5 +
+
+

+ Minimum bitrate required across a medium for Reticulum to be able to + successfully establish links. Currently 5 bits per second. +

+
+
+ +
+
+ static get_instance() +
+

Return the currently running Reticulum instance

+
+ +
+
+ static should_use_implicit_proof() +
+
+

Returns whether proofs sent are explicit or implicit.

+
+
Returns:
+
+

+ True if the current running configuration specifies to use implicit + proofs. False if not. +

+
+
+
+
+ +
+
+ static transport_enabled() +
+
+

Returns whether Transport is enabled for the running instance.

+

+ When Transport is enabled, Reticulum will route traffic for other peers, + respond to path requests and pass announces over the network. +

+
+
Returns:
+
+

True if Transport is enabled, False if not.

+
+
+
+
+ +
+ +
+

+ Returns whether link MTU discovery is enabled for the running instance. +

+

+ When link MTU discovery is enabled, Reticulum will automatically upgrade + link MTUs to the highest supported value, increasing transfer speed and + efficiency. +

+
+
Returns:
+
+

True if link MTU discovery is enabled, False if not.

+
+
+
+
+ +
+
+ static remote_management_enabled() +
+
+

+ Returns whether remote management is enabled for the running instance. +

+

+ When remote management is enabled, authenticated peers can remotely query + and manage this instance. +

+
+
Returns:
+
+

True if remote management is enabled, False if not.

+
+
+
+
+
+
+ +

+

Identity

+

+
+
+ class RNS.Identity(create_keys=True) +
+
+

+ This class is used to manage identities in Reticulum. It provides methods for + encryption, decryption, signatures and verification, and is the basis for all + encrypted communication over Reticulum networks. +

+
+
Parameters:
+
+

+ create_keys – Specifies whether new encryption and + signing keys should be generated. +

+
+
+
+
+ CURVE = 'Curve25519' +
+

The curve used for Elliptic Curve DH key exchanges

+
+ +
+
+ KEYSIZE = 512 +
+
+

+ X.25519 key size in bits. A complete key is the concatenation of a 256 bit + encryption key, and a 256 bit signing key. +

+
+
+ +
+
+ RATCHETSIZE = 256 +
+

X.25519 ratchet key size in bits.

+
+ +
+
+ RATCHET_EXPIRY = 2592000 +
+
+

+ The expiry time for received ratchets in seconds, defaults to 30 days. + Reticulum will always use the most recently announced ratchet, and + remember it for up to + RATCHET_EXPIRY + since receiving it, after which it will be discarded. If a newer ratchet + is announced in the meantime, it will be replace the already known + ratchet. +

+
+
+ +
+
+ TRUNCATED_HASHLENGTH = 128 +
+
+

+ Constant specifying the truncated hash length (in bits) used by Reticulum + for addressable hashes and other purposes. Non-configurable. +

+
+
+ +
+
+ static recall(target_hash, + from_identity_hash=False) +
+
+

+ Recall identity for a destination or identity hash. By default, this + function will return the identity associated with a given + destination hash. As an example, if you know the + lxmf.delivery + destination hash of an endpoint, this function will return the associated + underlying identity. You can also search for an identity from a known + identity hash, by setting the + from_identity_hash + argument. +

+
+
Parameters:
+
+
    +
  • +

    + target_hash – Destination or identity hash as + bytes. +

    +
  • +
  • +

    + from_identity_hash – Whether to search based on + identity hash instead of destination hash as bool. +

    +
  • +
+
+
Returns:
+
+

+ An + RNS.Identity + instance that can be used to create an outgoing + RNS.Destination, or None if the destination is unknown. +

+
+
+
+
+ +
+
+ static recall_app_data(destination_hash) +
+
+

Recall last heard app_data for a destination hash.

+
+
Parameters:
+
+

+ destination_hash – Destination hash as + bytes. +

+
+
Returns:
+
+

+ Bytes containing app_data, or None if the + destination is unknown. +

+
+
+
+
+ +
+
+ static full_hash(data) +
+
+

Get a SHA-256 hash of passed data.

+
+
Parameters:
+
+

data – Data to be hashed as bytes.

+
+
Returns:
+
+

SHA-256 hash as bytes.

+
+
+
+
+ +
+
+ static truncated_hash(data) +
+
+

Get a truncated SHA-256 hash of passed data.

+
+
Parameters:
+
+

data – Data to be hashed as bytes.

+
+
Returns:
+
+

Truncated SHA-256 hash as bytes.

+
+
+
+
+ +
+
+ static get_random_hash() +
+
+

Get a random SHA-256 hash.

+
+
Parameters:
+
+

data – Data to be hashed as bytes.

+
+
Returns:
+
+

Truncated SHA-256 hash of random data as bytes.

+
+
+
+
+ +
+
+ static current_ratchet_id(destination_hash) +
+
+

+ Get the ID of the currently used ratchet key for a given destination hash +

+
+
Parameters:
+
+

+ destination_hash – A destination hash as + bytes. +

+
+
Returns:
+
+

A ratchet ID as bytes or None.

+
+
+
+
+ +
+
+ static from_bytes(prv_bytes) +
+
+

+ Create a new + RNS.Identity + instance from bytes of private key. Can be used to load + previously created and saved identities into Reticulum. +

+
+
Parameters:
+
+

+ prv_bytes – The bytes of private a saved + private key. HAZARD! Never use this to generate a new + key by feeding random data in prv_bytes. +

+
+
Returns:
+
+

+ A + RNS.Identity + instance, or None if the bytes data was invalid. +

+
+
+
+
+ +
+
+ static from_file(path) +
+
+

+ Create a new + RNS.Identity + instance from a file. Can be used to load previously created and saved + identities into Reticulum. +

+
+
Parameters:
+
+

+ path – The full path to the saved + RNS.Identity + data +

+
+
Returns:
+
+

+ A + RNS.Identity + instance, or None if the loaded data was invalid. +

+
+
+
+
+ +
+
+ to_file(path) +
+
+

+ Saves the identity to a file. This will write the private key to disk, and + anyone with access to this file will be able to decrypt all communication + for the identity. Be very careful with this method. +

+
+
Parameters:
+
+

+ path – The full path specifying where to save the + identity. +

+
+
Returns:
+
+

True if the file was saved, otherwise False.

+
+
+
+
+ +
+
+ get_private_key() +
+
+
+
Returns:
+
+

The private key as bytes

+
+
+
+
+ +
+
+ get_public_key() +
+
+
+
Returns:
+
+

The public key as bytes

+
+
+
+
+ +
+
+ load_private_key(prv_bytes) +
+
+

Load a private key into the instance.

+
+
Parameters:
+
+

prv_bytes – The private key as bytes.

+
+
Returns:
+
+

True if the key was loaded, otherwise False.

+
+
+
+
+ +
+
+ load_public_key(pub_bytes) +
+
+

Load a public key into the instance.

+
+
Parameters:
+
+

pub_bytes – The public key as bytes.

+
+
Returns:
+
+

True if the key was loaded, otherwise False.

+
+
+
+
+ +
+
+ encrypt(plaintext, + ratchet=None) +
+
+

Encrypts information for the identity.

+
+
Parameters:
+
+

+ plaintext – The plaintext to be encrypted as + bytes. +

+
+
Returns:
+
+

Ciphertext token as bytes.

+
+
Raises:
+
+

KeyError if the instance does not hold a public key.

+
+
+
+
+ +
+
+ decrypt(ciphertext_token, + ratchets=None, + enforce_ratchets=False, + ratchet_id_receiver=None) +
+
+

Decrypts information for the identity.

+
+
Parameters:
+
+

+ ciphertext – The ciphertext to be decrypted as + bytes. +

+
+
Returns:
+
+

+ Plaintext as bytes, or None if decryption fails. +

+
+
Raises:
+
+

KeyError if the instance does not hold a private key.

+
+
+
+
+ +
+
+ sign(message) +
+
+

Signs information by the identity.

+
+
Parameters:
+
+

+ message – The message to be signed as bytes. +

+
+
Returns:
+
+

Signature as bytes.

+
+
Raises:
+
+

KeyError if the instance does not hold a private key.

+
+
+
+
+ +
+
+ validate(signature, + message) +
+
+

Validates the signature of a signed message.

+
+
Parameters:
+
+
    +
  • +

    + signature – The signature to be validated as + bytes. +

    +
  • +
  • +

    + message – The message to be validated as + bytes. +

    +
  • +
+
+
Returns:
+
+

True if the signature is valid, otherwise False.

+
+
Raises:
+
+

KeyError if the instance does not hold a public key.

+
+
+
+
+
+
+ +

+

Destination

+

+
+
+ class RNS.Destination(identity, + direction, + type, + app_name, + *aspects) +
+
+

+ A class used to describe endpoints in a Reticulum Network. Destination + instances are used both to create outgoing and incoming endpoints. The + destination type will decide if encryption, and what type, is used in + communication with the endpoint. A destination can also announce its presence + on the network, which will distribute necessary keys for encrypted + communication with it. +

+
+
Parameters:
+
+
    +
  • +

    + identity – An instance of + RNS.Identity. Can hold only public keys for an outgoing destination, or holding + private keys for an ingoing. +

    +
  • +
  • +

    + direction – + RNS.Destination.IN + or + RNS.Destination.OUT. +

    +
  • +
  • +

    + type – + RNS.Destination.SINGLE, + RNS.Destination.GROUP + or + RNS.Destination.PLAIN. +

    +
  • +
  • +

    app_name – A string specifying the app name.

    +
  • +
  • +

    + *aspects – Any non-zero number of string arguments. +

    +
  • +
+
+
+
+
+ RATCHET_COUNT = 512 +
+
+

+ The default number of generated ratchet keys a destination will retain, if + it has ratchets enabled. +

+
+
+ +
+
+ RATCHET_INTERVAL = 1800 +
+
+

The minimum interval between rotating ratchet keys, in seconds.

+
+
+ +
+
+ static 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. +

+
+
+
+
+ +
+
+ static app_and_aspects_from_name(full_name) +
+
+
+
Returns:
+
+

+ A tuple containing the app name and a list of aspects, for a full-name + string. +

+
+
+
+
+ +
+
+ static hash_from_name_and_identity(full_name, + identity) +
+
+
+
Returns:
+
+

+ A destination name in adressable hash form, for a full name string and + Identity instance. +

+
+
+
+
+ +
+
+ static hash(identity, + app_name, + *aspects) +
+
+
+
Returns:
+
+

+ A destination name in adressable hash form, for an app_name and a + number of aspects. +

+
+
+
+
+ +
+
+ announce(app_data=None, + path_response=False, + attached_interface=None, + tag=None, + send=True) +
+
+

+ Creates an announce packet for this destination and broadcasts it on all + relevant interfaces. Application specific data can be added to the + announce. +

+
+
Parameters:
+
+
    +
  • +

    + app_data – bytes containing the + app_data. +

    +
  • +
  • +

    + path_response – Internal flag used by + RNS.Transport. Ignore. +

    +
  • +
+
+
+
+
+ +
+ +
+

Set or query whether the destination accepts incoming link requests.

+
+
Parameters:
+
+

+ accepts – If + True + or + False, this method sets whether the destination accepts incoming link + requests. If not provided or + None, the method returns whether the destination currently accepts link + requests. +

+
+
Returns:
+
+

+ True + or + False + depending on whether the destination accepts incoming link requests, + if the accepts parameter is not provided or + None. +

+
+
+
+
+ +
+ +
+

+ Registers a function to be called when a link has been established to this + destination. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(link) to be called when a new link is established + with this destination. +

+
+
+
+
+ +
+
+ set_packet_callback(callback) +
+
+

+ Registers a function to be called when a packet has been received by this + destination. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(data, packet) to be called when this destination + receives a packet. +

+
+
+
+
+ +
+
+ set_proof_requested_callback(callback) +
+
+

+ Registers a function to be called when a proof has been requested for a + packet sent to this destination. Allows control over when and if proofs + should be returned for received packets. +

+
+
Parameters:
+
+

+ callback – A function or method to with the signature + callback(packet) be called when a packet that requests a + proof is received. The callback must return one of True or False. If + the callback returns True, a proof will be sent. If it returns False, + a proof will not be sent. +

+
+
+
+
+ +
+
+ set_proof_strategy(proof_strategy) +
+
+

Sets the destinations proof strategy.

+
+
Parameters:
+
+

+ proof_strategy – One of + RNS.Destination.PROVE_NONE, + RNS.Destination.PROVE_ALL + or + RNS.Destination.PROVE_APP. If + RNS.Destination.PROVE_APP + is set, the proof_requested_callback will be called to + determine whether a proof should be sent or not. +

+
+
+
+
+ +
+
+ register_request_handler(path, + response_generator=None, + allow=ALLOW_NONE, + allowed_list=None, + auto_compress=True) +
+
+

Registers a request handler.

+
+
Parameters:
+
+
    +
  • +

    + path – The path for the request handler to be + registered. +

    +
  • +
  • +

    + response_generator – A function or method with + the signature + response_generator(path, data, request_id, link_id, + remote_identity, requested_at) + to be called. Whatever this funcion returns will be sent as a + response to the requester. If the function returns + None, no response will be sent. +

    +
  • +
  • +

    + allow – One of + RNS.Destination.ALLOW_NONE, + RNS.Destination.ALLOW_ALL + or + RNS.Destination.ALLOW_LIST. If + RNS.Destination.ALLOW_LIST + is set, the request handler will only respond to requests for + identified peers in the supplied list. +

    +
  • +
  • +

    + allowed_list – A list of bytes-like + RNS.Identity + hashes. +

    +
  • +
  • +

    + auto_compress – If + True + or + False, determines whether automatic compression of responses should be + carried out. If set to an integer value, responses will only be + auto-compressed if under this size in bytes. If omitted, the + default compression settings will be followed. +

    +
  • +
+
+
Raises:
+
+

+ ValueError + if any of the supplied arguments are invalid. +

+
+
+
+
+ +
+
+ deregister_request_handler(path) +
+
+

Deregisters a request handler.

+
+
Parameters:
+
+

+ path – The path for the request handler to be + deregistered. +

+
+
Returns:
+
+

True if the handler was deregistered, otherwise False.

+
+
+
+
+ +
+
+ enable_ratchets(ratchets_path) +
+
+

+ Enables ratchets on the destination. When ratchets are enabled, Reticulum + will automatically rotate the keys used to encrypt packets to this + destination, and include the latest ratchet key in announces. +

+

+ Enabling ratchets on a destination will provide forward secrecy for + packets sent to that destination, even when sent outside a + Link. The normal Reticulum + Link + establishment procedure already performs its own ephemeral key exchange + for each link establishment, which means that ratchets are not necessary + to provide forward secrecy for links. +

+

+ Enabling ratchets will have a small impact on announce size, adding 32 + bytes to every sent announce. +

+
+
Parameters:
+
+

+ ratchets_path – The path to a file to store ratchet + data in. +

+
+
Returns:
+
+

True if the operation succeeded, otherwise False.

+
+
+
+
+ +
+
+ enforce_ratchets() +
+
+

+ When ratchet enforcement is enabled, this destination will never accept + packets that use its base Identity key for encryption, but only accept + packets encrypted with one of the retained ratchet keys. +

+
+
+ +
+
+ set_retained_ratchets(retained_ratchets) +
+
+

+ Sets the number of previously generated ratchet keys this destination will + retain, and try to use when decrypting incoming packets. Defaults to + Destination.RATCHET_COUNT. +

+
+
Parameters:
+
+

+ retained_ratchets – The number of generated ratchets + to retain. +

+
+
Returns:
+
+

True if the operation succeeded, False if not.

+
+
+
+
+ +
+
+ set_ratchet_interval(interval) +
+
+

+ Sets the minimum interval in seconds between ratchet key rotation. + Defaults to + Destination.RATCHET_INTERVAL. +

+
+
Parameters:
+
+

interval – The minimum interval in seconds.

+
+
Returns:
+
+

True if the operation succeeded, False if not.

+
+
+
+
+ +
+
+ create_keys() +
+
+

+ For a + RNS.Destination.GROUP + type destination, creates a new symmetric key. +

+
+
Raises:
+
+

+ TypeError + if called on an incompatible type of destination. +

+
+
+
+
+ +
+
+ get_private_key() +
+
+

+ For a + RNS.Destination.GROUP + type destination, returns the symmetric private key. +

+
+
Raises:
+
+

+ TypeError + if called on an incompatible type of destination. +

+
+
+
+
+ +
+
+ load_private_key(key) +
+
+

+ For a + RNS.Destination.GROUP + type destination, loads a symmetric private key. +

+
+
Parameters:
+
+

+ key – A bytes-like containing the symmetric + key. +

+
+
Raises:
+
+

+ TypeError + if called on an incompatible type of destination. +

+
+
+
+
+ +
+
+ encrypt(plaintext) +
+
+

+ Encrypts information for + RNS.Destination.SINGLE + or + RNS.Destination.GROUP + type destination. +

+
+
Parameters:
+
+

+ plaintext – A bytes-like containing the + plaintext to be encrypted. +

+
+
Raises:
+
+

+ ValueError + if destination does not hold a necessary key for encryption. +

+
+
+
+
+ +
+
+ decrypt(ciphertext) +
+
+

+ Decrypts information for + RNS.Destination.SINGLE + or + RNS.Destination.GROUP + type destination. +

+
+
Parameters:
+
+

+ ciphertext – Bytes containing the ciphertext + to be decrypted. +

+
+
Raises:
+
+

+ ValueError + if destination does not hold a necessary key for decryption. +

+
+
+
+
+ +
+
+ sign(message) +
+
+

+ Signs information for + RNS.Destination.SINGLE + type destination. +

+
+
Parameters:
+
+

+ message – Bytes containing the message to be + signed. +

+
+
Returns:
+
+

+ A bytes-like containing the message signature, or + None if the destination could not sign the message. +

+
+
+
+
+ +
+
+ set_default_app_data(app_data=None) +
+
+

+ Sets the default app_data for the destination. If set, the default + app_data will be included in every announce sent by the destination, + unless other app_data is specified in the announce method. +

+
+
Parameters:
+
+

+ app_data – A bytes-like containing the + default app_data, or a callable returning a + bytes-like containing the app_data. +

+
+
+
+
+ +
+
+ clear_default_app_data() +
+

Clears default app_data previously set for the destination.

+
+
+
+ +

+

Packet

+

+
+
+ class RNS.Packet(destination, + data, + create_receipt=True) +
+
+

+ The Packet class is used to create packet instances that can be sent over a + Reticulum network. Packets will automatically be encrypted if they are + addressed to a + RNS.Destination.SINGLE + destination, + RNS.Destination.GROUP + destination or a + RNS.Link. +

+

+ For + RNS.Destination.GROUP + destinations, Reticulum will use the pre-shared key configured for the + destination. All packets to group destinations are encrypted with the same + AES-256 key. +

+

+ For + RNS.Destination.SINGLE + destinations, Reticulum will use a newly derived ephemeral AES-256 key for + every packet. +

+

+ For + RNS.Link + destinations, Reticulum will use per-link ephemeral keys, and offers + Forward Secrecy. +

+
+
Parameters:
+
+
    +
  • +

    + destination – A + RNS.Destination + instance to which the packet will be sent. +

    +
  • +
  • +

    + data – The data payload to be included in the packet + as bytes. +

    +
  • +
  • +

    + create_receipt – Specifies whether a + RNS.PacketReceipt + should be created when instantiating the packet. +

    +
  • +
+
+
+
+
+ ENCRYPTED_MDU = 383 +
+
+

The maximum size of the payload data in a single encrypted packet

+
+
+ +
+
+ PLAIN_MDU = 464 +
+
+

The maximum size of the payload data in a single unencrypted packet

+
+
+ +
+
+ send() +
+
+

Sends the packet.

+
+
Returns:
+
+

+ A + RNS.PacketReceipt + instance if create_receipt was set to True when the + packet was instantiated, if not returns None. If the packet + could not be sent False is returned. +

+
+
+
+
+ +
+
+ resend() +
+
+

Re-sends the packet.

+
+
Returns:
+
+

+ A + RNS.PacketReceipt + instance if create_receipt was set to True when the + packet was instantiated, if not returns None. If the packet + could not be sent False is returned. +

+
+
+
+
+ +
+
+ get_rssi() +
+
+
+
Returns:
+
+

+ The physical layer Received Signal Strength Indication if + available, otherwise + None. +

+
+
+
+
+ +
+
+ get_snr() +
+
+
+
Returns:
+
+

+ The physical layer Signal-to-Noise Ratio if available, + otherwise + None. +

+
+
+
+
+ +
+
+ get_q() +
+
+
+
Returns:
+
+

+ The physical layer Link Quality if available, otherwise + None. +

+
+
+
+
+
+
+ +

+

Packet Receipt

+

+
+
+ class RNS.PacketReceipt +
+
+

+ The PacketReceipt class is used to receive notifications about + RNS.Packet + instances sent over the network. Instances of this class are never created + manually, but always returned from the send() method of a + RNS.Packet + instance. +

+
+
+ get_status() +
+
+
+
Returns:
+
+

+ The status of the associated + RNS.Packet + instance. Can be one of + RNS.PacketReceipt.SENT, + RNS.PacketReceipt.DELIVERED, + RNS.PacketReceipt.FAILED + or + RNS.PacketReceipt.CULLED. +

+
+
+
+
+ +
+
+ get_rtt() +
+
+
+
Returns:
+

The round-trip-time in seconds

+
+
+
+ +
+
+ set_timeout(timeout) +
+
+

Sets a timeout in seconds

+
+
Parameters:
+
+

timeout – The timeout in seconds.

+
+
+
+
+ +
+
+ set_delivery_callback(callback) +
+
+

+ Sets a function that gets called if a successfull delivery has been + proven. +

+
+
Parameters:
+
+

+ callback – A callable with the signature + callback(packet_receipt) +

+
+
+
+
+ +
+
+ set_timeout_callback(callback) +
+
+

Sets a function that gets called if the delivery times out.

+
+
Parameters:
+
+

+ callback – A callable with the signature + callback(packet_receipt) +

+
+
+
+
+
+
+ + +

Link

+

+
+ +
+

+ This class is used to establish and manage links to other peers. When a link + instance is created, Reticulum will attempt to establish verified and + encrypted connectivity with the specified destination. +

+
+
Parameters:
+
+
    +
  • +

    + destination – A + RNS.Destination + instance which to establish a link to. +

    +
  • +
  • +

    + established_callback – An optional function or method + with the signature callback(link) to be called when the link + has been established. +

    +
  • +
  • +

    + closed_callback – An optional function or method with + the signature callback(link) to be called when the link is + closed. +

    +
  • +
+
+
+
+
+ CURVE = 'Curve25519' +
+

The curve used for Elliptic Curve DH key exchanges

+
+ +
+
+ ESTABLISHMENT_TIMEOUT_PER_HOP = 6 +
+
+

Timeout for link establishment in seconds per hop to destination.

+
+
+ +
+
+ KEEPALIVE_TIMEOUT_FACTOR = 4 +
+

RTT timeout factor used in link timeout calculation.

+
+ +
+
+ STALE_GRACE = 5 +
+

Grace period in seconds used in link timeout calculation.

+
+ +
+
+ KEEPALIVE = 360 +
+
+

+ Default interval for sending keep-alive packets on established links in + seconds. +

+
+
+ +
+
+ STALE_TIME = 720 +
+
+

+ If no traffic or keep-alive packets are received within this period, the + link will be marked as stale, and a final keep-alive packet will be sent. + If after this no traffic or keep-alive packets are received within + RTT + * + KEEPALIVE_TIMEOUT_FACTOR + + + STALE_GRACE, the link is considered timed out, and will be torn down. +

+
+
+ +
+
+ identify(identity) +
+
+

+ Identifies the initiator of the link to the remote peer. This can only + happen once the link has been established, and is carried out over the + encrypted link. The identity is only revealed to the remote peer, and + initiator anonymity is thus preserved. This method can be used for + authentication. +

+
+
Parameters:
+
+

+ identity – An RNS.Identity instance to identify as. +

+
+
+
+
+ +
+
+ request(path, + data=None, + response_callback=None, + failed_callback=None, + progress_callback=None, + timeout=None) +
+
+

Sends a request to the remote peer.

+
+
Parameters:
+
+
    +
  • +

    path – The request path.

    +
  • +
  • +

    + response_callback – An optional function or + method with the signature + response_callback(request_receipt) to be called when a + response is received. See the + Request Example + for more info. +

    +
  • +
  • +

    + failed_callback – An optional function or method + with the signature failed_callback(request_receipt) to be + called when a request fails. See the + Request Example + for more info. +

    +
  • +
  • +

    + progress_callback – An optional function or + method with the signature + progress_callback(request_receipt) to be called when + progress is made receiving the response. Progress can be accessed + as a float between 0.0 and 1.0 by the + request_receipt.progress property. +

    +
  • +
  • +

    + timeout – An optional timeout in seconds for the + request. If None is supplied it will be calculated based + on link RTT. +

    +
  • +
+
+
Returns:
+
+

+ A + RNS.RequestReceipt + instance if the request was sent, or False if it was not. +

+
+
+
+
+ +
+
+ track_phy_stats(track) +
+
+

+ You can enable physical layer statistics on a per-link basis. If this is + enabled, and the link is running over an interface that supports reporting + physical layer statistics, you will be able to retrieve stats such as + RSSI, SNR and physical Link Quality for the + link. +

+
+
Parameters:
+
+

+ track – Whether or not to keep track of physical + layer statistics. Value must be + True + or + False. +

+
+
+
+
+ +
+
+ get_rssi() +
+
+
+
Returns:
+
+

+ The physical layer Received Signal Strength Indication if + available, otherwise + None. Physical layer statistics must be enabled on the link for this + method to return a value. +

+
+
+
+
+ +
+
+ get_snr() +
+
+
+
Returns:
+
+

+ The physical layer Signal-to-Noise Ratio if available, + otherwise + None. Physical layer statistics must be enabled on the link for this + method to return a value. +

+
+
+
+
+ +
+
+ get_q() +
+
+
+
Returns:
+
+

+ The physical layer Link Quality if available, otherwise + None. Physical layer statistics must be enabled on the link for this + method to return a value. +

+
+
+
+
+ +
+
+ get_establishment_rate() +
+
+
+
Returns:
+
+

+ The data transfer rate at which the link establishment procedure + ocurred, in bits per second. +

+
+
+
+
+ +
+
+ get_mtu() +
+
+
+
Returns:
+

The MTU of an established link.

+
+
+
+ +
+
+ get_mdu() +
+
+
+
Returns:
+

The packet MDU of an established link.

+
+
+
+ +
+
+ get_expected_rate() +
+
+
+
Returns:
+
+

The packet expected in-flight data rate of an established link.

+
+
+
+
+ +
+
+ get_mode() +
+
+
+
Returns:
+

The mode of an established link.

+
+
+
+ +
+
+ get_age() +
+
+
+
Returns:
+
+

The time in seconds since this link was established.

+
+
+
+
+ +
+
+ no_inbound_for() +
+
+
+
Returns:
+
+

+ The time in seconds since last inbound packet on the link. This + includes keepalive packets. +

+
+
+
+
+ +
+
+ no_outbound_for() +
+
+
+
Returns:
+
+

+ The time in seconds since last outbound packet on the link. This + includes keepalive packets. +

+
+
+
+
+ +
+
+ no_data_for() +
+
+
+
Returns:
+
+

+ The time in seconds since payload data traversed the link. This + excludes keepalive packets. +

+
+
+
+
+ +
+
+ inactive_for() +
+
+
+
Returns:
+
+

+ The time in seconds since activity on the link. This includes + keepalive packets. +

+
+
+
+
+ +
+
+ get_remote_identity() +
+
+
+
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. +

+
+
+
+
+ +
+
+ teardown() +
+
+

+ Closes the link and purges encryption keys. New keys will be used if a new + link to the same destination is established. +

+
+
+ +
+
+ get_channel() +
+
+

+ Get the + Channel + for this link. +

+
+
Returns:
+
+

+ Channel + object +

+
+
+
+
+ +
+ +
+

Registers a function to be called when a link has been torn down.

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(link) to be called. +

+
+
+
+
+ +
+
+ set_packet_callback(callback) +
+
+

+ Registers a function to be called when a packet has been received over + this link. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(message, packet) to be called. +

+
+
+
+
+ +
+
+ set_resource_callback(callback) +
+
+

+ Registers a function to be called when a resource has been advertised over + this link. If the function returns True the resource will be + accepted. If it returns False it will be ignored. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(resource) to be called. Please note that only the + basic information of the resource is available at this time, such as + get_transfer_size(), get_data_size(), + get_parts() and is_compressed(). +

+
+
+
+
+ +
+
+ set_resource_started_callback(callback) +
+
+

+ Registers a function to be called when a resource has begun transferring + over this link. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(resource) to be called. +

+
+
+
+
+ +
+
+ set_resource_concluded_callback(callback) +
+
+

+ Registers a function to be called when a resource has concluded + transferring over this link. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(resource) to be called. +

+
+
+
+
+ +
+
+ set_remote_identified_callback(callback) +
+
+

+ Registers a function to be called when an initiating peer has identified + over this link. +

+
+
Parameters:
+
+

+ callback – A function or method with the signature + callback(link, identity) to be called. +

+
+
+
+
+ +
+
+ set_resource_strategy(resource_strategy) +
+
+

Sets the resource strategy for the link.

+
+
Parameters:
+
+

+ resource_strategy – One of + RNS.Link.ACCEPT_NONE, + RNS.Link.ACCEPT_ALL + or + RNS.Link.ACCEPT_APP. If + RNS.Link.ACCEPT_APP + is set, the resource_callback will be called to determine + whether the resource should be accepted or not. +

+
+
Raises:
+
+

TypeError if the resource strategy is unsupported.

+
+
+
+
+
+
+ +

+

Request Receipt

+

+
+
+ class RNS.RequestReceipt +
+
+

+ An instance of this class is returned by the + request + method of + RNS.Link + instances. It should never be instantiated manually. It provides methods to + check status, response time and response data when the request concludes. +

+
+
+ get_request_id() +
+
+
+
Returns:
+
+

The request ID as bytes.

+
+
+
+
+ +
+
+ get_status() +
+
+
+
Returns:
+
+

+ The current status of the request, one of + RNS.RequestReceipt.FAILED, + RNS.RequestReceipt.SENT, + RNS.RequestReceipt.DELIVERED, + RNS.RequestReceipt.READY. +

+
+
+
+
+ +
+
+ get_progress() +
+
+
+
Returns:
+
+

+ The progress of a response being received as a float between + 0.0 and 1.0. +

+
+
+
+
+ +
+
+ get_response() +
+
+
+
Returns:
+
+

+ The response as bytes if it is ready, otherwise + None. +

+
+
+
+
+ +
+
+ get_response_time() +
+
+
+
Returns:
+
+

The response time of the request in seconds.

+
+
+
+
+ +
+
+ concluded() +
+
+
+
Returns:
+
+

+ True if the associated request has concluded (successfully or with a + failure), otherwise False. +

+
+
+
+
+
+
+ +

+

Resource

+

+
+
+ class RNS.Resource(data, + link, + advertise=True, + auto_compress=True, + callback=None, + progress_callback=None, + timeout=None) +
+
+

+ The Resource class allows transferring arbitrary amounts of data over a link. + It will automatically handle sequencing, compression, coordination and + checksumming. +

+
+
Parameters:
+
+
    +
  • +

    + data – The data to be transferred. Can be + bytes or an open file handle. See the + Filetransfer Example + for details. +

    +
  • +
  • +

    + link – The + RNS.Link + instance on which to transfer the data. +

    +
  • +
  • +

    + advertise – Optional. Whether to automatically + advertise the resource. Can be True or False. +

    +
  • +
  • +

    + auto_compress – Optional. Whether to auto-compress + the resource. Can be True or False. +

    +
  • +
  • +

    + callback – An optional callable with the + signature callback(resource). Will be called when the + resource transfer concludes. +

    +
  • +
  • +

    + progress_callback – An optional + callable with the signature callback(resource). Will + be called whenever the resource transfer progress is updated. +

    +
  • +
+
+
+
+
+ advertise() +
+
+

+ Advertise the resource. If the other end of the link accepts the resource + advertisement it will begin transferring. +

+
+
+ +
+
+ cancel() +
+

Cancels transferring the resource.

+
+ +
+
+ get_progress() +
+
+
+
Returns:
+
+

+ The current progress of the resource transfer as a + float between 0.0 and 1.0. +

+
+
+
+
+ +
+
+ get_transfer_size() +
+
+
+
Returns:
+
+

The number of bytes needed to transfer the resource.

+
+
+
+
+ +
+
+ get_data_size() +
+
+
+
Returns:
+

The total data size of the resource.

+
+
+
+ +
+
+ get_parts() +
+
+
+
Returns:
+
+

The number of parts the resource will be transferred in.

+
+
+
+
+ +
+
+ get_segments() +
+
+
+
Returns:
+
+

The number of segments the resource is divided into.

+
+
+
+
+ +
+
+ get_hash() +
+
+
+
Returns:
+

The hash of the resource.

+
+
+
+ +
+
+ is_compressed() +
+
+
+
Returns:
+

Whether the resource is compressed.

+
+
+
+
+
+ +

+

Channel

+

+
+
+ class RNS.Channel.Channel +
+
+

Provides reliable delivery of messages over a link.

+

+ Channel + differs from + Request + and + Resource + in some important ways: +

+
+
+
+
Continuous
+
+

+ Messages can be sent or received as long as the + Link + is open. +

+
+
Bi-directional
+
+

+ Messages can be sent in either direction on the + Link; neither end is the client or server. +

+
+
Size-constrained
+

Messages must be encoded into a single packet.

+
+
+
+

+ Channel + is similar to + Packet, except that it provides reliable delivery (automatic retries) as well as a + structure for exchanging several types of messages over the + Link. +

+

+ Channel + is not instantiated directly, but rather obtained from a + Link + with + get_channel(). +

+
+
+ register_message_type(message_class: Type[MessageBase]) +
+
+

+ Register a message class for reception over a + Channel. +

+

+ Message classes must extend + MessageBase. +

+
+
Parameters:
+
+

message_class – Class to register

+
+
+
+
+ +
+
+ add_message_handler(callback: MessageCallbackType) +
+
+

+ Add a handler for incoming messages. A handler has the following + signature: +

+

+ (message: + MessageBase) -> + bool +

+

+ Handlers are processed in the order they are added. If any handler returns + True, processing of the message stops; handlers after the returning + handler will not be called. +

+
+
Parameters:
+
+

callback – Function to call

+
+
+
+
+ +
+
+ remove_message_handler(callback: MessageCallbackType) +
+
+

+ Remove a handler added with + add_message_handler. +

+
+
Parameters:
+
+

callback – handler to remove

+
+
+
+
+ +
+
+ is_ready_to_send() + � + bool +
+
+

+ Check if + Channel + is ready to send. +

+
+
Returns:
+

True if ready

+
+
+
+ +
+
+ send(message: MessageBase) + � + Envelope +
+
+

+ Send a message. If a message send is attempted and + Channel + is not ready, an exception is thrown. +

+
+
Parameters:
+
+

+ message – an instance of a + MessageBase + subclass +

+
+
+
+
+ +
+
+ property mdu +
+
+

+ Maximum Data Unit: the number of bytes available for a message to consume + in a single send. This value is adjusted from the + Link + MDU to accommodate message header information. +

+
+
Returns:
+

number of bytes available

+
+
+
+
+
+ +

+

MessageBase

+

+
+
+ class RNS.MessageBase +
+
+

+ Base type for any messages sent or received on a Channel. Subclasses must + define the two abstract methods as well as the + MSGTYPE + class variable. +

+
+
+ MSGTYPE = None +
+
+

Defines a unique identifier for a message class.

+
    +
  • +

    + Must be unique within all classes registered with a + Channel +

    +
  • +
  • +

    + Must be less than + 0xf000. Values greater than or equal to + 0xf000 + are reserved. +

    +
  • +
+
+
+ +
+
+ abstractmethod pack() + � + bytes +
+
+

Create and return the binary representation of the message

+
+
Returns:
+

binary representation of message

+
+
+
+ +
+
+ abstractmethod unpack(raw: bytes) +
+
+

Populate message from binary representation

+
+
Parameters:
+
+

raw – binary representation

+
+
+
+
+
+
+ +

+

Buffer

+

+
+
+ class RNS.Buffer +
+
+

+ Static functions for creating buffered streams that send and receive over a + Channel. +

+

+ These functions use + BufferedReader, + BufferedWriter, and + BufferedRWPair + to add buffering to + RawChannelReader + and + RawChannelWriter. +

+
+
+ static create_reader(stream_id: int, + channel: Channel, + ready_callback: Callable[[int], None] | None = None) + � + BufferedReader +
+
+

+ Create a buffered reader that reads binary data sent over a + Channel, with an optional callback when new data is available. +

+

+ Callback signature: + (ready_bytes: int) + -> None +

+

+ For more information on the reader-specific functions of this object, see + the Python documentation for + BufferedReader +

+
+
Parameters:
+
+
    +
  • +

    + stream_id – the local stream id to receive from +

    +
  • +
  • +

    channel – the channel to receive on

    +
  • +
  • +

    + ready_callback – function to call when new data + is available +

    +
  • +
+
+
Returns:
+

a BufferedReader object

+
+
+
+ +
+
+ static create_writer(stream_id: int, + channel: Channel) + � + BufferedWriter +
+
+

+ Create a buffered writer that writes binary data over a + Channel. +

+

+ For more information on the writer-specific functions of this object, see + the Python documentation for + BufferedWriter +

+
+
Parameters:
+
+
    +
  • +

    stream_id – the remote stream id to send to

    +
  • +
  • +

    channel – the channel to send on

    +
  • +
+
+
Returns:
+

a BufferedWriter object

+
+
+
+ +
+
+ static create_bidirectional_buffer(receive_stream_id: int, + send_stream_id: int, + channel: Channel, + ready_callback: Callable[[int], None] | None = None) + � + BufferedRWPair +
+
+

+ Create a buffered reader/writer pair that reads and writes binary data + over a + Channel, with an optional callback when new data is available. +

+

+ Callback signature: + (ready_bytes: int) + -> None +

+

+ For more information on the reader-specific functions of this object, see + the Python documentation for + BufferedRWPair +

+
+
Parameters:
+
+
    +
  • +

    + receive_stream_id – the local stream id to + receive at +

    +
  • +
  • +

    + send_stream_id – the remote stream id to send to +

    +
  • +
  • +

    channel – the channel to send and receive on

    +
  • +
  • +

    + ready_callback – function to call when new data + is available +

    +
  • +
+
+
Returns:
+

a BufferedRWPair object

+
+
+
+
+
+ +

+

RawChannelReader

+

+
+
+ class RNS.RawChannelReader(stream_id: int, + channel: Channel) +
+
+

+ An implementation of RawIOBase that receives binary stream data sent over a + Channel. +

+
+
+

+ This class generally need not be instantiated directly. Use + RNS.Buffer.create_reader(), + RNS.Buffer.create_writer(), and + RNS.Buffer.create_bidirectional_buffer() + functions to create buffered streams with optional callbacks. +

+

+ For additional information on the API of this object, see the Python + documentation for + RawIOBase. +

+
+
+
+
+ __init__(stream_id: int, + channel: Channel) +
+
+

Create a raw channel reader.

+
+
Parameters:
+
+
    +
  • +

    stream_id – local stream id to receive at

    +
  • +
  • +

    + channel – + Channel + object to receive from +

    +
  • +
+
+
+
+
+ +
+
+ add_ready_callback(cb: Callable[[int], None]) +
+
+

+ Add a function to be called when new data is available. The function + should have the signature + (ready_bytes: int) + -> None +

+
+
Parameters:
+
+

cb – function to call

+
+
+
+
+ +
+
+ remove_ready_callback(cb: Callable[[int], None]) +
+
+

+ Remove a function added with + RNS.RawChannelReader.add_ready_callback() +

+
+
Parameters:
+
+

cb – function to remove

+
+
+
+
+
+
+ +

+

RawChannelWriter

+

+
+
+ class RNS.RawChannelWriter(stream_id: int, + channel: Channel) +
+
+

+ An implementation of RawIOBase that receives binary stream data sent over a + channel. +

+
+
+

+ This class generally need not be instantiated directly. Use + RNS.Buffer.create_reader(), + RNS.Buffer.create_writer(), and + RNS.Buffer.create_bidirectional_buffer() + functions to create buffered streams with optional callbacks. +

+

+ For additional information on the API of this object, see the Python + documentation for + RawIOBase. +

+
+
+
+
+ __init__(stream_id: int, + channel: Channel) +
+
+

Create a raw channel writer.

+
+
Parameters:
+
+
    +
  • +

    stream_id – remote stream id to sent do

    +
  • +
  • +

    + channel – + Channel + object to send on +

    +
  • +
+
+
+
+
+
+
+ +

+

Transport

+

+
+
+ class RNS.Transport +
+
+

+ Through static methods of this class you can interact with the Transport + system of Reticulum. +

+
+
+ PATHFINDER_M = 128 +
+

Maximum amount of hops that Reticulum will transport a packet.

+
+ +
+
+ static register_announce_handler(handler) +
+
+

Registers an announce handler.

+
+
Parameters:
+
+

+ handler – Must be an object with an + aspect_filter attribute and a + received_announce(destination_hash, announced_identity, + app_data) + or + received_announce(destination_hash, announced_identity, app_data, + announce_packet_hash) + or + received_announce(destination_hash, announced_identity, app_data, + announce_packet_hash, is_path_response) + callable. Can optionally have a + receive_path_responses attribute set to + True, to also receive all path responses, in addition to live announces. + See the + Announce Example + for more info. +

+
+
+
+
+ +
+
+ static deregister_announce_handler(handler) +
+
+

Deregisters an announce handler.

+
+
Parameters:
+
+

+ handler – The announce handler to be deregistered. +

+
+
+
+
+ +
+
+ static has_path(destination_hash) +
+
+
+
Parameters:
+
+

+ destination_hash – A destination hash as + bytes. +

+
+
Returns:
+
+

+ True if a path to the destination is known, otherwise + False. +

+
+
+
+
+ +
+
+ static hops_to(destination_hash) +
+
+
+
Parameters:
+
+

+ destination_hash – A destination hash as + bytes. +

+
+
Returns:
+
+

+ The number of hops to the specified destination, or + RNS.Transport.PATHFINDER_M + if the number of hops is unknown. +

+
+
+
+
+ +
+
+ static next_hop(destination_hash) +
+
+
+
Parameters:
+
+

+ destination_hash – A destination hash as + bytes. +

+
+
Returns:
+
+

+ The destination hash as bytes for the next hop to the + specified destination, or None if the next hop is unknown. +

+
+
+
+
+ +
+
+ static next_hop_interface(destination_hash) +
+
+
+
Parameters:
+
+

+ destination_hash – A destination hash as + bytes. +

+
+
Returns:
+
+

+ The interface for the next hop to the specified destination, or + None if the interface is unknown. +

+
+
+
+
+ +
+
+ static request_path(destination_hash, + on_interface=None, + tag=None, + recursive=False) +
+
+

+ Requests a path to the destination from the network. If another reachable + peer on the network knows a path, it will announce it. +

+
+
Parameters:
+
+
    +
  • +

    + destination_hash – A destination hash as + bytes. +

    +
  • +
  • +

    + on_interface – If specified, the path request + will only be sent on this interface. In normal use, Reticulum + handles this automatically, and this parameter should not be used. +

    +
  • +
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/search.html b/docs/search.html new file mode 100644 index 0000000..26a5817 --- /dev/null +++ b/docs/search.html @@ -0,0 +1,411 @@ + + + + + + + + + + + + + Search - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+ + +
+
+
+
+ +
+
+ + Официальный сайт проекта Reticulum.network
+ Официальный репозиторий на GitHub +
+
+
+
+
+ +
+
+ + + + + + + + + + + + diff --git a/docs/searchindex.js b/docs/searchindex.js new file mode 100644 index 0000000..6e4b048 --- /dev/null +++ b/docs/searchindex.js @@ -0,0 +1 @@ +Search.setIndex({"alltitles":{"API Reference":[[7,null]],"ARM64":[[2,"arm64"]],"AX.25 KISS Interface":[[5,"ax-25-kiss-interface"]],"Adding Radio Interfaces":[[2,"adding-radio-interfaces"]],"An Explanation of Reticulum for Human Beings":[[1,null]],"Android":[[2,"android"]],"Announce":[[0,"announce"]],"Announce Propagation Rules":[[9,"announce-propagation-rules"]],"Announce Rate Control":[[5,"announce-rate-control"]],"Auto Interface":[[5,"auto-interface"]],"Backbone Interface":[[5,"backbone-interface"]],"Bridging Over the Internet":[[6,"bridging-over-the-internet"]],"Broadcast":[[0,"broadcast"]],"Buffer":[[0,"buffer"]],"Building Networks":[[6,null]],"Caveat Emptor":[[11,"caveat-emptor"]],"Channel":[[0,"channel"]],"Code Examples":[[0,null]],"Combining Hardware Types":[[3,"combining-hardware-types"]],"Common Interface Options":[[5,"common-interface-options"]],"Communications Hardware":[[3,null]],"Concepts & Overview":[[6,"concepts-overview"]],"Configuration & Data":[[10,"configuration-data"]],"Configuring Interfaces":[[5,null]],"Connect to the Public Testnet":[[2,"connect-to-the-public-testnet"]],"Connecting Remotes":[[5,"connecting-remotes"]],"Connecting Reticulum Instances Over the Internet":[[2,"connecting-reticulum-instances-over-the-internet"]],"Contribute Code":[[8,"contribute-code"]],"Creating RNodes":[[3,"creating-rnodes"]],"Creating a Network With Reticulum":[[2,"creating-a-network-with-reticulum"]],"Creating and Using Custom Interfaces":[[2,"creating-and-using-custom-interfaces"]],"Cryptographic Primitives":[[9,"cryptographic-primitives"]],"Current Status":[[11,"current-status"]],"Custom Interfaces":[[0,"custom-interfaces"],[5,"custom-interfaces"]],"Debian Bookworm":[[2,"debian-bookworm"]],"Destination Naming":[[9,"destination-naming"]],"Destinations":[[9,"destinations"]],"Develop a Program with Reticulum":[[2,"develop-a-program-with-reticulum"]],"Donations":[[8,"donations"]],"Echo":[[0,"echo"]],"Ethernet-based Hardware":[[3,"ethernet-based-hardware"]],"Example Scenarios":[[6,"example-scenarios"]],"Filetransfer":[[0,"filetransfer"]],"Fixed Serial Port Names":[[10,"fixed-serial-port-names"]],"Getting Further":[[9,"getting-further"]],"Getting Started Fast":[[2,null]],"Goals":[[9,"goals"]],"Growth and Convergence":[[6,"growth-and-convergence"]],"Heltec LoRa32 v2.0":[[3,"heltec-lora32-v2-0"]],"Heltec LoRa32 v3.0":[[3,"heltec-lora32-v3-0"]],"Heltec LoRa32 v4.0":[[3,"heltec-lora32-v4-0"]],"Heltec T114":[[3,"heltec-t114"]],"Hosting Public Entrypoints":[[2,"hosting-public-entrypoints"]],"I2P Interface":[[5,"i2p-interface"]],"Identification":[[0,"example-identify"]],"Identities":[[9,"understanding-identities"]],"Improving System Configuration":[[10,"improving-system-configuration"]],"Included Utility Programs":[[10,"included-utility-programs"]],"Indices and Tables":[[4,"indices-and-tables"]],"Installation":[[3,"installation"]],"Interconnected LoRa Sites":[[6,"interconnected-lora-sites"]],"Interface Access Codes":[[9,"interface-access-codes"]],"Interface Modes":[[5,"interface-modes"]],"Interface Types and Devices":[[11,"interface-types-and-devices"]],"Introduction & Basic Functionality":[[9,"introduction-basic-functionality"]],"KISS Interface":[[5,"kiss-interface"]],"LilyGO LoRa32 v1.0":[[3,"lilygo-lora32-v1-0"]],"LilyGO LoRa32 v2.0":[[3,"lilygo-lora32-v2-0"]],"LilyGO LoRa32 v2.1":[[3,"lilygo-lora32-v2-1"]],"LilyGO T-Beam":[[3,"lilygo-t-beam"]],"LilyGO T-Beam Supreme":[[3,"lilygo-t-beam-supreme"]],"LilyGO T-Deck":[[3,"lilygo-t-deck"]],"LilyGO T-Echo":[[3,"lilygo-t-echo"]],"LilyGO T3S3":[[3,"lilygo-t3s3"]],"Link":[[0,"link"]],"Link Establishment in Detail":[[9,"link-establishment-in-detail"]],"Listeners":[[5,"listeners"]],"MacOS":[[2,"macos"]],"MeshChat":[[2,"meshchat"]],"Minimal":[[0,"minimal"]],"Motivation":[[9,"motivation"]],"New Destination Rate Limiting":[[5,"new-destination-rate-limiting"]],"Node Types":[[9,"node-types"]],"Nomad Network":[[2,"nomad-network"]],"OpenCom XL":[[3,"opencom-xl"]],"OpenWRT":[[2,"openwrt"]],"Packet Prioritisation":[[9,"packet-prioritisation"]],"Packet Radio Modems":[[3,"packet-radio-modems"]],"Participate in Reticulum Development":[[2,"participate-in-reticulum-development"]],"Pipe Interface":[[5,"pipe-interface"]],"Platform-Specific Install Notes":[[2,"platform-specific-install-notes"]],"Protocol Specifics":[[9,"protocol-specifics"]],"Provide Feedback":[[8,"provide-feedback"]],"Public Key Announcements":[[9,"public-key-announcements"]],"Pure-Python Reticulum":[[2,"pure-python-reticulum"]],"RAK4631-based Boards":[[3,"rak4631-based-boards"]],"RISC-V":[[2,"risc-v"]],"RNode":[[3,"rnode"]],"RNode LoRa Interface":[[5,"rnode-lora-interface"]],"RNode Multi Interface":[[5,"rnode-multi-interface"]],"Raspberry Pi":[[2,"raspberry-pi"]],"Reaching the Destination":[[9,"reaching-the-destination"]],"Reference Setup":[[9,"reference-setup"]],"Remote Management":[[10,"remote-management"]],"Remote Shell":[[2,"remote-shell"]],"Requests & Responses":[[0,"requests-responses"]],"Resolving Dependency & Installation Issues":[[2,"resolving-dependency-installation-issues"]],"Resources":[[9,"resources"]],"Reticulum Network Stack Manual":[[4,null]],"Reticulum Transport":[[9,"reticulum-transport"]],"Reticulum as a System Service":[[10,"reticulum-as-a-system-service"]],"Serial Interface":[[5,"serial-interface"]],"Serial Lines & Devices":[[3,"serial-lines-devices"]],"Sideband":[[2,"sideband"]],"Standalone Reticulum Installation":[[2,"standalone-reticulum-installation"]],"Support Reticulum":[[8,null]],"Supported Boards and Devices":[[3,"supported-boards-and-devices"]],"Systemwide Service":[[10,"systemwide-service"]],"TCP Client Interface":[[5,"tcp-client-interface"]],"TCP Server Interface":[[5,"tcp-server-interface"]],"Table Of Contents":[[4,"table-of-contents"]],"The Announce Mechanism in Detail":[[9,"the-announce-mechanism-in-detail"]],"The rncp Utility":[[10,"the-rncp-utility"]],"The rnid Utility":[[10,"the-rnid-utility"]],"The rnodeconf Utility":[[10,"the-rnodeconf-utility"]],"The rnpath Utility":[[10,"the-rnpath-utility"]],"The rnprobe Utility":[[10,"the-rnprobe-utility"]],"The rnsd Utility":[[10,"the-rnsd-utility"]],"The rnstatus Utility":[[10,"the-rnstatus-utility"]],"The rnx Utility":[[10,"the-rnx-utility"]],"Try Using a Reticulum-based Program":[[2,"try-using-a-reticulum-based-program"]],"UDP Interface":[[5,"udp-interface"]],"Ubuntu Lunar":[[2,"ubuntu-lunar"]],"Understanding Reticulum":[[9,null]],"Unsigned RNode v2.x":[[3,"unsigned-rnode-v2-x"]],"Usage with Reticulum":[[3,"usage-with-reticulum"]],"Userspace Service":[[10,"userspace-service"]],"Using Reticulum on Your System":[[10,null]],"Using the Included Utilities":[[2,"using-the-included-utilities"]],"What does Reticulum Offer?":[[11,"what-does-reticulum-offer"]],"What is Reticulum?":[[11,null]],"Where can Reticulum be Used?":[[11,"where-can-reticulum-be-used"]],"WiFi-based Hardware":[[3,"wifi-based-hardware"]],"Windows":[[2,"windows"]],"Wire Format":[[9,"wire-format"]]},"docnames":["examples","forhumans","gettingstartedfast","hardware","index","interfaces","networks","reference","support","understanding","using","whatis"],"envversion":{"sphinx":65,"sphinx.domains.c":3,"sphinx.domains.changeset":1,"sphinx.domains.citation":1,"sphinx.domains.cpp":9,"sphinx.domains.index":1,"sphinx.domains.javascript":3,"sphinx.domains.math":2,"sphinx.domains.python":4,"sphinx.domains.rst":2,"sphinx.domains.std":2},"filenames":["examples.rst","forhumans.rst","gettingstartedfast.rst","hardware.rst","index.rst","interfaces.rst","networks.rst","reference.rst","support.rst","understanding.rst","using.rst","whatis.rst"],"indexentries":{"__init__() (rns.rawchannelreader method)":[[7,"RNS.RawChannelReader.__init__",false]],"__init__() (rns.rawchannelwriter method)":[[7,"RNS.RawChannelWriter.__init__",false]],"accepts_links() (rns.destination method)":[[7,"RNS.Destination.accepts_links",false]],"add_message_handler() (rns.channel.channel method)":[[7,"RNS.Channel.Channel.add_message_handler",false]],"add_ready_callback() (rns.rawchannelreader method)":[[7,"RNS.RawChannelReader.add_ready_callback",false]],"advertise() (rns.resource method)":[[7,"RNS.Resource.advertise",false]],"announce() (rns.destination method)":[[7,"RNS.Destination.announce",false]],"announce_cap (rns.reticulum attribute)":[[7,"RNS.Reticulum.ANNOUNCE_CAP",false]],"app_and_aspects_from_name() (rns.destination static method)":[[7,"RNS.Destination.app_and_aspects_from_name",false]],"buffer (class in rns)":[[7,"RNS.Buffer",false]],"cancel() (rns.resource method)":[[7,"RNS.Resource.cancel",false]],"channel (class in rns.channel)":[[7,"RNS.Channel.Channel",false]],"clear_default_app_data() (rns.destination method)":[[7,"RNS.Destination.clear_default_app_data",false]],"concluded() (rns.requestreceipt method)":[[7,"RNS.RequestReceipt.concluded",false]],"create_bidirectional_buffer() (rns.buffer static method)":[[7,"RNS.Buffer.create_bidirectional_buffer",false]],"create_keys() (rns.destination method)":[[7,"RNS.Destination.create_keys",false]],"create_reader() (rns.buffer static method)":[[7,"RNS.Buffer.create_reader",false]],"create_writer() (rns.buffer static method)":[[7,"RNS.Buffer.create_writer",false]],"current_ratchet_id() (rns.identity static method)":[[7,"RNS.Identity.current_ratchet_id",false]],"curve (rns.identity attribute)":[[7,"RNS.Identity.CURVE",false]],"curve (rns.link attribute)":[[7,"RNS.Link.CURVE",false]],"decrypt() (rns.destination method)":[[7,"RNS.Destination.decrypt",false]],"decrypt() (rns.identity method)":[[7,"RNS.Identity.decrypt",false]],"deregister_announce_handler() (rns.transport static method)":[[7,"RNS.Transport.deregister_announce_handler",false]],"deregister_request_handler() (rns.destination method)":[[7,"RNS.Destination.deregister_request_handler",false]],"destination (class in rns)":[[7,"RNS.Destination",false]],"enable_ratchets() (rns.destination method)":[[7,"RNS.Destination.enable_ratchets",false]],"encrypt() (rns.destination method)":[[7,"RNS.Destination.encrypt",false]],"encrypt() (rns.identity method)":[[7,"RNS.Identity.encrypt",false]],"encrypted_mdu (rns.packet attribute)":[[7,"RNS.Packet.ENCRYPTED_MDU",false]],"enforce_ratchets() (rns.destination method)":[[7,"RNS.Destination.enforce_ratchets",false]],"establishment_timeout_per_hop (rns.link attribute)":[[7,"RNS.Link.ESTABLISHMENT_TIMEOUT_PER_HOP",false]],"expand_name() (rns.destination static method)":[[7,"RNS.Destination.expand_name",false]],"from_bytes() (rns.identity static method)":[[7,"RNS.Identity.from_bytes",false]],"from_file() (rns.identity static method)":[[7,"RNS.Identity.from_file",false]],"full_hash() (rns.identity static method)":[[7,"RNS.Identity.full_hash",false]],"get_age() (rns.link method)":[[7,"RNS.Link.get_age",false]],"get_channel() (rns.link method)":[[7,"RNS.Link.get_channel",false]],"get_data_size() (rns.resource method)":[[7,"RNS.Resource.get_data_size",false]],"get_establishment_rate() (rns.link method)":[[7,"RNS.Link.get_establishment_rate",false]],"get_expected_rate() (rns.link method)":[[7,"RNS.Link.get_expected_rate",false]],"get_hash() (rns.resource method)":[[7,"RNS.Resource.get_hash",false]],"get_instance() (rns.reticulum static method)":[[7,"RNS.Reticulum.get_instance",false]],"get_mdu() (rns.link method)":[[7,"RNS.Link.get_mdu",false]],"get_mode() (rns.link method)":[[7,"RNS.Link.get_mode",false]],"get_mtu() (rns.link method)":[[7,"RNS.Link.get_mtu",false]],"get_parts() (rns.resource method)":[[7,"RNS.Resource.get_parts",false]],"get_private_key() (rns.destination method)":[[7,"RNS.Destination.get_private_key",false]],"get_private_key() (rns.identity method)":[[7,"RNS.Identity.get_private_key",false]],"get_progress() (rns.requestreceipt method)":[[7,"RNS.RequestReceipt.get_progress",false]],"get_progress() (rns.resource method)":[[7,"RNS.Resource.get_progress",false]],"get_public_key() (rns.identity method)":[[7,"RNS.Identity.get_public_key",false]],"get_q() (rns.link method)":[[7,"RNS.Link.get_q",false]],"get_q() (rns.packet method)":[[7,"RNS.Packet.get_q",false]],"get_random_hash() (rns.identity static method)":[[7,"RNS.Identity.get_random_hash",false]],"get_remote_identity() (rns.link method)":[[7,"RNS.Link.get_remote_identity",false]],"get_request_id() (rns.requestreceipt method)":[[7,"RNS.RequestReceipt.get_request_id",false]],"get_response() (rns.requestreceipt method)":[[7,"RNS.RequestReceipt.get_response",false]],"get_response_time() (rns.requestreceipt method)":[[7,"RNS.RequestReceipt.get_response_time",false]],"get_rssi() (rns.link method)":[[7,"RNS.Link.get_rssi",false]],"get_rssi() (rns.packet method)":[[7,"RNS.Packet.get_rssi",false]],"get_rtt() (rns.packetreceipt method)":[[7,"RNS.PacketReceipt.get_rtt",false]],"get_segments() (rns.resource method)":[[7,"RNS.Resource.get_segments",false]],"get_snr() (rns.link method)":[[7,"RNS.Link.get_snr",false]],"get_snr() (rns.packet method)":[[7,"RNS.Packet.get_snr",false]],"get_status() (rns.packetreceipt method)":[[7,"RNS.PacketReceipt.get_status",false]],"get_status() (rns.requestreceipt method)":[[7,"RNS.RequestReceipt.get_status",false]],"get_transfer_size() (rns.resource method)":[[7,"RNS.Resource.get_transfer_size",false]],"has_path() (rns.transport static method)":[[7,"RNS.Transport.has_path",false]],"hash() (rns.destination static method)":[[7,"RNS.Destination.hash",false]],"hash_from_name_and_identity() (rns.destination static method)":[[7,"RNS.Destination.hash_from_name_and_identity",false]],"hops_to() (rns.transport static method)":[[7,"RNS.Transport.hops_to",false]],"identify() (rns.link method)":[[7,"RNS.Link.identify",false]],"identity (class in rns)":[[7,"RNS.Identity",false]],"inactive_for() (rns.link method)":[[7,"RNS.Link.inactive_for",false]],"is_compressed() (rns.resource method)":[[7,"RNS.Resource.is_compressed",false]],"is_ready_to_send() (rns.channel.channel method)":[[7,"RNS.Channel.Channel.is_ready_to_send",false]],"keepalive (rns.link attribute)":[[7,"RNS.Link.KEEPALIVE",false]],"keepalive_timeout_factor (rns.link attribute)":[[7,"RNS.Link.KEEPALIVE_TIMEOUT_FACTOR",false]],"keysize (rns.identity attribute)":[[7,"RNS.Identity.KEYSIZE",false]],"link (class in rns)":[[7,"RNS.Link",false]],"link_mtu_discovery (rns.reticulum attribute)":[[7,"RNS.Reticulum.LINK_MTU_DISCOVERY",false]],"link_mtu_discovery() (rns.reticulum static method)":[[7,"RNS.Reticulum.link_mtu_discovery",false]],"load_private_key() (rns.destination method)":[[7,"RNS.Destination.load_private_key",false]],"load_private_key() (rns.identity method)":[[7,"RNS.Identity.load_private_key",false]],"load_public_key() (rns.identity method)":[[7,"RNS.Identity.load_public_key",false]],"mdu (rns.channel.channel property)":[[7,"RNS.Channel.Channel.mdu",false]],"messagebase (class in rns)":[[7,"RNS.MessageBase",false]],"minimum_bitrate (rns.reticulum attribute)":[[7,"RNS.Reticulum.MINIMUM_BITRATE",false]],"msgtype (rns.messagebase attribute)":[[7,"RNS.MessageBase.MSGTYPE",false]],"mtu (rns.reticulum attribute)":[[7,"RNS.Reticulum.MTU",false]],"next_hop() (rns.transport static method)":[[7,"RNS.Transport.next_hop",false]],"next_hop_interface() (rns.transport static method)":[[7,"RNS.Transport.next_hop_interface",false]],"no_data_for() (rns.link method)":[[7,"RNS.Link.no_data_for",false]],"no_inbound_for() (rns.link method)":[[7,"RNS.Link.no_inbound_for",false]],"no_outbound_for() (rns.link method)":[[7,"RNS.Link.no_outbound_for",false]],"pack() (rns.messagebase method)":[[7,"RNS.MessageBase.pack",false]],"packet (class in rns)":[[7,"RNS.Packet",false]],"packetreceipt (class in rns)":[[7,"RNS.PacketReceipt",false]],"pathfinder_m (rns.transport attribute)":[[7,"RNS.Transport.PATHFINDER_M",false]],"plain_mdu (rns.packet attribute)":[[7,"RNS.Packet.PLAIN_MDU",false]],"ratchet_count (rns.destination attribute)":[[7,"RNS.Destination.RATCHET_COUNT",false]],"ratchet_expiry (rns.identity attribute)":[[7,"RNS.Identity.RATCHET_EXPIRY",false]],"ratchet_interval (rns.destination attribute)":[[7,"RNS.Destination.RATCHET_INTERVAL",false]],"ratchetsize (rns.identity attribute)":[[7,"RNS.Identity.RATCHETSIZE",false]],"rawchannelreader (class in rns)":[[7,"RNS.RawChannelReader",false]],"rawchannelwriter (class in rns)":[[7,"RNS.RawChannelWriter",false]],"recall() (rns.identity static method)":[[7,"RNS.Identity.recall",false]],"recall_app_data() (rns.identity static method)":[[7,"RNS.Identity.recall_app_data",false]],"register_announce_handler() (rns.transport static method)":[[7,"RNS.Transport.register_announce_handler",false]],"register_message_type() (rns.channel.channel method)":[[7,"RNS.Channel.Channel.register_message_type",false]],"register_request_handler() (rns.destination method)":[[7,"RNS.Destination.register_request_handler",false]],"remote_management_enabled() (rns.reticulum static method)":[[7,"RNS.Reticulum.remote_management_enabled",false]],"remove_message_handler() (rns.channel.channel method)":[[7,"RNS.Channel.Channel.remove_message_handler",false]],"remove_ready_callback() (rns.rawchannelreader method)":[[7,"RNS.RawChannelReader.remove_ready_callback",false]],"request() (rns.link method)":[[7,"RNS.Link.request",false]],"request_path() (rns.transport static method)":[[7,"RNS.Transport.request_path",false]],"requestreceipt (class in rns)":[[7,"RNS.RequestReceipt",false]],"resend() (rns.packet method)":[[7,"RNS.Packet.resend",false]],"resource (class in rns)":[[7,"RNS.Resource",false]],"reticulum (class in rns)":[[7,"RNS.Reticulum",false]],"send() (rns.channel.channel method)":[[7,"RNS.Channel.Channel.send",false]],"send() (rns.packet method)":[[7,"RNS.Packet.send",false]],"set_default_app_data() (rns.destination method)":[[7,"RNS.Destination.set_default_app_data",false]],"set_delivery_callback() (rns.packetreceipt method)":[[7,"RNS.PacketReceipt.set_delivery_callback",false]],"set_link_closed_callback() (rns.link method)":[[7,"RNS.Link.set_link_closed_callback",false]],"set_link_established_callback() (rns.destination method)":[[7,"RNS.Destination.set_link_established_callback",false]],"set_packet_callback() (rns.destination method)":[[7,"RNS.Destination.set_packet_callback",false]],"set_packet_callback() (rns.link method)":[[7,"RNS.Link.set_packet_callback",false]],"set_proof_requested_callback() (rns.destination method)":[[7,"RNS.Destination.set_proof_requested_callback",false]],"set_proof_strategy() (rns.destination method)":[[7,"RNS.Destination.set_proof_strategy",false]],"set_ratchet_interval() (rns.destination method)":[[7,"RNS.Destination.set_ratchet_interval",false]],"set_remote_identified_callback() (rns.link method)":[[7,"RNS.Link.set_remote_identified_callback",false]],"set_resource_callback() (rns.link method)":[[7,"RNS.Link.set_resource_callback",false]],"set_resource_concluded_callback() (rns.link method)":[[7,"RNS.Link.set_resource_concluded_callback",false]],"set_resource_started_callback() (rns.link method)":[[7,"RNS.Link.set_resource_started_callback",false]],"set_resource_strategy() (rns.link method)":[[7,"RNS.Link.set_resource_strategy",false]],"set_retained_ratchets() (rns.destination method)":[[7,"RNS.Destination.set_retained_ratchets",false]],"set_timeout() (rns.packetreceipt method)":[[7,"RNS.PacketReceipt.set_timeout",false]],"set_timeout_callback() (rns.packetreceipt method)":[[7,"RNS.PacketReceipt.set_timeout_callback",false]],"should_use_implicit_proof() (rns.reticulum static method)":[[7,"RNS.Reticulum.should_use_implicit_proof",false]],"sign() (rns.destination method)":[[7,"RNS.Destination.sign",false]],"sign() (rns.identity method)":[[7,"RNS.Identity.sign",false]],"stale_grace (rns.link attribute)":[[7,"RNS.Link.STALE_GRACE",false]],"stale_time (rns.link attribute)":[[7,"RNS.Link.STALE_TIME",false]],"teardown() (rns.link method)":[[7,"RNS.Link.teardown",false]],"to_file() (rns.identity method)":[[7,"RNS.Identity.to_file",false]],"track_phy_stats() (rns.link method)":[[7,"RNS.Link.track_phy_stats",false]],"transport (class in rns)":[[7,"RNS.Transport",false]],"transport_enabled() (rns.reticulum static method)":[[7,"RNS.Reticulum.transport_enabled",false]],"truncated_hash() (rns.identity static method)":[[7,"RNS.Identity.truncated_hash",false]],"truncated_hashlength (rns.identity attribute)":[[7,"RNS.Identity.TRUNCATED_HASHLENGTH",false]],"unpack() (rns.messagebase method)":[[7,"RNS.MessageBase.unpack",false]],"validate() (rns.identity method)":[[7,"RNS.Identity.validate",false]]},"objects":{"RNS":[[7,0,1,"","Buffer"],[7,0,1,"","Destination"],[7,0,1,"","Identity"],[7,0,1,"","Link"],[7,0,1,"","MessageBase"],[7,0,1,"","Packet"],[7,0,1,"","PacketReceipt"],[7,0,1,"","RawChannelReader"],[7,0,1,"","RawChannelWriter"],[7,0,1,"","RequestReceipt"],[7,0,1,"","Resource"],[7,0,1,"","Reticulum"],[7,0,1,"","Transport"]],"RNS.Buffer":[[7,1,1,"","create_bidirectional_buffer"],[7,1,1,"","create_reader"],[7,1,1,"","create_writer"]],"RNS.Channel":[[7,0,1,"","Channel"]],"RNS.Channel.Channel":[[7,1,1,"","add_message_handler"],[7,1,1,"","is_ready_to_send"],[7,2,1,"","mdu"],[7,1,1,"","register_message_type"],[7,1,1,"","remove_message_handler"],[7,1,1,"","send"]],"RNS.Destination":[[7,3,1,"","RATCHET_COUNT"],[7,3,1,"","RATCHET_INTERVAL"],[7,1,1,"","accepts_links"],[7,1,1,"","announce"],[7,1,1,"","app_and_aspects_from_name"],[7,1,1,"","clear_default_app_data"],[7,1,1,"","create_keys"],[7,1,1,"","decrypt"],[7,1,1,"","deregister_request_handler"],[7,1,1,"","enable_ratchets"],[7,1,1,"","encrypt"],[7,1,1,"","enforce_ratchets"],[7,1,1,"","expand_name"],[7,1,1,"","get_private_key"],[7,1,1,"","hash"],[7,1,1,"","hash_from_name_and_identity"],[7,1,1,"","load_private_key"],[7,1,1,"","register_request_handler"],[7,1,1,"","set_default_app_data"],[7,1,1,"","set_link_established_callback"],[7,1,1,"","set_packet_callback"],[7,1,1,"","set_proof_requested_callback"],[7,1,1,"","set_proof_strategy"],[7,1,1,"","set_ratchet_interval"],[7,1,1,"","set_retained_ratchets"],[7,1,1,"","sign"]],"RNS.Identity":[[7,3,1,"","CURVE"],[7,3,1,"","KEYSIZE"],[7,3,1,"","RATCHETSIZE"],[7,3,1,"","RATCHET_EXPIRY"],[7,3,1,"","TRUNCATED_HASHLENGTH"],[7,1,1,"","current_ratchet_id"],[7,1,1,"","decrypt"],[7,1,1,"","encrypt"],[7,1,1,"","from_bytes"],[7,1,1,"","from_file"],[7,1,1,"","full_hash"],[7,1,1,"","get_private_key"],[7,1,1,"","get_public_key"],[7,1,1,"","get_random_hash"],[7,1,1,"","load_private_key"],[7,1,1,"","load_public_key"],[7,1,1,"","recall"],[7,1,1,"","recall_app_data"],[7,1,1,"","sign"],[7,1,1,"","to_file"],[7,1,1,"","truncated_hash"],[7,1,1,"","validate"]],"RNS.Link":[[7,3,1,"","CURVE"],[7,3,1,"","ESTABLISHMENT_TIMEOUT_PER_HOP"],[7,3,1,"","KEEPALIVE"],[7,3,1,"","KEEPALIVE_TIMEOUT_FACTOR"],[7,3,1,"","STALE_GRACE"],[7,3,1,"","STALE_TIME"],[7,1,1,"","get_age"],[7,1,1,"","get_channel"],[7,1,1,"","get_establishment_rate"],[7,1,1,"","get_expected_rate"],[7,1,1,"","get_mdu"],[7,1,1,"","get_mode"],[7,1,1,"","get_mtu"],[7,1,1,"","get_q"],[7,1,1,"","get_remote_identity"],[7,1,1,"","get_rssi"],[7,1,1,"","get_snr"],[7,1,1,"","identify"],[7,1,1,"","inactive_for"],[7,1,1,"","no_data_for"],[7,1,1,"","no_inbound_for"],[7,1,1,"","no_outbound_for"],[7,1,1,"","request"],[7,1,1,"","set_link_closed_callback"],[7,1,1,"","set_packet_callback"],[7,1,1,"","set_remote_identified_callback"],[7,1,1,"","set_resource_callback"],[7,1,1,"","set_resource_concluded_callback"],[7,1,1,"","set_resource_started_callback"],[7,1,1,"","set_resource_strategy"],[7,1,1,"","teardown"],[7,1,1,"","track_phy_stats"]],"RNS.MessageBase":[[7,3,1,"","MSGTYPE"],[7,1,1,"","pack"],[7,1,1,"","unpack"]],"RNS.Packet":[[7,3,1,"","ENCRYPTED_MDU"],[7,3,1,"","PLAIN_MDU"],[7,1,1,"","get_q"],[7,1,1,"","get_rssi"],[7,1,1,"","get_snr"],[7,1,1,"","resend"],[7,1,1,"","send"]],"RNS.PacketReceipt":[[7,1,1,"","get_rtt"],[7,1,1,"","get_status"],[7,1,1,"","set_delivery_callback"],[7,1,1,"","set_timeout"],[7,1,1,"","set_timeout_callback"]],"RNS.RawChannelReader":[[7,1,1,"","__init__"],[7,1,1,"","add_ready_callback"],[7,1,1,"","remove_ready_callback"]],"RNS.RawChannelWriter":[[7,1,1,"","__init__"]],"RNS.RequestReceipt":[[7,1,1,"","concluded"],[7,1,1,"","get_progress"],[7,1,1,"","get_request_id"],[7,1,1,"","get_response"],[7,1,1,"","get_response_time"],[7,1,1,"","get_status"]],"RNS.Resource":[[7,1,1,"","advertise"],[7,1,1,"","cancel"],[7,1,1,"","get_data_size"],[7,1,1,"","get_hash"],[7,1,1,"","get_parts"],[7,1,1,"","get_progress"],[7,1,1,"","get_segments"],[7,1,1,"","get_transfer_size"],[7,1,1,"","is_compressed"]],"RNS.Reticulum":[[7,3,1,"","ANNOUNCE_CAP"],[7,3,1,"","LINK_MTU_DISCOVERY"],[7,3,1,"","MINIMUM_BITRATE"],[7,3,1,"","MTU"],[7,1,1,"","get_instance"],[7,1,1,"","link_mtu_discovery"],[7,1,1,"","remote_management_enabled"],[7,1,1,"","should_use_implicit_proof"],[7,1,1,"","transport_enabled"]],"RNS.Transport":[[7,3,1,"","PATHFINDER_M"],[7,1,1,"","deregister_announce_handler"],[7,1,1,"","has_path"],[7,1,1,"","hops_to"],[7,1,1,"","next_hop"],[7,1,1,"","next_hop_interface"],[7,1,1,"","register_announce_handler"],[7,1,1,"","request_path"]]},"objnames":{"0":["py","class","Python class"],"1":["py","method","Python method"],"2":["py","property","Python property"],"3":["py","attribute","Python attribute"]},"objtypes":{"0":"py:class","1":"py:method","2":"py:property","3":"py:attribute"},"terms":{"":[0,2,5,6,9,10,11],"0":[0,2,5,7,9,10,11],"00":[9,10],"00000000":9,"00000100":9,"00000111":9,"01":9,"01010000":9,"02":2,"05":0,"08":[0,10],"0f4259fef4521ab75a3409e353fe9073eb10783b4912a6a9937c57bf44a62c1":10,"0x0101":0,"0x20":0,"0x7d":0,"0x7e":0,"0x91c421ddfb8a30a49a71d63447ddb54cebe3465":8,"0xf000":[0,7],"1":[0,2,5,7,9,10],"10":[5,9,10],"100":[0,5,9],"1000":0,"10000000":9,"1024":0,"11":9,"115":9,"115200":[0,5,10],"12":[2,5,10],"1200":9,"125":5,"125000":5,"127":5,"128":[7,9],"13":10,"13425ec15b621c1d928589718000d814":9,"15":5,"150":[5,10],"150m":5,"16":[5,9,10],"1625":5,"1625000":5,"167":9,"17":10,"1726dbad538775b5bf9b0ea25a4079c8":10,"174a64852a75682259ad8b921b8bf416":2,"18":10,"1800":7,"187":10,"1b03013c25f1c2ca068a4f080b844a10":10,"2":[0,2,5,7,9,10],"20":[5,9,10],"200":[5,10],"201":5,"2023":[2,10],"21":2,"2225fdeecaf6e2db4556c3c2d7637294":10,"23":10,"24":5,"2400000000":5,"25":[0,4,11],"255":[5,10],"25519":7,"256":[5,7,9,10,11],"2592000":7,"27":10,"29":5,"297":[9,11],"29716":5,"2b489d06eaf7c543808c76a5332a447d":10,"2d03725b327348980d570f739a3a5708":10,"2d882c5586e548d79b5af27bca1776dc":10,"2f":0,"2owjajquafianpecac":2,"3":[0,2,5,9,10,11],"30":[5,7,10],"30602def3b3506a28ed33db6f60cc6c9":10,"32":[2,7,9],"3278":5,"33":5,"360":7,"3600":[0,5],"37428":10,"37429":10,"38":10,"383":7,"3b87":5,"4":[7,9,10],"4242":[2,5],"4251":5,"42671":5,"430":9,"4343":5,"44":11,"45":[0,9],"464":7,"465":9,"469":10,"48555":5,"49":10,"49555":5,"4965":10,"4e":5,"4faf1b2e0a077e6a9d92fa051f256038":9,"4ghz":5,"5":[0,5,7,9,10,11],"500":[5,7,9,11],"5001":5,"51":9,"512":[5,7,9,11],"5245a8efe1788c6a1cd36144a270e13b":10,"55":5,"56":10,"564":0,"5757":5,"59":10,"5caf":5,"5d78":5,"5urvjicpzi7q3ybztsef4i5ow2aq4soktfj7zedz53s47r54jnqq":5,"6":[5,7,10],"60":[0,5],"600":5,"63":10,"64":[2,9,10],"7":[2,5,9,10],"71e5":5,"72":5,"720":7,"7200":5,"73":[5,10],"73cbd378bb0286ed11a707c13447bb1":10,"74":10,"781":10,"7a55144adf826958a9529a3bcf08b149":10,"8":[0,5,10],"80":10,"8001":5,"809":10,"83":[9,10],"84fpy1qbxhcgdseepynmhthcrgmx4nffbytz2gkytoqhvvhjp8eaw1z1eedrnkd19b3b8nilcgvxzkv17ummmeescrpya5w":8,"86":10,"865":5,"865600000":5,"867":5,"867200000":5,"868":9,"88":5,"89":5,"8dd57a738226809646089335a6b03695":10,"9":[2,7,10],"900":9,"921600":10,"941bed5e228775e5a8079fc38b1ccf3f":10,"96":9,"9600":0,"984b74a3f768bef236af4371e6f248cd":10,"99":9,"9fb6d773498fb3feda407ed8ef2c3229":10,"A":[0,2,5,6,7,9,10],"And":0,"As":[2,3,5,6,7,9,11],"At":[2,6,9],"Be":[7,10],"But":9,"By":[0,2,5,7,9,10],"For":[2,5,6,7,9,10,11],"IN":[0,7],"If":[0,2,3,5,6,7,9,10,11],"In":[0,2,3,5,6,7,9,10,11],"It":[0,2,3,5,7,9,10,11],"No":[0,2,5,9,10,11],"On":[0,2,5,10],"One":[3,7,9],"Or":[5,10,11],"That":9,"The":[0,2,3,4,5,6,7,11],"Then":[0,2],"There":[2,6,9],"These":[2,5,7,9,10],"To":[0,2,3,5,6,9,10,11],"Will":7,"With":[4,5,6,9,10],"_":9,"__":9,"______":9,"_______":9,"________":9,"________________":9,"__future__":0,"__init__":[0,7],"__main__":0,"__name__":0,"__str__":0,"a4d":5,"a79f":5,"aarch64":2,"ab":0,"abil":[2,3,11],"abl":[0,2,5,6,7,9,10],"abort":0,"about":[0,2,3,5,6,7,9],"abov":[2,3,5,9,10],"absolut":[2,8,11],"abstract":[7,9],"abstractmethod":7,"abund":3,"accept":[7,8,9,10],"accept_al":[0,7],"accept_app":7,"accept_non":7,"accepts_link":7,"access":[2,4,5,6,7,10],"access_point":5,"accommod":[7,9],"accord":[0,2,9],"accordingli":[0,5],"achiev":[5,7,9],"acknowledg":11,"across":[0,3,6,7],"act":[2,7,9,10],"action":0,"activ":[0,2,5,7,9],"actor":9,"actual":[0,2,5,9],"ad":[0,3,4,5,6,7,9,10,11],"adapt":[3,6],"add":[0,2,5,6,7,10],"add_argu":0,"add_message_handl":[0,7],"add_ready_callback":7,"addit":[2,3,5,7,9,10,11],"addition":[2,3,5,9],"addr":10,"address":[0,2,5,6,7,9,10,11],"adher":7,"adjust":[2,7],"admin":5,"administr":10,"adress":[7,9],"advanc":9,"advantag":7,"advers":11,"adversari":2,"advertis":[0,7],"advis":9,"ae":[7,9,11],"af73":5,"affect":[2,5],"after":[0,2,5,6,7,9,10],"again":[2,5,9],"against":9,"agenc":9,"agent":9,"agnost":[6,9],"agnostic":9,"aim":[4,9],"air":3,"airmax":3,"airtim":5,"airtime_limit_long":5,"airtime_limit_short":5,"aliv":[7,9],"all":[0,2,3,4,5,6,7,8,9,10,11],"allevi":3,"alloc":[5,7,9,10],"allow":[0,2,3,5,6,7,9,10,11],"allow_al":[0,7],"allow_list":7,"allow_non":7,"allowed_hash":10,"allowed_ident":10,"allowed_list":7,"almost":[3,5,9,10],"alon":5,"along":[5,6,7,9,10],"alreadi":[0,2,3,6,7,9,10],"also":[0,2,3,4,5,6,7,9,10,11],"alter":[2,7,9],"altern":[0,2,5,10],"although":[2,9,11],"alwai":[2,5,7,9,10],"amateur":[5,11],"amount":[0,5,6,7,9,11],"amsterdam":5,"an":[0,2,3,5,6,7,9,10,11],"analyt":8,"android":[4,5,10],"ani":[0,2,3,5,6,7,8,9,10,11],"annot":0,"annouce_cap":5,"announc":[4,7,10],"announce_cap":[5,7],"announce_handl":0,"announce_packet_hash":7,"announce_rate_grac":5,"announce_rate_penalti":5,"announce_rate_target":5,"announced_ident":[0,7],"announceloop":0,"announcesampl":0,"anonym":[2,6,7,9,11],"anoth":[2,7,9,10],"answer":[9,10],"antenna":3,"anymor":2,"anyon":[0,2,3,5,6,7,9,10],"anyth":[2,3,5,9,10,11],"anywher":[0,5],"ap":5,"api":[2,4,9,11],"apk":2,"app":[0,2,7,9],"app_and_aspects_from_nam":7,"app_data":[0,7],"app_nam":[0,7],"app_timeout":0,"append":[0,9],"appli":[5,7,9],"applic":[0,2,5,6,7,9,10,11],"approach":[3,9,10],"approv":9,"approxim":5,"april":2,"apt":2,"ar":[0,2,3,5,6,7,8,9,10,11],"arbitrari":[7,9,10,11],"arch":2,"architectur":2,"area":[3,5,6,9,11],"arg":0,"argon":0,"argpars":0,"argument":[0,7,10],"argumentpars":0,"arm64":4,"around":[5,9],"arriv":[0,9],"arx":10,"ask":[0,2,3,7],"aspect":[0,3,5,7,9,10],"aspect_filt":[0,7],"assign":[0,9,10],"associ":[2,7,9],"assum":[5,9],"asymmetr":[9,10,11],"attach":10,"attached_interfac":7,"attack":2,"attempt":[0,2,3,7],"attribut":7,"atx":10,"audit":11,"auth":10,"authent":[2,5,6,7,9,10,11],"author":[9,10],"authorit":9,"auto":[2,3,4,7,9],"auto_compress":7,"autoconfigur":11,"autodiscov":5,"autoinstal":[3,10],"autointerfac":[2,3,5,10],"autom":[3,8,9],"automat":[0,2,5,6,7,9,10,11],"autonom":[6,9],"autonomi":11,"avail":[0,2,3,4,5,6,7,9,10,11],"averag":9,"avoid":[3,9,10],"awai":[0,5,6,9,10],"awar":[2,5,9],"ax":[4,11],"ax25kissinterfac":5,"b":[0,6,10],"b32":5,"back":[0,5,9,11],"backbon":[2,3,4],"backboneinterfac":[2,5],"backend":[5,9],"background":[2,5],"backhaul":[3,6],"backup":10,"balanc":5,"band":[3,9],"bandwidth":[2,5,6,7,9,10,11],"bare":[0,5],"barrier":9,"base":[4,5,6,7,9,10,11],"base32":[5,10],"base64":10,"basi":[5,7,9,10,11],"basic":[0,2,4,5,7,10],"baud":[5,10],"baud_flash":10,"baudrat":0,"bc1pgqgu8h8xvj4jtafslq396v7ju7hkgymyrzyqft4llfslz5vp99psqfk3a6":8,"bc7291552be7a58f361522990465165c":10,"beacon":5,"becaus":[6,9],"becki":0,"becom":[0,2,6,7,9],"been":[0,2,3,5,6,7,9,11],"befor":[0,2,5,7,9,10],"begin":[0,3,7],"begun":7,"behalf":5,"behav":3,"behaviour":[2,5,10],"behind":[2,9],"being":[2,5,7,9],"beings":9,"belief":9,"below":[2,3,5],"benefici":[5,10],"best":[2,9,11],"better":[5,9],"between":[0,5,6,7,9,10],"betweenthebord":2,"bi":[7,9],"bidirect":9,"billion":[6,9],"bin":[2,10],"binari":[0,2,7,9,10],"bind":5,"bit":[0,2,5,7,9,10,11],"bitcoin":8,"bitrat":[0,5,7],"ble":5,"blob":[0,9],"block":5,"bluetooth":10,"board":[2,4,5,9,11],"bogu":5,"boil":3,"bookworm":4,"bool":7,"boot":[2,10],"bootstrap":10,"both":[0,2,3,5,6,7,9,10,11],"boundari":5,"box":3,"break":[2,7,9,11],"breviti":10,"bridg":[3,4],"briefli":[3,9],"bring":5,"broad":[2,3],"broadcast":[2,4,5,7,9],"broadcast_destin":0,"broadcastloop":0,"brought":[5,10],"browser":2,"buffer":[4,5,7,11],"bufferedread":7,"bufferedrwpair":7,"bufferedwrit":7,"bufferexampl":0,"bug":11,"build":[0,2,3,4,5,9,11],"built":[2,5,9,10,11],"bundl":0,"bureaucrat":11,"burst":5,"bw":10,"byte":[0,7,9,10,11],"bytes":0,"c":[0,6,10],"c50cc4e4f7838b6c31f60ab9032cbc62":10,"c89b4da064bf66d280f0e4d8abfd9806":10,"cabl":[5,6],"cach":10,"calcul":[7,9,10],"call":[0,6,7,9,11],"callabl":[0,7],"callback":[0,7],"callsign":5,"can":[0,2,3,4,5,6,7,8,9,10],"cancel":7,"candid":6,"cannot":[0,2,5,11],"cap":5,"capabl":[0,9],"capac":[3,5,7,9],"carambola":0,"care":[2,7,11],"carefulli":2,"cargo_build_target":2,"carri":[5,7,9,10,11],"carrier":[6,11],"case":[0,2,3,5,6,9,10],"cat":10,"categori":3,"caution":5,"caveat":4,"cb":[7,9],"cbc":[9,11],"cd":2,"cdma":5,"censor":9,"censorship":[9,11],"central":[3,6,9],"centralis":9,"certain":[0,5,6,8,9],"chain":5,"challeng":9,"chanc":3,"chang":[0,2,5,7,9,10,11],"channel":[2,4,5,6,7,8,9,11],"channelarg":0,"channelexampl":0,"chapter":[2,3,5,6,7,9,10,11],"charact":0,"characterist":9,"cheap":[3,5,9],"cheapli":2,"check":[0,2,7,9,10],"checksum":[7,11],"choic":2,"choos":[0,2,5,9],"chose":9,"chosen":[6,9],"chunk":0,"cific":5,"ciphertext":7,"ciphertext_token":7,"circumst":[8,9],"cl":0,"claim":9,"class":[0,6,7,11],"clear":[0,5,7,9,10],"clear_default_app_data":7,"clear_screen":0,"client":[0,2,3,4,7,10],"client_buffer_readi":0,"client_connect":0,"client_disconnect":0,"client_ident":0,"client_loop":0,"client_message_receiv":0,"client_packet_receiv":0,"client_request":0,"clone":[2,9],"close":[0,6,7,10],"closed_callback":7,"closer":9,"closest":9,"cluster":9,"co":[3,5,11],"code":[2,3,4,5,10],"codingr":5,"collect":8,"com":[0,2,8],"combin":[2,4,6,9],"come":[2,5,9],"comma":5,"command":[0,2,5,10],"comment":[5,10],"common":[0,3,4,6,9,10,11],"commonli":[3,5],"commun":[0,2,4,5,6,7,8,9,10,11],"communica":5,"compat":[0,2,3,5,7,9],"compil":2,"complet":[0,2,3,5,6,7,9,10,11],"complex":[5,9],"compon":[3,8,9],"compos":9,"compress":[0,7,9,10,11],"compromis":9,"comput":[2,5,9,11],"concaten":7,"conceiv":[2,3],"concept":[4,9,10],"conceptu":9,"conclud":[0,7],"concurr":[3,9,10],"condit":[9,11],"conf":2,"config":[0,2,5,6,10],"configarg":0,"configdir":7,"configpath":0,"configur":[0,2,3,4,6,7,9,11],"configuraion":3,"configure_devic":0,"confirm":[9,11],"conflict":2,"confus":[3,9],"congest":9,"conjunct":5,"connect":[0,3,4,6,7,9,10,11],"consequ":9,"conserv":5,"consid":[0,5,7,9,11],"consider":9,"consist":9,"consol":10,"constant":7,"constantli":9,"constrain":7,"construct":[9,11],"constructor":0,"consum":7,"contact":9,"contain":[0,6,7,9,10],"contend":9,"content":[0,2,6,10],"context":9,"contin":0,"continu":[5,7,8,11],"contribut":4,"control":[0,2,3,4,6,7,9,11],"convei":0,"conveni":0,"convent":0,"converg":[2,4,9],"coordin":[6,7,9,11],"copi":10,"core":[6,9,10,11],"correct":[0,9],"correctli":0,"correspond":9,"cost":[3,9,11],"could":[0,2,5,6,7,9,11],"count":9,"counter":0,"coupl":2,"cours":[2,5,9],"cover":[2,3,9,11],"coverag":6,"cpu":[0,9],"cpuinfo":10,"cr":10,"creat":[0,4,5,6,7,9,10,11],"create_bidirectional_buff":[0,7],"create_kei":7,"create_read":7,"create_receipt":[0,7],"create_writ":7,"creation":[9,11],"creator":9,"critic":[9,10],"cross":5,"cryptograph":[2,4,6,10,11],"cryptographi":[2,9,11],"ctrl":0,"cull":7,"current":[0,2,4,5,7,9],"current_download":0,"current_filenam":0,"current_ratchet_id":7,"curv":[6,7,9,11],"curve25519":[6,7,9,11],"custom":[3,4,7,9,11],"custom_network_nam":5,"customis":5,"d":[6,10],"daemon":[0,2,5,7,10],"dai":[6,7],"data":[0,2,3,4,5,6,7,9,11],"data_buff":0,"data_port":5,"databit":[0,5,10],"datar":5,"date":[0,2],"datetim":0,"db":[0,10],"dbm":[0,5,10],"debian":[4,9,10],"debug":[2,10],"decad":3,"decentralis":11,"decid":[5,6,7,9],"decis":[5,9],"decod":0,"decreas":10,"decrypt":[7,9,10],"dedic":[5,9],"deep":2,"def":0,"default":[0,2,3,5,6,7,9,10],"default_ifac_s":0,"defin":[0,5,7,9,10],"definit":[0,2,9],"degrad":6,"degre":5,"delai":[2,5,9,10],"delimit":0,"deliv":[0,7],"deliveri":[0,2,7,11],"demand":7,"demonstr":[0,2,5],"depend":[0,3,4,6,7,9,10],"deploi":9,"deregist":7,"deregister_announce_handl":7,"deregister_request_handl":7,"deriv":[2,7,9,11],"describ":[3,5,7,9],"descript":[0,10],"descriptor":0,"deseri":0,"deserializ":0,"design":[2,3,6,9,11],"desir":[0,3,5,9],"desktop":5,"dest_len":0,"destin":[0,2,4,6,7,10],"destination_1":0,"destination_2":0,"destination_clos":0,"destination_hash":[0,7,10],"destination_hexhash":0,"detail":[0,2,4,5,7,10,11],"detect":0,"determin":[2,7,9],"dev":[0,2,5,10],"devel":2,"develop":[3,4,7,8,9,11],"devic":[0,2,4,5,6,7,9,10],"dh":7,"dhcp":[3,5,10],"dict":0,"did":0,"differ":[0,2,3,5,6,7,9,10,11],"diffi":[6,9],"difficult":[2,3],"digit":[2,3,9,11],"dir":0,"dire":3,"direct":[0,2,3,6,7,9,10],"direction":9,"directli":[2,3,5,7,9,10,11],"directori":[0,2,10],"disabl":[5,9,10],"disappear":[5,10],"disassoci":9,"discard":[7,9],"disconnect":[0,5],"discov":[2,5],"discover":5,"discoveri":[5,7,9,10],"discovery_port":5,"discovery_scop":5,"discrimin":6,"discuss":[2,3,9],"disk":[0,7],"displai":[0,9,10],"disrupt":5,"dissolv":6,"distanc":[3,9],"distant":7,"distinct":[5,9],"distinguish":9,"distribut":[0,2,6,7,9,10,11],"disucss":2,"divid":7,"divmod":0,"dn":3,"dnf":2,"do":[0,2,3,5,7,9,10,11],"document":[2,7,9],"doe":[0,2,3,4,5,6,7,9,10],"doesn":5,"domain":[2,5,10],"don":[0,2,6,7,9,10],"donat":4,"done":[0,2,5,6,9,10],"dori":6,"dot":[9,10],"doubt":2,"dowload":2,"down":[0,2,3,5,7],"download":[0,2,5,10],"download_began":0,"download_conclud":0,"download_finish":0,"download_start":0,"download_tim":0,"driver":[10,11],"droid":2,"drop":[5,7,9,10],"dsrdtr":0,"dual":3,"dublin":10,"due":[0,6],"dump":10,"duplex":[9,11],"dynam":[2,10],"dysfunct":8,"e":[0,6,10],"e5c032d3ec4e64a6aca9927ba8ab73336780f6d71790":10,"e702c42ba8":10,"e7536ee90bd4a440e130490b87a25124":10,"each":[0,2,5,6,7,9,10],"earlier":9,"eas":[5,9],"easi":[2,3,5,9,10,11],"easier":[2,5,6,10,11],"easiest":[2,3,5,9],"easili":[2,5,6,9,10,11],"ecdh":[9,11],"echo":[2,4],"echo_destin":0,"echo_request":0,"ed25519":[9,11],"edit":[2,10],"eeprom":10,"effect":5,"effici":[0,2,5,7,9,11],"effort":3,"eg":10,"ei":0,"either":[2,3,6,7,9,10],"elaps":5,"elif":0,"ellipt":[6,7,9,11],"els":[0,2,6,9,11],"embed":3,"emploi":[3,9],"empow":11,"empti":0,"emptor":4,"emul":2,"enabl":[0,2,3,5,6,7,9,10,11],"enable_ratchet":7,"enable_remote_manag":10,"enable_transport":[9,10],"encapsul":[5,11],"encod":[0,7,10],"encrypt":[0,2,6,7,9,10,11],"encrypted_mdu":7,"end":[0,5,6,7,9,11],"endless":5,"endpoint":[0,6,7,9],"energi":2,"enforc":[5,7],"enforce_ratchet":7,"enhanc":9,"enough":[2,3,9],"ensur":[0,5,7,9,10,11],"ensurepath":2,"enter":[0,10],"entir":[0,2,6,7,9,10],"entiti":9,"entri":[0,2,9],"entrypoint":4,"enumer":0,"envelop":7,"environ":[2,6,9],"environment":9,"environmentlogg":9,"eof":5,"ephemer":[6,7,9,11],"epub":4,"equal":[6,7,9],"equip":[5,6,9],"equival":5,"error":[0,2,8,10],"esc":0,"esc_mask":0,"escap":0,"esp32":3,"especi":[2,3,5],"essenti":[2,5,9],"establish":[0,2,5,6,7,11],"established_callback":7,"establishment_timeout_per_hop":7,"etc":10,"eth0":5,"eth1":5,"ethereum":8,"ethernet":[2,4,5,6,9,11],"even":[0,2,5,6,7,9,10,11],"event":5,"eventu":7,"ever":9,"everi":[0,2,5,6,7,9],"everyon":[6,9],"everyth":[0,6,9],"evolv":6,"exact":[3,5,9],"exactli":[7,9],"exampl":[2,3,4,5,7,9,10,11],"example_util":0,"exampleannouncehandl":0,"exampleconfig":[2,10],"exampleinterfac":0,"exce":[0,5,7],"except":[0,5,7],"excess":5,"exchang":[6,7,9,11],"exclud":[7,9],"execstart":10,"execstartpr":10,"execut":[0,2,5,7,10],"exhaust":[3,9],"exist":[0,2,3,5,9,10,11],"exit":[0,2,7,10],"expand":[9,11],"expand_nam":7,"expect":[0,2,5,7,9,10],"expens":3,"experi":[2,9],"experienc":0,"experiment":[2,11],"expir":5,"expiri":[5,7],"explain":[3,7],"explan":[9,10],"explicit":7,"explicitli":10,"explor":[0,9,11],"export":[2,10],"expos":[5,7],"extend":[0,7],"extens":[5,11],"extern":[0,2,5,7,11],"extra":[2,5,6,10],"extract":10,"extrem":[2,9,10,11],"f":[0,2,10],"f4":5,"f53a1c4278e0726bb73fcc623d6ce763":10,"face":[2,5],"facilit":2,"fact":11,"factor":[5,7,10],"fail":[0,2,7],"failed_callback":[0,7],"failur":[2,5,7],"fals":[0,5,7],"far":[6,9],"fashion":8,"fast":[4,5,7,9],"faster":[2,5,9],"fastest":[5,9],"fe80":2,"featur":[2,5,7,8,9,11],"fedora":2,"feed":[2,7],"feedback":[0,4],"feel":2,"fernet":9,"fetch":10,"few":[2,3,5,6,9,10,11],"fewer":7,"ff":10,"fi":8,"fiber":3,"fibr":11,"field":9,"file":[0,2,3,5,6,7,9,10,11],"file_resourc":0,"file_s":0,"filelist":0,"filelist_data":0,"filelist_receiv":0,"filelist_timeout_job":0,"filenam":0,"filetransf":[2,4,7],"filter":[0,6,9,10],"final":[0,7,9],"find":[2,6,9],"find_spec":0,"firewal":[2,5],"firmwar":[2,3,9,10],"firmware_hash":10,"first":[0,2,5,7,9,10],"fit":0,"five":0,"fix":[4,9],"fixed_mtu":5,"flag":[0,2,7,9],"flash":10,"flexibl":[2,3,5,11],"flight":7,"float":[0,7],"flow":[0,5,6],"flow_control":5,"flush":0,"folder":[0,2],"follow":[0,2,3,5,7,8,9,10,11],"forc":[0,10],"forcibli":[7,10],"foreground":2,"foremost":11,"form":[2,5,6,7,9],"format":[0,4,10,11],"forth":0,"forum":2,"forward":[5,7,9,11],"forward_ip":5,"forward_port":5,"found":[0,2,5,6,9,10],"foundat":11,"four":6,"frame":[0,5],"free":[2,6,8,11],"freedom":9,"freedv":3,"freeli":9,"freq":10,"frequenc":[3,5,9,10],"frequent":5,"friendli":2,"from":[0,2,3,5,6,7,9,10,11],"from_byt":7,"from_fil":7,"from_identity_hash":7,"fromhex":0,"fruit":0,"ftdi_ft230x_basic_uart_43891ckm":10,"full":[0,2,5,7,9,10,11],"full_hash":7,"full_nam":[7,10],"fulli":[0,2,3,5,9,10,11],"funcion":7,"function":[0,2,3,4,5,6,7,8,10,11],"fundament":[3,9],"further":[2,4,5],"futur":[6,7,9],"fw":10,"g":[0,10],"ga":0,"gain":[2,3,7,9],"galact":9,"gatekeep":9,"gatewai":[0,2,5,6,9],"gbp":10,"gener":[0,2,3,5,6,7,9,10,11],"generalis":11,"geograph":6,"get":[0,3,4,5,7,10,11],"get_ag":7,"get_channel":[0,7],"get_config_obj":0,"get_data_s":7,"get_establishment_r":7,"get_expected_r":7,"get_hash":7,"get_inst":7,"get_mdu":7,"get_mod":7,"get_mtu":7,"get_packet_rssi":0,"get_packet_snr":0,"get_part":7,"get_private_kei":7,"get_progress":[0,7],"get_public_kei":7,"get_q":7,"get_random_hash":[0,7],"get_remote_ident":[0,7],"get_request_id":7,"get_respons":7,"get_response_tim":7,"get_rssi":7,"get_rtt":[0,7],"get_seg":7,"get_snr":7,"get_statu":7,"get_transfer_s":7,"geti2p":5,"ghz":9,"gi":0,"gigabyt":11,"git":2,"github":[0,2,8],"give":[5,9,10],"given":[5,6,7,9],"global":[0,2,5,6,7,9,11],"glue":3,"go":[0,2,5,9],"goal":[4,5],"goe":2,"good":[2,3,6,9,10],"got":0,"got_respons":0,"govern":9,"grace":7,"gracefulli":5,"grape":0,"graphic":2,"gratefulli":8,"great":9,"greater":[7,9,11],"greatli":[2,5],"group":[5,7,9],"group_id":5,"groupinstal":2,"grow":6,"growth":4,"guarante":[2,9],"guess":5,"guid":[2,3,9],"gw":5,"h":[2,10],"ha":[0,2,3,5,6,7,9,11],"hack":11,"had":9,"half":[9,11],"hand":0,"handheld":9,"handl":[0,2,3,5,6,7,9,10,11],"handler":[0,7],"happen":[0,2,7,9],"hard":3,"hardcod":2,"hardlin":6,"hardwar":[0,2,4,5,6,7,9,10,11],"has_path":[0,7],"hasattr":0,"hash":[0,2,7,9,10],"hash1":9,"hash2":9,"hash_from_name_and_ident":7,"hashlib":9,"hashmap":0,"have":[0,2,3,5,6,7,9,10],"hazard":7,"hdlc":0,"head":2,"header":[0,7,9],"header_1":9,"header_2":9,"hear":9,"heard":[7,9],"held":[5,10],"helium":0,"hellman":[6,9],"help":[0,2,6,8,9,10,11],"helper":0,"her":6,"here":[0,2,5,9,10],"heterogen":11,"hex":[0,10],"hexadecim":[0,9,10],"hexbyt":10,"hidden":10,"hide":2,"hierarch":11,"high":[3,5,9,11],"higher":[6,11],"highest":7,"highli":9,"hill":6,"hint":0,"hit":0,"hkdf":9,"hmac":[9,11],"hoc":11,"hold":[5,7,9],"home":[6,10],"homebrew":5,"hop":[5,6,7,9,10,11],"hops_to":7,"host":[0,4,5,9,10],"hostnam":5,"hour":[0,5],"how":[0,2,3,5,6,9,10,11],"howev":[2,6,9],"http":[0,2,8],"hub":[2,5],"human":[0,7,8,9],"hundr":2,"hungri":3,"hw_mtu":0,"hwrev":10,"hz":10,"i":[0,2,3,4,5,6,7,8,9,10],"i2p":[2,4,11],"i2p_tunnel":5,"i2pd":[2,5],"i2pinterfac":[2,5],"ia":10,"ic":3,"ic_burst_freq":5,"ic_burst_freq_new":5,"ic_burst_hold":5,"ic_burst_penalti":5,"ic_held_release_interv":5,"ic_max_held_announc":5,"ic_new_tim":5,"id":[5,7,9,10],"id_callsign":5,"id_interv":5,"idea":[2,9,10],"ideal":[2,11],"ident":[0,2,4,7,10,11],"identif":[4,5,11],"identifi":[0,5,7,9,10],"identifyexampl":0,"identity_data":10,"ie":10,"if00":10,"ifac":[0,2,9,10],"ifac_s":5,"ifconf":0,"ifconfig":10,"ignor":[5,7,9],"ignored_devic":5,"illustr":[0,5,6,9],"immedi":[2,5,10],"impact":[5,7,9],"implement":[0,5,6,7,8,9,11],"implic":5,"implicit":[7,9],"import":[0,2,3,5,6,7,8,9,10],"importlib":0,"imposs":9,"improv":[2,4,5,8],"in_fram":0,"in_wait":0,"inactive_for":7,"inbound":[0,5,7],"includ":[0,3,4,5,7,9,11],"incom":[0,5,7,10],"incompat":[7,9],"increas":[5,7,10],"incur":5,"independ":[7,9,11],"index":[0,2,4],"indic":[0,7],"indirectli":9,"individu":[5,7,9,11],"inevit":9,"infer":9,"influx":5,"info":[7,9,10],"inform":[0,2,4,5,6,7,9,10],"infrastructur":[2,3,5,6,9,10],"ingo":7,"ingress":[0,5],"ingress_control":5,"init":2,"initi":[0,5,6,7,9,11],"initialis":[0,7,10],"input":[0,10],"insert":9,"insid":9,"inspect":[2,5,6,9,10],"instal":[0,4,5,6,9,10,11],"instanc":[0,4,5,7,9,10],"instance_control_port":10,"instance_nam":10,"instanti":7,"instead":[0,2,5,7,9,10],"instruct":2,"int":[0,7],"integ":[0,7],"integr":[2,6,9],"intend":[2,5,6,9],"intens":10,"intention":9,"inter":7,"inter_byte_timeout":0,"interact":[0,2,7,9,10],"interchang":5,"interconnect":[4,5,9],"interest":[2,9],"interfac":[3,4,6,7,10],"interface_class":0,"interface_en":10,"interfer":10,"intermediari":[5,7,9],"intermitt":5,"intern":[0,5,7,9],"internet":[4,5,9,11],"interoper":[2,3,6,9,11],"interrupt":5,"interv":[5,7,10],"intiat":0,"introduc":[2,9],"introduct":4,"intuit":11,"invalid":[0,7],"invers":9,"investig":6,"invis":[2,5],"involv":6,"io":3,"ioerror":0,"iot":3,"ip":[2,3,5,9,10,11],"ipv4":5,"ipv6":[2,5,10],"is_compress":7,"is_connected_to_shared_inst":0,"is_open":0,"is_path_respons":7,"is_ready_to_send":[0,7],"isdir":0,"isfil":0,"isinst":0,"island":6,"ism":[3,9],"isol":[2,5,10],"isp":5,"issu":[4,5,6,8],"its":[3,5,7,9],"itself":[4,9],"iv":[9,11],"j":10,"jail":10,"job":0,"join":[0,2,6,8,9],"json":10,"just":[0,2,3,5,6,9,11],"k":[0,10],"kb":10,"kbp":10,"keep":[0,6,7,9,10,11],"keepal":[7,9],"keepalive_timeout_factor":7,"kei":[0,4,6,7,10,11],"kept":[5,6,7,9],"kernel":[5,10,11],"keyboardinterrupt":0,"keyerror":7,"keypair":9,"keyset":11,"keysiz":7,"keystor":6,"khz":5,"ki":0,"kill":[7,9],"kind":[3,5,6,9],"kiss":[3,4,10,11],"kiss_fram":5,"kissinterfac":[5,10],"know":[0,2,3,6,7,9],"knowledg":[6,9],"known":[0,5,7,9,10],"ko":8,"krypton":0,"l":[5,10],"lack":9,"laid":9,"lan":5,"larg":[0,3,5,6,7,9,11],"larger":[6,9,10],"laser":5,"last":[0,5,7],"last_read_m":0,"last_unit":0,"latenc":[2,9,11],"later":[0,2,5,10],"latest":[0,2,5,7,10],"latest_buff":0,"latest_client_link":0,"laucnh":2,"launch":[2,10],"layer":[3,5,6,7,9,10,11],"lead":[2,9],"leak":2,"learn":[0,2,8,9],"least":[3,5,9,10,11],"leav":[2,6,9],"ledger":9,"left":[5,7,9,10],"legaci":6,"legal":5,"legisl":5,"len":0,"length":[0,5,7,9],"less":[0,2,3,5,7,9,11],"let":[0,2,5,6,9,10],"level":[3,5,9,10],"liber":3,"liberapai":8,"libffi":2,"librari":2,"licens":9,"light":10,"lightweight":11,"like":[0,2,3,5,6,7,9,10,11],"limit":[0,2,3,4,6,9],"line":[0,2,4,5,6,9,10,11],"linger":10,"link":[2,3,4,5,6,7,10,11],"link_clos":0,"link_establish":0,"link_id":[0,7],"link_mtu_discoveri":7,"linkexampl":0,"linux":[2,3,5,9],"list":[0,2,3,5,7,9,11],"list_deliv":0,"list_fil":0,"list_packet":0,"list_receipt":0,"list_timeout":0,"listdir":0,"listen":[0,4,9,10],"listen_ip":5,"listen_on":[2,5],"listen_port":5,"littl":[3,9],"live":7,"lki":9,"lkr":9,"ll":[0,2,11],"ln":[2,10],"load":[0,2,3,7,10,11],"load_private_kei":7,"load_public_kei":7,"local":[0,2,5,6,7,9,10,11],"locat":[2,5,6,9,10],"log":[0,2,5,10],"log_crit":0,"log_error":0,"log_info":0,"log_verbos":0,"logdest":7,"loginctl":10,"loglevel":[0,7,10],"long":[0,2,3,5,7,9],"longer":[0,2,6,9,10],"longest":5,"look":[0,2,5,9,10],"loop":0,"lora":[2,3,4,9,11],"lorawan":[3,9],"loss":[5,9],"lot":9,"low":[2,3,5,6,9,11],"lower":[0,2,5,10],"ltu":3,"lunar":4,"lxmf":[2,7,10],"m":[0,2,9,10],"mac":[5,9],"machin":[2,9],"maco":4,"made":[2,7,9],"mai":[2,5,7,9,10],"main":0,"mainli":6,"maintain":[2,9],"mainten":9,"make":[0,2,3,5,8,9,10,11],"malici":9,"manag":[2,4,6,7,9,11],"mani":[0,2,3,5,6,7,9,10,11],"manipul":[9,11],"manjaro":2,"manner":6,"manual":[0,2,5,6,7,9,10],"manufactur":[3,5],"mark":[7,9],"markqvist":[0,2,8],"master":[0,7],"match":[0,5,9,10],"matter":[2,5],"max":10,"maximum":[0,5,7,9,10],"mbp":10,"mdu":[0,7],"mean":[3,5,6,7,9,10],"meantim":7,"measur":9,"mechan":[4,5,11],"medium":[0,3,5,6,7,9,11],"member":6,"memori":[2,9],"mention":[5,9],"menu":0,"menu_mod":0,"mesh":[2,5,6,11],"meshchat":4,"messag":[0,2,7,9,10],"message_class":7,"messagebas":[0,4,7],"messagecallbacktyp":7,"messeng":9,"metadata":[2,9],"metavar":0,"meth":0,"method":[0,2,5,7,9],"methodologi":[9,10],"mhz":[5,9],"mi":0,"microcontrol":9,"might":[2,5,6,9,10],"mikrotik":3,"millimet":3,"millisecond":[0,10],"mind":[6,11],"minim":[3,4,9],"minimalsampl":0,"minimum":[0,5,6,7,9],"minimum_bitr":7,"minut":[0,2,5,9],"mirror":10,"mislead":2,"miss":[0,2],"mix":[2,5,6,10],"mixtur":11,"mobil":[5,9],"mode":[0,2,3,4,7,9,10,11],"model":10,"modem":[4,5,6,7,9,11],"moder":5,"modern":3,"modifi":[5,9,10],"modul":[0,2,3,5,9,10,11],"moment":9,"momentarili":5,"monero":8,"monitor":9,"moon":0,"more":[0,2,3,5,6,7,9,10,11],"most":[2,3,5,6,7,9,10],"mostli":[5,6,9],"motiv":4,"move":[2,5,9,10],"msgtype":[0,7],"mtu":[0,5,7,9,11],"much":[2,5,6,9,10,11],"multi":[4,9,10,11],"multicast":5,"multicast_address_typ":5,"multilater":9,"multipl":[0,5,6,9,10],"multiplex":0,"multipoint":9,"must":[0,2,5,6,7,9,10],"mw":5,"my":9,"my_fil":10,"my_ident":10,"mycal":5,"myriad":9,"n":[0,9,10],"name":[0,2,4,5,6,7],"namespac":0,"nano":2,"narg":0,"nat":2,"nativ":0,"natur":5,"nearbi":5,"nears":9,"neccessari":5,"necesarri":5,"necessari":[2,3,5,6,7,9],"necessarili":9,"need":[0,2,3,4,5,6,7,9,10,11],"neg":2,"neglig":9,"neither":[7,9],"neon":0,"neopixel":10,"net":5,"netcat":5,"network":[0,3,5,7,9,10,11],"network_nam":[2,5],"never":[5,7,9],"new":[0,4,6,7,9,10],"new_id":10,"new_ident":10,"newer":[7,9],"newest":9,"newli":[5,6,7,9],"next":[2,6,7,9],"next_hop":7,"next_hop_interfac":7,"nicknam":9,"no1cll":5,"no_data_for":7,"no_inbound_for":7,"no_outbound_for":7,"noauth":10,"nobl":0,"noble_ga":0,"noble_gas":0,"nocheck":10,"node":[2,4,5,6,10,11],"noid":10,"nois":7,"nomad":4,"nomadnet":2,"non":[2,7,9],"none":[0,2,5,7,9,10],"normal":[0,2,5,7,9,10],"notat":[9,10],"note":[0,3,4,5,7,9,10],"noth":[3,11],"notic":[9,10],"notif":[0,7],"now":[0,2,6,9,10],"np":10,"nrf52":3,"nt":0,"num":0,"number":[0,2,5,6,7,9,10],"o":[0,2,5,9,10,11],"object":[0,7],"obscur":2,"obtain":[3,7,9],"obvious":9,"occasion":2,"occur":[0,5,10,11],"ocur":7,"odd":0,"off":[5,9,10,11],"offer":[2,4,5,7,9],"offlin":[0,2],"often":[2,5,6,9,10],"oganesson":0,"old":[0,3,8,9],"older":10,"omit":7,"on_interfac":7,"onc":[0,2,3,5,6,7,9,10,11],"one":[0,2,3,5,6,7,9,10,11],"ones":[5,10],"oneself":9,"onli":[0,2,3,5,6,7,9,10,11],"onlin":[0,10],"onto":[2,9],"open":[0,2,3,5,6,7,8,9,10,11],"open_port":0,"openmodem":[5,11],"openssl":[2,9],"openwrt":4,"oper":[2,3,5,6,7,9,10,11],"opkg":2,"opposit":[0,5],"opt":9,"optic":[3,11],"optim":6,"option":[0,2,3,4,6,7,9,10],"ord":0,"order":[0,7,10],"organ":6,"organis":[5,6,8],"orient":9,"origin":[0,6,9],"os":2,"other":[0,2,3,5,6,7,9,10],"otherwis":[0,7],"our":[0,9],"out":[0,2,3,5,6,7,9,10,11],"outbound":[7,9],"outgo":[0,5,7,9,10],"outli":6,"outlier":6,"outlin":[2,3,9],"output":[5,10],"outsid":[7,11],"over":[0,3,4,5,7,9,10,11],"overal":9,"overcom":9,"overhead":[2,3,5,9],"overlai":2,"overrid":0,"oversight":9,"overview":[4,5,9],"overwhelm":[5,7],"overwrit":10,"own":[0,2,6,7,9,10,11],"owner":0,"p":[0,10],"pack":[0,7],"packag":[0,2,5,9],"packb":0,"packed_s":0,"packet":[0,2,4,5,6,7,10,11],"packet_callback":0,"packet_deliv":0,"packet_hash":0,"packet_receipt":[0,7],"packet_timed_out":0,"packetreceipt":[0,4,7],"pad":[9,11],"page":[2,4,9],"pair":[5,7,9,10],"pamac":2,"panic":[0,10],"panic_on_interface_error":[0,10],"paper":2,"par":[0,2],"parallel":2,"param":0,"paramet":[0,3,5,6,7,9,10],"pariti":[0,5,10],"parity_even":0,"parity_non":0,"parity_odd":0,"pars":0,"parse_arg":0,"parser":0,"part":[0,5,6,7,9,10],"particip":[4,6,9],"particular":[0,3,5,9],"pass":[0,3,5,6,7,9,10],"passphras":[2,5,9],"path":[0,2,3,5,7,9,10],"path_respons":7,"pathfinder_m":7,"pattern":[3,9],"payload":[0,7,9,10],"pdf":4,"peach":0,"peer":[0,2,5,7,9,10],"penalti":5,"pend":[0,9],"peopl":[2,9],"per":[5,7,9,10,11],"percent":[0,5],"percentag":7,"perfectli":2,"perform":[0,2,5,6,7,9,10],"period":[0,5,7,9],"perman":[5,10],"permissionless":9,"persecut":9,"persist":[5,10],"person":[5,9],"perspect":[5,7,9,11],"pet":0,"philosophi":9,"phy":10,"physic":[0,2,3,5,7,9,10,11],"pi":[0,4,6,9,10,11],"pick":9,"piec":9,"ping":[2,10],"pip":[0,2,3,10],"pip3":2,"pipe":[2,4,11],"pipeinterfac":[3,5],"pipx":2,"pitfal":9,"pkcs7":[9,11],"pkg":2,"place":[0,2,5,6,9,10],"plaform":3,"plain":[0,3,5,7,9],"plain_mdu":7,"plaintext":[0,7],"plan":[6,9],"planetari":11,"platform":[0,3,4,9,10],"pleas":[0,2,5,7,10,11],"plenti":9,"plug":10,"pmr":9,"point":[2,3,5,6,9,10],"pointer":2,"pomelo":0,"poorli":6,"popul":7,"popular":11,"port":[0,2,3,4,5,6,9,11],"port0":10,"portabl":[5,9],"pose":[2,9],"posit":[0,10],"posix":2,"possess":9,"possibl":[2,3,5,6,7,9,10,11],"possibli":[2,9],"post":0,"postfix":10,"potenti":[0,2,5,8,9,10,11],"power":[2,3,5,9,10,11],"powershel":2,"ppp":0,"practic":[2,9,11],"pre":[2,7,9],"preambl":[5,10],"preced":0,"precompil":2,"predict":9,"prefer":[2,9],"prefer_ipv6":5,"prepar":[0,6],"prerequisit":7,"presenc":7,"present":5,"preserv":[2,7],"preshar":9,"press":0,"pretend":9,"pretti":9,"prettyhexrep":0,"previou":0,"previous":[5,6,7,9],"primari":9,"primarili":5,"primit":[2,4],"principl":[9,11],"print":[0,5,10],"print_filelist":0,"print_help":0,"print_menu":0,"priorit":9,"prioriti":9,"prioritis":[4,5,6,7],"privaci":11,"privat":[2,5,7,8,9,10,11],"private_ret":2,"privileg":10,"probabl":[0,2,6,9,10,11],"probe":10,"problem":[2,9],"proc":10,"procedur":[2,7,9],"process":[0,2,3,5,7,9],"process_incom":0,"process_outgo":0,"product":10,"program":[0,3,4,5,7,9,11],"program_setup":0,"programm":9,"programmat":9,"progress":[0,7,10,11],"progress_callback":7,"project":2,"prompt":[0,2],"proof":[0,7,9,10],"proof_packet":0,"proof_requested_callback":7,"proof_strategi":7,"propag":[4,5,7],"proper":2,"properti":[0,6,7],"proport":9,"propos":2,"protocol":[2,3,4,5,11],"prove":[0,9],"prove_al":[0,7],"prove_app":7,"prove_non":7,"proven":[7,9],"provid":[0,2,3,4,5,6,7,9,11],"provis":[3,10],"prv_byte":7,"pseudo":10,"pub_byt":7,"public":[0,4,5,7,10],"public_inform":0,"publicli":[2,5],"pull":2,"purchas":[2,6,9,11],"pure":[4,9],"purg":7,"purpos":[2,3,5,7,9,10],"put":[0,3,5,10],"py":[0,2,9,10],"py3":2,"pyca":[2,9],"pyseri":[0,2],"python":[0,4,7,9,10,11],"python3":[0,2,3],"q":[0,10],"qr":2,"qualiti":7,"queri":[0,2,7,10],"question":[2,3,5],"queu":[7,10],"queue":[5,9],"quickli":[8,9,11],"quiet":[5,10],"quinc":0,"quirk":2,"quit":[0,2],"r":[0,5,9,10],"radio":[4,5,6,7,9,10,11],"radon":0,"rais":[0,7],"rak":3,"ram":[2,5],"randint":0,"random":[0,7,9],"random_text_gener":0,"randomis":9,"randomli":[0,9],"rang":[0,2,3,5,6,9,10,11],"rapidli":5,"rare":[2,5],"raspberri":[4,6,9,10,11],"rasperri":2,"ratchet":[7,9],"ratchet_count":7,"ratchet_expiri":7,"ratchet_id_receiv":7,"ratchet_interv":7,"ratchets":7,"ratchets_path":7,"rate":[0,4,7,10],"rather":[2,7],"ratio":7,"raw":[0,3,7],"rawchannelread":[4,7],"rawchannelwrit":[4,7],"rawiobas":7,"rb":0,"re":[0,5,7,9],"reach":[2,4,5,6],"reachabl":[0,2,5,6,7,9,10],"read":[0,2,5,7,9,10],"read_loop":0,"readabl":[0,7,9],"reader":[0,7],"readi":[0,2,3,5,6,7,11],"readili":11,"ready_byt":[0,7],"ready_callback":7,"real":[3,6,11],"realiti":8,"realli":[5,7],"reappear":5,"reason":[2,5,9],"reassembl":9,"reboot":2,"recal":[0,7,10],"recall_app_data":7,"recap":9,"receipt":[0,7,9],"receiv":[0,2,5,7,9,10],"receive_path_respons":7,"receive_stream_id":7,"received_announc":[0,7],"recent":[7,9],"recept":7,"reception_rssi":0,"reception_snr":0,"reception_stat":0,"recip":2,"recipi":9,"recommend":[0,2,5,9],"recondit":10,"reconnect":0,"reconnect_port":0,"reconstruct":9,"record":[2,9],"recoveri":5,"recreat":9,"recurs":[7,9],"redund":2,"refer":[0,2,4],"regard":9,"regist":[0,7],"register_announce_handl":[0,7],"register_message_typ":[0,7],"register_request_handl":[0,7],"regul":5,"regular":10,"rel":[3,5,9],"relai":2,"relat":2,"releas":[2,5,7,9],"relev":[0,3,5,7,9,10],"reli":[8,9],"reliabl":[3,5,6,7,9,11],"reload":10,"rem":0,"remain":[5,7,9],"rememb":[7,9],"remot":[0,4,7],"remote_ident":[0,7],"remote_identifi":0,"remote_management_allow":10,"remote_management_en":7,"remote_p":0,"remotesensor":9,"remov":[7,10],"remove_message_handl":7,"remove_ready_callback":7,"render":2,"repeat":2,"replac":[0,2,7,9,10],"repli":[0,10],"replic":[3,9],"reply_data":0,"reply_messag":0,"reply_text":0,"report":[5,7,8,10],"repositori":[2,8,9],"repres":9,"represent":[0,7],"request":[2,4,5,7,9,10,11],"request_destin":0,"request_fail":0,"request_id":[0,7],"request_packet":0,"request_path":[0,7],"request_receipt":[0,7],"request_receiv":0,"requested_at":[0,7],"requestexampl":0,"requestor":5,"requestreceipt":[4,7],"requir":[0,2,5,6,7,9,10,11],"require_shared_inst":7,"research":11,"resend":7,"reserv":[0,7],"resid":5,"resili":11,"resolut":2,"resolv":[4,5,9,10],"resourc":[0,2,4,5,7,8],"resource_callback":7,"resource_sending_conclud":0,"resource_strategi":7,"respawn":5,"respawn_delai":5,"respawn_interv":5,"respect":[5,11],"respond":[0,7,10],"respond_to_prob":10,"respons":[4,5,7,9,11],"response_callback":[0,7],"response_gener":[0,7],"rest":[6,11],"restart":10,"restartsec":10,"restor":[2,5],"restrict":[6,10],"result":[0,5,9,10],"retain":[5,7],"retained_ratchet":7,"reticulum":[0,5,6,7],"retransmiss":9,"retransmit":[5,9],"retri":[0,7,9],"retriev":7,"return":[0,7,10],"reveal":[2,7,9,11],"revers":10,"review":[9,11],"revis":10,"rfe":10,"ridicul":9,"right":[5,6],"risc":4,"risk":9,"rn":[0,2,3,7,9,10],"rncp":4,"rnid":4,"rnode":[2,4,9,10,11],"rnodeconf":[3,4],"rnodef3b9":5,"rnodeinterfac":[3,5,10],"rnodemultiinterfac":5,"rnpath":[2,4,5],"rnprobe":[2,4],"rns_bin_dir":10,"rnsd":[2,4],"rnsh":[2,10],"rnspure":[2,9],"rnstatu":[2,4,5,9],"rnstransport":10,"rnx":4,"roadmap":8,"roam":5,"robot":9,"roll":5,"rom":10,"rotat":[7,9,10],"round":[0,7,10],"rout":[2,3,5,6,7,9,10,11],"router":[5,10],"rpc":10,"rpc_kei":10,"rprogress":0,"rssi":[0,7,10],"rtsct":0,"rtt":[0,7,9],"rttstring":0,"rule":[2,4,5],"run":[0,2,3,5,6,7,9,10,11],"runtim":[0,9],"rust":2,"rx":[5,10],"rxb":0,"safe":9,"sai":2,"said":9,"same":[0,2,3,5,6,7,9,10],"satisfi":9,"save":[7,9,10],"save_error":0,"saved_filenam":0,"scalabl":11,"scale":[9,11],"scan":5,"scenario":[2,4,9],"schedul":7,"scheme":3,"scope":5,"scratch":3,"screen":0,"script":[2,3],"scrutini":9,"seamlessli":5,"search":[4,7],"second":[0,5,7,9,10,11],"secreci":[7,9,11],"section":[2,3,5,6,9,10],"secur":[2,9,11],"see":[0,2,5,6,7,9,10,11],"seek":9,"seen":[5,9],"segment":[0,5,6,7,9,11],"select":[0,5],"self":[0,6,11],"semtech":3,"send":[0,5,7,9,10],"send_stream_id":7,"sender":[0,2,6,9,10],"sensibl":[2,3,5],"sensor":9,"sent":[0,2,7,9,10],"sentiment":9,"separ":[0,2,5,6,9,10],"sequenc":[0,7,9,11],"sequenti":11,"seri":3,"serial":[0,2,4,9,11],"serialinterfac":[3,5],"serv":[0,3,5,6,9,10],"serve_path":0,"server":[0,2,3,4,7,10],"server_buffer_readi":0,"server_callback":0,"server_client_connect":0,"server_destin":0,"server_fil":0,"server_ident":0,"server_link":0,"server_loop":0,"server_message_receiv":0,"server_packet_receiv":0,"servic":[2,4,6],"session":[2,9],"set":[0,2,3,5,6,7,9,10,11],"set_default_app_data":7,"set_delivery_callback":[0,7],"set_link_closed_callback":[0,7],"set_link_established_callback":[0,7],"set_packet_callback":[0,7],"set_proof_requested_callback":7,"set_proof_strategi":[0,7],"set_ratchet_interv":7,"set_remote_identified_callback":[0,7],"set_resource_callback":7,"set_resource_concluded_callback":[0,7],"set_resource_started_callback":[0,7],"set_resource_strategi":[0,7],"set_retained_ratchet":7,"set_timeout":[0,7],"set_timeout_callback":[0,7],"setup":[0,2,4,5,10],"sever":[2,6,7,10],"sf":10,"sha":[7,9],"sha256":[9,11],"shall":9,"share":[0,2,6,7,9,10],"share_inst":10,"shared_instance_port":10,"shared_instance_typ":[7,10],"she":6,"shelf":[9,11],"shell":[4,10],"ship":2,"shop":0,"short":[3,5,9,10],"shorter":5,"shorthand":[5,10],"shot":2,"should":[0,2,5,6,7,9,10,11],"should_ingress_limit":0,"should_quit":0,"should_use_implicit_proof":7,"show":[2,10],"shown":0,"side":[5,11],"sideband":4,"sight":6,"sign":[7,9,10],"signal":[0,7,9],"signatur":[7,9,10,11],"significantli":[5,7],"silent":10,"similar":[0,2,3,5,6,7,10,11],"simpl":[0,3,7,9,10,11],"simpler":[5,11],"simplest":[5,9],"simpli":[0,2,3,5,6,9,10],"simplic":9,"simplifi":0,"simplyequip":3,"simultan":[2,9],"sinc":[0,2,5,6,7,9],"singl":[0,5,7,9,10,11],"singular":9,"site":[4,5],"situat":[2,3,5,6,9],"size":[0,2,5,7,9,10],"size_str":0,"skip":0,"sleep":[0,10],"slice":0,"slightli":[0,2],"slottim":[5,10],"slow":[0,5,9],"slower":[5,7,9],"small":[0,2,5,6,7,9,11],"smaller":7,"snippet":2,"snr":[0,7,10],"so":[0,2,3,5,6,7,8,9,10,11],"socket":[5,10,11],"softwar":[2,3,5,9],"solut":[2,9,10],"solv":9,"some":[0,2,3,5,6,7,9,10],"someon":[2,5],"someth":9,"somethign":0,"sometim":[3,5],"somewhat":2,"soon":7,"sort":[5,9,10],"soundmodem":5,"sourc":[0,2,3,6,9,11],"sovereignti":11,"space":[0,2,3,6,9,11],"spam":5,"span":[5,9],"spawn":5,"spe":5,"spec":9,"special":[9,10],"specif":[0,3,4,5,7,10],"specifi":[0,2,3,5,6,7,9,10],"spectrum":[5,9],"speed":[0,5,7,9,10],"split":0,"sponsor":[8,11],"spread":[5,10],"spreadingfactor":5,"squelch":5,"ssh":2,"ssid":5,"stabl":[9,11],"stack":[0,2,6,7,9,10,11],"stage":9,"stai":[0,9,10],"stale":7,"stale_grac":7,"stale_tim":7,"standalon":4,"standard":[3,9],"start":[0,3,4,5,7,9,10],"startup":[0,2,10],"stat":[7,10],"state":0,"static":7,"staticmethod":0,"station":5,"stationari":[6,10],"statist":[0,5,7,8],"statu":[0,2,4,5,7,9,10],"stderr":10,"stdin":[5,10],"stdio":11,"stdout":[0,5,10],"step":[0,2,3],"still":[0,2,5,6,9,10],"stock":0,"stop":[7,11],"stopbit":[0,5,10],"storag":2,"store":[0,7,9,10],"store_tru":0,"str":0,"straightforward":5,"strategi":[5,7],"stream":[0,7,9],"stream_id":[0,7],"strength":[7,11],"strictli":[5,9],"string":[0,7],"stringmessag":0,"strong":9,"struct":0,"structur":[0,7,9,11],"sub":[0,5],"subclass":[0,7],"subinterfac":5,"subject":[2,11],"submit":2,"subnet":[2,6],"subsequ":[0,9],"subset":5,"subsid":5,"succe":2,"succeed":[0,7],"successful":7,"successfulli":[0,7,9],"sudo":[2,10],"suffic":9,"suffici":[2,5,9,10],"suffix":0,"suggest":8,"suit":[2,3,9,10],"suitabl":[0,2,5,6,9,11],"super":0,"suppli":[0,5,6,7,9,11],"supplier":2,"support":[0,2,4,5,6,7,9,10,11],"sure":[0,2,3,10],"surveil":9,"surviv":9,"switch":[3,5,9,10],"sx1262":3,"sx1268":3,"sx1276":3,"sx1278":3,"sx1280":3,"sy":0,"symlink":[2,10],"symmetr":[7,9],"system":[0,2,3,4,5,6,7,8,9,11],"systemctl":10,"systemd":10,"t":[0,2,5,6,7,9,10],"tabl":[2,5,6,9,10],"tag":7,"tail":5,"tailor":9,"take":[0,2,5,9,10,11],"taken":[0,9],"tangerin":0,"tap":3,"target":[0,5,10],"target_hash":7,"target_host":[2,5],"target_port":[2,5],"task":10,"tcp":[2,3,4,6,9,10,11],"tcpclientinterfac":[2,3,5],"tcpinterfac":10,"tcpserverinterfac":[2,5],"tdata":0,"teach":10,"teardown":[0,7],"teardown_reason":0,"teffect":0,"telemetri":8,"tell":[0,5],"temperatur":9,"temporari":5,"temporarili":5,"ten":9,"tend":5,"term":[5,6,9],"termin":[0,2,7],"terminologi":[6,9],"termux":2,"test":[2,9,10],"testnet":[4,10],"text":[0,2,6,9],"tfile":0,"tgz":10,"than":[0,2,5,6,7,9,10,11],"thei":[0,2,5,6,7,9,10],"them":[0,2,3,5,6,8,9,10,11],"themselv":5,"thereaft":9,"therefor":[2,9,11],"thi":[0,2,3,4,5,6,7,9,10,11],"thing":[0,2],"think":[2,3],"thorough":11,"those":[6,9],"though":[2,5,9],"thousand":[2,5,9],"thread":0,"three":[2,6,9],"threshold":5,"throough":5,"throttl":6,"through":[0,2,3,5,6,7,9,10,11],"throughout":9,"throughput":[7,9,11],"thrown":7,"thu":[6,7,9],"ti":[0,9],"time":[0,2,3,5,6,7,9,10],"time_since_last":0,"timeout":[0,7,10],"timeoutarg":0,"timestamp":[0,9],"timestr":0,"tion":5,"tnc":[3,5,7,10,11],"to_fil":7,"todai":9,"togeth":[3,9,10],"token":[7,9,11],"toler":5,"too":[0,6],"tool":[2,3,9,10,11],"top":[6,9],"topic":9,"topographi":[2,6,9],"topologi":[5,9,11],"torn":7,"total":[7,9,11],"total_s":0,"touch":11,"toward":[0,5,9],"track":7,"track_phy_stat":7,"trade":9,"tradit":[6,9],"traffic":[0,2,5,6,7,9,10],"transceiv":[2,3,5,9,11],"transfer":[0,7,9,10,11],"transfer_s":0,"transform":11,"transmiss":[2,5,7,9],"transmit":[0,5,9],"transpar":[3,5,9,10],"transport":[0,2,4,5,6,7,10,11],"transport_en":7,"travers":[7,9],"treat":9,"tri":0,"trip":[0,7,10],"trivial":[9,11],"true":[0,2,5,7,10],"truli":[3,9],"truncat":[7,9,10],"truncated_hash":7,"truncated_hashlength":[0,7],"trust":[9,10],"trustless":[6,9,11],"try":[0,4,5,7],"ttime":0,"ttransfer":0,"ttyacm0":5,"ttyusb0":[0,5,10],"ttyusb1":5,"ttyusb2":5,"tun":[3,5],"tun0":5,"tunnel":[5,9,11],"tupl":7,"turn":[0,5,10],"turnaround":5,"tutori":2,"two":[0,3,5,6,7,9],"tx":[5,10],"txb":0,"txp":10,"txpower":5,"txt":10,"txtail":[5,10],"type":[0,2,4,5,6,7,10],"typeerror":7,"u":[8,9,10],"ubiqu":3,"ubuntu":[4,10],"uci":2,"udp":[4,6,9,10,11],"udpinterfac":5,"uhf":[10,11],"ultim":9,"umsgpack":0,"uncencrypt":0,"uncensor":2,"under":[7,8,10,11],"underli":[0,5,6,7,9,11],"understand":[2,4,7,10],"underwai":2,"unencrypt":[0,7,9],"unequivoc":9,"unexplor":6,"unforg":11,"unfortun":2,"unidentifi":0,"unidirect":0,"unifi":6,"uninterest":0,"uniqu":[0,5,7,9,10,11],"unit":[0,2,7,10],"unknown":[0,5,7,9,10],"unless":[0,2,5,7,9],"unlicens":9,"unlik":9,"unlock":10,"unorganis":6,"unpack":[0,7],"unpackb":0,"unplug":10,"unrecover":[0,10],"unreli":5,"unset":9,"unsupport":7,"until":[0,2,5,7],"unus":10,"unwant":9,"up":[0,2,3,5,6,7,9,10,11],"updat":[0,2,7,9,10],"upgrad":[2,7,9],"upkeep":5,"upon":[0,5,9],"upset":0,"urandom":[9,11],"url":10,"us":[0,3,4,5,6,7,9],"usabl":[5,9],"usag":[2,4,5,7,8,10],"usb":[3,6,9,10],"useabl":9,"user":[0,2,5,6,9,10,11],"user_input":0,"userland":11,"usernameher":10,"usr":10,"usual":2,"utf":0,"util":[0,3,4,5,9],"utilis":[0,2,5,6,7,9,10,11],"v":[4,10],"valid":[0,5,7,9,10],"valu":[0,5,7,9,10],"valuabl":[3,8],"valueerror":[0,7],"vari":[2,5,9,10],"variabl":[0,2,7],"varieti":[5,9,10,11],"variou":[0,2,5,6,9,10,11],"vast":9,"ve":2,"vehicl":5,"vendor":[0,3,11],"verbos":[7,10],"veri":[2,3,5,6,7,8,9,10,11],"verif":[7,9,10],"verifi":[0,2,7,9,10,11],"versa":[6,11],"version":[0,2,7,9,10],"vhf":[6,9,11],"via":[2,3,5,8,9,10,11],"vice":[6,11],"view":[2,5,9,10],"violat":5,"virtual":[2,3,5,6,9,10,11],"visibl":0,"volunt":2,"vport":5,"vvv":2,"w":10,"wa":[0,3,5,6,7,9,10,11],"wai":[0,2,5,6,7,9,10],"wait":[0,5,9,10],"want":[0,2,5,6,9,10,11],"wantedbi":10,"warn":10,"warrant":11,"wast":5,"wave":3,"wb":0,"we":[0,2,3,5,8,9],"weaken":9,"websit":[2,5],"weight":10,"weird":2,"welcom":2,"well":[2,3,5,6,7,9,10,11],"went":0,"were":[0,6],"what":[0,2,4,5,7,9],"whatev":[7,9],"wheel":2,"when":[0,2,3,5,6,7,9,10],"whenev":[0,7,9],"where":[2,3,4,5,6,7,9,10],"whereupon":9,"whether":[0,2,5,7,9],"which":[0,2,5,6,7,9,10],"while":[0,2,3,5,6,7,9,11],"whl":2,"who":[2,5,9],"whole":10,"wide":[2,3,5,9,10,11],"wider":[2,5,9,10],"wifi":[2,4,5,6,9,10,11],"wiki":2,"wildcard":0,"willing":6,"window":[4,5],"wipe":10,"wire":[2,3,4,5,11],"wireless":[3,6],"wirelessli":5,"wish":[0,9,10],"within":[0,2,5,6,7,9],"without":[0,2,3,5,6,9,10,11],"wlan0":5,"wolf":3,"won":0,"word":2,"work":[2,3,5,6,9,10,11],"world":[3,5,6,11],"worri":6,"worth":2,"would":[2,5,6,7,9],"write":[0,2,3,5,7,9,10],"write_timeout":0,"writer":[0,7],"written":[0,9,11],"wrong":[0,5],"wrote":[0,5],"x":[7,9,10],"x25519":[9,11],"xenon":0,"xonxoff":0,"y":0,"ye":[2,5,9,10],"year":9,"yet":[0,5,9,11],"yggdrasil":5,"yi":0,"you":[0,2,3,4,5,6,7,8,9,10,11],"your":[0,2,3,4,5,6,7,8,9,11],"yourself":[2,9,11],"z":0,"zero":[7,11],"zi":0,"zshrc":2},"titles":["Code Examples","An Explanation of Reticulum for Human Beings","Getting Started Fast","Communications Hardware","Reticulum Network Stack Manual","Configuring Interfaces","Building Networks","API Reference","Support Reticulum","Understanding Reticulum","Using Reticulum on Your System","What is Reticulum?"],"titleterms":{"0":3,"1":3,"25":5,"Beings":1,"Of":4,"The":[9,10],"With":2,"access":9,"ad":2,"an":1,"android":2,"announc":[0,5,9],"api":7,"arm64":2,"auto":5,"ax":5,"backbon":5,"base":[2,3],"basic":9,"beam":3,"board":3,"bookworm":2,"bridg":6,"broadcast":0,"buffer":0,"build":6,"can":11,"caveat":11,"channel":0,"client":5,"code":[0,8,9],"combin":3,"common":5,"commun":3,"concept":6,"configur":[5,10],"connect":[2,5],"content":4,"contribut":8,"control":5,"converg":6,"creat":[2,3],"cryptograph":9,"current":11,"custom":[0,2,5],"data":10,"debian":2,"deck":3,"depend":2,"destin":[5,9],"detail":9,"develop":2,"devic":[3,11],"doe":11,"donat":8,"echo":[0,3],"emptor":11,"entrypoint":2,"establish":9,"ethernet":3,"exampl":[0,6],"explan":1,"fast":2,"feedback":8,"filetransf":0,"fix":10,"format":9,"function":9,"further":9,"get":[2,9],"goal":9,"growth":6,"hardwar":3,"heltec":3,"host":2,"human":1,"i":11,"i2p":5,"ident":9,"identif":0,"improv":10,"includ":[2,10],"indic":4,"instal":[2,3],"instanc":2,"interconnect":6,"interfac":[0,2,5,9,11],"internet":[2,6],"introduct":9,"issu":2,"kei":9,"kiss":5,"lilygo":3,"limit":5,"line":3,"link":[0,9],"listen":5,"lora":[5,6],"lora32":3,"lunar":2,"maco":2,"manag":10,"manual":4,"mechan":9,"meshchat":2,"minim":0,"mode":5,"modem":3,"motiv":9,"multi":5,"name":[9,10],"network":[2,4,6],"new":5,"node":9,"nomad":2,"note":2,"offer":11,"opencom":3,"openwrt":2,"option":5,"over":[2,6],"overview":6,"packet":[3,9],"particip":2,"pi":2,"pipe":5,"platform":2,"port":10,"primit":9,"prioritis":9,"program":[2,10],"propag":9,"protocol":9,"provid":8,"public":[2,9],"pure":2,"python":2,"radio":[2,3],"rak4631":3,"raspberri":2,"rate":5,"reach":9,"refer":[7,9],"remot":[2,5,10],"request":0,"resolv":2,"resourc":9,"respons":0,"reticulum":[1,2,3,4,8,9,10,11],"risc":2,"rncp":10,"rnid":10,"rnode":[3,5],"rnodeconf":10,"rnpath":10,"rnprobe":10,"rnsd":10,"rnstatu":10,"rnx":10,"rule":9,"scenario":6,"serial":[3,5,10],"server":5,"servic":10,"setup":9,"shell":2,"sideband":2,"site":6,"specif":[2,9],"stack":4,"standalon":2,"start":2,"statu":11,"support":[3,8],"suprem":3,"system":10,"systemwid":10,"t":3,"t114":3,"t3s3":3,"tabl":4,"tcp":5,"testnet":2,"transport":9,"try":2,"type":[3,9,11],"ubuntu":2,"udp":5,"understand":9,"unsign":3,"us":[2,10,11],"usag":3,"userspac":10,"util":[2,10],"v":2,"v1":3,"v2":3,"v3":3,"v4":3,"what":11,"where":11,"wifi":3,"window":2,"wire":9,"x":3,"xl":3,"your":10}}) \ No newline at end of file diff --git a/docs/software.html b/docs/software.html new file mode 100644 index 0000000..df1da07 --- /dev/null +++ b/docs/software.html @@ -0,0 +1,1361 @@ + + + + + + + + + + + + + + + Programs Using Reticulum - Reticulum Network Stack 1.1.3 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Programs Using Reticulum +

+

+ This chapter provides a non-exhaustive list of notable programs, systems + and application-layer protocols that have been built using Reticulum. +

+

+ These programs will let you get a feel for how Reticulum works. Most of + them have been designed to run well even over slow networks based on + LoRa or packet radio, but all can also be used over fast links, such as + 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 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 radio interfaces can then + be added later. +

+
+

+ Programs & Utilities +

+

+ Many different applications using Reticulum already exist, serving a + wide variety of purposes from day-to-day communication and information + sharing to systems administration and tackling advanced networking and + communications challenges. +

+

+ Development of Reticulum-based applications and systems is ongoing, so + consider this list a non-exhaustive starting point of some of + the options available. With a bit of searching, primarily over + Reticulum itself, you will find many more interesting things. +

+
+

+ Remote Shell +

+

+ The + rnsh + program lets you establish fully interactive remote shell sessions + over Reticulum. It also allows you to pipe any program to or from a + remote system, and is similar to how + ssh + works. The + rnsh + program is very efficient, and can facilitate fully interactive + shell sessions, even over extremely low-bandwidth links, such as + LoRa or packet radio. +

+

+ In addition to the default, fully interactive terminal mode, for + extremely limited links, + rnsh + offers line-interactive mode, allowing you to interact with remote + systems, even when link throughput is counted in a few hundreds of + bits per second. +

+
+
+

+ Nomad Network +

+

+ The terminal-based program + Nomad Network + provides a complete encrypted communications suite built with + Reticulum. It features encrypted messaging (both direct and + delayed-delivery for offline users), file sharing, and has a + built-in text-browser and page server with support for dynamically + rendered pages, user authentication and more. +

+ _images/nomadnet_3.png + +

+ Nomad Network + is a user-facing client for the messaging and information-sharing + protocol LXMF. +

+
+
+

+ RNS Page Node +

+

+ RNS Page Node + is a simple way to serve pages and files to any other Nomad Network + compatible client. Drop-in replacement for NomadNet nodes that + primarily serve pages and files. +

+
+
+

+ Retipedia +

+

+ You can host the entirity of Wikipedia (or any + .zim) file to other Nomad Network clients using + Retipedia. +

+
+
+

+ Sideband +

+

+ If you would rather use an LXMF client with a graphical user + interface, you can take a look at + Sideband, which is available for Android, Linux, macOS and Windows. + Sideband is an advanced LXMF and LXST client, and a multi-purpose + Reticulum utility, with features and functionality targeted at + advanced users. +

+ _images/sideband_devices.webp + +

+ Sideband allows you to communicate with other people or + LXMF-compatible systems over Reticulum networks using LoRa, Packet + Radio, WiFi, I2P, Encrypted QR Paper Messages, or anything else + Reticulum supports. +

+

+ It also interoperates with all other LXMF clients, and provides + advanced features such as voice messaging, real-time voice calls, + file attachments, private telemetry sharing, and a full plugin + system for expandability. +

+
+
+

+ MeshChatX +

+

+ A + Reticulum MeshChat fork from the future, with the goal of providing everything you need for Reticulum, + LXMF, and LXST in one beautiful and feature-rich application. This + project is separate from the original Reticulum MeshChat project, + and is not affiliated with the original project. +

+ _images/meshchatx.webp + +

+ Features include full LXST support, custom voicemail, phonebook, + contact sharing, and ringtone support, multi-identity handling, + modern UI/UX, offline documentation, expanded tools, page archiving, + integrated maps and improved application security. +

+
+
+

+ MeshChat +

+

+ The + Reticulum MeshChat + application is a user-friendly LXMF client for Linux, macOS and + Windows, that also includes a Nomad Network page browser and other + interesting functionality. +

+ _images/meshchat_1.webp + +

+ Reticulum MeshChat is of course also compatible with Sideband and + Nomad Network, or any other LXMF client. +

+
+
+

+ Columba +

+

+ Columba + is a simple and familiar LXMF messaging app Android, built with a + native Android interface and Material Design 3. +

+ _images/columba.webp + +

+ While still in early and very active development, it is of course + also compatible with all other LXMF clients, and allows you to + message seamlessly with anyone else using LXMF. +

+
+
+

+ Reticulum Relay Chat +

+

+ Reticulum Relay Chat + is a live chat system built on top of the Reticulum Network Stack. + It exists to let people talk to each other in real time over + Reticulum without dragging in message databases, synchronization + engines, or architectural commitments they did not ask for. +

+

+ The + rrcd + program provides a functional, reference RRC hub-server daemon + implementation. RRC user clients include + rrc-gui + and + rrc-web. +

+

+ RRC is closer in spirit to IRC than to modern “everything + platforms.” You connect, you join a room, you talk, and then you + leave. If you were present, you saw the conversation. If you were + not, the conversation did not wait for you. This is not an accident. + This is the entire design. +

+
+
+

+ RetiBBS +

+

+ RetiBBS + is a bulletin board system implementation for Reticulum networks. +

+ _images/retibbs.webp + +

+ RetiBBS allows users to communicate through message boards in a + secure manner. +

+
+
+

+ RBrowser +

+

+ The + rBrowser + program is a cross-platoform, standalone, web-based browser for + exploring NomadNetwork Nodes over Reticulum Network. It + automatically discovers NomadNet nodes through network announces and + provides a user-friendly interface for browsing distributed content + with Micron markup support. +

+ _images/rbrowser.webp + +

+ Includes useful features like automatic listening for announce, + adding nodes to favorites, browsing and rendering any kind of + NomadNet links, downloading files from remote nodes, a unique local + NomadNet Search Engine and more. +

+
+
+

+ Reticulum Network Telephone +

+

+ The + rnphone + program, included as part of the + LXST + package is a command-line Reticulum telephone utility and daemon, + that allows building physical, hardware telephones for LXST and + Reticulum, as well as simply performing calls via the command line. +

+ _images/rnphone.webp + +

+ It supports interfacing directly with hardware peripherals such as + GPIO keypads and LCD displays, providing a modular system for + building secure hardware telephones. +

+
+
+

+ LXST Phone +

+

+ The + LXST Phone + program is a cross-platform desktop application for performing LXST + voice calls over Reticulum. +

+ _images/lxst_phone.webp + +

+ It supports various advanced features such as SAS verification, peer + blocking, rate limiting, encrypted call history storage and contact + management. +

+
+
+

+ LXMFy +

+

+ LXMFy + is a comprehensive and advanced bot creation framework for LXMF, + that allows building any kind of automation or bot system running + over LXMF and Reticulum. + Bot implementations exist + for Home Assistant control, LLM integrations, and various other + purposes. +

+
+
+

+ LXMF Interactive Client +

+

+ LXMF Interactive Client + is a feature-rich, terminal-based LXMF messaging client with many + advanced features and an extensible plugin architecture. +

+
+
+

+ RNS FileSync +

+

+ The + RNS FileSync + program enables automatic file synchronization between devices + without requiring central servers, internet connectivity, or cloud + services. It works over any network medium supported by Reticulum, + including radio, LoRa, WiFi, or the internet, making it ideal for + off-grid, privacy-focused, and resilient file sharing. +

+
+
+

+ Micron Parser JS +

+

+ Micron Parser JS + is the JavaScript-based parser for the Micron markup language, that + most web-based Nomad Network browsers use. If you want to make + utilities or tools that display Micron pages, this library is + essential. +

+
+
+

+ RNMon +

+

+ RNMon + is a monitoring daemon designed to monitor the status of multiple + RNS applications and push the metrics to an InfluxDB instance over + the influx line protocol. +

+
+
+
+

+ Protocols +

+

+ A number of standard protocols have emerged through real-world usage + and testing in the Reticulum community. While you may sometimes want + to use completely custom protocols and implementations when writing + Reticulum-based software, using these protocols provides application + developers with an easy way to implement advanced functionality + quickly and effortlessly. Using them also ensures compatibility and + interoperability between many different client applications, creating + an open communications ecosystem where users are free to choose the + applications that suit their needs, while remaining connected to + everyone else. +

+
+

+ LXMF +

+

+ LXMF + is a simple and flexible messaging format and delivery protocol that + allows a wide variety of applications, while using as little + bandwidth as possible. It offers zero-conf message routing, + end-to-end encryption and Forward Secrecy, and can be transported + over any kind of medium that Reticulum supports. +

+

+ LXMF is efficient enough that it can deliver messages over extremely + low-bandwidth systems such as packet radio or LoRa. Encrypted LXMF + messages can also be encoded as QR-codes or text-based URIs, + allowing completely analog paper message transport. +

+

+ Using Propagation Nodes, LXMF also offer a way to store and forward + messages to users or endpoints that are not directly reachable at + the time of message emission. +

+
+
+

+ LXST +

+

+ LXST + is a simple and flexible real-time streaming format and delivery + protocol that allows a wide variety of applications, while using as + little bandwidth as possible. It is built on top of Reticulum and + offers zero-conf stream routing, end-to-end encryption and Forward + Secrecy, and can be transported over any kind of medium that + Reticulum supports. It currently powers real-time voice and + telephony applications over Reticulum. +

+
+
+

+ RRC +

+

+ The + Reticulum Relay Chat + protocol, is a live chat system built on top of the Reticulum + Network Stack. It exists to provide near real-time group + communication without dragging in message history databases, + federation machinery, or architectural guilt. +

+

+ RRC is intentionally simple. It does not pretend to be email, a + mailbox, or a distributed archive. It behaves more like a + conversation in a room. If you were there, you heard it. If you were + not, you did not. That is not a bug, that is the point. +

+
+
+
+

+ Interface Modules & Connectivity Resources +

+

+ This section provides a list of various community-provided interface + modules, guides and resources for creating Reticulum networks over + special or challenging mediums. +

+ +
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/support.html b/docs/support.html new file mode 100644 index 0000000..82e33b9 --- /dev/null +++ b/docs/support.html @@ -0,0 +1,532 @@ + + + + + + + + + + + + + + + Support Reticulum - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Support Reticulum +

+

+ You can help support the continued development of open, free and private + communications systems by donating, providing feedback and contributing code and + learning resources. +

+
+

+ Donations +

+

Donations are gratefully accepted via the following channels:

+
+
+
Monero:
+84FpY1QbxHcgdseePYNmhTHcrgMX4nFfBYtz2GKYToqHVVhJp8Eaw1Z1EedRnKD19b3B8NiLCGVxzKV17UMmmeEsCrPyA5w
+
+Bitcoin:
+bc1pgqgu8h8xvj4jtafslq396v7ju7hkgymyrzyqft4llfslz5vp99psqfk3a6
+
+Ethereum:
+0x91C421DdfB8a30a49A71d63447ddb54cEBe3465E
+
+Liberapay:
+https://liberapay.com/Reticulum/
+
+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. +

+
+
+

+ Provide Feedback +

+

+ 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 + improvement of Reticulum. +

+

+ Absolutely no automated analytics, telemetry, error reporting or statistics is + collected and reported by Reticulum under any circumstances, so we rely on + old-fashioned human feedback. +

+
+
+

+ Contribute Code +

+

+ Join us on + the GitHub repository + to report issues, suggest functionality and contribute code to Reticulum. +

+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/understanding.html b/docs/understanding.html new file mode 100644 index 0000000..254dd3e --- /dev/null +++ b/docs/understanding.html @@ -0,0 +1,2283 @@ + + + + + + + + + + + + + + + Understanding Reticulum - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Understanding Reticulum +

+

+ 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 develop networked applications using Reticulum. +

+

+ This chapter is not an exhaustive source of information on Reticulum, at least not + yet. Currently, the only complete repository, and final authority on how Reticulum + actually functions, is the Python reference implementation and API reference. That + being said, this chapter is an essential resource in understanding how Reticulum + works from a high-level perspective, along with the general principles of + Reticulum, and how to apply them when creating your own networks or software. +

+

+ After reading this document, you should be well-equipped to understand how a + Reticulum network operates, what it can achieve, and how you can use it yourself. + If you want to help out with 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 approaches those + solutions. +

+
+ +

+ Motivation +

+

+ 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 belief that it is highly desirable to create a + reliable and efficient way to set up long-range digital communication networks + that can securely allow exchange of information between people and machines, + with no central point of authority, control, censorship or barrier to entry. +

+

+ Almost all of the various networking systems in use today share a common + limitation: They require large amounts of coordination and centralised trust and + power to function. To join such networks, you need approval of gatekeepers in + control. This need for coordination and trust inevitably leads to an environment + of central control, where it’s very easy for infrastructure operators or + governments to control or alter traffic, and censor or persecute unwanted + actors. It also makes it completely impossible to freely deploy and use networks + at will, like one would use other common tools that enhance individual agency + and freedom. +

+

+ Reticulum aims to require as little coordination and trust as possible. It aims + to make secure, anonymous and permissionless networking and information exchange + a tool that anyone can just pick up and use. +

+

+ Since Reticulum is completely medium agnostic, it can be used to build networks + on whatever is best suited to the situation, or whatever you have available. In + some cases, this might be packet radio links over VHF frequencies, in other + cases it might be a 2.4 GHz network using off-the-shelf radios, or it might be + using common LoRa development boards. +

+

+ At the time of release of this document, the fastest and easiest setup for + development and testing is using LoRa radio modules with an open source firmware + (see the section + Reference Setup), connected to any kind of computer or mobile device that Reticulum can run + on. +

+

+ The ultimate aim 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, interconnectable and autonomous networks. Reticulum + is not one network, it is a tool to + build 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. +

+
+
+ +

+ Goals +

+

+ To be as widely usable and efficient to deploy as possible, the following goals + have been used to guide the design of Reticulum: +

+
    +
  • +
    +
    Fully useable as open source software stack
    +
    +

    + Reticulum must be implemented with, and be able to run using only open + source software. This is critical to ensuring the availability, security + and transparency of the system. +

    +
    +
    +
  • +
  • +
    +
    Hardware layer agnosticism
    +
    +

    + 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, 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 it can be easily modified and replicated by anyone + interested in doing so. +

    +
    +
    +
  • +
  • +
    +
    Very low bandwidth requirements
    +
    +

    + Reticulum should be able to function reliably over links with a + transmission capacity as low as 5 bits per second. +

    +
    +
    +
  • +
  • +
    +
    Encryption by default
    +
    +

    + Reticulum must use strong encryption by default for all communication. +

    +
    +
    +
  • +
  • +
    +
    Initiator Anonymity
    +
    +

    + It must be possible to communicate over a Reticulum network without + revealing any identifying information about oneself. +

    +
    +
    +
  • +
  • +
    +
    Unlicensed use
    +
    +

    + Reticulum shall be functional over physical communication mediums that + do not require any form of license to use. Reticulum must be designed in + a way, so it is usable over ISM radio frequency bands, and can provide + functional long distance links in such conditions, for example by + connecting a modem to a PMR or CB radio, or by using LoRa or WiFi + modules. +

    +
    +
    +
  • +
  • +
    +
    Supplied software
    +
    +

    + In addition to the core networking stack and API, that allows a + developer to build applications with Reticulum, a basic set of + Reticulum-based communication tools must be implemented and released + along with Reticulum itself. These shall serve both as a functional, + basic communication suite, and as an example and learning resource to + others wishing to build applications with Reticulum. +

    +
    +
    +
  • +
  • +
    +
    Ease of use
    +
    +

    + The reference implementation of Reticulum is written in Python, to make + it easy to use and understand. A programmer with only basic experience + should be able to use Reticulum to write networked applications. +

    +
    +
    +
  • +
  • +
    +
    Low cost
    +
    +

    + It shall be as cheap as possible to deploy a communication system based + on Reticulum. This should be achieved by using cheap off-the-shelf + hardware that potential users might already own. The cost of setting up + a functioning node should be less than $100 even if all parts needs to + be purchased. +

    +
    +
    +
  • +
+
+
+ +

+ Introduction & Basic Functionality +

+

+ Reticulum is a networking stack suited for high-latency, low-bandwidth links. + Reticulum is at its core a message oriented system. It is suited for + both local point-to-point or point-to-multipoint 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. +

+

+ Reticulum does away with the idea of addresses and ports known from IP, TCP and + UDP. Instead Reticulum uses the singular concept of destinations. Any + application using Reticulum as its networking stack will need to create one or + more destinations to receive data, and know the destinations it needs to send + data to. +

+

+ 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 will be + displayed as 16 hexadecimal bytes, like this example: + <13425ec15b621c1d928589718000d814>. +

+

+ The truncation size of 16 bytes (128 bits) for destinations has been chosen as a + reasonable trade-off between address space 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 + 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 bits, ensuring the Reticulum address space could + potentially support galactic-scale networks. This is obviously complete and + ridiculous over-allocation, and as such, the current 128 bits should be + sufficient, even far into the future. +

+

+ By default Reticulum encrypts all data using elliptic curve cryptography and + AES. Any packet sent to a 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 + Initiator Anonymity. Links additionally offer + Forward Secrecy by default, employing an Elliptic Curve Diffie Hellman + key exchange on Curve25519 to derive per-link ephemeral keys. Asymmetric, + link-less packet communication can also provide forward secrecy, with automatic + key ratcheting, by enabling ratchets on a per-destination basis. The multi-hop + transport, 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 unencrypted packets (for local broadcast purposes + only). +

+

+ 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 private IP networks. +

+
+ +

+ Destinations +

+

+ 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: +

+
    +
  • +
    +
    Single
    +
    +

    + The single destination type is the most common type in + Reticulum, and should be used for most purposes. It is always + identified by a unique public key. Any data sent to this destination + will be encrypted using ephemeral keys derived from an ECDH key + exchange, and will only be readable by the creator of the destination, + who holds the corresponding private key. +

    +
    +
    +
  • +
  • +
    +
    Plain
    +
    +

    + 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. Generally, plain destinations can be used for + broadcast information intended to be public. 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 + must be encrypted, since Reticulum uses the per-packet + encryption to verify routing paths and keep them alive. +

    +
    +
    +
  • +
  • +
    +
    Group
    +
    +

    + The group special destination type, that defines a + symmetrically encrypted virtual destination. Data sent to this + destination will be encrypted with a symmetric key, and will be + readable by anyone in possession of the key, but as with the + plain destination type, packets to this type of destination + are not currently transported over multiple hops, although a planned + upgrade to Reticulum will allow globally reachable + group destinations. +

    +
    +
    +
  • +
  • +
    +
    Link
    +
    +

    + A link is a special destination type, that serves as an + abstract channel to a single destination, directly connected + or over multiple hops. The link also offers reliability and + more efficient encryption, forward secrecy, initiator anonymity, and + as such can be useful even when a node is directly reachable. It also + offers a more capable API and allows easily carrying out requests and + responses, large data transfers and more. +

    +
    +
    +
  • +
+
+ +

+ Destination Naming +

+

+ Destinations are created and named in an easy to understand dotted notation + of aspects, and 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. The + next levels of aspects can be defined in any way by the creator of the + application. +

+

+ Aspects can be as long and as plentiful as required, and a resulting long + destination name will not impact efficiency, as names are always represented + as truncated SHA-256 hashes on the network. +

+

+ As an example, a destination for a environmental monitoring application + could be made up of the application name, a device type and measurement + type, like this: +

+
+
+
app name  : environmentlogger
+aspects   : remotesensor, temperature
+
+full name : environmentlogger.remotesensor.temperature
+hash      : 4faf1b2e0a077e6a9d92fa051f256038
+
+
+
+

+ For the single destination, Reticulum will automatically append the + associated public key as a destination aspect before hashing. This is done + to ensure only the correct destination is reached, since anyone can listen + to any destination name. Appending the public key ensures that a given + packet is only directed at the destination that holds the corresponding + private key to decrypt the packet. +

+

+ Take note! There is a very important concept to understand + here: +

+
    +
  • +

    + Anyone can use the destination name + environmentlogger.remotesensor.temperature +

    +
  • +
  • +

    + Each destination that does so will still have a unique destination hash, + and thus be uniquely addressable, because their public keys will differ. +

    +
  • +
+

+ 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 is represented. The + uniquely identifying aspect is always achieved by appending the public key, + 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 knowing its 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 + structure Reticulum programs and makes it possible to filter what + information and data your program receives. +

+

+ To recap, the different destination types should be used in the following + situations: +

+
    +
  • +
    +
    Single
    +
    +

    + When private communication between two endpoints is needed. Supports + multiple hops. +

    +
    +
    +
  • +
  • +
    +
    Group
    +
    +

    + When private communication between two or more endpoints is needed. + Supports multiple hops indirectly, but must first be established + through a single destination. +

    +
    +
    +
  • +
  • +
    +
    Plain
    +
    +

    + When plain-text communication is desirable, for example when + broadcasting information, or for local discovery purposes. +

    +
    +
    +
  • +
+

+ To communicate with a single destination, you need to know its + public key. Any method for obtaining the public key is valid, but Reticulum + includes a simple mechanism for making other nodes aware of your + destinations public key, called the announce. It is also possible + to request an unknown public key from the network, as all transport + instances serve as a distributed ledger of public keys. +

+

+ Note that public key information can be shared and verified in other ways + than using the built-in announce functionality, and that it is + therefore not required to use the announce and + path request 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. +

+
+
+
+ +

+ Public Key Announcements +

+

+ An announce 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, application specific data. The entire + packet is signed by the sender to ensure authenticity. It is not required to + use the announce functionality, but in many cases it will be the simplest way + to share public keys on the network. The announce mechanism also serves to + establish end-to-end connectivity to the announced destination, as the + announce propagates through the network. +

+

+ As an example, an announce in a simple messenger application might contain the + following information: +

+
    +
  • The announcers destination hash

  • +
  • The announcers public key

  • +
  • +

    + Application specific data, in this case the users nickname and + availability status +

    +
  • +
  • A random blob, making each new announce unique

  • +
  • +

    An Ed25519 signature of the above information, verifying authenticity

    +
  • +
+

+ With this information, any Reticulum node that receives it will be able to + reconstruct an outgoing destination to securely communicate with that + destination. You might have noticed that there is one piece of information + lacking to reconstruct full knowledge of the announced destination, and that + is the aspect names of the destination. These are intentionally left out to + save bandwidth, since they will be implicit in almost all cases. The receiving + application will already know them. If a destination name is not entirely + implicit, information can be included in the application specific data part + that will allow the receiver to infer the naming. +

+

+ It is important to note that announces will be forwarded throughout the + network according to a certain pattern. This will be detailed in the section + The Announce Mechanism in Detail. +

+

+ In Reticulum, destinations are allowed to move around the network at will. + This is very different from protocols such as IP, where an address is always + expected to stay within the network segment it was assigned in. This + limitation does not exist in Reticulum, and any destination is + completely portable over the entire topography of the network, and + can even be moved to other Reticulum networks than the one it was + created in, and still become reachable. To update its 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. +

+

+ Seeing how single destinations are always tied to a private/public + key pair leads us to the next topic. +

+
+
+ +

+ Identities +

+

+ In Reticulum, an identity does not necessarily represent a personal + identity, but is an abstraction that can represent any kind of + verifiable entity. 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 general, any kind of agent that can act, or be + acted upon, or store or manipulate information, can be represented as an + identity. An identity can be used to create any number of + destinations. +

+

+ A single destination will always have an identity tied to + it, but not plain or group destinations. Destinations and + identities share a multilateral connection. You can create a destination, and + if it is not connected to an identity upon creation, it will just create a new + one to use automatically. This may be desirable in some situations, but often + you will probably want to create the identity first, and then use it to create + new destinations. +

+

+ As an example, we could use an identity to represent the user of a messaging + application. Destinations can then be created by this identity to allow + communication to reach the user. 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 obtaining access + and controlling reachability to any destinations created by that identity. +

+
+
+ +

+ Getting Further +

+

+ 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 nodes can directly hear each + other. But to be truly useful, we need a way to direct traffic over multiple + hops in the network. +

+

+ In the following sections, two concepts that allow this will be introduced, + paths and links. +

+
+
+
+ +

+ Reticulum Transport +

+

+ 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, + and often needs a lot more bandwidth than Reticulum can assume is available. + Since Reticulum is designed to survive running over open radio spectrum, no such + trust can be assumed, and bandwidth is often very limited. +

+

+ To overcome such challenges, Reticulum’s Transport system uses + asymmetric elliptic curve cryptography to implement the concept of + paths that allow discovery of how to get information closer to a + certain 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 know the most direct way to get a + packet one hop closer to it’s destination. +

+
+ +

+ Node Types +

+

+ Currently, Reticulum distinguishes between two types of network nodes. All + nodes on a Reticulum network 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. +

+

+ 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 network will help forward traffic, and + what nodes rely on other nodes for wider connectivity. +

+

+ If a node is an Instance it should be given the configuration + directive + enable_transport = + No, which is the default setting. +

+

+ If it is a Transport Node, it should be given the configuration + directive + enable_transport = + Yes. +

+
+
+ +

+ The Announce Mechanism in Detail +

+

+ When an announce for a destination is transmitted by a Reticulum + instance, it will be forwarded by any transport node receiving it, but + according to some specific rules: +

+
    +
  • +
    +
    + If this exact announce has already been received before, ignore it. +
    +
    +
  • +
  • +
    +
    + If not, record into a table which Transport Node the announce was + received from, and how many times in total it has been retransmitted to + get here. +
    +
    +
  • +
  • +
    +
    + If the announce has been retransmitted m+1 times, it will not + be forwarded any more. By default, m is set to 128. +
    +
    +
  • +
  • +
    +
    + After a randomised delay, the announce will be retransmitted on all + interfaces that have bandwidth available for processing announces. By + default, the maximum bandwidth allocation for processing announces is + set at 2%, but can be configured on a per-interface basis. +
    +
    +
  • +
  • +
    +
    + If any given interface does not have enough bandwidth available for + retransmitting the announce, the announce will be assigned a priority + inversely proportional to its hop count, and be inserted into a queue + managed by the interface. +
    +
    +
  • +
  • +
    +
    + When the interface has bandwidth available for processing an announce, + it will prioritise announces for destinations that are closest in terms + of hops, thus prioritising reachability and connectivity of local nodes, + even on slow networks that connect to wider and faster networks. +
    +
    +
  • +
  • +
    +
    + After the announce has been re-transmitted, and if no other nodes are + heard retransmitting the announce with a greater hop count than when it + left this node, transmitting it will be retried r times. By + default, r is set to 1. +
    +
    +
  • +
  • +
    +
    + If a newer announce from the same destination arrives, while an + identical one is already waiting to be transmitted, the newest announce + is discarded. If the newest announce contains different application + specific data, it will replace the old announce. +
    +
    +
  • +
+

+ Once an announce has reached a transport node in the network, any other node + in direct contact with that transport node will be able to reach the + destination the announce originated from, simply by sending a packet addressed + to that destination. Any transport node with knowledge of the announce will be + able to direct the packet towards the destination by looking up the most + efficient next node to the destination. +

+

+ According to these rules, an announce will propagate throughout the network in + a predictable way, and make the announced destination reachable in a short + amount of time. Fast networks that have the capacity to process many announces + can reach full convergence very quickly, even when constantly adding new + destinations. Slower segments of such networks might take a bit longer to gain + full knowledge about the wide and fast networks they are connected to, but can + still do so over time, while prioritising full and quickly converging + end-to-end connectivity for their local, slower segments. +

+
+

Tip

+

+ Even very slow networks, that simply don’t have the capacity to ever reach + full convergence will generally still be able to reach + any other destination on any connected segments, since + interconnecting transport nodes will prioritize announces into the slower + segments that are actually requested by nodes on these. +

+

+ This means that slow, low-capacity or low-resource segments + don’t need to have full network knowledge, since paths can + always be recursively resolved from other segments that do have knowledge + about them. +

+
+

+ 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 the required amount of announces. +

+
+
+ +

+ Reaching the Destination +

+

+ In networks with changing topology and trustless connectivity, nodes need a + way to establish verified connectivity with each other. Since the + underlying network mediums are assumed to be trustless, Reticulum must provide + a way to guarantee that the peer you are communicating with is actually who + you expect. Reticulum offers two ways to do this. +

+

+ For exchanges of small amounts of information, Reticulum offers the + Packet API, which works exactly like you would expect - on a per + packet level. The following process is employed when sending a packet: +

+
    +
  • +
    +
    + A packet is always created with an associated destination and some + payload data. When the packet is sent to a single destination + type, Reticulum will automatically create an ephemeral encryption key, + perform an ECDH key exchange with the destination’s public key (or + ratchet key, if available), and encrypt the information. +
    +
    +
  • +
  • +
    +
    + It is important to note that this key exchange does not require any + network traffic. The sender already knows the public key of the + destination from an earlier received announce, and can thus perform the + ECDH key exchange locally, before sending the packet. +
    +
    +
  • +
  • +
    +
    + The public part of the newly generated ephemeral key-pair is included + with the encrypted token, and sent along with the encrypted payload data + in the packet. +
    +
    +
  • +
  • +
    +
    + When the destination receives the packet, it can itself perform an ECDH + key exchange and decrypt the packet. +
    +
    +
  • +
  • +
    +
    + A new ephemeral key is used for every packet sent in this way. +
    +
    +
  • +
  • +
    +
    + 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, and signing this hash with its Ed25519 signing key. Transport + nodes in the network can then direct this proof back to the + packets origin, where the signature can be verified against the + destination’s known public signing key. +
    +
    +
  • +
  • +
    +
    + In case the packet is addressed to a group destination type, + the packet will be encrypted with the pre-shared AES-256 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 can offer 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. +
    +
    +
  • +
+

+ For exchanges of larger amounts of data, or when longer sessions of + bidirectional communication is desired, Reticulum offers the + Link API. To establish a link, the following process is + employed: +

+
    +
  • +
    +
    + First, the node that wishes to establish a link will send out a + link request packet, that traverses the network and locates the + desired destination. Along the way, the Transport Nodes that forward the + packet will take note of this link request, and mark it as + pending. +
    +
    +
  • +
  • +
    +
    + Second, if the destination accepts the link request , it will + send back a packet that proves the authenticity of its identity (and the + receipt of the link request) to the initiating node. All nodes that + initially forwarded the packet will also be able to verify this proof, + and thus accept the validity of the link throughout the + network. The link is now marked as established. +
    +
    +
  • +
  • +
    +
    + When the validity of the link has been accepted by forwarding + nodes, these nodes will remember the link , and it can + subsequently be used by referring to a hash representing it. +
    +
    +
  • +
  • +
    +
    + As a part of the link request, an Elliptic Curve Diffie-Hellman + key exchange takes place, that sets up an efficiently encrypted tunnel + between the two nodes. As such, this mode of communication is preferred, + even for situations when nodes can directly communicate, when the amount + of data to be exchanged numbers in the tens of packets, or whenever the + use of the more advanced API functions is desired. +
    +
    +
  • +
  • +
    +
    + When a link has been set up, it automatically provides message + receipt functionality, through the same proof mechanism + discussed before, so the sending node can obtain verified confirmation + that the information reached the intended recipient. +
    +
    +
  • +
  • +
    +
    + Once the link has been set up, the initiator can remain + anonymous, or choose to authenticate towards 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. +
    +
    +
  • +
+

+ In a moment, we will discuss the details of how this methodology is + implemented, but let’s first recap what purposes this methodology serves. We + first ensure that the node answering our request is actually the one we want + to communicate with, and not a malicious actor pretending to be so. At the + same time we establish an efficient encrypted channel. The setup of this is + relatively cheap in terms of bandwidth, so it can be used just for a short + 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 297 + bytes (more info in the + Binary Packet Format + 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 radio channel, 100 concurrent links will still leave 96% channel + capacity for actual data. +

+ +
+
+ +

+ Resources +

+

+ For exchanging small amounts of data over a Reticulum network, the + Packet + interface is sufficient, but for exchanging data that would require many + packets, an efficient way to coordinate the transfer is needed. +

+

+ This is the purpose of the Reticulum + Resource. A Resource can automatically handle the reliable transfer of an + arbitrary amount of data over an established + Link. Resources can auto-compress data, will handle breaking the data into + individual packets, sequencing the transfer, integrity verification and + reassembling the data on the other end. +

+

+ Resources + 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, or stream data directly from files. +

+
+
+
+ +

+ Reference Setup +

+

+ This section will detail a recommended Reference Setup for Reticulum. + It is important to 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 minimum requirements. +

+

+ The communication channel must support at least half-duplex operation, and + provide an average throughput of 5 bits per second or greater, and supports a + physical layer MTU of 500 bytes. The Reticulum stack should be able to run on + more or less any hardware that can provide a Python 3.x runtime environment. +

+

+ That being said, this reference setup has been outlined to provide a common + platform for anyone who wants to help in the development of Reticulum, and for + everyone who wants to know a recommended setup to get started experimenting. A + reference system consists of three parts: +

+
    +
  • +
    +
    An Interface Device
    +
    +

    + Which provides access to the physical medium whereupon the communication + takes place, for example a radio with an integrated modem. A setup with + a separate modem connected to a radio would also be an interface device. +

    +
    +
    +
  • +
  • +
    +
    A Host Device
    +
    +

    + Some sort of computing device that can run the necessary software, + communicate with the interface device, and provide user interaction. +

    +
    +
    +
  • +
  • +
    +
    A Software Stack
    +
    +

    + The software implementing the Reticulum protocol and applications using + it. +

    +
    +
    +
  • +
+

+ The reference setup can be considered a relatively stable platform to develop + on, and also to start building networks or applications on. While details of the + implementation might change at the current stage of development, it is the goal + to maintain hardware compatibility for as long as entirely possible, and the + current reference setup has been determined to provide a functional platform for + many years into the future. The current Reference System Setup is as follows: +

+
    +
  • +
    +
    Interface Device
    +
    +

    + A data radio consisting of a LoRa radio module, and a microcontroller + with open source firmware, that can connect to host devices via USB. It + operates in either the 430, 868 or 900 MHz frequency bands. More details + can be found on the + RNode Page. +

    +
    +
    +
  • +
  • +
    +
    Host Device
    +
    +

    + Any computer device running Linux and Python. A Raspberry Pi with a + Debian based OS is a good place to start, but anything can be used. +

    +
    +
    +
  • +
  • +
    +
    Software Stack
    +
    +

    + The most recently released Python Implementation of Reticulum, running + on a Linux-based operating system. +

    +
    +
    +
  • +
+
+

Note

+

+ To avoid confusion, it is very important to note, that the reference interface + device does not use the LoRaWAN standard, but uses a custom + MAC layer on top of the plain LoRa modulation! As such, you will need a plain + LoRa radio module connected to a controller with the correct firmware. Full + details on how to get or make such a device is available on the + RNode Page. +

+
+

+ With the current reference setup, it should be possible to get on a Reticulum + network for around 100$ even if you have none of the hardware already, and need + to purchase everything. +

+

+ 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. +

+
+
+ +

+ Protocol Specifics +

+

+ 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 treated more as a reference than as + essential reading. +

+
+

+ Packet Prioritisation +

+

+ Currently, Reticulum is completely priority-agnostic regarding + general traffic. All traffic is handled on a first-come, first-serve + basis. Announce re-transmission and other maintenance traffic is handled + according to the re-transmission times and priorities described earlier in + this chapter. +

+
+
+

+ Interface Access Codes +

+

+ 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 + Common Interface Options + section. To implement this feature, Reticulum uses the concept of Interface + Access Codes, that are calculated and verified per-packet. +

+

+ An interface with a named virtual network or passphrase authentication enabled + will derive a shared Ed25519 signing identity, and for every outbound packet + generate a signature of the entire packet. This signature is then inserted + into the packet as an Interface Access Code before transmission. Depending on + the speed and capabilities of the interface, the IFAC can be the full 512-bit + Ed25519 signature, or a truncated version. Configured IFAC length can be + inspected for all interfaces with the + rnstatus + utility. +

+

+ 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 pass onto + the network. +

+
+
+ +

+ Wire Format +

+
+
+
== Reticulum Wire Format ======
+
+A Reticulum packet is composed of the following fields:
+
+[HEADER 2 bytes] [ADDRESSES 16/32 bytes] [CONTEXT 1 byte] [DATA 0-465 bytes]
+
+* The HEADER field is 2 bytes long.
+  * Byte 1: [IFAC Flag], [Header Type], [Context Flag], [Propagation Type],
+            [Destination Type] and [Packet Type]
+  * Byte 2: Number of hops
+
+* Interface Access Code field if the IFAC flag was set.
+  * The length of the Interface Access Code can vary from
+    1 to 64 bytes according to physical interface
+    capabilities and configuration.
+
+* The ADDRESSES field contains either 1 or 2 addresses.
+  * Each address is 16 bytes long.
+  * The Header Type flag in the HEADER field determines
+    whether the ADDRESSES field contains 1 or 2 addresses.
+  * Addresses are SHA-256 hashes truncated to 16 bytes.
+
+* The CONTEXT field is 1 byte.
+  * It is used by Reticulum to determine packet context.
+
+* The DATA field is between 0 and 465 bytes.
+  * It contains the packets data payload.
+
+IFAC Flag
+-----------------
+open             0  Packet for publically accessible interface
+authenticated    1  Interface authentication is included in packet
+
+
+Header Types
+-----------------
+type 1           0  Two byte header, one 16 byte address field
+type 2           1  Two byte header, two 16 byte address fields
+
+
+Context Flag
+-----------------
+unset            0  The context flag is used for various types
+set              1  of signalling, depending on packet context
+
+
+Propagation Types
+-----------------
+broadcast        0
+transport        1
+
+
+Destination Types
+-----------------
+single          00
+group           01
+plain           10
+link            11
+
+
+Packet Types
+-----------------
+data            00
+announce        01
+link request    10
+proof           11
+
+
++- Packet Example -+
+
+   HEADER FIELD           DESTINATION FIELDS            CONTEXT FIELD  DATA FIELD
+ _______|_______   ________________|________________   ________|______   __|_
+|               | |                                 | |               | |    |
+01010000 00000100 [HASH1, 16 bytes] [HASH2, 16 bytes] [CONTEXT, 1 byte] [DATA]
+|| | | |    |
+|| | | |    +-- Hops             = 4
+|| | | +------- Packet Type      = DATA
+|| | +--------- Destination Type = SINGLE
+|| +----------- Propagation Type = TRANSPORT
+|+------------- Header Type      = HEADER_2 (two byte header, two address fields)
++-------------- Access Codes     = DISABLED
+
+
++- Packet Example -+
+
+   HEADER FIELD   DESTINATION FIELD   CONTEXT FIELD  DATA FIELD
+ _______|_______   _______|_______   ________|______   __|_
+|               | |               | |               | |    |
+00000000 00000111 [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
+|| | | |    |
+|| | | |    +-- Hops             = 7
+|| | | +------- Packet Type      = DATA
+|| | +--------- Destination Type = SINGLE
+|| +----------- Propagation Type = BROADCAST
+|+------------- Header Type      = HEADER_1 (two byte header, one address field)
++-------------- Access Codes     = DISABLED
+
+
++- Packet Example -+
+
+   HEADER FIELD     IFAC FIELD    DESTINATION FIELD   CONTEXT FIELD  DATA FIELD
+ _______|_______   ______|______   _______|_______   ________|______   __|_
+|               | |             | |               | |               | |    |
+10000000 00000111 [IFAC, N bytes] [HASH1, 16 bytes] [CONTEXT, 1 byte] [DATA]
+|| | | |    |
+|| | | |    +-- Hops             = 7
+|| | | +------- Packet Type      = DATA
+|| | +--------- Destination Type = SINGLE
+|| +----------- Propagation Type = BROADCAST
+|+------------- Header Type      = HEADER_1 (two byte header, one address field)
++-------------- Access Codes     = ENABLED
+
+
+Size examples of different packet types
+---------------------------------------
+
+The following table lists example sizes of various
+packet types. The size listed are the complete on-
+wire size counting all fields including headers,
+but excluding any interface access codes.
+
+- Path Request    :    51  bytes
+- Announce        :    167 bytes
+- Link Request    :    83  bytes
+- Link Proof      :    115 bytes
+- Link RTT packet :    99  bytes
+- Link keepalive  :    20  bytes
+
+
+
+
+
+ +

+ Announce Propagation Rules +

+

+ The following table illustrates the rules for automatically propagating + announces from one interface type to another, for all possible combinations. + For the purpose of announce propagation, the Full and + Gateway modes are identical. +

+ _images/if_mode_graph_b.png +

+ See the + Interface Modes + section for a conceptual overview of the different interface modes, and how + they are configured. +

+
+
+ +

+ Cryptographic Primitives +

+

+ Reticulum uses a simple suite of efficient, strong and well-tested + cryptographic primitives, with widely available implementations that can be + used both on general-purpose CPUs and on microcontrollers. +

+

+ One of the primary considerations for choosing this particular set of + primitives is that they can be implemented safely with relatively few + pitfalls, on practically all current computing platforms. +

+

+ The primitives listed here are authoritative. Anything + claiming to be Reticulum, but not using these exact primitives + is not Reticulum, and possibly an intentionally compromised + or weakened clone. The utilised primitives are: +

+
    +
  • Ed25519 for signatures

  • +
  • X25519 for ECDH key exchanges

  • +
  • HKDF for key derivation

  • +
  • +

    Encrypted tokens are based on the Fernet spec

    +
      +
    • +

      Ephemeral keys derived from an ECDH key exchange on Curve25519

      +
    • +
    • AES-256 in CBC mode with PKCS7 padding

    • +
    • HMAC using SHA256 for message authentication

    • +
    • +

      + IVs must be generated through + os.urandom() + or better +

      +
    • +
    • No Fernet version and timestamp metadata fields

    • +
    +
  • +
  • SHA-256

  • +
  • SHA-512

  • +
+

+ In the default installation configuration, the + X25519, + Ed25519 + and + AES-256-CBC + primitives are provided by + OpenSSL (via + the + PyCA/cryptography + package). The hashing functions + SHA-256 + and + SHA-512 + are provided by the standard Python + hashlib. The + HKDF, + HMAC, + Token + primitives, and the + PKCS7 + padding function are always provided by the following internal + implementations: +

+
    +
  • +

    + RNS/Cryptography/HKDF.py +

    +
  • +
  • +

    + RNS/Cryptography/HMAC.py +

    +
  • +
  • +

    + RNS/Cryptography/Token.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. +

+

+ Using the normal RNS installation procedures, it is not possible to install + Reticulum on a system without the required OpenSSL primitives being available, + and if they are not, they will be resolved and installed as a dependency. It + is only possible to use the pure-python primitives by manually specifying + this, for example by using the + rnspure + package. +

+
+

Warning

+

+ 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. +

+
+
+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/using.html b/docs/using.html new file mode 100644 index 0000000..e6d2558 --- /dev/null +++ b/docs/using.html @@ -0,0 +1,1922 @@ + + + + + + + + + + + + + + + Using Reticulum on Your System - Reticulum Network Stack 1.0.5 documentation + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Using Reticulum on Your System +

+

+ 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, containing + the networking core, and a set of utility and daemon programs. +

+

+ 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. +

+

+ 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 + Reticulum, it is loaded, initialised, interfaces are brought up, and the program + can now communicate over any Reticulum networks available. If another program + starts up and also wants access to the same Reticulum network, the already 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 are + other options. +

+
+

+ Configuration & Data +

+

+ Reticulum stores all information that it needs to function in a single + file-system directory. When Reticulum is started, it will look for a valid + configuration directory in the following places: +

+
    +
  • +

    + /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 + 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 + running on the same system will automatically share the same Reticulum instance, + if the configuration allows for it, which it does by default. +

+

+ The entire configuration of Reticulum is found in the + ~/.reticulum/config + 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: +

+
+
+
# This is the default Reticulum config file.
+# You should probably edit it to include any additional,
+# interfaces and settings you might need.
+
+# Only the most basic options are included in this default
+# configuration. To see a more verbose, and much longer,
+# configuration example, you can run the command:
+# rnsd --exampleconfig
+
+
+[reticulum]
+
+# If you enable Transport, your system will route traffic
+# for other peers, pass announces and serve path requests.
+# This should be done for systems that are suited to act
+# as transport nodes, ie. if they are stationary and
+# always-on. This directive is optional and can be removed
+# for brevity.
+
+enable_transport = No
+
+
+# By default, the first program to launch the Reticulum
+# Network Stack will create a shared instance, that other
+# programs can communicate with. Only the shared instance
+# opens all the configured interfaces directly, and other
+# local programs communicate with the shared instance over
+# a local socket. This is completely transparent to the
+# user, and should generally be turned on. This directive
+# is optional and can be removed for brevity.
+
+share_instance = Yes
+
+
+# If you want to run multiple *different* shared instances
+# on the same system, you will need to specify different
+# instance names for each. On platforms supporting domain
+# sockets, this can be done with the instance_name option:
+
+instance_name = default
+
+# Some platforms don't support domain sockets, and if that
+# is the case, you can isolate different instances by
+# specifying a unique set of ports for each:
+
+# shared_instance_port = 37428
+# instance_control_port = 37429
+
+
+# If you want to explicitly use TCP for shared instance
+# communication, instead of domain sockets, this is also
+# possible, by using the following option:
+
+# shared_instance_type = tcp
+
+
+# On systems where running instances may not have access
+# to the same shared Reticulum configuration directory,
+# it is still possible to allow full interactivity for
+# running instances, by manually specifying a shared RPC
+# key. In almost all cases, this option is not needed, but
+# it can be useful on operating systems such as Android.
+# The key must be specified as bytes in hexadecimal.
+
+# rpc_key = e5c032d3ec4e64a6aca9927ba8ab73336780f6d71790
+
+
+# It is possible to allow remote management of Reticulum
+# systems using the various built-in utilities, such as
+# rnstatus and rnpath. You will need to specify one or
+# more Reticulum Identity hashes for authenticating the
+# queries from client programs. For this purpose, you can
+# use existing identity files, or generate new ones with
+# the rnid utility.
+
+# enable_remote_management = yes
+# remote_management_allowed = 9fb6d773498fb3feda407ed8ef2c3229, 2d882c5586e548d79b5af27bca1776dc
+
+
+# You can configure Reticulum to panic and forcibly close
+# if an unrecoverable interface error occurs, such as the
+# hardware device for an interface disappearing. This is
+# an optional directive, and can be left out for brevity.
+# This behaviour is disabled by default.
+
+# panic_on_interface_error = No
+
+
+# When Transport is enabled, it is possible to allow the
+# Transport Instance to respond to probe requests from
+# the rnprobe utility. This can be a useful tool to test
+# connectivity. When this option is enabled, the probe
+# destination will be generated from the Identity of the
+# Transport Instance, and printed to the log at startup.
+# Optional, and disabled by default.
+
+# respond_to_probes = No
+
+
+[logging]
+# Valid log levels are 0 through 7:
+#   0: Log only critical information
+#   1: Log errors and lower log levels
+#   2: Log warnings and lower log levels
+#   3: Log notices and lower log levels
+#   4: Log info and lower (this is the default)
+#   5: Verbose logging
+#   6: Debug logging
+#   7: Extreme logging
+
+loglevel = 4
+
+
+# The interfaces section defines the physical and virtual
+# interfaces Reticulum will use to communicate on. This
+# section will contain examples for a variety of interface
+# types. You can modify these or use them as a basis for
+# your own config, or simply remove the unused ones.
+
+[interfaces]
+
+  # This interface enables communication with other
+  # link-local Reticulum nodes over UDP. It does not
+  # need any functional IP infrastructure like routers
+  # or DHCP servers, but will require that at least link-
+  # local IPv6 is enabled in your operating system, which
+  # should be enabled by default in almost any OS. See
+  # the Reticulum Manual for more configuration options.
+
+  [[Default Interface]]
+    type = AutoInterface
+    interface_enabled = True
+
+
+
+

+ If Reticulum infrastructure already exists locally, you probably don’t need to + change anything, and you may already be connected to a wider network. If not, + you will probably need to add relevant interfaces to the configuration, + in order to communicate with other systems. +

+

+ You can generate a much more verbose configuration example by running the + command: +

+

+ rnsd --exampleconfig +

+

+ The output includes examples for most interface types supported by Reticulum, + along with additional options and configuration parameters. +

+

+ It is a good idea to read the comments 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, take a look at the + Interfaces + chapter of this manual. +

+
+
+

+ Included Utility Programs +

+

+ Reticulum includes a range of useful utilities, both for managing your Reticulum + networks, and for carrying out common tasks over Reticulum networks, such as + transferring files to remote systems, and executing commands and programs + remotely. +

+

+ If you often use Reticulum from several different programs, or simply want + 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 other + programs, applications and services can utilise. +

+
+

+ The rnsd Utility +

+

+ It is very easy to run Reticulum as a service. Simply run the included + rnsd + command. When + rnsd + is running, it will keep all configured interfaces open, handle transport if + it is enabled, and allow any other programs to immediately utilise the + Reticulum network it is configured for. +

+

+ You can even run multiple instances of + rnsd + with different configurations on the same system. +

+

Usage Examples

+

+ Run + rnsd: +

+
+
+
$ rnsd
+
+[2023-08-18 17:59:56] [Notice] Started rnsd version 0.5.8
+
+
+
+

+ Run + rnsd + in service mode, ensuring all logging output is sent directly to file: +

+
+
+
$ rnsd -s
+
+
+
+

+ Generate a verbose and detailed configuration example, with explanations of + all the various configuration options, and interface configuration examples: +

+
+
+
$ rnsd --exampleconfig
+
+
+
+

All Command-Line Options

+
+
+
usage: rnsd.py [-h] [--config CONFIG] [-v] [-q] [-s] [--exampleconfig] [--version]
+
+Reticulum Network Stack Daemon
+
+options:
+  -h, --help        show this help message and exit
+  --config CONFIG   path to alternative Reticulum config directory
+  -v, --verbose
+  -q, --quiet
+  -s, --service     rnsd is running as a service and should log to file
+  -i, --interactive drop into interactive shell after initialisation
+  --exampleconfig   print verbose configuration example to stdout and exit
+  --version         show program's version number and exit
+
+
+
+

+ You can easily add + rnsd + as an always-on service by + configuring a service. +

+
+
+

+ The rnstatus Utility +

+

+ Using the + rnstatus + utility, you can view the status of configured Reticulum interfaces, similar + to the + ifconfig + program. +

+

Usage Examples

+

+ Run + rnstatus: +

+
+
+
$ rnstatus
+
+Shared Instance[37428]
+   Status  : Up
+   Serving : 1 program
+   Rate    : 1.00 Gbps
+   Traffic : 83.13 KB↑
+             86.10 KB↓
+
+AutoInterface[Local]
+   Status  : Up
+   Mode    : Full
+   Rate    : 10.00 Mbps
+   Peers   : 1 reachable
+   Traffic : 63.23 KB↑
+             80.17 KB↓
+
+TCPInterface[RNS Testnet Dublin/dublin.connect.reticulum.network:4965]
+   Status  : Up
+   Mode    : Full
+   Rate    : 10.00 Mbps
+   Traffic : 187.27 KB↑
+             74.17 KB↓
+
+RNodeInterface[RNode UHF]
+   Status  : Up
+   Mode    : Access Point
+   Rate    : 1.30 kbps
+   Access  : 64-bit IFAC by <…e702c42ba8>
+   Traffic : 8.49 KB↑
+             9.23 KB↓
+
+Reticulum Transport Instance <5245a8efe1788c6a1cd36144a270e13b> running
+
+
+
+

Filter output to only show some interfaces:

+
+
+
$ rnstatus rnode
+
+RNodeInterface[RNode UHF]
+   Status  : Up
+   Mode    : Access Point
+   Rate    : 1.30 kbps
+   Access  : 64-bit IFAC by <…e702c42ba8>
+   Traffic : 8.49 KB↑
+             9.23 KB↓
+
+Reticulum Transport Instance <5245a8efe1788c6a1cd36144a270e13b> running
+
+
+
+

All Command-Line Options

+
+
+
usage: rnstatus [-h] [--config CONFIG] [--version] [-a] [-A]
+                [-l] [-s SORT] [-r] [-j] [-R hash] [-i path]
+                [-w seconds] [-v] [filter]
+
+Reticulum Network Stack Status
+
+positional arguments:
+  filter                only display interfaces with names including filter
+
+options:
+  -h, --help            show this help message and exit
+  --config CONFIG       path to alternative Reticulum config directory
+  --version             show program's version number and exit
+  -a, --all             show all interfaces
+  -A, --announce-stats  show announce stats
+  -l, --link-stats      show link stats
+  -s SORT, --sort SORT  sort interfaces by [rate, traffic, rx, tx, announces, arx, atx, held]
+  -r, --reverse         reverse sorting
+  -j, --json            output in JSON format
+  -R hash               transport identity hash of remote instance to get status from (requires -i)
+  -i path               path to identity used for remote management
+  -w seconds            timeout before giving up on remote queries
+  -v, --verbose
+
+
+
+
+

Note

+

+ When using + -R + to query a remote transport instance, you must also specify + -i + with the path to a management identity file that is authorized for remote + management on the target system. +

+
+
+
+

+ The rnid Utility +

+

+ With the + rnid + utility, you can generate, manage and view Reticulum Identities. The program + can also calculate Destination hashes, and perform encryption and decryption + of files. +

+

+ Using + rnid, it is possible to asymmetrically encrypt files and information for any + Reticulum destination hash, and also to create and verify cryptographic + signatures. +

+

Usage Examples

+

Generate a new Identity:

+
+
+
$ rnid -g ./new_identity
+
+
+
+

Display Identity key information:

+
+
+
$ rnid -i ./new_identity -p
+
+Loaded Identity <984b74a3f768bef236af4371e6f248cd> from new_id
+Public Key  : 0f4259fef4521ab75a3409e353fe9073eb10783b4912a6a9937c57bf44a62c1e
+Private Key : Hidden
+
+
+
+

Encrypt a file for an LXMF user:

+
+
+
$ rnid -i 8dd57a738226809646089335a6b03695 -e my_file.txt
+
+Recalled Identity  for destination <8dd57a738226809646089335a6b03695>
+Encrypting my_file.txt
+File my_file.txt encrypted for  to my_file.txt.rfe
+
+
+
+

+ If the Identity for the destination is not already known, you can fetch it + from the network by using the + -R + command-line option: +

+
+
+
$ rnid -R -i 30602def3b3506a28ed33db6f60cc6c9 -e my_file.txt
+
+Requesting unknown Identity for <30602def3b3506a28ed33db6f60cc6c9>...
+Received Identity <2b489d06eaf7c543808c76a5332a447d> for destination <30602def3b3506a28ed33db6f60cc6c9> from the network
+Encrypting my_file.txt
+File my_file.txt encrypted for <2b489d06eaf7c543808c76a5332a447d> to my_file.txt.rfe
+
+
+
+

Decrypt a file using the Reticulum Identity it was encrypted for:

+
+
+
$ rnid -i ./my_identity -d my_file.txt.rfe
+
+Loaded Identity <2225fdeecaf6e2db4556c3c2d7637294> from ./my_identity
+Decrypting ./my_file.txt.rfe...
+File ./my_file.txt.rfe decrypted with <2225fdeecaf6e2db4556c3c2d7637294> to ./my_file.txt
+
+
+
+

All Command-Line Options

+
+
+
usage: rnid.py [-h] [--config path] [-i identity] [-g path] [-v] [-q] [-a aspects]
+               [-H aspects] [-e path] [-d path] [-s path] [-V path] [-r path] [-w path]
+               [-f] [-R] [-t seconds] [-p] [-P] [--version]
+
+Reticulum Identity & Encryption Utility
+
+options:
+  -h, --help            show this help message and exit
+  --config path         path to alternative Reticulum config directory
+  -i, --identity identity
+                        hexadecimal Reticulum identity or destination hash, or path to Identity file
+  -g, --generate file   generate a new Identity
+  -m, --import identity_data
+                        import Reticulum identity in hex, base32 or base64 format
+  -x, --export          export identity to hex, base32 or base64 format
+  -v, --verbose         increase verbosity
+  -q, --quiet           decrease verbosity
+  -a, --announce aspects
+                        announce a destination based on this Identity
+  -H, --hash aspects    show destination hashes for other aspects for this Identity
+  -e, --encrypt file    encrypt file
+  -d, --decrypt file    decrypt file
+  -s, --sign path       sign file
+  -V, --validate path   validate signature
+  -r, --read file       input file path
+  -w, --write file      output file path
+  -f, --force           write output even if it overwrites existing files
+  -R, --request         request unknown Identities from the network
+  -t seconds            identity request timeout before giving up
+  -p, --print-identity  print identity info and exit
+  -P, --print-private   allow displaying private keys
+  -b, --base64          Use base64-encoded input and output
+  -B, --base32          Use base32-encoded input and output
+  --version             show program's version number and exit
+
+
+
+
+
+

+ The rnpath Utility +

+

+ With the + rnpath + utility, you can look up and view paths for destinations on the Reticulum + network. +

+

Usage Examples

+

Resolve path to a destination:

+
+
+
$ rnpath c89b4da064bf66d280f0e4d8abfd9806
+
+Path found, destination  is 4 hops away via  on TCPInterface[Testnet/dublin.connect.reticulum.network:4965]
+
+
+
+

All Command-Line Options

+
+
+
usage: rnpath [-h] [--config CONFIG] [--version] [-t] [-m hops]
+              [-r] [-d] [-D] [-x] [-w seconds] [-R hash] [-i path]
+              [-W seconds] [-j] [-v] [destination]
+
+Reticulum Path Discovery Utility
+
+positional arguments:
+  destination           hexadecimal hash of the destination
+
+options:
+  -h, --help            show this help message and exit
+  --config CONFIG       path to alternative Reticulum config directory
+  --version             show program's version number and exit
+  -t, --table           show all known paths
+  -m hops, --max hops   maximum hops to filter path table by
+  -r, --rates           show announce rate info
+  -d, --drop            remove the path to a destination
+  -D, --drop-announces  drop all queued announces
+  -x, --drop-via        drop all paths via specified transport instance
+  -w seconds            timeout before giving up
+  -R hash               transport identity hash of remote instance to manage
+  -i path               path to identity used for remote management
+  -W seconds            timeout before giving up on remote queries
+  -j, --json            output in JSON format
+  -v, --verbose
+
+
+
+
+
+

+ The rnprobe Utility +

+

+ The + rnprobe + utility lets you probe a destination for connectivity, similar to the + ping + program. Please note that probes will only be answered if the specified + destination is configured to send proofs for received packets. Many + destinations will not have this option enabled, so most destinations will not + be probable. +

+

+ You can enable a probe-reply destination on Reticulum Transport Instances by + setting the + respond_to_probes + configuration directive. Reticulum will then print the probe destination to + the log on Transport Instance startup. +

+

Usage Examples

+

Probe a destination:

+
+
+
$ rnprobe rnstransport.probe 2d03725b327348980d570f739a3a5708
+
+Sent 16 byte probe to <2d03725b327348980d570f739a3a5708>
+Valid reply received from <2d03725b327348980d570f739a3a5708>
+Round-trip time is 38.469 milliseconds over 2 hops
+
+
+
+

Send a larger probe:

+
+
+
$ rnprobe rnstransport.probe 2d03725b327348980d570f739a3a5708 -s 256
+
+Sent 16 byte probe to <2d03725b327348980d570f739a3a5708>
+Valid reply received from <2d03725b327348980d570f739a3a5708>
+Round-trip time is 38.781 milliseconds over 2 hops
+
+
+
+

+ If the interface that receives the probe replies supports reporting radio + parameters such as RSSI and SNR, the + rnprobe + utility will print these as part of the result as well. +

+
+
+
$ rnprobe rnstransport.probe e7536ee90bd4a440e130490b87a25124
+
+Sent 16 byte probe to 
+Valid reply received from 
+Round-trip time is 1.809 seconds over 1 hop [RSSI -73 dBm] [SNR 12.0 dB]
+
+
+
+

All Command-Line Options

+
+
+
usage: rnprobe [-h] [--config CONFIG] [-s SIZE] [-n PROBES]
+               [-t seconds] [-w seconds] [--version] [-v]
+               [full_name] [destination_hash]
+
+Reticulum Probe Utility
+
+positional arguments:
+  full_name             full destination name in dotted notation
+  destination_hash      hexadecimal hash of the destination
+
+options:
+  -h, --help            show this help message and exit
+  --config CONFIG       path to alternative Reticulum config directory
+  -s SIZE, --size SIZE  size of probe packet payload in bytes
+  -n PROBES, --probes PROBES
+                        number of probes to send
+  -t seconds, --timeout seconds
+                        timeout before giving up
+  -w seconds, --wait seconds
+                        time between each probe
+  --version             show program's version number and exit
+  -v, --verbose
+
+
+
+
+
+

+ The rncp Utility +

+

+ The + rncp + utility is a simple file transfer tool. Using it, you can transfer files + through Reticulum. +

+

Usage Examples

+

+ Run rncp on the receiving system, specifying which identities are allowed to + send files: +

+
+
+
$ rncp --listen -a 1726dbad538775b5bf9b0ea25a4079c8 -a c50cc4e4f7838b6c31f60ab9032cbc62
+
+
+
+

+ You can also specify allowed identity hashes (one per line) in the file + ~/.rncp/allowed_identities and simply running the program in listener mode: +

+
+
+
$ rncp --listen
+
+
+
+

From another system, copy a file to the receiving system:

+
+
+
$ rncp ~/path/to/file.tgz 73cbd378bb0286ed11a707c13447bb1e
+
+
+
+

Or fetch a file from the remote system:

+
+
+
$ rncp --fetch ~/path/to/file.tgz 73cbd378bb0286ed11a707c13447bb1e
+
+
+
+

All Command-Line Options

+
+
+
usage: rncp [-h] [--config path] [-v] [-q] [-S] [-l] [-F] [-f]
+            [-j path] [-b seconds] [-a allowed_hash] [-n] [-p]
+            [-w seconds] [--version] [file] [destination]
+
+Reticulum File Transfer Utility
+
+positional arguments:
+  file                  file to be transferred
+  destination           hexadecimal hash of the receiver
+
+options:
+  -h, --help            show this help message and exit
+  --config path         path to alternative Reticulum config directory
+  -v, --verbose         increase verbosity
+  -q, --quiet           decrease verbosity
+  -S, --silent          disable transfer progress output
+  -l, --listen          listen for incoming transfer requests
+  -C, --no-compress     disable automatic compression
+  -F, --allow-fetch     allow authenticated clients to fetch files
+  -f, --fetch           fetch file from remote listener instead of sending
+  -j, --jail path       restrict fetch requests to specified path
+  -s, --save path       save received files in specified path
+  -O, --overwrite       Allow overwriting received files, instead of adding postfix
+  -b seconds            announce interval, 0 to only announce at startup
+  -a allowed_hash       allow this identity (or add in ~/.rncp/allowed_identities)
+  -n, --no-auth         accept requests from anyone
+  -p, --print-identity  print identity and destination info and exit
+  -w seconds            sender timeout before giving up
+  -P, --phy-rates       display physical layer transfer rates
+  --version             show program's version number and exit
+
+
+
+
+
+

+ The rnx Utility +

+

+ The + rnx + utility is a basic remote command execution program. It allows you to execute + commands on remote systems over Reticulum, and to view returned command + output. For a fully interactive remote shell solution, be sure to also take a + look at the + rnsh + program. +

+

Usage Examples

+

+ Run rnx on the listening system, specifying which identities are allowed to + execute commands: +

+
+
+
$ rnx --listen -a 941bed5e228775e5a8079fc38b1ccf3f -a 1b03013c25f1c2ca068a4f080b844a10
+
+
+
+

From another system, run a command on the remote:

+
+
+
$ rnx 7a55144adf826958a9529a3bcf08b149 "cat /proc/cpuinfo"
+
+
+
+

Or enter the interactive mode pseudo-shell:

+
+
+
$ rnx 7a55144adf826958a9529a3bcf08b149 -x
+
+
+
+

+ The default identity file is stored in + ~/.reticulum/identities/rnx, but you can use another one, which will be created if it does not already + exist +

+
+
+
$ rnx 7a55144adf826958a9529a3bcf08b149 -i /path/to/identity -x
+
+
+
+

All Command-Line Options

+
+
+
usage: rnx [-h] [--config path] [-v] [-q] [-p] [-l] [-i identity] [-x] [-b] [-n] [-N]
+           [-d] [-m] [-a allowed_hash] [-w seconds] [-W seconds] [--stdin STDIN]
+           [--stdout STDOUT] [--stderr STDERR] [--version] [destination] [command]
+
+Reticulum Remote Execution Utility
+
+positional arguments:
+  destination           hexadecimal hash of the listener
+  command               command to be execute
+
+optional arguments:
+  -h, --help            show this help message and exit
+  --config path         path to alternative Reticulum config directory
+  -v, --verbose         increase verbosity
+  -q, --quiet           decrease verbosity
+  -p, --print-identity  print identity and destination info and exit
+  -l, --listen          listen for incoming commands
+  -i identity           path to identity to use
+  -x, --interactive     enter interactive mode
+  -b, --no-announce     don't announce at program start
+  -a allowed_hash       accept from this identity
+  -n, --noauth          accept files from anyone
+  -N, --noid            don't identify to listener
+  -d, --detailed        show detailed result output
+  -m                    mirror exit code of remote command
+  -w seconds            connect and request timeout before giving up
+  -W seconds            max result download time
+  --stdin STDIN         pass input to stdin
+  --stdout STDOUT       max size in bytes of returned stdout
+  --stderr STDERR       max size in bytes of returned stderr
+  --version             show program's version number and exit
+
+
+
+
+
+

+ The rnodeconf Utility +

+

+ The + rnodeconf + utility allows you to inspect and configure existing + RNodes, and to create and provision new + RNodes + from any supported hardware devices. +

+

All Command-Line Options

+
+
+
usage: rnodeconf [-h] [-i] [-a] [-u] [-U] [--fw-version version]
+                 [--fw-url url] [--nocheck] [-e] [-E] [-C]
+                 [--baud-flash baud_flash] [-N] [-T] [-b] [-B] [-p] [-D i]
+                 [--display-addr byte] [--freq Hz] [--bw Hz] [--txp dBm]
+                 [--sf factor] [--cr rate] [--eeprom-backup] [--eeprom-dump]
+                 [--eeprom-wipe] [-P] [--trust-key hexbytes] [--version] [-f]
+                 [-r] [-k] [-S] [-H FIRMWARE_HASH] [--platform platform]
+                 [--product product] [--model model] [--hwrev revision]
+                 [port]
+
+RNode Configuration and firmware utility. This program allows you to change
+various settings and startup modes of RNode. It can also install, flash and
+update the firmware on supported devices.
+
+positional arguments:
+  port                  serial port where RNode is attached
+
+options:
+  -h, --help            show this help message and exit
+  -i, --info            Show device info
+  -a, --autoinstall     Automatic installation on various supported devices
+  -u, --update          Update firmware to the latest version
+  -U, --force-update    Update to specified firmware even if version matches or is older than installed version
+  --fw-version version  Use a specific firmware version for update or autoinstall
+  --fw-url url          Use an alternate firmware download URL
+  --nocheck             Don't check for firmware updates online
+  -e, --extract         Extract firmware from connected RNode for later use
+  -E, --use-extracted   Use the extracted firmware for autoinstallation or update
+  -C, --clear-cache     Clear locally cached firmware files
+  --baud-flash baud_flash
+                        Set specific baud rate when flashing device. Default is 921600
+  -N, --normal          Switch device to normal mode
+  -T, --tnc             Switch device to TNC mode
+  -b, --bluetooth-on    Turn device bluetooth on
+  -B, --bluetooth-off   Turn device bluetooth off
+  -p, --bluetooth-pair  Put device into bluetooth pairing mode
+  -D, --display i       Set display intensity (0-255)
+  -t, --timeout s       Set display timeout in seconds, 0 to disable
+  -R, --rotation rotation
+                        Set display rotation, valid values are 0 through 3
+  --display-addr byte   Set display address as hex byte (00 - FF)
+  --recondition-display
+                        Start display reconditioning
+  --np i                Set NeoPixel intensity (0-255)
+  --freq Hz             Frequency in Hz for TNC mode
+  --bw Hz               Bandwidth in Hz for TNC mode
+  --txp dBm             TX power in dBm for TNC mode
+  --sf factor           Spreading factor for TNC mode (7 - 12)
+  --cr rate             Coding rate for TNC mode (5 - 8)
+  -x, --ia-enable       Enable interference avoidance
+  -X, --ia-disable      Disable interference avoidance
+  -c, --config          Print device configuration
+  --eeprom-backup       Backup EEPROM to file
+  --eeprom-dump         Dump EEPROM to console
+  --eeprom-wipe         Unlock and wipe EEPROM
+  -P, --public          Display public part of signing key
+  --trust-key hexbytes  Public key to trust for device verification
+  --version             Print program version and exit
+  -f, --flash           Flash firmware and bootstrap EEPROM
+  -r, --rom             Bootstrap EEPROM without flashing firmware
+  -k, --key             Generate a new signing key and exit
+  -S, --sign            Display public part of signing key
+  -H, --firmware-hash FIRMWARE_HASH
+                        Set installed firmware hash
+  --platform platform   Platform specification for device bootstrap
+  --product product     Product specification for device bootstrap
+  --model model         Model code for device bootstrap
+  --hwrev revision      Hardware revision for device bootstrap
+
+
+
+

+ For more information on how to create your own RNodes, please read the + Creating RNodes + section of this manual. +

+
+
+
+

+ Remote Management +

+

+ It is possible to allow remote management of Reticulum systems using the various + built-in utilities, such as + rnstatus + and + rnpath. To do so, you will need to set the + enable_remote_management + directive in the + [reticulum] + section of the configuration file. You will also need to specify one or more + Reticulum Identity hashes for authenticating the queries from client programs. + For this purpose, you can use existing identity files, or generate new ones with + the rnid utility. +

+

+ The following is a truncated example of enabling remote management in the + Reticulum configuration file: +

+
+
+
[reticulum]
+...
+enable_remote_management = yes
+remote_management_allowed = 9fb6d773498fb3feda407ed8ef2c3229, 2d882c5586e548d79b5af27bca1776dc
+...
+
+
+
+

+ For a complete example configuration, you can run + rnsd --exampleconfig. +

+
+
+

+ Improving System Configuration +

+

+ 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. These + changes will be detailed here. +

+
+

+ Fixed Serial Port Names +

+

+ 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 of the + dynamically allocated shorthands such as + /dev/ttyUSB0. Under most Debian-based distributions, including Ubuntu and Raspberry Pi + OS, these nodes can be found under + /dev/serial/by-id. +

+

+ You can use such a device path directly in place of the numbered shorthands. + Here is an example of a packet radio TNC configured as such: +

+
+
+
[[Packet Radio KISS Interface]]
+  type = KISSInterface
+  interface_enabled = True
+  outgoing = true
+  port = /dev/serial/by-id/usb-FTDI_FT230X_Basic_UART_43891CKM-if00-port0
+  speed = 115200
+  databits = 8
+  parity = none
+  stopbits = 1
+  preamble = 150
+  txtail = 10
+  persistence = 200
+  slottime = 20
+
+
+
+

+ Using this methodology avoids potential naming mix-ups where physical devices + might be plugged and unplugged in different orders, or when device name + assignment varies from one boot to another. +

+
+
+ +

+ Reticulum as a System Service +

+

+ Instead of starting Reticulum manually, you can install + rnsd + as a system service and have it start automatically at boot. +

+
+

+ Systemwide Service +

+

+ If you installed Reticulum with + pip, the + rnsd + program will most likely be located in a user-local installation path only, + which means + systemd + will not be able to execute it. In this case, you can simply symlink the + rnsd + program into a directory that is in systemd’s path: +

+
+
+
sudo ln -s $(which rnsd) /usr/local/bin/
+
+
+
+

+ You can then create the service file + /etc/systemd/system/rnsd.service + with the following content: +

+
+
+
[Unit]
+Description=Reticulum Network Stack Daemon
+After=multi-user.target
+
+[Service]
+# If you run Reticulum on WiFi devices,
+# or other devices that need some extra
+# time to initialise, you might want to
+# add a short delay before Reticulum is
+# started by systemd:
+# ExecStartPre=/bin/sleep 10
+Type=simple
+Restart=always
+RestartSec=3
+User=USERNAMEHERE
+ExecStart=rnsd --service
+
+[Install]
+WantedBy=multi-user.target
+
+
+
+

+ Be sure to replace + USERNAMEHERE + with the user you want to run + rnsd + as. +

+

+ To manually start + rnsd + run: +

+
+
+
sudo systemctl start rnsd
+
+
+
+

+ If you want to automatically start + rnsd + at boot, run: +

+
+
+
sudo systemctl enable rnsd
+
+
+
+
+
+

+ Userspace Service +

+

+ Alternatively you can use a user systemd service instead of a system wide + one. This way the whole setup can be done as a regular user. Create a user + systemd service files + ~/.config/systemd/user/rnsd.service + with the following content: +

+
+
+
[Unit]
+Description=Reticulum Network Stack Daemon
+After=default.target
+
+[Service]
+# If you run Reticulum on WiFi devices,
+# or other devices that need some extra
+# time to initialise, you might want to
+# add a short delay before Reticulum is
+# started by systemd:
+# ExecStartPre=/bin/sleep 10
+Type=simple
+Restart=always
+RestartSec=3
+ExecStart=RNS_BIN_DIR/rnsd --service
+
+[Install]
+WantedBy=default.target
+
+
+
+

+ Replace + RNS_BIN_DIR + with the path to your Reticulum binary directory (eg. + /home/USERNAMEHERE/rns/bin). +

+

Start user service:

+
+
+
systemctl --user daemon-reload
+systemctl --user start rnsd.service
+
+
+
+

+ If you want to automatically start + rnsd + without having to log in as the USERNAMEHERE, do: +

+
+
+
sudo loginctl enable-linger USERNAMEHERE
+systemctl --user enable rnsd.service
+
+
+
+
+
+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/whatis.html b/docs/whatis.html new file mode 100644 index 0000000..a58f205 --- /dev/null +++ b/docs/whatis.html @@ -0,0 +1,880 @@ + + + + + + + + + + + + + + + Что такое Reticulum? — документация к сетевому стеку Reticulum 1.0.5 + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+

+ Что такое Reticulum? +

+

+ Reticulum — это сетевой стек на основе криптографии для построения локальных и глобальных сетей с + использованием легкодоступного оборудования, который может продолжать функционировать в + неблагоприятных условиях, таких как чрезвычайно низкая пропускная способность и очень + высокая задержка. +

+ +

+ Чтобы понять основополагающую философию и цели этой системы, прочитайте + Zen of Reticulum. +

+ +

+ Reticulum позволяет создавать глобальные сети с помощью готовых инструментов и предлагает сквозное + шифрование, прямую секретность, автоконфигурируемый криптографически защищенный многоузловой + транспорт, эффективную адресацию, неподдельные подтверждения пакетов и многое другое. +

+

+ С точки зрения пользователя, Reticulum позволяет создавать приложения, которые уважают и + расширяют автономию и суверенитет сообществ и отдельных лиц. Reticulum обеспечивает безопасность + цифровых коммуникаций, которые не могут быть подвергнуты внешнему контролю, манипуляциям или цензуре. +

+

+ Reticulum позволяет строить как небольшие, так и потенциально планетарные сети без + необходимости использования иерархических или бюрократических структур + для их контроля или управления, обеспечивая при этом полный суверенитет отдельных лиц и + сообществ над своими сегментами сети. +

+

+ Reticulum — это полный сетевой стек, который не требует + IP‑протокола или более высоких уровней, + хотя протокол IP (TCP или UDP) можно использовать в качестве + базового канала для Reticulum. + Поэтому Reticulum легко туннелировать через Интернет или частные IP‑сети. + + Reticulum построен непосредственно на криптографических принципах, + что обеспечивает отказоустойчивость и стабильную работу в открытых и не доверенных сетях. +

+

+ Не требуется никаких модулей ядра или драйверов. Reticulum может работать полностью в + пользовательском пространстве и будет работать практически на любой системе, + на которой работает Python 3. Reticulum хорошо работает даже на небольших одноплатных + компьютерах, таких как + Pi Zero. +

+
+

+ Текущий статус +

+

+ Все основные функции протокола реализованы и работают, но по мере изучения реальных условий + использования, вероятно, будут добавлены дополнительные функции. + API и формат передачи данных можно считать завершенными и стабильными, но они могут измениться, + если это будет абсолютно необходимо. +

+
+
+

+ Эталонная реализация +

+

+ Код на языке Python, для которого написана данная документация и известный как Reticulum Network Stack, + является эталонной реализацией Reticulum. + Протокол Reticulum полностью и авторитетно определяется данной эталонной реализацией и + настоящим руководством.
+ Его поддерживает Марк Квист (Mark Qvist), + с идентификатором в сети Reticulum: + <bc7291552be7a58f361522990465165c> +

+

+ Реализация считается совместимой с протоколом Reticulum, если она полностью взаимодействует с + эталонной реализацией и обеспечивает те же основные функции. + Если оба условия выполнены — реализация является Reticulum. + Любая, которая этого не делает, не является Reticulum. +

+

Эталонная реализация лицензируется по + лицензии Reticulum.

+

Протокол Reticulum был передан в общественное достояние в 2016 году.

+
+
+

+ Что предлагает Reticulum? +

+
    +
  • Глобальная уникальная адресация и идентификация без координации

  • +
  • +

    Полностью самонастраиваемая многоузловая маршрутизация по гетерогенным сетям

    +
  • +
  • +

    Гибкая масштабируемость в гетерогенных топологиях

    +
      +
    • +

      + Reticulum может передавать данные по любой комбинации физических носителей и топологий +

      +
    • +
    • +

      + Сети с низкой пропускной способностью могут сосуществовать и + взаимодействовать с большими сетями с высокой пропускной способностью +

      +
    • +
    +
  • +
  • +

    Анонимность инициатора, общайтесь, не раскрывая свою личность

    +
      +
    • + Reticulum не включает исходные адреса в любые пакеты

    • +
    +
  • +
  • +

    + Асимметричное шифрование + X25519 и подписи Ed25519 как основа для всей коммуникации +

    +
      +
    • +

      + Основные идентификационные ключи Reticulum представляют собой наборы ключей + эллиптической кривой длиной 512 бит +

      +
    • +
    +
  • +
  • +

    + Прямая секретность + доступна для всех типов связи, как для отдельных пакетов, так и для каналов связи +

    +
  • +
  • +

    Reticulum использует следующий формат для зашифрованных токенов:

    +
      +
    • +

      + Эфемерные ключи + на пакет и канал связи, полученные в результате обмена ключами + ECDH + на кривой Curve25519 +

      +
    • +
    • AES-256 в режиме CBC с заполнением + PKCS7

    • +
    • + HMAC с использованием SHA256 для аутентификации

    • +
    • IV + генерируются с помощью + os.urandom()

    • +
    +
  • +
  • Неподделываемые подтверждения доставки пакетов

  • +
  • +

    Гибкая и расширяемая система интерфейсов

    +
      +
    • +

      Reticulum включает широкий набор встроенных типов интерфейсов

      +
    • +
    • +

      + Возможность загрузки и использования пользовательских или предоставленных сообществом + типов интерфейсов +

      +
    • +
    • +

      + Легко создавайте собственные интерфейсы для связи по любому каналу +

      +
    • +
    +
  • +
  • +

    + Аутентификация и виртуальная сегментация сети для всех поддерживаемых типов интерфейсов +

    +
  • +
  • +

    Интуитивно понятный и простой в использовании API

    +
      +
    • +

      + Легче и удобнее в использовании, чем API‑интерфейсы сокетов, и при этом более мощный +

      +
    • +
    • +

      + Значительно упрощает создание распределенных и децентрализованных приложений +

      +
    • +
    +
  • +
  • +

    Надежная и эффективная передача произвольных объемов данных

    +
      +
    • +

      Reticulum может работать как с несколькими байтами данных, + так и с файлами размером в несколько гигабайт

      +
    • +
    • +

      + Последовательность, сжатие, координация передачи и контроль контрольных сумм + выполняются автоматически +

      +
    • +
    • API очень прост в использовании и отображает ход передачи данных

    • +
    +
  • +
  • Легкий, гибкий и расширяемый механизм запроса/ответа

  • +
  • +

    Эффективное установление связи

    +
      +
    • +

      + Общая стоимость установки зашифрованного и проверенного соединения составляет 3 пакета, + суммарно 297 байт +

      +
    • +
    • Низкая стоимость поддержания соединения — всего 0,44 бита в секунду

    • +
    +
  • +
  • Надёжная последовательная доставка с использованием механизмов + Каналов и Буферов

  • +
+
+
+

+ Где можно использовать Reticulum? +

+

+ Практически на любом носителе, который может поддерживать хотя бы полудуплексный канал + со скоростью более 5 бит/с и + + MTU ≈ 500 байт.
+ + + Радиостанции для передачи данных, + модемы, + радиомодули LoRa, + + последовательные линии, + + AX.25 TNC, + + цифровые режимы любительского радио, + + ad-hoc WiFi, + + беспроводные оптические линии связи и + аналогичные системы — все это примеры типов интерфейсов, для которых был разработан Reticulum. +

+

+ Открытый интерфейс на базе LoRa под названием + RNode + был разработан в качестве примера трансивера, + который очень хорошо подходит для Reticulum. Его можно собрать самостоятельно, превратив + обычную + плату разработки LoRa + в такой трансивер, либо купить готовый трансивер у различных поставщиков. +

+

+ Reticulum может быть инкапсулирован поверх существующих IP‑сетей, поэтому ничто не мешает + использовать его через проводной Ethernet или локальную Wi‑Fi сеть — он будет работать так же эффективно. + Фактически, одной из сильных сторон Reticulum является то, как легко он позволяет соединять + разные среды в самонастраивающуюся, устойчивую и зашифрованную mesh‑сеть. +

+

+ В качестве примера можно настроить Raspberry Pi, подключённый одновременно к + LoRa‑радио, + + пакетному радиомодулю TNC и Wi‑Fi сети. + После добавления этих интерфейсов Reticulum позаботится обо всём остальном, + и любое устройство в Wi‑Fi сети сможет обмениваться данными с узлами на LoRa + и + пакетного радио, + и наоборот. +

+
+
+

+ Типы интерфейсов и устройства +

+

+ Reticulum реализует набор обобщённых типов интерфейсов, охватывающих аппаратные средства связи, + через которые может работать Reticulum. Если ваше оборудование не поддерживается, + его легко добавить, + реализовав класс интерфейса. В настоящее время Reticulum может использовать следующие устройства и средства связи: +

+
    +
  • +

    Любое Ethernet‑устройство

    +
      +
    • Wi‑Fi‑устройства

    • +
    • Проводные Ethernet‑устройства

    • +
    • Оптоволоконные трансиверы

    • +
    • Радиомодули передачи данных с Ethernet‑портами

    • +
    +
  • +
  • +

    + LoRa с использованием + RNode +

    + +
  • +
  • +

    + Пакетные радиомодемы (TNC), такие как + OpenModem +

    +
      +
    • Любой TNC для пакетной радиосвязи в режиме + + KISS

    • +
    • Идеально подходит для радиостанций + VHF и + UHF

    • +
    +
  • +
  • Любое устройство с последовательным портом

  • +
  • Сеть I2P

  • +
  • TCP поверх IP‑сетей

  • +
  • UDP поверх IP‑сетей

  • +
  • +

    Любой интерфейс, доступный через + + stdio

    +
      +
    • Reticulum может использовать внешние программы и + + каналы (pipe) в качестве интерфейсов

    • +
    • Это можно использовать для простого добавления + виртуальных интерфейсов

    • +
    • Или быстро создать интерфейсы для пользовательского оборудования

    • +
    +
  • +
  • Любое другое решение, использующее + + кастомные интерфейсные модули, написанные на Python

  • +
+

+ Полный список и более подробную информацию см. в главе + Поддерживаемые интерфейсы. +

+
+
+
+
+ +
+ +
+
+ + + + + + + + diff --git a/docs/zen.html b/docs/zen.html new file mode 100644 index 0000000..5b5520c --- /dev/null +++ b/docs/zen.html @@ -0,0 +1,2059 @@ + + + + + + + + + + + + + + + Дзен Reticulum - Reticulum Network Stack 1.1.3 documentation + + + + + + + + + + + + + + + Contents + + + + + + Menu + + + + + + + + Expand + + + + + + Light mode + + + + + + + + + + + + + + Dark mode + + + + + + + Auto light/dark, in light mode + + + + + + + + + + + + + + + Auto light/dark, in dark mode + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Skip to content + +
+
+
+ +
+ +
+
+ +
+ +
+
+ +
+
+
+ + + + + Back to top + +
+
+ +
+ +
+
+
+ +

+ Дзен Reticulum +

+
+

+ Иллюзия центра +

+

+ На протяжении почти целого поколения нас учили визуализировать цифровой мир через призму иерархии. + В наших ментальных картах доминирует одно единственное, вводящее в заблуждение изображение: + Облако. +

+

+ Мы представляем себе сеть как огромное, эфирное пространство + “там, наверху” или “где-то там”. + Централизованное хранилище услуг и данных, к которому мы, ничтожные клиенты, должны подключаться. + Мы создаем свое программное обеспечение с этой предпосылкой, жестко запрограммированной в нашу логику: + Есть сервер. Сервер обладает полномочиями. Сервер знает путь. Я должен найти сервер, чтобы функционировать. +

+

+ Эта модель "Клиент-Сервер" является основной преградой для понимания Ретикулума. +

+
+

+ Заблуждение об облаке +

+

+ Первый шаг в дзен-философии Reticulum — осознать, что + облака не существует. Есть только компьютеры других людей. + Когда вы создаете приложение для облака, вы создаете его для арендодателя. + Вы соглашаетесь с тем, что существование вашего приложения зависит от разрешения, + времени безотказной работы и постоянной доброй воли центральной власти. +

+

+ В Reticulum вы должны изменить свое мышление с “подключения к” на "нахождение среди". + Reticulum — это не услуга, на которую вы подписываетесь, а ткань, в которой вы обитаете.
+ Нет никакого “там, наверху”. + Есть только здесь и там, а пространство между ними — это + одноранговая сеть. +

+
+
+

+ Децентрализация или нецентрализуемость? + +

+

+ В современных технологических кругах часто можно услышать слово “децентрализованный”. + Но зачастую это всего лишь маркетинговый термин, + обозначающий “слегка распределенную централизацию”. + Блокчейн с несколькими доминирующими майнерами или федеративный протокол с + несколькими гигантскими серверами. + На практике это все равно централизация. Просто вместо одного центра есть несколько. +

+

+ Reticulum идет дальше. Он стремится к + нецентрализуемости. +

+

+ Это не просто политическая позиция, а фундаментальная математическая характеристика протокола, + на которой построено все остальное. Reticulum исходит из того, что каждый участник сети + потенциально враждебен, а каждое соединение потенциально скомпрометировано. + Протокол разрабатывается без “привилегированных” узлов. + Хотя некоторые узлы могут выступать в качестве Транспортных Экземпляров — пересылая + трафик для других — они делают это вслепую, зная только о своём непосредственном окружении и + ничего более. + Они маршрутизируют на основе криптографических доказательств, а не административных привилегий. + Они не могут видеть, кто с кем общается, и не могут избирательно манипулировать трафиком, + не нарушив полностью свою способность маршрутизировать. +

+

+ Система спроектирована таким образом, что иерархия структурно невозможна.
+ Вы не можете захватить адрес, потому что нет центрального реестра, который можно было бы захватить.
+ Вы не можете заблокировать пользователя, потому что нет центрального переключателя, + который можно отключить.
+ Вы можете предлагать пути через сеть, но не можете заставить кого‑то их использовать. +

+
+
+

+ Смерть адресу +

+

+ Чтобы освободиться от центра, вы также должны отказаться от концепции “адреса”. +

+

+ В мире IP адрес — это местоположение. + Это координата в глубоко иерархической и статичной сетке. + Если вы перемещаете свой компьютер в другой дом, ваш адрес меняется. + Если ваш маршрутизатор перезагружается, ваш адрес может измениться. + Ваша личность привязана к вашему местоположению, + и поэтому она уязвима и легко контролируется. +

+

+ Reticulum устраняет эту связь между личностью и местоположением. +

+

+ В Reticulum адрес — это не место, а + хеш идентификатора. + Это криптографическое представление того, кто вы есть, а не где вы находитесь. + Благодаря этому ваш адрес является переносимым. + Вы можете взять ноутбук из WiFi-кафе в Берлине, перейти к сети + + LoRa в горах, к каналу пакетной + радиосвязи на лодке, и ваш “адрес” — ваш хэш назначения — + никогда не изменится. +

+

+ Сеть не направляет трафик в определенное место, а направляет его конкретному человеку (или устройству). + Когда вы отправляете пакет, вы + не нацеливаетесь на координату в сетке; + вы шифруете сообщение для конкретного объекта. + Сеть динамически определяет, где в данный момент находится этот объект, и делает это таким образом, + что никто не знает, где он физически находится. +

+

Рассмотрим:

+
    +
  • +

    + Старый способ: “Я нахожусь по адресу + 192.168.1.5. Найдите меня”. +

    +
  • +
  • +

    + Способ Дзен: “Я + <327c1b2f87c9353e01769b01090b18f2>. Где бы я ни был, мои коллеги могут связаться со мной”. +

    +
  • +
+

+ Как только вы перестаете думать о серверах и начинаете думать о переносимых идентификаторах, + когда каждый может всегда напрямую связаться с кем-либо, иллюзия центра исчезнет. + Вы понимаете, что нет центра, который удерживает сеть вместе. + Не нужны координаторы или бюрократы.
+ Сеть — это просто совокупность ее участников, которые общаются напрямую, суверенно и без хозяина. +

+
+
+
+

+ Физика доверия +

+

Паранойя — отличный принцип дизайна

+

+ Если мы примем, что центра нет — что сеть представляет собой хаотичную + одноранговую сеть — + мы будем вынуждены столкнуться с ужасающей реальностью: + Никто не охраняет дверь. +

+

+ В традиционном подходе к сетевым технологиям мы полагаемся на концепцию “доверительного ядра”. + Мы предполагаем, что WiFi в нашей местной кофейне безопасен, + или что магистральные провайдеры являются нейтральными хранителями. + Мы строим нашу безопасность как замок: крепкие стены снаружи, мягкие и доверительные внутри. + Мы используем шифрование только тогда, когда выходим в “дикий” интернет. +

+
+

+ Враждебная среда +

+

+ Дзен Ретикулума требует от вас изменить это представление. + Вы должны исходить из того, что любая среда является враждебной. + Это не цинизм, а просто безразличная физика. +

+

+ Когда вы передаете информацию по радиоволнам, вы как будто кричите в переполненной комнате. + Любой может вас услышать. + Когда вы перемещаетесь по интернету, ваши пакеты проходят через маршрутизаторы, + контролируемые посторонними лицами, корпорациями и государственными структурами. + Полагаться на конфиденциальность в такой среде без криптографической защиты — это не оптимизм, + а грубая халатность. +

+

+ Reticulum построен на предпосылке, что каждое соединение прослушивается, + а каждый узел является потенциальным противником. + Если ваша система не может выжить при наличии противника, владеющего физическим уровнем, + она не может выжить вообще. +

+

+ Но в этом и заключается парадокс: предполагая, что сеть является враждебной, вы делаете ее безопасной. + Когда вы принимаете опасности такими, какие они есть, они становятся управляемыми. + Когда вы перестаете доверять инфраструктуре и начинаете доверять математике, + вы устраняете единственную точку отказа: человеческую честность. +

+
+
+

+ Шифрование — это не функция +

+

+ В мире + + TCP/IP шифрование — это второстепенная функция. + Это слой, который мы накладываем поверх протокола (HTTPS, TLS), + чтобы залатать дыры в безопасности исходной конструкции. + Это “функция”, которую иногда включают для “чувствительные данных“. + Это в корне неверно, поскольку все данные являются конфиденциальными. +

+

В Reticulum шифрование — это гравитация.

+

+ Оно не является опцией. Это не плагин. + Это фундаментальная сила, которая позволяет сети существовать. + Если удалить шифрование из Reticulum, маршрутизация перестанет работать.
+ Транспортная система использует криптографические подписи и энтропию для проверки путей и передачи информации. + Если бы пакеты были в виде открытого текста, промежуточные узлы не могли бы подтвердить + действительность маршрута, а конечные точки не могли бы предотвратить подделку или фальсификацию. +

+

+ В Reticulum энтропия зашифрованного пакета является логикой маршрутизации. +

+

+ Просить версию Reticulum без шифрования — все равно что просить версию океана без жидкости. + Вы не просите изменить функционал, вы просите создать другую физическую вселенную. + Мы разрабатываем продукты для вселенной, в которой информация имеет массу, структуру и целостность. +

+
+
+

+ Архитектуры с нулевым доверием +

+

+ Мы должны избавиться от привычки полагаться на + институциональное доверие. +

+

+ За десятилетия мы привыкли доверять авторитетам. + Мы доверяем веб-сайту, потому что за него ручается цепочка центров сертификации + (компаний, о которых мы ничего не знаем). + Мы доверяем приложению, потому что оно находится в магазине приложений + (управляемым корпорацией, которую мы не контролируем). + Мы доверяем сообщению, потому что оно пришло с телефонного номера, + выданного телекоммуникационной компанией. + Однако сегодня все в нашей цифровой информационной сфере более ненадежно и рискованно, + чем средневековый рынок подержанного нижнего белья. +

+

+ Reticulum заменяет институциональное доверие + Криптографическим Доказательством. +

+

+ В Reticulum вы доверяете узлу не потому, что у него красивое имя хоста или он указан в каталоге. + Вы доверяете ему, потому что он хранит закрытый ключ, соответствующий хешу назначения, + с которым вы обмениваетесь данными. + Это доверие является бинарным, математическим и + абсолютным. Подпись либо совпадает, либо нет. Здесь нет места для “возможно”. +

+

+ Этот сдвиг переносит власть от организации к индивидууму. + Вы становитесь высшим арбитром своих собственных доверительных отношений. + Вы решаете, какие ключи принимать, по каким путям следовать и какие идентификаторы признавать. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: + “Я доверяю этому сайту, потому что браузер показывает зеленый значок замка”. +

    +
  • +
  • +

    + Подход Дзен: + “Я доверяю этому сайту, потому что я + проверил его хеш-отпечаток, и математика подтверждает подпись.”. +

    +
  • +
+

+ Когда вы усваиваете “физику доверия”, вы перестаете искать защиту в брандмауэрах, + VPN и соглашениях об условиях предоставления услуг. + Вы понимаете, что настоящая безопасность зависит от дизайна самого протокола. Вы можете перестать + доверять облаку и начать доверять коду, потому что вы можете проверить его самостоятельно. +

+
+
+
+

+ Преимущества дефицита +

+

Каждый бит имеет значение

+

+ Мы привыкли к изобилию. В современном цифровом пространстве пропускная способность воспринимается + как бесконечный, ровный океан. + Мы без раздумий стримим видео в высоком разрешении, отправляем целые библиотеки кода лишь для + отображения одной кнопки и измеряем производительность в гигабитах в секунду. + Такое изобилие опустошило наше мастерство. + Когда ограничения исчезают, эффективность умирает, вместе с ней — Ясность и Качество. +

+

+ Reticulum предлагает вам выйти из океана и встать на канат. +

+
+

+ Заблуждение о пропускной способности +

+

+ Дзен Ретикулума требует осознания того, что + 5 бит в секунду — это приемлемая скорость. +

+

+ Для современного разработчика это звучит как паралич. + Но в ограничениях скрыта глубокая свобода: когда у вас гигабитное соединение, + вы можете быть невероятно неаккуратными. + Вы можете быть расточительными. + Вы можете переложить свои проблемы на инфраструктуру. + “Медленно? Купите более быстрый роутер”. +

+

+ Но при высокой задержке и низкой пропускной способности канала (будь то + шумный HF-радиоканал + или слабый LoRa-канал) + вы не можете перекладывать проблемы куда‑то ещё. + Вы должны решить их. Сеть не терпит расточительства. +

+

+ Это вынуждает перейти от потребления к взаимодействию. + Вы больше не потребляете услугу, предоставляемую широким каналом связи; + вы вступаете в тщательные переговоры с физической средой. + Среда становится партнером в диалоге, а не просто тупым каналом. + Теперь вам необходимо понять мир, чтобы быть в нём. +

+
+
+

+ Стоимость байта +

+

+ В условиях ограниченной экономики байт — это не просто данные, а энергия, время и пространство. +

+

+ Каждый передаваемый байт расходует заряд батареи на узле, питающемся от солнечной энергии. + Он занимает ценное эфирное время, которое могло бы быть использовано другим узлом. + Он представляет собой измеримую часть электромагнитного спектра. +

+

+ Когда вы осознаёте это, вы начнете писать код по-другому. + Вы перестанете спрашивать: “Сколько данных я могу отправить?”, + а начнете спрашивать: “Какой минимальный объем информации необходим для передачи этого намерения? + Как я могу наилучшим образом использовать свою информационную энтропию?”. +

+

+ Именно здесь проявляется элегантность Reticulum. + Протокол разработан таким образом, чтобы устранить все несущественное. + Для установления соединения требуется всего три очень маленьких пакета. + Хеш назначения помещается в 16 байтах. + Накладные расходы ничтожно малы, оставляя почти весь канал для самого сообщения. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: + + “Мне нужно отправить обновление статуса. + Я отправлю JSON-объект с метаданными, + временными метками и информацией о профиле пользователя (15 КБ)”. + +

    +
  • +
  • +

    + Подход Дзен: + + “Мне нужно отправить обновление статуса. + Я отправлю один байт, представляющий код состояния. Контекст уже известен”. + +

    +
  • +
+

+ Конечно, это оптимизация, но, что более важно, это форма уважения. + Эффективность в общей среде — это акт ответственного управления. + Беря из сети только то, что вам нужно, вы оставляете место для других. + Сеть прислушивается к тем, кто говорит с целью. +

+
+
+

+ Поток & Время +

+

+ Дефицит также учит нас ценить время. + Мы стали зависимыми от синхронного настоящего — мгновенных уведомлений, + потоков в реальном времени. Но Reticulum принимает асинхронное время. +

+

+ Когда соединение прерывается, а задержка измеряется минутами или часами, + “реальное время” становится иллюзией. + Reticulum поощряет + Store and Forward не как запасной вариант, + а как основной режим существования. + Вы пишете сообщение, оно распространяется когда может, и приходит, когда приходит. +

+

+ Это меняет психологическую структуру общения. + Устраняется беспокойство, связанное с необходимостью немедленного ответа. + Появляется возможность для размышлений. Вы не требуете внимания получателя прямо сейчас; + вы оставляете ему подарок, который он найдет, когда будет готов. +

+

+ Проектируя с учетом задержек, вы проектируете с учетом отказоустойчивости. + Вы больше не строите карточный домик, который рушится при потере одного пакета. + Вы строите каменную арку, которая распределяет нагрузку во времени. +

+
+
+

+ Освобождение от ограничений +

+

+ В дефиците есть странный оптимизм. + Когда вы вынуждены работать в условиях строгих ограничений, + вы вынуждены расставлять приоритеты. + Вы должны решить, что действительно важно. В этом и заключается суть свободы воли. +

+

+ В бесконечном фантастическом мире Облака всё считается срочным, + поэтому ничто не является таковым. + В экономике Reticulum стоимость передачи данных заставляет вас взвешивать ценность вашего сообщения. + Действительно ли нужно отправлять + + этот сигнал? + Является ли эта фотография необходимой? +

+

Когда вы устраняете шум, остается только сигнал.

+

+ Эта дисциплина создает иной тип разработчика. + Она создает мастера, который понимает, что лучший код — это код, который не нужно писать. + Она создает пользователя, который осознаёт, + что самое сильное сообщение — это то, которое понятно, а не то, которое громче всего. + В мире Reticulum вы не просто потребитель пропускной способности, вы — архитектор намерения. +

+
+
+
+

+ Суверенитет через инфраструктуру +

+

Будь своей собственной сетью

+

+ Мы живем в эпоху цифровой аренды.
+ Мы арендуем свою связь у интернет-провайдеров.
+ Мы арендуем хранилище у поставщиков облачных услуг.
+ Мы даже заимствуем свою личность у платформ социальных сетей.
+ Мы — арендаторы в доме, который не строили, подчиняемся правилам, которые не писали, + и можем быть выселены по прихоти хозяина, который никогда нас не видел. +

+

+ Дзен Reticulum заключается в осознании того, что вы можете стать владельцем этого дома. +

+
+

+ Ложь уровня оператора связи +

+

+ На протяжении десятилетий нам внушали, что создание сетевой инфраструктуры — это не просто сложно, + а вообще невозможно. + Это представляется как темное искусство, доступное только телекоммуникационным компаниям и + миллиардерам, требующее миллионов долларов на оптоволоконные сети, + климатизированные центры обработки данных и армии инженеров. + Нам говорят, что создание надежной инфраструктуры — это + “слишком сложно” для отдельного человека или небольшой организации. +

+

Это большая, жирная ложь.

+

+ Физика проста. Радиоволне нужны передатчик + и приемник. Пакету нужен путь.
+ “Сложность” современного Интернета в основном бюрократическая — + гора биллинговых систем, + регуляторный захват и устаревшие системы, созданные для того, чтобы сохранить + + власть у воротников. +

+

+ Reticulum устраняет бюрократию.
+ Он работает на оборудовании, стоимость которого равна цене ужина.
+ Он использует спектр радио-частот, который свободен для использования.
+ Это демонстрирует, что для создания надежной сети планетарного масштаба не требуется компания из списка + Fortune 500.
+ Необходимы только желание развернуть сеть и распределенные, нескоординированные усилия множества людей. +

+
+
+

+ Личная инфраструктура +

+

+ Здесь все становится на свои места.
+ Вы можете прочитать о Reticulum, понять теорию, но истинное понимание приходит только тогда, + когда вы + подключаете радио устройство и запускаете Транспортный Узел.
+ Внезапно вы перестаете быть потребителем.
+ Вы становитесь оператором. +

+

+ Это изменение едва заметно, но имеет глубокий смысл. + Когда вы управляете собственной инфраструктурой, сеть перестает быть услугой, которая вам предоставляется. + Она становится пространством, в котором вы обитаете. + Вы становитесь ответственными за поток информации. + Вы приобретаете глубокое понимание среды — того, как погода влияет на радиоволны, + как меняется топология, как пакеты данных “танцуют” в эфире. +

+

+ Из этого вытекает спокойная компетентность.
+ Вы перестаете спрашивать “Интернет не работает?” и начинаете спрашивать “Мои ссылки работают?”.
+ Вы перестаете ждать техников и начинаете проверять журналы.
+ Это проявление силы.
+ Понимать систему, которая передает ваши слова, значит освободиться от тайны, + которая держит вас в зависимости. +

+
+
+

+ Возможность отключения +

+

+ Зачем же тогда все эти хлопоты? Зачем покупать радио-устройство, + писать конфигурацию и оставлять + + Raspberry Pi работающим в углу? +

+

+ Потому что старая, централизованная сеть хрупка. + И потому что большинство из нас уже не хочет там находиться. +

+

+ Интернет, на который мы полагаемся сегодня, представляет собой цепочку отдельных точек отказа. + Отрежьте подводный кабель, и весь континент погрузится в темноту. + Отключите электросеть, и облако испарится. + Снизьте приоритет “неправильного” трафика, и поток информации будет перекрыт. +

+

+ Суверенитет — это способность выжить после отключения, независимо от того, + было ли оно случайным или преднамеренным. +

+

+ Когда вы строите свою собственную инфраструктуру, вы создаете спасательный круг.
+ Reticulum предназначен для работы в условиях, которые традиционный интернет + не может охватить — голые провода, радиоприемники с питанием от батарей, + + временные Wi-Fi сети. + Когда сеть дает сбой, приходят цензоры, или не оплачивается счет, + ваша сеть Reticulum продолжает функционировать. +

+

+ Речь не идет о “выходе” из общества.
+ Речь идет о создании основы, на которой может функционировать реальное общество. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: “Мое соединение медленное. + Я должен позвонить своему интернет-провайдеру и пожаловаться.” +

    +
  • +
  • +

    + Подход Дзен: “На пути много помех. Я настрою антенну или найду лучший маршрут.” +

    +
  • +
+

+ Принимая на себя ответственность за инфраструктуру, вы принимаете на себя ответственность за свой голос. + Вы перестаете кричать в чужой мегафон и начинаете создавать свой собственный. + Сеть больше не является чем-то, что происходит с вами; это то, что вы создаете сами. +

+
+
+
+

+ Личность и Номадизм +

+

Изменчивое “Я”

+

+ В старом мире вас определяют ваши координаты. + Если вы находитесь по адресу + 34.109.71.5, то вы здесь. Если вы отсоедините кабель и выйдете на улицу, вы исчезнете. + Ваше цифровое Я испаряется, потому что было привязано к стене. + Вы — призрак в бесконечных механизмах шестеренок, рычагов и транзисторов, + привязанный к оборудованию и тем, кто им владеет. +

+

+ Это создает тонкое, постоянное беспокойство. Мы боимся отключения, + потому что в архитектуре старого Интернета отключение — это своего рода смерть. +

+

Дзен Reticulum предлагает другой способ существования.

+
+

+ Переносимое существование +

+

+ В Reticulum ваша личность — это не местоположение или имя пользователя, присвоенное сервисом. + Это криптографический ключ — сложная, уникальная математическая подпись, + которая существует независимо от физического мира. + Вы можете носить его только в своем уме, если хотите. +

+

+ Думайте об этом не как об адресе, а скорее как об имени. + Настоящем имени. +

+

+ Если вы путешествуете из Берлина в Токио, вы не меняете свое имя. Вы все еще вы. + Люди, которые вас знают, по-прежнему могут вас узнать. + Reticulum применяет этот принцип к сетевому уровню. + Ваш хэш назначения остается неизмененным. + Он путешествует вместе с вами, надежно хранясь на вашем устройстве, неизменный как камень. +

+

+ Это меняет отношения между вами и устройством. + Вы не “входите” в сеть через определенный шлюз. Вы являетесь конечной точкой. + Сеть не подключается к месту, она сходится на вас. +

+
+
+

+ Перемещаемые узлы +

+

+ Эта свобода вводит новое понятие времени и пространства: + Кочевничество [Nomadism]. +

+

+ Поскольку ваша личность является переносимой, ваша связь может быть гибкой. + В один момент вы можете сидеть за столом, подключенным к оптоволоконной магистрали, + а в следующий — идти по полю, подключенным только к дальнобойной сети LoRa. + Для остальной части сети ничего не изменилось. + Вашим друзьям не нужно обновлять вашу контактную информацию. + Отправляемые ими сообщения не возвращаются обратно. + Сеть чувствует смену среды и автоматически перенаправляет поток данных. +

+

+ Вы больше не являетесь стационарным узлом в фиксированной сети. Вы — странник в изменчивой среде. +

+

+ Интерфейсы — будь то WiFi, Ethernet, пакетное радио или + физический провод — это всего лишь одежда, которую носит ваш узел. + Вы меняете ее в зависимости от окружающей среды. + Внутри вы остаетесь прежними. + В этом заключается свобода протокола. + Он рассматривает физическую среду как временное обстоятельство, а не как определение себя. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: + “Я потерял соединение. Мне нужно повторно подключиться к VPN, + чтобы сообщить им, где я сейчас нахожусь.” +

    +
  • +
  • +

    + Подход Дзен: + “Я переместился. Сеть незаметно адаптируется к новой реальности.” +

    +
  • +
+
+
+

+ Объявление о присутствии +

+

Как сеть находит странника? Она слушает.

+

+ В мире IP мы запрашиваем справочники. Мы спрашиваем сервер: “Где Марк?”
+ Сервер проверяет свою базу данных и дает нам координаты. + Это означает, что кто-то, где-то, следит за вами. + Это предполагает и требует наблюдения. +

+

+ Reticulum заменяет наблюдение на Объявления. +

+

+ Вместо того чтобы спрашивать авторитетный центр о своем местонахождении, + вы просто заявляете о своем присутствии.
+ Вы транслируете криптографическое доказательство: “Я здесь, и я тот, за кого себя выдаю”.
+ Эта информация распространяется по сети. + Ваши соседи слышат ее, обновляют свои таблицы маршрутов и передают дальше. +

+

+ Это тихий, органичный процесс. Это цифровой эквивалент зажигания фонарей в темноте. + Вам не нужно гоняться за светом, вы позволяете свету найти вас. Это уважает вашу автономию. + Вы выбираете, когда объявлять о своем присутствии, как часто говорить и с кем. + Вы также выбираете, когда исчезнуть — на мгновение или навсегда. +

+
+
+

+ Якорь в потоке +

+

+ В этом кочевничестве есть глубокий мир. + Оно учит вас, что стабильность не приходит от неподвижности. + Стабильность приходит от внутренней согласованности. +

+

+ Обладая собственным приватным ключом, вы обладаете собственным центром тяжести. + Мир вокруг вас: инфраструктура, топография и доступность связей — все это может хаотично меняться. + Штормы могут сносить башни. Кабели могут быть перерезаны. Интернет может выйти из строя. +

+

+ Но пока у вас есть ключ, у вас есть ваша личность. + Вся инфраструктура может быть разрушена и восстановлена, + а вы останетесь собой. Ничто не вечно, но и ничего не теряется. +

+

+ Вы становитесь независимой сущностью, движущейся сквозь шум, связанной не жесткостью кабелей, + а текучестью признания. + Сеть становится вашим домом, а не просто услугой, на которую вы подписываетесь: + вы ощущаете себя комфортно в эфире. +

+
+
+
+

+ Этика инструмента +

+

Технология с совестью

+

+ Вы отучились от центра.
+ Вы приняли физику доверия.
+ Вы приняли экономику дефицита и свободу безграничного кочевничества.
+ Вы стоите в новом пространстве.
+ Теперь посмотрите на инструмент в вашей руке. +

+

+ В старом мире нас учили, что технология нейтральна.
+ Нам говорят, что “не оружие убивает людей, а люди”, или что компонент — это просто компонент, + независимо от его комбинаторного потенциала.
+ Это удобная ложь.
+ Она служит только для того, чтобы позволить создателям умыть руки от ответственности. +

+

+ Но теперь мы знаем лучше. + Мы знаем, что архитектура — это политика, а политика — это контроль. + То, как вы строите систему, определяет, как она будет использоваться.
+ Если вы построите систему, оптимизированную для массовой слежки, вы получите + + паноптикум.
+ Если вы построите систему, оптимизированную для централизованного контроля, вы получите диктатуру.
+ Если вы создадите систему, оптимизированную для извлечения ресурсов, вы получите паразита. +

+

Дзен Ретикулума утверждает, что инструмент никогда не бывает нейтральным.

+

+ Напротив: инструмент — это + кристаллизованное намерение. +

+
+

+ Принцип вреда +

+

+ Почему лицензия Reticulum запрещает использование программного обеспечения в системах, + предназначенных для нанесения вреда людям? Разве это не просто ограничение свободы? +

+

+ Да, это ограничение лицензии, но в то же время это расширение свободы. +

+

+ Создание мощных инструментов без морального компаса ни в коем случае не является добродетельным + или похвальным, это просто безответственность. +

+

+ Инструмент, который можно легко использовать для угнетения, + представляет реальную опасность для пользователя.
+ Если вы создаете сеть, которую тиран может обратить против вас, вы не свободны.
+ Вы просто ждете, когда поводок затянется. + Закодировав “принцип вреда” в + + юридическом ДНК эталонной реализации, мы создаем защиту. + Мы четко и неизменно заявляем, что этот инструмент предназначен для жизни, а не для смерти. +

+

+ Это приводит программное обеспечение в соответствие с интересами человечества.
+ Это закрепляет, что сеть не может быть использована в качестве системы убийства, + управляющей боевыми дронами или устройством пыток без нарушения лицензии и закона. + Это черта, проводимая на песке — не правительством или внешней властью, + а самими создателями инструмента. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: + “Это всего лишь программное обеспечение. Как люди его используют — не моя проблема.” +

    +
  • +
  • +

    + Подход Дзен: + “Это программное обеспечение — среда обитания. Я не позволю использовать его для создания клетки.” +

    +
  • +
+

+ Вы сами решаете, соглашаться ли с этим — мы никому не навязываем эту точку зрения. + Если вы решите выбрать жизнь вместо смерти, творчество вместо разрушения, + мы предоставим вам чрезвычайно мощный инструмент, которым вы сможете владеть + и строить по своему усмотрению. Если вы не согласны, мы откажем вам в этом. +

+

+ Если вам это не нравится, мы, безусловно, не нуждаемся в вас здесь, + и вы останетесь один на один со своими проблемами. +

+
+
+

+ Public Domain Protocol +

+

+ Это приводит к важному различию: разнице между идеей и ее реализацией. +

+

+ Протокол — математические правила, по которым работает Reticulum — является общественным достоянием. + Он принадлежит всему человечеству.
+ Никто не может владеть им.
+ Любой может реализовать, улучшить или адаптировать его. + Это основная идея свободного общения, которое само по себе должно быть навсегда свободным. +

+

+ Но функциональная, развернутая эталонная реализация — код на Python, + её обслуживание, годы труда — + + имеет совесть. + Это различие является двигателем устойчивости. + Оно позволяет протоколу быть универсальным, одновременно гарантируя, + что конкретный труд создателей не будет использован для + подрыва основополагающих целей самого проекта. + Из этого документа должно быть вполне ясно, каков этот замысел. +

+

+ Если вы хотите создать систему с помощью Reticulum, которая манипулирует и наносит ущерб + пользователям с целью получения прибыли или нацеливает ракеты, + вы можете использовать протокол доступный как общественное достояние + , и начать с нуля.
+ Однако вы не имеете права использовать нашу работу.
+ Вы должны сделать свою собственную. Это служит основой ответственности.
+ Если вы хотите создать оружие, вы должны сами выковать сталь, пока мир наблюдает за вами. + И когда прольется кровь, она будет на ваших руках. +

+
+
+

+ Сохранение человеческой свободы воли +

+

+ Мы живем в эпоху хищнической эксплуатации. + Открытые источники информации подвергаются сбору, обработке и переработке алгоритмами машинного + обучения, чьи корпоративные владельцы стремятся заменить тех самых людей, + которые создали эти источники. + Наш код, наши слова и наше творчество используются для обучения систем, + специально разработанных для того, чтобы сделать нас ненужными, не предлагая ничего взамен, + кроме рабства и оков. +

+

Reticulum выступает против этого.

+

+ Лицензия защищает программное обеспечение от использования в целях кормление зверя. + Она проводит четкую грань: этот инструмент предназначен для людей. + Он предназначен для связи между людьми. + Это не набор данных, который можно добывать с целью создания синтетического повелителя, + управляемого крошечным конгломератом контролеров. +

+

+ Это радикальный акт сохранения. + Защищая код от присвоения искусственным интеллектом, + мы защищаем возможность человека действовать самостоятельно. + Мы обеспечиваем сохранение цифровой сферы, где действующие лица — это живые люди с плотью, + кровью и душой, а решения принимаются умами, а не владыками, скрывающимися за ИИ моделями. +

+

+ Когда вы используете Reticulum, вы используете инструмент, который уважает вас.
+ Он не рассматривает вас как продукт, за которым нужно следить.
+ Он не рассматривает ваши данные как топливо для алгоритма.
+ Он рассматривает вас как независимого, равного партнера. +

+

+ Это меняет базовый принцип использования технологии.
+ Это восстанавливает достоинство взаимодействия.
+ Вы не являетесь пользователем услуги; вы являетесь участником взаимного соглашения. + Инструмент согласуется с вашей автономией, а не подрывает ее. +

+

+ Таким образом, этика является не ограничением, а основой. + Эта основа помогает гарантировать, что сеть будет принадлежать вам и завтра. +

+
+
+
+

+ Шаблоны проектирования для систем Post-IP +

+

Практическая философия для разработчиков

+

+ Философия бесполезна, если ее невозможно воплотить в коде.
+ Метафоры, которые мы рассмотрели — кочевничество, + дефицит, доверие — это не просто поэзия, а реальные инженерные ограничения. + Когда вы садитесь писать программное обеспечение для Reticulum, + эти концепции должны формировать саму структуру вашего приложения. +

+

+ Теперь мы переходим от почему к как. + Здесь абстрактное становится конкретным, и вы увидите истинную + + глубину узоров, которые мы плели. +

+
+

+ Хранение & Пересылка +

+

+ Интернет приучил нас к нетерпеливости.
+ Мы пишем синхронный код.
+ Мы отправляем запрос и ждем, блокируя пользовательский интерфейс и затаив дыхание.
+ Если ответ не приходит в течение 250 миллисекунд, мы показываем индикатор загрузки.
+ Если он не приходит в течение пяти секунд, мы показываем ошибку.
+ Мы рассматриваем сетевое соединение как двоичное состояние: либо мы “онлайн”, либо мы “сломаны”. +

+

Это хрупко. Это отказ от реальности.

+

+ В Reticulum + связность представляет собой спектр, а присутствие является асинхронным. + Если это применимо к вашим целям, + вы должны разрабатывать свои приложения с учетом Store & Forward. +

+

+ Вместо того чтобы требовать мгновенного ответа, приложение должно выступать в роли терпеливого участника. + Вы создаете сообщение для кого-то или чего-то в сети. Сеть хранит его. + Она передает его от узла к узлу, возможно, в течение нескольких часов или дней, + ожидая появления получателя. + Когда он наконец появляется, сообщение доставляется.
+ Это требует перехода от модели “запрос/ответ” к модели “событие/обработчик”. + Как именно это сделать — задача, которую вам предстоит решить интеллектуально в рамках вашей + проблемной области, но уже существуют системы на основе Reticulum, + которые делают это чрезвычайно хорошо, и вы можете использовать их в качестве вдохновения. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: + Connect() + -> Send() + -> Wait() + -> Crash + if + timeout. +

    +
  • +
  • +

    + Подход Дзен: + Send() + -> + Continue + living. + -> + Receive() + when it + arrives. +

    +
  • +
+

+ Это кардинально меняет пользовательский опыт. + Исчезает беспокойство, связанное с индикатором загрузки. Создается ощущение непрерывности. + Пользователь не “ждет сеть”, он взаимодействует с постоянным журналом коммуникаций, + который существует непосредственно в самой сети. +

+
+
+

+ Имя — это сила +

+

+ В мире IP мы являемся рабами системы доменных имен (DNS). + Мы полагаемся на иерархию регистраторов, которые сопоставляют понятные для человека имена + с понятными для машин адресами. + Эта иерархия является узким местом. + Если регистратор аннулирует ваш домен или DNS сервер выйдет из строя, вы исчезнете. +

+

+ Reticulum устраняет эту иерархию с помощью + идентификации на основе хешей. +

+

+ В этом шаблоне проектирования имя — не строка, которую нужно искать; + это криптографический адрес назначения, который проверяется. + При проектировании для Reticulum вы перестаете запрашивать у пользователя URL-адрес и + начинаете запрашивать + Хеш назначения или Хеш идентификатора. +

+

+ Сначала это кажется странным. Хеш типа + <83b7328926fed0d2e6a10a7671f9e237> + выглядит чужеродным по сравнению с + myfriend.com. + Но эта чужеродность и есть защита. Ее нельзя подделать. + Ее нельзя подвергнуть цензуре со стороны регистратора. Она абсолютна. +

+

+ + Проектирование этого подразумевает изменение концепций вашего пользовательского интерфейса. + Вы больше не просматриваете веб-страницы — вы управляете реестром ключей.
+ Вы создаете “адресную книгу”, которая на самом деле является связкой ключей.
+ Имена присваиваются пользователем, и власть остается за ним. + Сложный вид хэшей напрямую отражает надёжность связей, образованных при их использовании.
+ Это заставляет пользователя участвовать в процессе проверки, обмен рукопожатием (out-of-band handshake), + которое восстанавливает человеческий элемент доверия, стертый SSL-сертификатами. +

+
+
+

+ Интерфейс — это среда +

+

+ Один из самых освобождающих паттернов в Reticulum — это + транспортный агностицизм. +

+

+ В традиционных сетях код часто перегружен транспортной логикой.
+ “Я подключен к Wi-Fi? + Проверить пропускную способность. + Я подключен к сотовой сети? Проверить тарифный план. Я подключен к Ethernet?”. + Вы постоянно занимаетесь микроуправлением каналов. +

+

+ В Reticulum вы обращаетесь к API, а API записывает данные в среду передачи. + Вы отправляете пакет в пункт назначения. + Вам не важно, проходит ли этот пакет через TCP-туннель, радиоволну LoRa или + последовательный интерфейс. Об этом заботится стек. +

+

+ Это позволяет создавать универсальные приложения. + Представьте себе мессенджер. Вы пишете его один раз. + Он работает на ноутбуке, подключенном к оптоволоконной сети. + Он работает на телефоне в городе через Wi-Fi. + И, без изменения ни одной строчки кода, он работает на устройстве в глуши, + обмениваясь данными с другими устройствами только по радио. +

+

+ Принцип прост: + никогда не программируйте под конкретное оборудование. Программируйте под задачу. +

+

Рассмотрим:

+
    +
  • +

    + Старый подход: + socket.connect(ip, + port), а затем еще много всего +

    +
  • +
  • +

    + Подход Дзен: + RNS.Packet(destination, + data).send() +

    +
  • +
+

+ Абстрагируя среду передачи данных, вы делаете свое программное обеспечение невосприимчивым к + изменениям в инфраструктуре. Завтра пользователь может переключиться с + точки доступа 4G на высокочастотный модем (HF). + Вашему программному обеспечению не нужно об этом знать. + Оно просто продолжает разговор. +

+
+
+

+ Возникающие паттерны +

+

+ Сочетая эти паттерны — хранение и пересылка, + идентификация на основе хешей и + транспортная независимость — вы создаете программное обеспечение, + которое воспринимается совершенно иначе. +

+

+ В нём чувствуется стабильность. + Оно не сбоит при потере сигнала. + Оно не паникует, когда сервер не работает. + Оно обладает весом. + Оно обладает устойчивостью. + Оно обладает значимостью. +

+

+ Вы больше не создаете “клиент”, который выпрашивает внимания у “сервера”. + Вы создаете автономного агента, существующего внутри сети. + Он говорит, когда это необходимо, слушает, когда может, + и несет свою идентичность с собой, куда бы ни пошел. +

+

+ Это кульминация Дзен.
+ Код — это не просто набор инструкций: это оболочка поведения.
+ Это способ существования в сети. +

+
+
+
+

+ Суть независимости +

+

+ Мы развеяли иллюзии. Мы поняли, что центр пуст, что доверие должно быть прочным, + что ресурсы ограничены и что мы должны владеть своей инфраструктурой. + Мы поняли, что инструменты имеют свою этику и что + + наша идентичность может меняться. +

+

+ Это возвращение общего достояния. + Слишком долго мы позволяли, чтобы самая важная основа человеческого общества — + наша способность общаться друг с другом — была колонизирована структурами, + которые не разделяют наших интересов. + Мы позволили, чтобы архитектура нашей коммуникации проектировалась бухгалтерами, + а не архитекторами. +

+

+ Мы возвращаем её себе. Не обращаясь с просьбами к хозяевам, + а строя новый мир внутри, над, под и вокруг оболочки старого. +

+
+

+ Работа завершена +

+

Самое сложное позади.

+

+ Протокол находится в общественном достоянии — это подарок человечеству, + который никто не сможет у него отнять.
+ Программное обеспечение написано, протестировано и работает на устройствах по всему миру.
+ Руководство лежит перед вами.
+ Исходный код эталонной реализации теперь распространен на сотнях тысяч устройств по всей планете. + Никто не может его удалить или уничтожить. Аппаратное обеспечение доступно и широко распространено. +

+

+ Путь сюда был труден, но мы дошли. + Теперь нет комитета по дорожной карте, ожидающего одобрения. + Нет венчурного капитала, диктующего пользовательский опыт. + Нет генерального директора, который должен утвердить выпуск следующей функции. +

+

Есть только вы.

+

+ Барьер для входа — это уже не сложность: это просто привычка к зависимости.
+ Вас приучили ждать. + Ждать обновления приложения. + Ждать, пока провайдер починит линию. + Ждать, пока платформа разрешит публикацию. + Ждать, пока правительство изменит политику. + Ждать лайков. + Ждать, пока революцию покажут по телевизору. +

+

Революцию так и не показали по телевизору.

+

Она передается пакетами.

+
+
+

+ Открытое небо +

+

Будущее этой технологии — это строительный проект.

+

+ Это похоже на одиночный узел на подоконнике, прислушивающийся к шуму помех. + Это похоже на сообщение, отправленное соседу в обход шума коммерческого интернета. + Это похоже на сеть сообщества, которое растёт, звено за звеном, прыжок за прыжком, + поддерживаемая руками тех, кому важнее связь, чем прибыль. +

+

+ У вас есть чертежи. У вас есть инструменты. У вас есть философия. + Шум старого мира улетучился, оставив вам тихую + + ясность открытого спектра. +

+

Mark, начало 2026 года

+
+
+
+
+
+ +
+ + +
+
+ + + + + + + +