traffic: expose runtime appmarks items + show in gui

This commit is contained in:
beckline
2026-02-15 21:09:46 +03:00
parent b040b9e7d7
commit 1a96e849bb
6 changed files with 261 additions and 0 deletions

View File

@@ -227,6 +227,27 @@ type TrafficAppMarksStatusResponse struct {
Message string `json:"message,omitempty"`
}
// EN: Detailed list item for runtime per-app marks (for UI).
// RU: Детальный элемент списка runtime per-app меток (для UI).
type TrafficAppMarkItemView struct {
ID uint64 `json:"id"`
Target string `json:"target"` // vpn|direct
Cgroup string `json:"cgroup,omitempty"`
CgroupRel string `json:"cgroup_rel,omitempty"`
Level int `json:"level,omitempty"`
Unit string `json:"unit,omitempty"`
Command string `json:"command,omitempty"`
AppKey string `json:"app_key,omitempty"`
AddedAt string `json:"added_at,omitempty"`
ExpiresAt string `json:"expires_at,omitempty"`
RemainingSec int `json:"remaining_sec,omitempty"`
}
type TrafficAppMarksItemsResponse struct {
Items []TrafficAppMarkItemView `json:"items"`
Message string `json:"message,omitempty"`
}
// ---------------------------------------------------------------------
// traffic app profiles (persistent app launcher configs)
// ---------------------------------------------------------------------