From 4a1a1a391b24954bc76aafe603e135b1c423a6cf Mon Sep 17 00:00:00 2001 From: Sad Pencil Date: Fri, 7 Dec 2018 03:22:53 +0800 Subject: [PATCH] update document for getting an IP from an interface and running as a Windows service --- README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/README.md b/README.md index f66b41b..86d2532 100644 --- a/README.md +++ b/README.md @@ -173,6 +173,19 @@ Remember the DDNS key and fill it as password to the config.json. __NOTICE__: If you have multiple domains or subdomains, make sure their DDNS key are the same. +### Get an IP address from the interface + +For some reasons if you want to get an IP directly from the interface, say `eth0` for Linux or `Local Area Connection` for Windows, update config file like this: +```json + "ip_url": "", + "ip_interface": "eth0", +``` + +If you set both `ip_url` and `ip_interface`, it first tries to get an IP address online, and if not succeed, gets +an IP address from the interface as a fallback. + +Note that IPv6 address will be ignored currently. + ### Email notification support Update config file and provide your SMTP options, a notification mail will be sent to your mailbox once the IP is changed and updated. @@ -242,4 +255,10 @@ docker run -d --name godns --restart=always \ -v /path/to/config.json:/usr/local/godns/config.json timothyye/godns:latest ``` +## Run it as an Windows service + +* Get [birkett/srvany-ng](https://github.com/birkett/srvany-ng/releases) from Github. +* Uncompress and place the executable `srvany-ng.exe` to the same directory where `godns.exe` in. +* Create a service and add registry keys according to the guide [here](https://github.com/birkett/srvany-ng). + ## Enjoy it!