honwen / aliyun-ddns-cli

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

ipv6支持 #16

Closed Droid-MAX closed 5 years ago

Droid-MAX commented 5 years ago

现在手机上已逐步普及ipv6,这使得在手机上建站成为了可能,虽然阿里云官方提供了相关api,但第三方的各种ddns工具对ipv6的支持都不大友好,所以在此还望大佬们可以为这个软件项目添加ipv6地址动态解析的功能,谢谢!

honwen commented 5 years ago

Pull requests are always welcome.

Droid-MAX commented 5 years ago

这个工具不能正常解析ipv6的原因貌似跟这个issue很像Aliyun_DDNS

AndroidOL commented 5 years ago

已记录,没有预计时间,会尽快解决。

lRoccoon commented 5 years ago

我刚刚提交了一个PR,目前可以正常更新IPv6地址,但是是否存在其他问题,还需要看情况

honwen commented 5 years ago

please help test

Droid-MAX commented 5 years ago

可以手动指定ipv6,不过会报ipv4 format error错误,但可以成功修改

lRoccoon commented 5 years ago

可以手动指定ipv6,不过会报ipv4 format error错误,但可以成功修改

目前没有添加对IPv6格式的校验,添加校验之后应该可以自动识别地址的类型了

Droid-MAX commented 5 years ago

还有一个问题就是,如果默认不指定ipv6地址而通过web-api来获取的话,是无法正常更新记录的,只有使用-i参数手动指定一个ipv6地址才行 ,建议修改默认web-api为支持ipv6的!

honwen commented 5 years ago

@Droid-MAX use auto-update or update with -6

NAME:
   aliyun-ddns-cli auto-update - Auto-Update AliYun's DNS DomainRecords Record, Get IP using its getip

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

CATEGORY:
   DDNS

OPTIONS:
   --domain DomainName, -d DomainName  Specific DomainName. like ddns.aliyun.com
   --redo Seconds, -r Seconds          redo Auto-Update, every N Seconds; Disable if N less than 10; End with [Rr] enable random delay: [N, 2N]
   --ipv6, -6                          update IPv6 address
Droid-MAX commented 5 years ago

It works!

ChnCdd commented 5 years ago

使用--ipv6可以正常更新IPV6。但是会报“ipv4 format error”,同时IPV4也不能正常更新。 还有个问题就是三级域名b.a.domain.com不能正常更新,报“Status Code: 400 Code: InvalidDomainName.NoExist Message: The specified domain name does not exist. Refresh the page and try again.”。

Droid-MAX commented 5 years ago

update参数是用于手动指定ip来进行更新的,不过在更新ipv6地址时确实会报ipv4 format error,但不影响正常使用;而auto-update参数是自动通过getip来获取ip再进行更新的,这个是没问题的!

lRoccoon commented 5 years ago

可以手动指定ipv6,不过会报ipv4 format error错误,但可以成功修改

@Droid-MAX 这个错误是因为找不到v6地址的位置信息导致的,新的PR已经修复了

Sent with GitHawk

Droid-MAX commented 5 years ago

目前来看,应该没有什么其他问题了

Droid-MAX commented 5 years ago

这次aliyun-ddns-cli的更新,会不会影响下游的luci-app-aliddns的正常使用呢?要不要再搞个repo名为openwrt-aliddns用于编译ipk配合luci-app-aliddns在openwrt上安装使用?

ChnCdd commented 5 years ago

这次aliyun-ddns-cli的更新,会不会影响下游的luci-app-aliddns的正常使用呢?要不要再搞个repo名为openwrt-aliddns用于编译ipk配合luci-app-aliddns在openwrt上安装使用?

LEDE里有完美的插件,支持DNSPOD和ALI,可选IPV4和IPV6。

honwen commented 5 years ago

@Droid-MAX 两个都是独立的

honwen commented 5 years ago

please help test