Add per-route details to status, move socket to /srv/mc-proxy/

mcproxyctl status now shows individual routes per listener with
hostname, backend, mode, and re-encrypt indicator. Proto, gRPC
server, client library, and CLI all updated.

Default gRPC socket path moved from /var/run/mc-proxy.sock to
/srv/mc-proxy/mc-proxy.sock to match the service data directory
convention.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 12:52:37 -07:00
parent 57adbbf05e
commit 6dc3e18925
12 changed files with 95 additions and 41 deletions

View File

@@ -34,6 +34,17 @@ func statusCmd() *cobra.Command {
for _, ls := range status.Listeners {
fmt.Printf(" %s routes=%d active=%d\n", ls.Addr, ls.RouteCount, ls.ActiveConnections)
for _, r := range ls.Routes {
mode := r.Mode
if mode == "" {
mode = "l4"
}
extra := ""
if r.BackendTLS {
extra = " (re-encrypt)"
}
fmt.Printf(" %s %s → %s%s\n", mode, r.Hostname, r.Backend, extra)
}
}
return nil