ddns: remove ipv6 nameservers, support custom nameservers (#439)

This commit is contained in:
UUBulb
2024-10-18 22:06:01 +08:00
committed by GitHub
parent c58c4f866a
commit f6531a52bd
10 changed files with 45 additions and 3 deletions

View File

@@ -20,6 +20,7 @@ var (
func initDDNS() {
OnDDNSUpdate()
OnNameserverUpdate()
}
func OnDDNSUpdate() {
@@ -33,6 +34,10 @@ func OnDDNSUpdate() {
}
}
func OnNameserverUpdate() {
ddns2.InitDNSServers(Conf.DNSServers)
}
func GetDDNSProvidersFromProfiles(profileId []uint64, ip *ddns2.IP) ([]*ddns2.Provider, error) {
profiles := make([]*model.DDNSProfile, 0, len(profileId))
ddnsCacheLock.RLock()