honwen / aliyun-ddns-cli

ALiDDNS - Dynamic DNS CLI for [aliyun.com]
MIT License
414 stars 111 forks source link

如何开ipv6? #31

Closed xudl33 closed 4 years ago

xudl33 commented 4 years ago

默认是ipv4的 需要用ipv6地址解析怎么办?看了源码有ipv6的判断 但似乎一直返回false?另外能支持解析线路吗 默认有的时候解析不到

ricardomlee commented 4 years ago

添加一个变量IPAPI,改成可以返回ipv6的地址试试 -e "IPAPI=http://v6.ip.zxinc.org/getip"

steve3d commented 4 years ago

直接这样就可以了么? 应该不行, ipv4的dns是A, 而ipv6是AAAA, dns record不一样

honwen commented 4 years ago

PLZ try help

aliyun-ddns-cli update -h
NAME:
   aliyun-ddns-cli update - Update AliYun's DNS DomainRecords Record, Create Record if not exist

USAGE:
   aliyun-ddns-cli update [command options] [arguments...]

CATEGORY:
   DDNS

OPTIONS:
   --domain DomainName, -d DomainName  Specific DomainName. like ddns.aliyun.com
   --ipaddr IP, -i IP                  Specific IP. like 1.2.3.4
   --ipv6, -6                          update IPv6 address
steve3d commented 4 years ago

confirmed working.

sagexy commented 3 years ago

PLZ try help

aliyun-ddns-cli update -h
NAME:
   aliyun-ddns-cli update - Update AliYun's DNS DomainRecords Record, Create Record if not exist

USAGE:
   aliyun-ddns-cli update [command options] [arguments...]

CATEGORY:
   DDNS

OPTIONS:
   --domain DomainName, -d DomainName  Specific DomainName. like ddns.aliyun.com
   --ipaddr IP, -i IP                  Specific IP. like 1.2.3.4
   --ipv6, -6                          update IPv6 address

docker里面没有相关配置么?只能敲命令?

honwen commented 3 years ago

https://github.com/honwen/aliyun-ddns-cli/blob/master/Dockerfile#L27

sagexy commented 3 years ago

https://github.com/honwen/aliyun-ddns-cli/blob/master/Dockerfile#L27

我也看到这个了 是不是要配置环境变量的?${IPV6:+-6} 这个语法不知道啥意思

honwen commented 3 years ago

非空即可