/DDNS-linux

A C++ based Aliyun domain DDNS program with IPv4 and IPv6 supported.

Primary LanguageC++GNU General Public License v3.0GPL-3.0

English | 简体中文

DDNS-linux

This is a DDNS program written in C++.It can change Aliyun domain record automatically,IPv4 and IPv6 are both supported.

Build

To bulid this program,you need:

  • GCC 6.0.0 or newer (with c++11 support)
  • core and alidns module of Aliyun-openapi-cpp-sdk
  • libcurl installed.(should be installed when you bulid aliyun-openapi-cpp-sdk)

Bulid Step:

  1. Clone code to your device by execuing following command.
  git clone https://github.com/UnknownObject000/DDNS-linux.git
  1. Build and install.
  cd DDNS-linux
  c++ -std=c++11 -o DDNS main.cpp -lalibabacloud-sdk-core -l alibabacloud-sdk-alidns -lcurl
  cp ./DDNS /usr/bin/
  1. Write Config

config.uson

config.uson recored your accesskey info and file path info,it must be putted in the same directory of main program. (the default is /usr/bin)

You can see the 'config.uson' in source code to fill it with your data.('<' and '>' should not included)

dns.uson

dns.uson recorded your domain/dns record info.You can tell the program where it is by editing 'config.uson'.

You can see the 'dns.uson' in source code to fill it with your data.('<' and '>' should not included).Make sure that all domains in that file is belong to one account.If you have only one domain,you must set the 'DOMAIN_COUNT to 1 and all '<no.>' to 1.If you had more than one domain,set this from 1 to n.

log

The name of a log file can be whatever you want.What you just need to make sure is the directory that store log file exist and needn't to create a log file by yourself.The program will do that for you.

  1. Execute the following command to finish.
  mv ./config.uson /usr/bin/

Useage

To use start this DDNS service by execiting:

  DDNS

If you want to run it at background,executing:

 DDNS > /dev/null 2>&1 &