1
0
mirror of https://github.com/taigrr/godns synced 2025-01-18 04:03:25 -08:00

add IPv6 support for HE.net

This commit is contained in:
Timothy 2020-02-06 21:38:52 +08:00
parent 168ef4585a
commit 13f3d940a2
No known key found for this signature in database
GPG Key ID: DA25A2861AA0F2D1
2 changed files with 2 additions and 1 deletions

View File

@ -116,6 +116,7 @@ Usage of ./godns:
Supported provider(s):
* Cloudflare
* HE.net
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.

View File

@ -173,7 +173,7 @@ func GetIPOnline(configuration *Settings) (string, error) {
var response *http.Response
var err error
if configuration.IPType == "" || configuration.IPType == IPV4 {
if configuration.IPType == "" || strings.ToUpper(configuration.IPType) == IPV4 {
response, err = client.Get(configuration.IPUrl)
} else {
response, err = client.Get(configuration.IPV6Url)