Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminServer ¶
type AdminServer struct {
Session *api.GetSessionResponse
ClientRepo *ClientRepo
sync.Mutex
// contains filtered or unexported fields
}
type ClientRepo ¶
type ClientRepo struct {
// contains filtered or unexported fields
}
func NewClientRepo ¶
func NewClientRepo() *ClientRepo
func (*ClientRepo) Clients ¶
func (c *ClientRepo) Clients() []*api.Client
func (*ClientRepo) Delete ¶
func (c *ClientRepo) Delete(clientId string)
type PTY ¶ added in v0.18.0
type PTY interface {
io.ReadWriteCloser
// Setsize changes the terminal dimensions.
// On Unix, this sends a SIGWINCH to the slave process.
// On Windows, this resizes the ConPTY buffer.
Setsize(h, w int) error
// Wait waits for the process associated with this PTY to exit.
// On Unix, this delegates to exec.Cmd.Wait().
// On Windows, this waits on the process handle.
Wait() error
// Kill terminates the process associated with this PTY.
// On Unix, this delegates to exec.Cmd.Process.Kill().
// On Windows, this calls TerminateProcess on the handle.
Kill() error
}
PTY represents a pseudo-terminal abstraction that works across platforms. On Unix, it wraps a traditional PTY created via creack/pty. On Windows, it wraps a ConPTY (Console Pseudo Terminal).
The interface provides a common abstraction for:
- Reading/writing terminal I/O (via io.ReadWriteCloser)
- Resizing the terminal window
- Managing process lifecycle (Wait/Kill)
Platform-specific implementations:
- Unix: see pty_unix.go
- Windows: see pty_windows.go
type PermissionDeniedError ¶
type PermissionDeniedError struct {
// contains filtered or unexported fields
}
func (*PermissionDeniedError) Error ¶
func (e *PermissionDeniedError) Error() string
func (*PermissionDeniedError) Unwrap ¶
func (e *PermissionDeniedError) Unwrap() error
type ReverseTunnel ¶
type ReverseTunnel struct {
*ssh.Client
Host *url.URL
Signers []ssh.Signer
AuthorizedKeys []ssh.PublicKey
KeepAliveDuration time.Duration
HostKeyCallback ssh.HostKeyCallback
Logger *slog.Logger
// contains filtered or unexported fields
}
func (*ReverseTunnel) Close ¶
func (c *ReverseTunnel) Close()
func (*ReverseTunnel) Establish ¶
func (c *ReverseTunnel) Establish(ctx context.Context) (*server.CreateSessionResponse, error)
func (*ReverseTunnel) Listener ¶
func (c *ReverseTunnel) Listener() net.Listener
type SFTPSession ¶ added in v0.22.0
type SFTPSession struct {
// contains filtered or unexported fields
}
SFTPSession tracks permission state for a single SFTP session
type Server ¶
type Server struct {
Command []string
CommandEnv []string
ForceCommand []string
Signers []ssh.Signer
AuthorizedKeys []ssh.PublicKey
EventEmitter *emitter.Emitter
KeepAliveDuration time.Duration
Stdin *os.File
Stdout *os.File
Logger *slog.Logger
ReadOnly bool
// ForceForwardingInputForTesting forces stdin forwarding even when stdin is not a TTY.
// This is used in tests where stdin is a pipe but we still want to forward test data.
ForceForwardingInputForTesting bool
// SFTP configuration
SFTPDisabled bool // Disable SFTP subsystem entirely
SFTPPermissionChecker sftp.PermissionChecker // Optional: prompts user for SFTP permissions (nil = auto-allow)
}
Click to show internal directories.
Click to hide internal directories.