Files
VDR/VirtualDDNSRouter.Server
Mohammad Mahdi 64318b0ec9
All checks were successful
Build and Push Server Docker Image / build-server (push) Successful in 5m14s
Update README formatting for improved readability
2025-09-05 22:13:21 +03:30
..
2025-08-19 22:43:23 +03:30
2025-08-19 21:14:03 +03:30
2025-08-19 21:14:03 +03:30
2025-09-03 18:17:37 +03:30

VirtualDDNSRouter Server

The VirtualDDNSRouter Server is a lightweight reverse proxy that maintains dynamic mappings between paths and IP addresses. Clients can update their IP addresses, and users can access services through consistent URLs.

Configuration

The server uses a YAML rules file named rules.yaml. You can create this file by copying and modifying the provided example:

cp rules.example.yaml rules.yaml

The rules file has the following structure:

- name: Odoo Server      # A descriptive name for the service
  api_key: abc123XYZ     # The API key for authentication
  path: odoo             # The path identifier for the service

- name: Backup server
  api_key: def456ABC
  path: bk

Each entry defines a service with:

  • name: A descriptive label (for documentation purposes)
  • api_key: A secret key used by clients to authenticate updates
  • path: The URL path that users will use to access the service

Running the Server

  1. Download the latest server binary from https://git.mahdium.ir/mahdium/VDR/releases/latest
  2. Extract the archive
  3. Create your rules.yaml file based on rules.example.yaml
  4. Run the server:
./VirtualDDNSRouter.Server

By default, the server listens on port 8080. You can change this by setting the ASPNETCORE_HTTP_PORTS environment variable:

ASPNETCORE_HTTP_PORTS=8081 ./VirtualDDNSRouter.Server

Method 2: Using Docker

docker run -p 8080:8080 -v ./rules.yaml:/app/rules.yaml virtualddnsrouter.server

Method 3: Building from Source

dotnet build
dotnet run

Usage

The server provides two main endpoints:

  1. IP Update Endpoint (used by clients):

    GET /setip/{path}/{port}/{api_key}
    

    Clients call this endpoint to update their IP address.

  2. Service Access Endpoint (used by users):

    GET /goto/{path}
    

    Users access this endpoint to reach the service associated with the path.

For example, if a client has configured a service with path "odoo", users can access it at:

http://your-server:8080/goto/odoo

The server will redirect users to the IP address and port that the client last reported.