release: prepare 0.2.0 for sing-box 1.14
This commit is contained in:
@@ -9,6 +9,7 @@ from typing import Any
|
||||
from urllib.parse import urlsplit
|
||||
|
||||
from .errors import ValidationError
|
||||
from .version import SUPPORTED_SING_BOX_VERSION
|
||||
|
||||
|
||||
@dataclass(frozen=True, slots=True)
|
||||
@@ -160,8 +161,10 @@ def load_policy(path: str | Path) -> Policy:
|
||||
health = _mapping(root["healthcheck"], "healthcheck")
|
||||
|
||||
required_version = _string(sb, "required_version")
|
||||
if required_version != "1.13.19":
|
||||
raise ValidationError("This release requires sing-box version exactly 1.13.19")
|
||||
if required_version != SUPPORTED_SING_BOX_VERSION:
|
||||
raise ValidationError(
|
||||
f"This release requires sing-box version exactly {SUPPORTED_SING_BOX_VERSION}"
|
||||
)
|
||||
service = _string(sb, "service")
|
||||
if not re.fullmatch(r"[A-Za-z0-9@_.:-]+\.service", service):
|
||||
raise ValidationError("Invalid sing-box systemd service name")
|
||||
|
||||
Reference in New Issue
Block a user