ddns: Add ability to update IPv4 or IPv6 only (#342)

* ddns: Add ability to resolve IPv4 or IPv6 only

* Fix bugs

* cdn cache
This commit is contained in:
UUBulb
2024-03-30 11:00:55 +08:00
committed by GitHub
parent 506c87dbd8
commit f647a5f8e6
12 changed files with 61 additions and 5 deletions

View File

@@ -127,8 +127,8 @@ func (s *NezhaHandler) ReportSystemInfo(c context.Context, r *pb.Host) (*pb.Rece
ipv4, ipv6, _ := utils.SplitIPAddr(host.IP)
maxRetries := int(singleton.Conf.DDNS.MaxRetries)
config := &ddns.DomainConfig{
EnableIPv4: true,
EnableIpv6: true,
EnableIPv4: singleton.ServerList[clientID].EnableIPv4,
EnableIpv6: singleton.ServerList[clientID].EnableIpv6,
FullDomain: serverDomain,
Ipv4Addr: ipv4,
Ipv6Addr: ipv6,