Compare commits

..

22 commits

Author SHA1 Message Date
Mark Qvist
c9dbc11d9d
Display stamp costs and values in announce stream entries
Some checks are pending
Create and publish a Docker image / build-and-push-image (push) Waiting to run
2026-11-17 17:19:03 +01:00
Mark Qvist
a56c1da49b
Updated versions 2026-11-17 16:33:49 +01:00
Mark Qvist
415559f731
Added ability to configure LXMF destination stamp value 2026-11-17 16:33:23 +01:00
Mark Qvist
c47f9e4d97
Added ability to configure node stamp value and link cost 2026-11-17 16:16:11 +01:00
Mark Qvist
9dd3d861ea
Cleanup 2026-11-01 23:12:39 +01:00
Mark Qvist
22cd7ceff3
Prepared announce filtering 2026-11-01 21:49:54 +01:00
Mark Qvist
1f477ca8cf
Updated versions 2026-10-28 13:14:11 +01:00
Mark Qvist
f6b56044b4
Updated versions 2026-10-26 00:12:17 +01:00
Mark Qvist
b2f852c9e0
Updated logging
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
2026-09-30 15:08:55 +02:00
Mark Qvist
84620f8471
Updated versions 2026-09-28 19:13:30 +02:00
Mark Qvist
725c5a1b42
Soft-fail and block missing termios on Windows 2026-09-27 14:52:39 +02:00
Mark Qvist
e5d7de4537
Updated version 2026-09-27 14:32:15 +02:00
Mark Qvist
9d24271090
Fixed invalid divider chars crashing page rendering 2026-09-27 14:30:47 +02:00
Mark Qvist
cfe23af68d
Updated readme
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
2026-09-26 21:07:54 +02:00
Mark Qvist
64b750c28b
Updated readme 2026-09-26 21:07:23 +02:00
Mark Qvist
2561f73d4c
Updated readme 2026-09-26 21:02:50 +02:00
Mark Qvist
5fbd2914af
Updated readme 2026-09-26 21:00:46 +02:00
Mark Qvist
9f57b972c1
Updated readme 2026-09-26 21:00:24 +02:00
Mark Qvist
f286853b2b
Updated readme 2026-09-26 20:59:00 +02:00
Mark Qvist
700104d3de
Updated readme 2026-09-26 20:56:30 +02:00
Mark Qvist
abdfc62b17
Updated readme 2026-09-26 20:46:29 +02:00
Mark Qvist
e1e8ab8380
Hello typo my old friend 2026-09-11 20:16:13 +02:00
14 changed files with 122 additions and 81 deletions

View file

@ -1,10 +1,19 @@
# Nomad Network - Communicate Freely # Nomad Network - Communicate Freely
> [!WARNING]
> Several hastily launched, incorrect, and in most cases entirely LLM-generated fakes of Nomad Network and associated tools are currently being circulated and marketed. Most of these "projects" violate the open source GPLv3 license that Nomad Network was published under, but claim independent ownership and license grants. Such claims or grants are **not** legally valid, and **not** recognized by the Nomad Network authors and copyright holders.
>
> Any claimed assertion of copyright or grant of license that such projects are making are [void grants](https://reticulum.network/manual/brandolinis.html#void-grants-legal-foundations-of-machine-generated-code). Both the violators themselves, and **all** downstream projects using the infringing derivatives, are **directly** and **personally** liable for the legal consequences.
>
> For more detailed information, see the relevant sections of the [Brandolini's Reference](https://reticulum.network/manual/brandolinis.html) chapter of the Reticulum Manual. For software and projects recognized by the Reticulum community, see the [Programs Using Reticulum](https://reticulum.network/manual/software.html) chapter.
>
> Do **not** use these "projects", they are a hazard to the entire ecosystem we have been carefully building over the last ten years.
*This repository is [a public mirror](./MIRROR.md). All development is happening elsewhere.* *This repository is [a public mirror](./MIRROR.md). All development is happening elsewhere.*
Off-grid, resilient mesh communication with strong encryption, forward secrecy and extreme privacy. Off-grid, resilient mesh communication with strong encryption, forward secrecy and extreme privacy.
![Screenshot](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/1.png) ![Screenshot](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/1a.png)
Nomad Network allows you to build private and resilient communications platforms that are in complete control and ownership of the people that use them. No signups, no agreements, no handover of any data, no permissions and gatekeepers. Nomad Network allows you to build private and resilient communications platforms that are in complete control and ownership of the people that use them. No signups, no agreements, no handover of any data, no permissions and gatekeepers.
@ -12,15 +21,23 @@ Nomad Network is build on [LXMF](https://github.com/markqvist/LXMF) and [Reticul
Nomad Network does not need any connections to the public internet to work. In fact, it doesn't even need an IP or Ethernet network. You can use it entirely over packet radio, LoRa or even serial lines. But if you wish, you can bridge islanded networks over the Internet or private ethernet networks, or you can build networks running completely over the Internet. The choice is yours. Since Nomad Network uses Reticulum, it is efficient enough to run even over *extremely* low-bandwidth medium, and has been succesfully used over 300bps radio links. Nomad Network does not need any connections to the public internet to work. In fact, it doesn't even need an IP or Ethernet network. You can use it entirely over packet radio, LoRa or even serial lines. But if you wish, you can bridge islanded networks over the Internet or private ethernet networks, or you can build networks running completely over the Internet. The choice is yours. Since Nomad Network uses Reticulum, it is efficient enough to run even over *extremely* low-bandwidth medium, and has been succesfully used over 300bps radio links.
If you'd rather want to use an LXMF client with a graphical user interface, you may want to take a look at [Sideband](https://github.com/markqvist/sideband), which is available for Linux, Android and macOS. If you'd rather want to use an LXMF client with a graphical user interface, you may want to take a look at [Sideband](https://github.com/markqvist/sideband), which is available for Linux, Android, Windows and macOS.
Other Nomad Network clients include:
- [MeshChatX](https://meshchatx.com/)
- [Columba (mobile)](https://github.com/torlando-tech/columba)
- [Ren Browser](https://github.com/Quad4-Software/Ren-Browser)
## Notable Features ## Notable Features
- Encrypted messaging over packet-radio, LoRa, WiFi or anything else [Reticulum](https://github.com/markqvist/Reticulum) supports. - Encrypted messaging over packet-radio, LoRa, WiFi or anything else [Reticulum](https://github.com/markqvist/Reticulum) supports.
- Zero-configuration, minimal-infrastructure mesh communication - Zero-configuration, minimal-infrastructure mesh communication
- Distributed and encrypted message store holds messages for offline users - Distributed and encrypted message store holds messages for offline users
- Connectable nodes that can host pages and files - Connectable nodes that can host pages and files
- Image rendering support in terminals that support it
- Node-side generated pages with PHP, Python, bash or others - Node-side generated pages with PHP, Python, bash or others
- Built-in text-based browser for interacting with contents on nodes - Built-in text-based browser for interacting with contents on nodes
- Built-in RRC client for live, many-to-many chat
- An easy to use and bandwidth efficient markup language for writing pages - An easy to use and bandwidth efficient markup language for writing pages
- Page caching in browser - Page caching in browser
@ -76,10 +93,10 @@ The first time the program is running, you will be presented with the **Guide se
To use Nomad Network on packet radio or LoRa, you will need to configure your Reticulum installation to use any relevant packet radio TNCs or LoRa devices on your system. See the [Reticulum documentation](https://markqvist.github.io/Reticulum/manual/interfaces.html) for info. For a general introduction on how to set up such a system, take a look at [this post](https://unsigned.io/private-messaging-over-lora/). To use Nomad Network on packet radio or LoRa, you will need to configure your Reticulum installation to use any relevant packet radio TNCs or LoRa devices on your system. See the [Reticulum documentation](https://markqvist.github.io/Reticulum/manual/interfaces.html) for info. For a general introduction on how to set up such a system, take a look at [this post](https://unsigned.io/private-messaging-over-lora/).
If you want to try Nomad Network without building your own physical network, you can connect to the [Unsigned.io RNS Testnet](https://github.com/markqvist/Reticulum#public-testnet) over the Internet, where there is already some Nomad Network and LXMF activity. If you connect to the testnet, you can leave nomadnet running for a while and wait for it to receive announces from other nodes on the network that host pages or services, or you can try connecting directly to some nodes listed here: If you want to try Nomad Network without building your own physical network, you can connect to the [distributed backbone](https://reticulum.network/manual/gettingstartedfast.html#bootstrapping-connectivity) over the Internet, where there is already quite a bit of Nomad Network and LXMF activity. If you connect to the testnet, you can leave nomadnet running for a while and wait for it to receive announces from other nodes on the network that host pages or services, or you can try connecting directly to some nodes listed here:
- `abb3ebcd03cb2388a838e70c001291f9` Dublin Hub Testnet Node - `9ce92808be498e9e05590ff27cbfdfe4` The rns.recipes forum
- `ea6a715f814bdc37e56f80c34da6ad51` Frankfurt Hub Testnet Node - `a4a5e861626ce97c9aa544d9ecdf6d22` rmap.world
To browse pages on a node that is not currently known, open the URL dialog in the `Network` section of the program by pressing `Ctrl+U`, paste or enter the address and select `Go` or press enter. Nomadnet will attempt to discover and connect to the requested node. To browse pages on a node that is not currently known, open the URL dialog in the `Network` section of the program by pressing `Ctrl+U`, paste or enter the address and select `Go` or press enter. Nomadnet will attempt to discover and connect to the requested node.
@ -88,42 +105,12 @@ You can install Nomad Network on Android using Termux, but there's a few more co
For a native Android application with a graphical user interface, have a look at [Sideband](https://github.com/markqvist/Sideband). For a native Android application with a graphical user interface, have a look at [Sideband](https://github.com/markqvist/Sideband).
### Docker Images
Nomad Network is automatically published as a docker image on Github Packages. Image tags are one of either `master` (for the very latest commit) or the version number (eg `0.2.0`) for a specific release.
```sh
$ docker pull ghcr.io/markqvist/nomadnet:master
# Run nomadnet interactively in a container
$ docker run -it ghcr.io/markqvist/nomadnet:master --textui
# Run nomadnet as a daemon, using config stored on the host machine in specified
# directories, and connect the containers network to the host network (which will
# allow the default AutoInterface to automatically peer with other discovered
# Reticulum instances).
$ docker run -d \
-v /local/path/nomadnetconfigdir/:/root/.nomadnetwork/ \
-v /local/path/reticulumconfigdir/:/root/.reticulum/ \
--network host
ghcr.io/markqvist/nomadnet:master
# You can also keep the network of the container isolated from the host, but you
# will need to manually configure one or more Reticulum interfaces to reach other
# nodes in a network, by editing the Reticulum configuration file.
$ docker run -d \
-v /local/path/nomadnetconfigdir/:/root/.nomadnetwork/ \
-v /local/path/reticulumconfigdir/:/root/.reticulum/ \
ghcr.io/markqvist/nomadnet:master
# Send daemon log output to console instead of file
$ docker run -i ghcr.io/markqvist/nomadnet:master --daemon --console
```
## Tools & Extensions ## Tools & Extensions
Nomad Network is a very flexible and extensible platform, and a variety of community-provided tools, utilities and node-side extensions exist: Nomad Network is a very flexible and extensible platform, and a variety of community-provided tools, utilities and node-side extensions exist:
- [Retipedia](https://github.com/RFnexus/Retipedia)
- [NomadForum](https://codeberg.org/AutumnSpark1226/nomadForum) ([GitHub mirror](https://github.com/AutumnSpark1226/nomadForum)) - [NomadForum](https://codeberg.org/AutumnSpark1226/nomadForum) ([GitHub mirror](https://github.com/AutumnSpark1226/nomadForum))
- [NomadForecast](https://github.com/faragher/NomadForecast) - [NomadForecast](https://github.com/faragher/NomadForecast)
- [micron-blog](https://github.com/randogoth/micron-blog) - [micron-blog](https://github.com/randogoth/micron-blog)
@ -137,9 +124,6 @@ Nomad Network is a very flexible and extensible platform, and a variety of commu
- [POPR](https://github.com/faragher/POPR) - [POPR](https://github.com/faragher/POPR)
- [LXMF Tools](https://github.com/SebastianObi/LXMF-Tools) - [LXMF Tools](https://github.com/SebastianObi/LXMF-Tools)
## Help & Discussion
For help requests, discussion, sharing ideas or anything else related to Nomad Network, please have a look at the [Nomad Network discussions pages](https://github.com/markqvist/Reticulum/discussions/categories/nomad-network).
## Support Nomad Network ## Support Nomad Network
You can help support the continued development of open, free and private communications systems by donating via one of the following channels: You can help support the continued development of open, free and private communications systems by donating via one of the following channels:
@ -161,32 +145,12 @@ You can help support the continued development of open, free and private communi
- Ko-Fi: https://ko-fi.com/markqvist - Ko-Fi: https://ko-fi.com/markqvist
## Development Roadmap
- New major features
- Network-wide propagated bulletins and discussion threads
- Collaborative maps and geospatial information sharing
- Minor improvements and fixes
- Link status (RSSI and SNR) in conversation or conv list
- Ctrl-M shorcut for jumping to menu
- Share node with other users / send node info to user
- Fix internal editor failing on some OSes with no "editor" alias
- Possibly add a required-width header
- Improve browser handling of remote link close
- Better navigation handling when requests fail (also because of closed links)
- Retry failed messages mechanism
- Re-arrange buttons to be more consistent
- Term compatibility notice in readme
- Selected icon in conversation list
- Possibly a Search Local Nodes function
- Possibly add via entry in node info box, next to distance
## Caveat Emptor ## Caveat Emptor
Nomad Network is beta software, and should be considered as such. While it has been built with cryptography best-practices very foremost in mind, it _has not_ been externally security audited, and there could very well be privacy-breaking bugs. If you want to help out, or help sponsor an audit, please do get in touch. Nomad Network is beta software, and should be considered as such. Use at your own risk and responsibility.
## Screenshots ## Screenshots
![Screenshot 1](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/1.png) ![Screenshot 1](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/1a.png)
![Screenshot 2](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/2.png) ![Screenshot 2](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/2.png)
@ -194,4 +158,6 @@ Nomad Network is beta software, and should be considered as such. While it has b
![Screenshot 4](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/4.png) ![Screenshot 4](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/4.png)
![Screenshot 5](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/5.png) ![Screenshot 5](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/5.png)
![Screenshot 6](https://github.com/markqvist/NomadNet/raw/master/docs/screenshots/6.png)

View file

@ -16,6 +16,7 @@ If you'd rather want to use an LXMF client with a graphical user interface, you
• Zero-configuration, minimal-infrastructure mesh communication • Zero-configuration, minimal-infrastructure mesh communication
• Distributed and encrypted message store holds messages for offline users • Distributed and encrypted message store holds messages for offline users
• Connectable nodes that can host pages and files • Connectable nodes that can host pages and files
• Image rendering support in terminals that support it
• Node-side generated pages with PHP, Python, bash or others • Node-side generated pages with PHP, Python, bash or others
• Built-in text-based browser for interacting with contents on nodes • Built-in text-based browser for interacting with contents on nodes
• Built-in RRC client for live, many-to-many chat • Built-in RRC client for live, many-to-many chat
@ -119,4 +120,4 @@ For this to be possible, I need your help. Please support the continued developm
>> Caveat Emptor >> Caveat Emptor
Nomad Network is experimental software, and should be considered as such. While it has been built with cryptography best-practices very foremost in mind, it `!has not`! been externally security audited, and there could very well be privacy-breaking bugs. Use at your own risk and responsibility. Nomad Network is experimental software, and should be considered as such. Use at your own risk and responsibility.

BIN
docs/screenshots/1a.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

View file

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 KiB

Before After
Before After

View file

@ -6,7 +6,7 @@ import nomadnet
import threading import threading
import RNS.vendor.umsgpack as msgpack import RNS.vendor.umsgpack as msgpack
from LXMF import pn_announce_data_is_valid from LXMF import pn_announce_data_is_valid, PN_META_IMPL_NAME, PN_META_VERSION
from nomadnet.util import strip_modifiers from nomadnet.util import strip_modifiers
from nomadnet.util import sanitize_name from nomadnet.util import sanitize_name
@ -21,7 +21,10 @@ class PNAnnounceHandler:
data = msgpack.unpackb(app_data) data = msgpack.unpackb(app_data)
if data[2] == True: if data[2] == True:
RNS.log("Received active propagation node announce from "+RNS.prettyhexrep(destination_hash), RNS.LOG_DEBUG) metadata = data[6]
if not PN_META_IMPL_NAME in metadata or not PN_META_VERSION in metadata: impl_str = ""
else: impl_str = f" running {metadata[PN_META_IMPL_NAME]} {metadata[PN_META_VERSION]}"
RNS.log(f"Received active propagation node announce from {RNS.prettyhexrep(destination_hash)}{impl_str}", RNS.LOG_DEBUG)
associated_peer = RNS.Destination.hash_from_name_and_identity("lxmf.delivery", announced_identity) associated_peer = RNS.Destination.hash_from_name_and_identity("lxmf.delivery", announced_identity)
associated_node = RNS.Destination.hash_from_name_and_identity("nomadnetwork.node", announced_identity) associated_node = RNS.Destination.hash_from_name_and_identity("nomadnetwork.node", announced_identity)

View file

@ -21,6 +21,8 @@ class Node:
self.app = app self.app = app
self.identity = self.app.identity self.identity = self.app.identity
self.destination = RNS.Destination(self.identity, RNS.Destination.IN, RNS.Destination.SINGLE, "nomadnetwork", "node") self.destination = RNS.Destination(self.identity, RNS.Destination.IN, RNS.Destination.SINGLE, "nomadnetwork", "node")
self.destination.set_link_cost(self.app.node_link_cost)
if self.app.node_stamp_value: self.destination.set_value(self.app.node_stamp_value)
self.last_announce = time.time() self.last_announce = time.time()
self.last_file_refresh = time.time() self.last_file_refresh = time.time()
self.last_page_refresh = time.time() self.last_page_refresh = time.time()

View file

@ -36,6 +36,9 @@ class NomadNetworkApp:
START_ANNOUNCE_DELAY = 3 START_ANNOUNCE_DELAY = 3
REQUIRED_DESTINATION_TYPES = ["nomadnetwork.node", "rrc.hub"]
DEFAULT_LINK_COST = 17.8
def exit_handler(self): def exit_handler(self):
self.should_run_jobs = False self.should_run_jobs = False
@ -103,6 +106,9 @@ class NomadNetworkApp:
NomadNetworkApp._shared_instance = self NomadNetworkApp._shared_instance = self
self.rns = RNS.Reticulum(configdir = rnsconfigdir) self.rns = RNS.Reticulum(configdir = rnsconfigdir)
# self.rns.required_announces_only(True)
for full_name in self.REQUIRED_DESTINATION_TYPES:
self.rns.wants_destination_type(full_name)
self.configpath = self.configdir+"/config" self.configpath = self.configdir+"/config"
self.ignoredpath = self.configdir+"/ignored" self.ignoredpath = self.configdir+"/ignored"
@ -144,10 +150,13 @@ class NomadNetworkApp:
self.notify_on_new_message = True self.notify_on_new_message = True
self.compose_markdown = True self.compose_markdown = True
self.lxmf_stamp_value = None
self.lxmf_max_propagation_size = None self.lxmf_max_propagation_size = None
self.lxmf_max_sync_size = None self.lxmf_max_sync_size = None
self.lxmf_max_incoming_size = None self.lxmf_max_incoming_size = None
self.node_propagation_cost = LXMF.LXMRouter.PROPAGATION_COST self.node_propagation_cost = LXMF.LXMRouter.PROPAGATION_COST
self.node_link_cost = self.DEFAULT_LINK_COST
self.node_stamp_value = None
self.periodic_lxmf_sync = True self.periodic_lxmf_sync = True
self.lxmf_sync_interval = 360*60 self.lxmf_sync_interval = 360*60
@ -381,7 +390,7 @@ class NomadNetworkApp:
for destination_hash in self.ignored_list: for destination_hash in self.ignored_list:
self.message_router.ignore_destination(destination_hash) self.message_router.ignore_destination(destination_hash)
self.lxmf_destination = self.message_router.register_delivery_identity(self.identity, display_name=self.peer_settings["display_name"], stamp_cost=self.required_stamp_cost) self.lxmf_destination = self.message_router.register_delivery_identity(self.identity, display_name=self.peer_settings["display_name"], stamp_cost=self.required_stamp_cost, stamp_value=self.lxmf_stamp_value)
if not self.accept_invalid_stamps: if not self.accept_invalid_stamps:
self.message_router.enforce_stamps() self.message_router.enforce_stamps()
@ -862,6 +871,11 @@ class NomadNetworkApp:
value = self.config["client"].as_bool(option) value = self.config["client"].as_bool(option)
self.enable_client = value self.enable_client = value
if option == "stamp_value":
value = self.config["client"].as_float("stamp_value")
if value < 1: value = 1
self.lxmf_stamp_value = RNS.Stamps.quantize_cost(value)
if option == "downloads_path": if option == "downloads_path":
value = self.config["client"]["downloads_path"] value = self.config["client"]["downloads_path"]
self.downloads_path = os.path.expanduser(value) self.downloads_path = os.path.expanduser(value)
@ -1140,6 +1154,16 @@ class NomadNetworkApp:
else: else:
self.node_name = self.config["node"]["node_name"] self.node_name = self.config["node"]["node_name"]
if "link_cost" in self.config["node"]:
value = self.config["node"].as_float("link_cost")
if value < 1: value = 1
self.node_link_cost = RNS.Stamps.quantize_cost(value)
if "stamp_value" in self.config["node"]:
value = self.config["node"].as_float("stamp_value")
if value < 1: value = 1
self.node_stamp_value = RNS.Stamps.quantize_cost(value)
if not "disable_propagation" in self.config["node"]: if not "disable_propagation" in self.config["node"]:
self.disable_propagation = True self.disable_propagation = True
else: else:

View file

@ -223,6 +223,9 @@ class RRCHub:
self.dest_name = dest_name or DEFAULT_DEST_NAME self.dest_name = dest_name or DEFAULT_DEST_NAME
self.name = name or RNS.prettyhexrep(hub_hash) self.name = name or RNS.prettyhexrep(hub_hash)
if not self.dest_name == DEFAULT_DEST_NAME:
RNS.Reticulum.get_instance().wants_destination_type(self.dest_name)
self.link = None self.link = None
self.status = RRCHub.STATUS_DISCONNECTED self.status = RRCHub.STATUS_DISCONNECTED
self.status_text = "Disconnected" self.status_text = "Disconnected"
@ -1246,7 +1249,7 @@ class RRCHub:
# for it's purpose. My future work in chat-related # for it's purpose. My future work in chat-related
# protocols on Reticulum will be focused on a better # protocols on Reticulum will be focused on a better
# architecture, incorporating everything we learned # architecture, incorporating everything we learned
# from RRC, and makeing it Reticulum-native from the # from RRC, and making it Reticulum-native from the
# start, instead of mirroring IRC too closely. # start, instead of mirroring IRC too closely.
# - Mark # - Mark
was_parsed = self._process_notice_text(body) was_parsed = self._process_notice_text(body)

View file

@ -1 +1 @@
__version__ = "1.4.3" __version__ = "1.5.1"

View file

@ -1018,6 +1018,12 @@ The number of minutes between each automatic sync. The default is equal to 6 hou
On low-bandwidth networks, it can be useful to limit the amount of messages downloaded in each sync. The default is 8. Set to 0 to download all available messages every time a sync occurs. On low-bandwidth networks, it can be useful to limit the amount of messages downloaded in each sync. The default is 8. Set to 0 to download all available messages every time a sync occurs.
< <
>>>
`!stamp_value = 25.0`!
>>>>
The target stamp value for your LXMF destination can be configured with this option. Defaults to 25.0. Each increase of 1.0 doubles the generation difficulty. Destination stamps are one-time generations, so it can be worth targeting a high value here, to ensure that other transport nodes will accept your announces. The default should be sufficient for most cases, though.
<
>>> >>>
`!required_stamp_cost = None`! `!required_stamp_cost = None`!
>>>> >>>>
@ -1215,6 +1221,18 @@ Determines whether the node server should be started on launch. Must be a boolea
Defines what the announced name of the node should be. Defines what the announced name of the node should be.
< <
>>>
`!stamp_value = 25.0`!
>>>>
The target stamp value for your node destination can be configured with this option. Defaults to 25.0. Each increase of 1.0 doubles the generation difficulty. Destination stamps are one-time generations, so it can be worth targeting a high value here, to ensure that other transport nodes will accept your announces. The default should be sufficient for most cases, though.
<
>>>
`!link_cost = 17.8`!
>>>>
The link stamp cost required for other peers to connect to your node. The default is a relatively high value, that should deter most automated scraping and misuse, but you can set it even higher, if you wish, or lower it to allow connecting more easily.
<
>>> >>>
`!announce_at_start = yes`! `!announce_at_start = yes`!
>>>> >>>>

View file

@ -603,14 +603,14 @@ def parse_line(line, state, url_delegate):
if len(line) == 2: if len(line) == 2:
divider_char = line[1] divider_char = line[1]
# Control characters don't make sense here and otherwise crash nomadnet # Control characters don't make sense here and otherwise crash nomadnet
if ord(divider_char) < 32: if ord(divider_char) < 32: divider_char = "\u2500"
divider_char = "\u2500" # Check if the divider char is renderable
else: try: urwid.Divider(divider_char).render((30,))
divider_char = "\u2500" except Exception as e: divider_char = "\u2500"
if state["depth"] == 0: else: divider_char = "\u2500"
return [urwid.Divider(divider_char)]
else: if state["depth"] == 0: return [urwid.Divider(divider_char)]
return [urwid.Padding(urwid.Divider(divider_char), left=left_indent(state), right=right_indent(state))] else: return [urwid.Padding(urwid.Divider(divider_char), left=left_indent(state), right=right_indent(state))]
output = make_output(state, line, url_delegate, pre_escape) output = make_output(state, line, url_delegate, pre_escape)

View file

@ -8,6 +8,7 @@ from nomadnet.Directory import DirectoryEntry
from nomadnet.vendor.additional_urwid_widgets import IndicativeListBox, MODIFIER_KEY from nomadnet.vendor.additional_urwid_widgets import IndicativeListBox, MODIFIER_KEY
from nomadnet.util import strip_modifiers from nomadnet.util import strip_modifiers
from nomadnet.util import sanitize_name from nomadnet.util import sanitize_name
from LXMF import pn_stamp_cost_from_app_data
from .Browser import Browser from .Browser import Browser
from .ReadlineEdit import ReadlineEdit from .ReadlineEdit import ReadlineEdit
@ -241,13 +242,25 @@ class AnnounceInfo(urwid.WidgetWrap):
type_button, type_button,
]) ])
pile_widgets = [] dst_value = RNS.Identity.recall_stamp_value(source_hash)
link_cost = RNS.Identity.recall_link_cost(source_hash)
dst_val_str = f"{RNS.prettycost(dst_value)}" if dst_value else "None"
link_cost_str = f"{RNS.prettycost(link_cost)}" if link_cost else "None"
pile_widgets = []
if is_pn: if is_pn:
pn_app_data = RNS.Identity.recall_app_data(source_hash)
prop_cost = pn_stamp_cost_from_app_data(pn_app_data)
prop_cost_str = f"{RNS.prettycost(prop_cost)}" if prop_cost else "None"
pile_widgets = [ pile_widgets = [
urwid.Text("Time : "+ts_string, align=urwid.LEFT), urwid.Text("Time : "+ts_string, align=urwid.LEFT),
urwid.Text("Addr : "+addr_str, align=urwid.LEFT), urwid.Text("Addr : "+addr_str, align=urwid.LEFT),
urwid.Text("Type : "+type_string, align=urwid.LEFT), urwid.Text("Type : "+type_string, align=urwid.LEFT),
urwid.Text("D.Val : "+dst_val_str, align=urwid.LEFT),
urwid.Text("L.Cst : "+link_cost_str, align=urwid.LEFT),
urwid.Text("P.Cst : "+prop_cost_str, align=urwid.LEFT),
urwid.Divider(g["divider1"]), urwid.Divider(g["divider1"]),
button_columns button_columns
] ]
@ -258,6 +271,8 @@ class AnnounceInfo(urwid.WidgetWrap):
urwid.Text("Addr : "+addr_str, align=urwid.LEFT), urwid.Text("Addr : "+addr_str, align=urwid.LEFT),
urwid.Text("Type : "+type_string, align=urwid.LEFT), urwid.Text("Type : "+type_string, align=urwid.LEFT),
urwid.Text("Name : "+display_str, align=urwid.LEFT), urwid.Text("Name : "+display_str, align=urwid.LEFT),
urwid.Text("D.Val : "+dst_val_str, align=urwid.LEFT),
urwid.Text("L.Cst : "+link_cost_str, align=urwid.LEFT),
urwid.Text(["Trust : ", (style, trust_str)], align=urwid.LEFT), urwid.Text(["Trust : ", (style, trust_str)], align=urwid.LEFT),
urwid.Divider(g["divider1"]), urwid.Divider(g["divider1"]),
urwid.Text(["Announce Data: \n", (data_style, data_str)], align=urwid.LEFT), urwid.Text(["Announce Data: \n", (data_style, data_str)], align=urwid.LEFT),
@ -626,6 +641,8 @@ class KnownNodeInfo(urwid.WidgetWrap):
source_hash = node_hash source_hash = node_hash
node_ident = RNS.Identity.recall(node_hash) node_ident = RNS.Identity.recall(node_hash)
dst_value = RNS.Identity.recall_stamp_value(node_hash)
link_cost = RNS.Identity.recall_link_cost(node_hash)
time_format = self.app.time_format time_format = self.app.time_format
trust_level = self.app.directory.trust_level(source_hash) trust_level = self.app.directory.trust_level(source_hash)
trust_str = "" trust_str = ""
@ -641,7 +658,9 @@ class KnownNodeInfo(urwid.WidgetWrap):
else: else:
display_str = strip_modifiers(node_entry.display_name) display_str = strip_modifiers(node_entry.display_name)
addr_str = "<"+RNS.hexrep(source_hash, delimit=False)+">" addr_str = "<"+RNS.hexrep(source_hash, delimit=False)+">"
dst_val_str = f"{RNS.prettycost(dst_value)}" if dst_value else "None"
link_cost_str = f"{RNS.prettycost(link_cost)}" if link_cost else "None"
if display_str == None: if display_str == None:
display_str = addr_str display_str = addr_str
@ -791,6 +810,8 @@ class KnownNodeInfo(urwid.WidgetWrap):
urwid.Text("Type : "+type_string, align=urwid.LEFT), urwid.Text("Type : "+type_string, align=urwid.LEFT),
e_name, e_name,
urwid.Text("Node Addr : "+addr_str, align=urwid.LEFT), urwid.Text("Node Addr : "+addr_str, align=urwid.LEFT),
urwid.Text("Dst Value : "+dst_val_str, align=urwid.LEFT),
urwid.Text("Link Cost : "+link_cost_str, align=urwid.LEFT),
e_sort, e_sort,
urwid.Divider(g["divider1"]), urwid.Divider(g["divider1"]),
urwid.Text(lxmf_addr_str, align=urwid.CENTER), urwid.Text(lxmf_addr_str, align=urwid.CENTER),

View file

@ -10,9 +10,11 @@ import os
import select import select
import shutil import shutil
import sys import sys
import termios
import time import time
try: import termios
except: termios = None
from . import _ctlseqs from . import _ctlseqs
QUERY_TIMEOUT = 0.3 QUERY_TIMEOUT = 0.3
@ -43,7 +45,7 @@ def _open_tty():
def query_tty(request, timeout=QUERY_TIMEOUT): def query_tty(request, timeout=QUERY_TIMEOUT):
# Sends a query to the terminal and returns the raw response. # Sends a query to the terminal and returns the raw response.
global _query_failed global _query_failed
if _query_failed: return b"" if _query_failed or not termios: return b""
fd = _open_tty() fd = _open_tty()
if fd == -1: if fd == -1:
@ -121,6 +123,7 @@ def _cell_size_from_winsize(buf):
def _query_cell_size(): def _query_cell_size():
# Determines the current cell size in pixels, or None if unknown. # Determines the current cell size in pixels, or None if unknown.
if not termios: return None
fd = _open_tty() fd = _open_tty()
if fd != -1: if fd != -1:
# First, try the TIOCGWINSZ pixel fields (fast, no query) # First, try the TIOCGWINSZ pixel fields (fast, no query)

View file

@ -36,6 +36,6 @@ setuptools.setup(
entry_points= { entry_points= {
'console_scripts': ['nomadnet=nomadnet.nomadnet:main'] 'console_scripts': ['nomadnet=nomadnet.nomadnet:main']
}, },
install_requires=["rns>=1.5.4", "lxmf>=1.1.1", "urwid>=3.0.5", "qrcode"], install_requires=["rns>=1.6.1", "lxmf>=1.3.1", "urwid>=3.0.5", "qrcode"],
python_requires=">=3.8", python_requires=">=3.8",
) )