diff --git a/cmd/config.go b/cmd/config.go index d70890d..0b7a91a 100644 --- a/cmd/config.go +++ b/cmd/config.go @@ -51,6 +51,7 @@ type BasicAuthConfig struct { type CTLServiceConfig struct { Prefix string `yaml:"prefix"` // url prefix for control channel endpoints Addrs []string `yaml:"addresses"` + BasicAuth BasicAuthConfig `yaml:"basic-auth"` } type PXYServiceConfig struct { diff --git a/server-ctl.go b/server-ctl.go index e0278fa..10f44a4 100644 --- a/server-ctl.go +++ b/server-ctl.go @@ -26,7 +26,7 @@ type json_out_server_stats struct { ServerRoutes int64 `json:"server-routes"` ServerPeers int64 `json:"server-peers"` - SshProxySessions int64 `json:"ssh-pxy-sessions"` + SshProxySessions int64 `json:"pxy-ssh-sessions"` } // ------------------------------------ diff --git a/server-metrics.go b/server-metrics.go index 8b5da83..4f915bf 100644 --- a/server-metrics.go +++ b/server-metrics.go @@ -46,7 +46,7 @@ func NewServerCollector(server *Server) ServerCollector { nil, nil, ), SshProxySessions: prometheus.NewDesc( - prefix + "ssh_pxy_sessions", + prefix + "pxy_ssh_sessions", "Number of SSH proxy sessions", nil, nil, ), diff --git a/server.go b/server.go index ac87912..da7018d 100644 --- a/server.go +++ b/server.go @@ -42,6 +42,16 @@ type ServerSvcPortMap = map[PortId]ConnRouteId type ServerWpxResponseTransformer func(r *ServerRouteProxyInfo, resp *http.Response) io.Reader type ServerWpxForeignPortProxyMaker func(wpx_type string, port_id string) (*ServerRouteProxyInfo, error) +type ServerCTLConfig struct { + prefix string + addrs []string + basic_auth struct { + enabled bool + users []string + } + tls *tls.Config +} + type Server struct { UnimplementedHoduServer Named