blob: 6cbc73c6e9be3490dfbcb845c64f4f872aaebb2b [file] [log] [blame]
.TH dvpn 1 "December 2023" "dvpn Manual"
.SH NAME
dvpn \- Distributed VPN
.SH SYNOPSIS
.B dvpn
[\-h | \-\-help] [\-\-version] [\-\-listen] [\-\-bootstrap <BOOTSTRAP_ADDRESS>] [\-\-id_path <IDENTITY_PATH>] [\-\-turn_host <TURN_SERVER>] [\-\-turn_user <TURN_USERNAME>] [\-\-turn_pass <TURN_PASSWORD>] [\-\-turn_realm <TURN_REALM>] [\-\-configuration_path_file <CONF_PATH>] <PEER_ID>
.SH DESCRIPTION
.B dvpn
is a VPN tool based on the DHTNet library, utilizing a decentralized architecture for peer discovery and communication. It supports both server and client modes, implements a TUN interface for network communication and offers configuration flexibility.
.SH OPTIONS
.TP
.B \-h, \-\-help
Display help information.
.TP
.B \-V, \-\-version
Display the version information of dvpn.
.TP
.B \-l, \-\-listen
Run dvpn in listen mode, allowing the program to accept incoming VPN connections.
.TP
.B \-b, \-\-bootstrap <BOOTSTRAP_ADDRESS>
Specify the address of a bootstrap node to connect to an existing DHT network. Default is "bootstrap.jami.net" if not specified.
.TP
.B \-I, \-\-id_path <IDENTITY_PATH>
Specify the path to the identity file used for DHT network interactions. Default is "$HOME/.dhtnet" if not specified.
.TP
.B \-t, \-\-turn_host <TURN_SERVER>
Specify the hostname or IP address of the TURN server for network traversal.
.TP
.B \-u, \-\-turn_user <TURN_USERNAME>
Specify the username for authentication with the TURN server.
.TP
.B \-w, \-\-turn_pass <TURN_PASSWORD>
Specify the password for authentication with the TURN server.
.TP
.B \-r, \-\-turn_realm <TURN_REALM>
Specify the realm for authentication with the TURN server.
.TP
.B \-c, \-\-configuration_path_file <CONF_PATH>
Specify the path to the configuration file. Default is "dhtnet/tools/dvpn/test_config.yaml" if not specified.
.TP
.B <PEER_ID>
The peer ID argument is required when not running in listen mode. It specifies the ID of the target peer or device in the DHT network.
.SH VPN SETUP PROCESS
For each connection,
.B dvpn
dynamically creates a new TUN interface, utilizing information from the configuration file. The setup script then configures the TUN interface and establishes routing logic for the client, as well as managing NAT for the server.
The TUN interfaces are configured as follows:
Server TUN Interface:
.IP
<server tun address> 255.255.255.255 <client tun address>
Client TUN Interface:
.IP
<client tun address> 255.255.255.255 <server tun address>
.SH NOTES
.B dvpn
requires sudo privileges to create and configure TUN interfaces on both the client and server sides.
.SH EXAMPLES
To run a dvpn server:
.IP
$ sudo ./dvpn -l
To connect to a dvpn server:
.IP
$ sudo ./dvpn <PEER_ID>
.SH SEE ALSO
The DHTNet library documentation for more details.
.SH "dvpn 1.0" December 2023 DVPN(1)