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

@@ -301,6 +301,8 @@ type serverForm struct {
Note string
HideForGuest string
EnableDDNS string
EnableIPv4 string
EnableIpv6 string
DDNSDomain string
}
@@ -318,6 +320,8 @@ func (ma *memberAPI) addOrEditServer(c *gin.Context) {
s.Note = sf.Note
s.HideForGuest = sf.HideForGuest == "on"
s.EnableDDNS = sf.EnableDDNS == "on"
s.EnableIPv4 = sf.EnableIPv4 == "on"
s.EnableIpv6 = sf.EnableIpv6 == "on"
s.DDNSDomain = sf.DDNSDomain
if s.ID == 0 {
s.Secret, err = utils.GenerateRandomString(18)