TimothyYe / godns

A dynamic DNS client tool that supports AliDNS, Cloudflare, Google Domains, DNSPod, HE.net & DuckDNS & DreamHost, etc, written in Go.
https://timothyye.github.io/godns/
Apache License 2.0
1.51k stars 224 forks source link

Update doc of GetIPFromInterface #74

Closed SadPencil closed 4 years ago

SadPencil commented 4 years ago

https://github.com/TimothyYe/godns#get-an-ip-address-from-the-interface

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:

"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.

The above behavior is not correct now as GoDNS supports IPv6.

https://github.com/TimothyYe/godns#ipv6-support

To enable the IPv6 mode of GoDNS, you only need two steps:

Set the ip_type as IPv6, and make sure the ipv6_url is configured. Add one AAAA record to your provider.

The above is not correct now. Even if ipv6_url is not configured, as long as ip_interface is set, GoDNS can still obtain an IPv6 address.

TimothyYe commented 4 years ago

Thanks, I'll check it.

TimothyYe commented 4 years ago

README file updated.