diff --git a/01. Getting Dual.md b/01. Getting Dual.md new file mode 100644 index 0000000..3c53330 --- /dev/null +++ b/01. Getting Dual.md @@ -0,0 +1,21 @@ +# Getting Dual + +Right now, there is no official pre-compiled jar file. This means you'll have to build this program yourself. + +## Supported tools and environments + +Dual was tested with OpenJDK 15 and Linux, but it should also work with some other versions of JDK and with Windows. If you're using another operating system, you'll need to specify a custom hosts path in the default configuration file. We'll talk about the configuration file in a future page. + +## Building Dual + +The only way to get Dual is by compiling it yourself. Fortunately, this is not a hard task. + +In order to build Dual, you'll need the following pre-requisites: + +- GNU make; +- Java Development Kit. + +Once you have these installed, all you'll have to do is run `make`. + +Building Dual should also be possible if you import it to an IDE if you don't want to use GNU make. + diff --git a/02. Running Dual.md b/02. Running Dual.md new file mode 100644 index 0000000..cf83a4b --- /dev/null +++ b/02. Running Dual.md @@ -0,0 +1,35 @@ +# Running Dual + +Dual doesn't come with no graphical user interface. This means you have to run this program using a terminal. + +Running Dual is very easy: + +```sh +$ java -jar Dual.jar +``` + +*If you are on Windows, ignore the `$` bit.* + +And there you go! + +## Using a script + +If you are on Linux, you can create a script to make the Dual launch process easier: + +```sh +#!/bin/sh +java -jar Dual.jar +``` + +Save your script with some name, like `dual.sh`, and **make sure it's executable**. To make the script executable, run the following command (assuming you are running it under the same user that owns the script): + +```sh +chmod u+x dual.sh +``` + +Now you can run Dual by running your script: + +```sh +$ ./dual.sh +``` + diff --git a/03. Configuration.md b/03. Configuration.md new file mode 100644 index 0000000..3bbd388 --- /dev/null +++ b/03. Configuration.md @@ -0,0 +1,39 @@ +# Configuration + +Dual requires a configuration file that should be located in `cfg/gen.cfg`. + +## Anatomy + +The configuration file consists of namespaces (declared between brackets, like `[Dual]`) and namespaces contain key/value entries (key/value declarations look like `Key=Value`). + +Comments are also supported on configuration files, and they are ignored by Dual. Lines that start with `#` are recognized as comments and everything on a line after `#` is also considered a comment. + +## Required namespaces and keys + +The `Dual` namespace is **required**. You will declare a couple of preferences here that are going to be used by the program. They will tell what Dual should do. + +Here's a list of expected keys on the `Dual` namespace: + +- `FetchType` + - Required: no + - Default value: `Resolve` + - Description: declares how Dual should get the target IP address. + - Available values: + - `Resolve`: gets the target IP address by resolving a domain name declared in the `Source` value. + - `PlainText`: gets the target IP address by connecting to the specified address in the `Source` value and reading its output as plain text. +- `Source` + - Required: yes + - Default value: (-) + - Description: declares either the domain name associated with the target IP address (if you are using the `Resolve` `FetchType`) or the address that Dual should connect to (if you are using the `PlainText` `FetchType`). + - Value example: + - `Nautilus.luca0N.com` (used with `Resolve` `FetchType`) + - `https://www.luca0N.com/api/dynamicIpAddress?token=139871239` (used with `PlainText` `FetchType`) +- `Target` + - Required: yes + - Default value: (-) + - Description: declares the custom local hostname that is going to be associated with the `Source` IP address. + - Value example: + - `foobar` + - `foo.bar` + - `foo.bar.local` + diff --git a/Home.md b/Home.md index b81d07e..9b75f5d 100644 --- a/Home.md +++ b/Home.md @@ -1 +1,22 @@ -Welcome to the Dual Wiki! If you are interested in Dual but don't know where to start, you're in the right place. \ No newline at end of file +# Dual Wiki + +Welcome to the Dual Wiki! If you are interested in Dual but don't know where to start, you're in the right place. + +# What is Dual? + +Dual is a free and open source project written in Java in March 2021. It is distributed under the [GNU General Public License version 3 or later](https://git.luca0n.com/luca0N/Dual/src/branch/master/LICENSE). This program helps you manage dynamic IP addresses using your hosts file. + +Let's say you want to connect to a computer on a regular home network (with a dynamic IP address). In order to connect to it, you'd have to specify it's IP address every single time, and it would also change from time to time, since it's a dynamic IP address. Dual assists you by fetching the network IP address and then associating with a hostname of your choice. + +## What Dual is not + +Right now, Dual gets the remote IP address by resolving a domain name associated with it. Dual does not detect IP address changes by itself yet. + +# Disclaimer + +Dual is currently in an alpha version, meaning it's unstable. There are known issues (see [Issues](https://git.luca0n.com/luca0N/Dual/issues)), and one of them [does not preserve some of the existing comments on your hosts file](https://git.luca0n.com/luca0N/Dual/issues/3). This program comes with ABSOLUTELY NO WARRANTY, please refer to the [license](https://git.luca0n.com/luca0N/Dual/src/branch/master/LICENSE) for more details. + +# I am interested in Dual + +Sounds good! Go to the next page to get started. +