B5 switchover: sing-box is the only runtime payload

- master getConfig serves singbox_config only; xray payload retired
  (build failure is a hard 500, agent keeps its current state)
- agent: singbox_config arrival is the switch signal — flush xray
  tail traffic, stop xray, activate sing-box; activation failure
  restarts xray from the last payload and retries next poll; a
  legacy master (no sing-box keys) keeps the xray path untouched
- sing-box log rotation: 8 MiB copy-truncate with one .1 kept,
  checked on the traffic cycle
- install-agent.sh: xray/geo downloads and checks removed, agent
  binary now from the V2.0.0 release, self-check is sing-box
  binary + check on the live config
- display version default 2.0.0 (master V2.0.0 / agent A2.0.0)
This commit is contained in:
Muse
2026-10-23 01:24:43 +00:00
parent 3e2829e49d
commit 4a532e8c5a
9 changed files with 389 additions and 114 deletions
+1 -1
View File
@@ -112,7 +112,7 @@ func GetPanelVersion() string {
// defaultDisplayVersion is the display version reported when a build does
// not inject one (plain `go build` / `go run`).
const defaultDisplayVersion = "1.0.0"
const defaultDisplayVersion = "2.0.0"
// GetDisplayVersion returns the bare numeric display version ("1.0.0"):
// the injected display version when the build provided one, else the
+6 -6
View File
@@ -58,14 +58,14 @@ func TestDisplayVersionDefaultsAndOverride(t *testing.T) {
t.Cleanup(func() { displayVersion = orig })
displayVersion = ""
if got := GetDisplayVersion(); got != "1.0.0" {
t.Fatalf("default display version = %q, want 1.0.0", got)
if got := GetDisplayVersion(); got != "2.0.0" {
t.Fatalf("default display version = %q, want 2.0.0", got)
}
if got := GetMasterDisplayVersion(); got != "V1.0.0" {
t.Fatalf("default master display version = %q, want V1.0.0", got)
if got := GetMasterDisplayVersion(); got != "V2.0.0" {
t.Fatalf("default master display version = %q, want V2.0.0", got)
}
if got := GetAgentDisplayVersion(); got != "A1.0.0" {
t.Fatalf("default agent display version = %q, want A1.0.0", got)
if got := GetAgentDisplayVersion(); got != "A2.0.0" {
t.Fatalf("default agent display version = %q, want A2.0.0", got)
}
displayVersion = "1.0.1"