Files
Paul Otten 8590c929d6 dnet: make colors more consitent
Intended to address tau RefID sccCbF, which complains about text being
hard to read on a (presumably black and white) e ink screen.

The rule in webdev is if you change one color, then change all of them.
Mixing default and custom colors can lead to unreadable color combos.

I've set the primary text color and background color to default.
- On a typical color screen this will be light gray text on a black background.
- On a black and white e ink screen this will be black text on a white background.

I've left the highlighted text color as dark cyan, while explicitly setting the background to black.
- On a typical color screen this will be dark cyan text on a black background.
- On a black and white e ink screen this will be dark gray text on a black background.

The intended result is no visable change on typical color screens,
but a more readable experience on black and white e ink screens.
2025-04-06 19:33:40 +00:00
..
2025-04-06 19:33:40 +00:00
2025-04-06 19:33:40 +00:00
2025-01-23 11:49:50 +01:00

dnet

A simple tui to explore darkfi p2p network topology. Displays:

  1. Active p2p nodes
  2. Outgoing, incoming, manual and seed sessions
  3. Each associated connection and recent messages.

dnet is based on the design-pattern Model, View, Controller. We create a logical seperation between the underlying data structure or Model; the ui rendering aspect which is the View; and the Controller or game engine that makes everything run.

Run

Using a venv

Dnet requires Python 3.12.0. Make sure Python is installed and on the latest version.

Depending on your setup you may need to install a virtual environment for Python. Do so as follows:

% python -m venv python-env
% source python-env/bin/activate

Then install the requirements:

% pip install -r requirements.txt

Run dnet:

% python dnet

You will need to reactivate the venv in your current terminal session each time you use dnet as follows:

% source python-env/bin/activate

Without a venv

If you don't require a venv, install the requirements and run dnet as follows:

% pip install -r requirements.txt
% python dnet

Config

On first run, dnet will create a config file in the config directory specific to your operating system.

To use dnet you will need to open the config file and modify it. Enter the RPC ports of the nodes you want to connect to and title them as you see fit. The default config file uses localhost, but you can replace this with hostnames or external IP addresses. You must also specify whether it is a NORMAL or a LILITH node.

Usage

Navigate up and down using the arrow keys. Scroll the message log using PageUp and PageDown. Type q to quit.

Logging

dnet creates a log file in bin/dnet/dnet.log. To see json data and other debug info, tail the file like so:

tail -f dnet.log