cmd

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 21, 2026 License: Apache-2.0 Imports: 43 Imported by: 0

Documentation

Index

Constants

View Source
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 AllowDNSCommand() *cli.Command

func AllowHTTPCommand

func AllowHTTPCommand() *cli.Command

func CleanupSessionCredentials

func CleanupSessionCredentials(sessionID string) error

CleanupSessionCredentials removes the entire session directory and its contents. Safe to call if the directory does not exist.

func ConnectAction added in v0.2.0

func ConnectAction(ctx context.Context, cmd *cli.Command) error

func ConnectCommand added in v0.2.0

func ConnectCommand() *cli.Command

func DownAction

func DownAction(ctx context.Context, cmd *cli.Command) error

func DownCommand

func DownCommand() *cli.Command

func ExecAction added in v0.2.0

func ExecAction(ctx context.Context, cmd *cli.Command) error

func ExecCommand added in v0.2.0

func ExecCommand() *cli.Command

func LoadSessionTLSConfig

func LoadSessionTLSConfig(sessionID string) (*tls.Config, error)

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 MonitorCommand() *cli.Command

func ProxyCommand

func ProxyCommand() *cli.Command

func RootCommand

func RootCommand() *cli.Command

func RunAction

func RunAction(ctx context.Context, cmd *cli.Command) error

func RunCommand

func RunCommand() *cli.Command

func StatusAction

func StatusAction(ctx context.Context, cmd *cli.Command) error

func StatusCommand

func StatusCommand() *cli.Command

func UpAction

func UpAction(ctx context.Context, cmd *cli.Command) error

func UpCommand

func UpCommand() *cli.Command

func UpdateCommand

func UpdateCommand() *cli.Command

func VibedAction

func VibedAction(ctx context.Context, cmd *cli.Command) error

func VibedCommand

func VibedCommand() *cli.Command

func WriteSSHCredentials

func WriteSSHCredentials(sessionID string, clientPriv, clientPub, hostPriv, hostPub []byte) error

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) Logs

func (c *ControlClient) Logs() ([]proxy.LogEntry, 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

type SessionInfo struct {
	ControlPort string
	SessionID   string
	ProjectDir  string
}

SessionInfo contains the information needed to connect to a proxy's control API.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL