IPv6-Fix und kleine Bug-Fixes
All checks were successful
release-tag / release-image (push) Successful in 45s
All checks were successful
release-tag / release-image (push) Successful in 45s
This commit is contained in:
11
main.go
11
main.go
@@ -129,6 +129,11 @@ func handler(w http.ResponseWriter, r *http.Request) {
|
||||
D = make(map[string]dns_entry)
|
||||
}
|
||||
|
||||
if strings.Contains(Ip6, ".") {
|
||||
WriteLog("!", "IPv6 nicht möglich (IP-Version-Mismatch):", Ip6, "eventuell eine IPv4-Adresse?")
|
||||
Ip6 = ""
|
||||
}
|
||||
|
||||
if strings.EqualFold(Dns, "") || strings.EqualFold(Ip, "") || strings.EqualFold(User, "") || strings.EqualFold(Token, "") {
|
||||
/* strings.ToLower(Dns) != strings.ToLower("") && strings.ToLower(Ip) != strings.ToLower("") && strings.ToLower(User) != strings.ToLower("") && strings.ToLower(Token) != strings.ToLower("")*/
|
||||
WriteLog("!", "Eintrag unvollständig: ", D[Dns])
|
||||
@@ -307,14 +312,14 @@ func handleDNSRequest(w dns.ResponseWriter, r *dns.Msg) {
|
||||
|
||||
func prepareExit() {
|
||||
WriteLog("~", "Running exit tasks...")
|
||||
|
||||
WriteLog("~", "Exit completed.")
|
||||
os.Rename("/data/error.log", "/data/error_"+time.Now().Format("2006-01-02_15-04-05")+".log")
|
||||
fmt.Println("~", "Exit completed.")
|
||||
}
|
||||
|
||||
func StopServer(e error) {
|
||||
WriteLog("~", "Stopping server...")
|
||||
prepareExit()
|
||||
WriteLog("~", "Server stopped!")
|
||||
fmt.Println("~", "Server stopped!")
|
||||
}
|
||||
|
||||
func main() {
|
||||
|
Reference in New Issue
Block a user