DHTNODE(1)

NAME
dhtnode - a simple OpenDHT command line node runner.

SYNOPSIS
dhtnode [-h] [-V] [-v [-l logfile] [-L]] [-i [-I file]] [-c file] [-k file] [-m password] [-d] [-s] [-D] [-U] [-P] [-n network_id] [-p local_port] [-b bootstrap_host[:port]] [-f path] [-S port] [-e port] [-a address] [-w file] [-K file] [-M password] [-C server] [-y endpoint] [-z key] [-u bundleid]

DESCRIPTION
Runs an OpenDHT node, with an interactive CLI (default) or as a daemon (with '-d' or '-s'). Commands available in the interactive shell are:
        h, help    Print this help message.
        x, quit    Quit the program.
        log        Start/stop printing DHT logs.
        Node information:
        ll         Print basic information and stats about the current node.
        ls [key]   Print basic information about current search(es).
        ld [key]   Print basic information about currenty stored values on this
                   node (or for a specific key).
        lr         Print the full current routing table of this node.
        Operations on the DHT:
        b <ip:port>            Ping potential node at given IP address/port.
        g <key>                Get values at <key>.
        l <key>                Listen for value changes at <key>.
        cl <key> <token>       Cancel listen for <token> and <key>.
        p <key> <str>          Put string value at <key>.
        pp <key> <str>         Put string value at <key> (persistent version).
        cpp <key> <id>         Cancel persistent put operation for <key> and
                               value <id>.
        s <key> <str>          Put string value at <key>, signed with our
                               generated private key.
        e <key> <dest> <str>   Put string value at <key>, encrypted for <dest>
                               with its public key (if found).
        cc                     Trigger connectivity changed signal.
        Operations with the proxy (if compiled with proxy server support):
        pst [port] <pushServer>  Start the proxy interface on port.
        psx [port]               Start the proxy SSL interface on port.
        psp [port]               Stop the proxy interface on port.
        Operations with the proxy (if compiled with proxy client support):
        stt [server_address] <device_key>  Start the proxy client.
        stp                                Stop the proxy client.
        rs  [token]                        Resubscribe to opendht.
        rp  [token]                        Inject a push notification.

OPTIONS

-h, --help
    Prints help and exits.

-V, --version
    Prints version information and exits.

-v, --verbose
    Enable verbose mode (log to stdout/stderr by default).

-l logfile, --logfile logfile
    Write log to file instead of stdout/stderr.

-L, --syslog
    Write log to syslog instead of stdout/stderr (enables verbose mode).

-i, --identity
    Generate a cryptographic identity (RSA key pair and self-signed certificate) for the node. Required to perform cryptographic operations (encrypt/sign values) if no private key file is provided.

-I file, --save-identity file
    Save generated identity (certificate and private key) to given file prefix. Files are saved as file and file_ca.

-c file, --certificate file
    Load identity certificate from given file. If specified, the certificate is published on the DHT.

-k file, --privkey file
    Load identity private key from given file. Required to perform cryptographic operations if no identity is generated.

-m password, --privkey-password password
    Password to use for private key encryption or decryption (optional).

-d, --daemonize
    Run the program in daemon mode (will fork in the background). When verbose mode is enabled, logs to syslog by default.

-s, --service
    Run the program in service mode (non-forking daemon).

-D, --peer-discovery
    Enables multicast automatic local peer discovery.

-U, --no-rate-limit
    Disable rate limiting (allows unlimited requests and storage).

-P, --public-stable
    Enable public stable mode.

-f path, --persist path
    Specify a file path to persist/load the node state (routing table and values).

-n network_id, --net network_id
    Specify the network id. This lets you connect to distinct networks and prevents the merge of two different networks. Defaults to 0 (the main public network).

-p local_port, --port local_port
    Use UDP port local_port for the program to bind to. If not set, will use any available port. The default OpenDHT port for public nodes is 4222.

-b bootstrap_host[:port], --bootstrap bootstrap_host[:port]
    Specify a bootstrap node address to connect to the network.

-S local_port, --proxyserver local_port
    Run a REST API proxy server bound to this DHT node on HTTP port local_port.

-e local_port, --proxyserverssl local_port
    Run a REST API proxy server with SSL bound to this DHT node on HTTPS port local_port.

-a address, --proxy-addr address
    Proxy server bind address.

-w file, --proxy-certificate file
    Load proxy SSL certificate from given file.

-K file, --proxy-privkey file
    Load proxy SSL private key from given file.

-M password, --proxy-privkey-password password
    Password for the proxy private key encryption or decryption (optional).

-C server, --proxyclient server
    Run this DHT node in proxy client mode, and connect to server.

-y endpoint, --pushserver endpoint
    Push notification server endpoint.

-z key, --devicekey key
    Device key for push notifications.

-u bundleid, --bundleid bundleid
    Bundle ID for push notifications.

EXAMPLES
Run a node using bootstrap.jami.net as a bootstrap:

    dhtnode -b bootstrap.jami.net:4222

Run a node as a non-forking daemon on port 4222:

    dhtnode -b bootstrap.jami.net -p 4222 -s

Run a proxy server on port 8000:

    dhtnode -b bootstrap.jami.net:4222 --proxyserver 8000

Use a proxy client to connect to a proxy server:

    dhtnode --proxyclient dhtproxy.jami.net:80

AUTHORS

Program written by

•   Adrien Béraud <adrien.beraud@savoirfairelinux.com>

Man page written by

•   Simon Désaulniers <sim.desaulniers@gmail.com>