diff --git a/proto/vantage/v1/vantage.proto b/proto/vantage/v1/vantage.proto index d0d2de3..5754a39 100644 --- a/proto/vantage/v1/vantage.proto +++ b/proto/vantage/v1/vantage.proto @@ -14,6 +14,7 @@ service Vantage { rpc ReportChecks(ReportChecksRequest) returns (ReportChecksResponse); // Bidirectional stream: agent sends auth once, server pushes commands. rpc CommandStream(stream AgentMessage) returns (stream ServerCommand); + rpc ProxyStream(stream ProxyClientMsg) returns (stream ProxyServerMsg); } message RegisterRequest { @@ -180,6 +181,7 @@ message ServerCommand { ApplyUpdatesCmd apply_updates = 5; RunStepCmd run_step = 6; CleanupWorkspaceCmd cleanup_workspace = 7; + OpenProxyCmd open_proxy = 8; } } @@ -228,3 +230,33 @@ message StepOutputChunk { bytes data = 3; bool eof = 4; } + +// OpenProxyCmd tells the agent to dial 127.0.0.1:port locally and relay that +// connection back over a fresh ProxyStream identified by proxy_id. +message OpenProxyCmd { + string proxy_id = 1; + uint32 port = 2; +} + +message ProxyOpen { + string server_id = 1; + string agent_token = 2; + string proxy_id = 3; +} + +message ProxyClose { string reason = 1; } + +message ProxyClientMsg { + oneof payload { + ProxyOpen open = 1; // first message only + bytes data = 2; + ProxyClose close = 3; + } +} + +message ProxyServerMsg { + oneof payload { + bytes data = 1; + ProxyClose close = 2; + } +}