Files
VDR/VirtualDDNSRouter.Client/README.md

56 lines
1.6 KiB
Markdown

# VirtualDDNSRouter Client
The VirtualDDNSRouter Client is a lightweight application that periodically updates the IP address of a service with the VirtualDDNSRouter Server.
## Configuration
The client uses a YAML configuration file named `settings.yaml`. You can create this file by copying and modifying the provided example:
```bash
cp settings.example.yaml settings.yaml
```
The configuration file has the following structure:
```yaml
host: example.com # The hostname of the VDR server
path: odoo # The path identifier for your service
destination_port: 8081 # The port of your service
api_key: abc123XYZ # The API key for authentication
refresh_interval_minutes: 3 # How often to update the IP address (in minutes)
```
## Running the Client
### Method 1: Downloading Pre-built Binaries (Recommended)
1. Download the latest client binary from [https://git.mahdium.ir/mahdium/VDR/releases/latest](https://git.mahdium.ir/mahdium/VDR/releases/latest)
2. Extract the archive
3. Create your `settings.yaml` file based on `settings.example.yaml`
4. Run the client:
```bash
./VirtualDDNSRouter.Client
```
### Method 2: Using Docker
```bash
docker run -v ./settings.yaml:/app/settings.yaml virtualddnsrouter.client
```
### Method 3: Building from Source
```bash
dotnet build
dotnet run
```
## Usage
After starting the client, it will:
1. Read the configuration from `settings.yaml`
2. Send an update to the server every `refresh_interval_minutes`
3. Continue running until stopped with Ctrl+C
The client will output logs showing when updates are sent and whether they were successful.