Documentation
¶
Index ¶
- Constants
- func AllowDNSCommand() *cli.Command
- func AllowHTTPCommand() *cli.Command
- func CleanupSessionCredentials(sessionID string) error
- func ConnectAction(ctx context.Context, cmd *cli.Command) error
- func ConnectCommand() *cli.Command
- func DownAction(ctx context.Context, cmd *cli.Command) error
- func DownCommand() *cli.Command
- func ExecAction(ctx context.Context, cmd *cli.Command) error
- func ExecCommand() *cli.Command
- func LoadSessionTLSConfig(sessionID string) (*tls.Config, error)
- func MonitorCommand() *cli.Command
- func ProxyCommand() *cli.Command
- func RootCommand() *cli.Command
- func RunAction(ctx context.Context, cmd *cli.Command) error
- func RunCommand() *cli.Command
- func StatusAction(ctx context.Context, cmd *cli.Command) error
- func StatusCommand() *cli.Command
- func UpAction(ctx context.Context, cmd *cli.Command) error
- func UpCommand() *cli.Command
- func UpdateCommand() *cli.Command
- func VibedAction(ctx context.Context, cmd *cli.Command) error
- func VibedCommand() *cli.Command
- func WriteSSHCredentials(sessionID string, clientPriv, clientPub, hostPriv, hostPub []byte) error
- func WriteSessionCredentials(sessionID string, creds *proxy.MTLSCredentials) (string, error)
- type ControlClient
- func (c *ControlClient) AllowDNS(entries []string) ([]string, error)
- func (c *ControlClient) AllowHTTP(entries []string) ([]string, error)
- func (c *ControlClient) Close()
- func (c *ControlClient) Config() (*config.MergedConfig, error)
- func (c *ControlClient) Logs() ([]proxy.LogEntry, error)
- func (c *ControlClient) LogsAfter(afterID uint64) ([]proxy.LogEntry, error)
- func (c *ControlClient) Stats() (map[string]proxy.DomainStats, error)
- type SessionInfo
Constants ¶
const ( SSHClientPrivFile = "ssh-key" SSHClientPubFile = "ssh-key.pub" SSHHostPrivFile = "host-key" SSHHostPubFile = "host-key.pub" )
SSH credential filenames stored under the per-session directory.
Variables ¶
This section is empty.
Functions ¶
func AllowDNSCommand ¶
func AllowHTTPCommand ¶
func CleanupSessionCredentials ¶
CleanupSessionCredentials removes the entire session directory and its contents. Safe to call if the directory does not exist.
func ConnectCommand ¶
func DownCommand ¶
func ExecCommand ¶
func LoadSessionTLSConfig ¶
LoadSessionTLSConfig reads the PEM files from the session directory and returns a *tls.Config suitable for dialing the filtering proxy as a client.
func MonitorCommand ¶
func ProxyCommand ¶
func RootCommand ¶
func RunCommand ¶
func StatusCommand ¶
func UpdateCommand ¶
func VibedCommand ¶
func WriteSSHCredentials ¶
WriteSSHCredentials persists SSH key material for a session into $XDG_STATE_HOME/vibepit/sessions/<sessionID>/ so that the SSH server and client can load them when establishing a session.
func WriteSessionCredentials ¶
func WriteSessionCredentials(sessionID string, creds *proxy.MTLSCredentials) (string, error)
WriteSessionCredentials persists the client TLS material for a session into $XDG_STATE_HOME/vibepit/sessions/<sessionID>/ so that subcommands launched in separate processes can load them via LoadSessionTLSConfig.
Types ¶
type ControlClient ¶
type ControlClient struct {
// contains filtered or unexported fields
}
ControlClient talks to a running proxy's control API over mTLS.
func NewControlClient ¶
func NewControlClient(session *SessionInfo) (*ControlClient, error)
func (*ControlClient) AllowDNS ¶
func (c *ControlClient) AllowDNS(entries []string) ([]string, error)
AllowDNS adds domains to the proxy DNS allowlist and returns the entries that were added.
func (*ControlClient) AllowHTTP ¶
func (c *ControlClient) AllowHTTP(entries []string) ([]string, error)
AllowHTTP adds domains to the proxy HTTP allowlist and returns the entries that were added.
func (*ControlClient) Close ¶
func (c *ControlClient) Close()
Close releases idle connections held by the underlying HTTP transport.
func (*ControlClient) Config ¶
func (c *ControlClient) Config() (*config.MergedConfig, error)
func (*ControlClient) LogsAfter ¶
func (c *ControlClient) LogsAfter(afterID uint64) ([]proxy.LogEntry, error)
func (*ControlClient) Stats ¶
func (c *ControlClient) Stats() (map[string]proxy.DomainStats, error)
type SessionInfo ¶
SessionInfo contains the information needed to connect to a proxy's control API.