feat: Add support for legacy markers in ParseManagedBlock to ensure backward compatibility
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user