blob: ef79c2e08c687d82a7ea6aee67d2778dfd221f6c [file] [log] [blame]
.TH DNC 1 "September 2023" "Version 1.0" "Distributed nc"
.SH NAME
dnc \- Distributed nc
.SH SYNOPSIS
.B dnc
.RI "[-h|--help] [-V|--version] [-p|--port <PORT>] [-i|--ip <REMOTE_IP>] [-l|--listen] [-b|--bootstrap <BOOTSTRAP_ADDRESS>] [-I|--id_path <IDENTITY_PATH>] [-t|--turn_host <TURN_SERVER>] [-u|--turn_user <TURN_USERNAME>] [-w|--turn_pass <TURN_PASSWORD>] [-r|--turn_realm <TURN_REALM>]"
.RI "<peer-id>"
.SH DESCRIPTION
\fBdnc\fR is a versatile command-line utility that enables network connectivity between peers in a Distributed Hash Table (DHT) network. It allows you to establish connections with other peers or devices and create TCP sockets on remote devices, similar to the traditional \fBnc\fR (netcat) utility.
.SH OPTIONS
.TP
.B \-h, \-\-help
Display help information for using \fBdnc\fR.
.TP
.B \-V, \-\-version
Display the version information of \fBdnc\fR.
.TP
.B \-p, \-\-port <PORT>
Specify the port number to use for network connections. This option requires an argument. The default value is 22 if not specified.
.TP
.B \-i, \-\-ip <REMOTE_IP>
Specify the IP address or hostname of the remote host or device to connect to. This option requires an argument. The default value is "127.0.0.1" if not specified.
.TP
.B \-l, \-\-listen
Run \fBdnc\fR in listen mode, allowing the program to accept incoming network connections and perform network-related tasks on request.
.TP
.B \-b, \-\-bootstrap <BOOTSTRAP_ADDRESS>
Specify the address of a bootstrap node to connect to an existing DHT network. This option requires an argument and is only valid when not running in listen mode. The default value is "bootstrap.jami.net" if not specified.
.TP
.B \-I, \-\-id_path <IDENTITY_PATH>
Specify the path to the identity file, which contains information about the peer's identity and is used for DHT network interactions. This option requires an argument. The default value is "~/.dhtnet" if not specified.
.TP
.B \-t, \-\-turn_host <TURN_SERVER>
Specify the hostname or IP address of the TURN (Traversal Using Relays around NAT) server to use for network traversal. This option requires an argument. The default value is "turn.jami.net" if not specified.
.TP
.B \-u, \-\-turn_user <TURN_USERNAME>
Specify the username for authentication with the TURN server. This option requires an argument. The default value is "ring" if not specified.
.TP
.B \-w, \-\-turn_pass <TURN_PASSWORD>
Specify the password for authentication with the TURN server. This option requires an argument. The default value is "ring" if not specified.
.TP
.B \-r, \-\-turn_realm <TURN_REALM>
Specify the realm for authentication with the TURN server. This option requires an argument. The default value is "ring" if not specified.
.SH EXAMPLE
To connect to a remote device with a specific TURN server and identity file, you can use the following command:
.PP
.B
dnc -i <REMOTE_IP> -p <PORT> -t <TURN_SERVER> -u <TURN_USERNAME> -w <TURN_PASSWORD> -r <TURN_REALM> -I <IDENTITY_PATH> <peer-id>
.SH SEE ALSO
.PP
.BR nc (1)