feat: installer fetched from the direct address sets it as the agent's own with the main one as fallback (and downloads from it); agents fall back to whichever address is not theirs; (direct) beside the connection status

This commit is contained in:
redtea committed 2026-10-15 11:34:58 +03:00
1 parent 021da93229
commit 79828e3f8a
11 files changed
+72 -25

No files matched your search

+5
View File
@@ -77,6 +77,10 @@ const TransportHeader = "X-Transport"
// to when the main one is out of reach.
const FallbackHeader = "X-Fallback-Host"
// MainHeader carries the server's main address beside FallbackHeader, for an
// agent set to the direct one to fall back to the main one.
const MainHeader = "X-Main-Host"
// WSMsg is one message on an agent's WebSocket, either way. Server to agent:
// "ctrl" (Ctrl, as a control poll would answer), "cfg" (Tunnel and
// Transport, also a keep-alive), "in" (Frames for session SID), "gone"
@@ -91,6 +95,7 @@ type WSMsg struct {
Tunnel string `json:"tunnel,omitempty"`
Transport string `json:"transport,omitempty"`
Fallback string `json:"fallback,omitempty"`
Main string `json:"main,omitempty"`
}
// Terminal / stream frame types on the session "in" channel (server -> agent).