feat: Add support for legacy markers in ParseManagedBlock to ensure backward compatibility

This commit is contained in:
2026-03-04 18:05:54 -05:00
parent 6b07c9e2e1
commit 25aa16be14
3 changed files with 141 additions and 2 deletions
+7
View File
@@ -11,6 +11,13 @@ import (
const (
StartMarker = "# ekDNSHelper <<-> START CONFIG"
EndMarker = "# ekDNSHelper <->> END CONFIG"
// Legacy markers from the pre-rename "DNSHelper" era.
// ParseManagedBlock recognises these so that hosts files written by
// the old binary are detected, parsed, and silently upgraded to the
// current markers on the next write.
LegacyStartMarker = "# DNSHelper <<-> START CONFIG"
LegacyEndMarker = "# DNSHelper <->> END CONFIG"
)
// DNSEntry represents a single IP-to-hostname mapping.