feat: custom domain management, config and notification fixes, and VPS auto-renewal rollover

This commit is contained in:
Bot
2026-09-01 23:45:21 +08:00
parent 00f5777112
commit 3d2b27f4ec
30 changed files with 610 additions and 359 deletions
-28
View File
@@ -143,7 +143,6 @@ func (ns *NotificationServerBundle) Send(message string) error {
verifyTLS := n.VerifyTLS != nil && *n.VerifyTLS
reqBody, err := ns.reqBody(message)
if err != nil {
return err
@@ -331,33 +330,6 @@ func (ns *NotificationServerBundle) replaceParamsInString(str string, message st
)
}
replacer := strings.NewReplacer(replacements...)
return replacer.Replace(str)
}
var ipv4, ipv6, validIP string
if ns.Server.GeoIP != nil {
ip := ns.Server.GeoIP.IP
if ip.IPv4Addr != "" && ip.IPv6Addr != "" {
ipv4 = ip.IPv4Addr
ipv6 = ip.IPv6Addr
validIP = ipv4
} else if ip.IPv4Addr != "" {
ipv4 = ip.IPv4Addr
validIP = ipv4
} else {
ipv6 = ip.IPv6Addr
validIP = ipv6
}
}
replacements = append(replacements,
"#SERVER.IP#", mod(validIP),
"#SERVER.IPV4#", mod(ipv4),
"#SERVER.IPV6#", mod(ipv6),
)
}
replacer := strings.NewReplacer(replacements...)
return replacer.Replace(str)
}