Versions in this module Expand all Collapse all v0 v0.7.6 Jun 15, 2024 Changes in this version + const ClientCommandFmt + const DefaultMaxPtySize + const FirstExtraFilesFdNum + const ForceDebugRcFile + const ForceDebugReturnState + const InstallCommandFmt + const MaxFdNum + const MaxMaxPtySize + const MaxRunDataSize + const MaxTermCols + const MaxTermRows + const MaxTotalRunDataSize + const MinMaxPtySize + const MinTermCols + const MinTermRows + const NotFoundVersion + const ReturnStateReadWaitTime + const RtnStateFdNum + const ShellVarName + const SigKillWaitTime + func AddRunData(pk *packet.RunPacketType, data string, dataType string) (int, error) + func DetectGoArch(uname string) (string, string, error) + func GetTerminalSize() (int, int, error) + func GetWinsize(p *packet.RunPacketType) *pty.Winsize + func HasDupStdin(fds []packet.RemoteFd) bool + func IgnoreSigPipe() + func MakeAndCopyStdinFifo(dst *os.File, fifoName string) error + func MakeClientCommandStr() string + func MakeDetachedExecCmd(pk *packet.RunPacketType, cmdTty *os.File) (*exec.Cmd, error) + func MakeEnv0(envMap map[string]string) []byte + func MakeInitPacket() *packet.InitPacketType + func MakeInstallCommandStr() string + func MakeLocalExecCmd(cmdStr string, sapi shellapi.ShellApi) *exec.Cmd + func MakeRunnerExec(ck base.CommandKey) (*exec.Cmd, error) + func MakeServerInitPacket() (*packet.InitPacketType, error) + func MakeSimpleStaticWriterPipe(data []byte) (*os.File, error) + func MakeWaveshellSingleCmd() (*exec.Cmd, error) + func MaxFdNumInPacket(pk *packet.RunPacketType) int + func NextFreeFdNum(pk *packet.RunPacketType) (int, error) + func ParseEnv0(env []byte) map[string]string + func RunInstallFromCmd(ctx context.Context, ecmd ConnInterface, tryDetect bool, ...) error + func SendRunPacketAndRunData(ctx context.Context, sender *packet.PacketSender, ...) error + func SetupSignalsForDetach() + func ValidateRemoteFds(rfds []packet.RemoteFd) error + func ValidateRunPacket(pk *packet.RunPacketType) error + type ClientOpts struct + Command string + Cwd string + Debug bool + Detach bool + Fds []packet.RemoteFd + SSHOpts SSHOpts + Sudo bool + SudoPw string + SudoWithPass bool + UsePty bool + type ClientProc struct + Cmd ConnInterface + InitPk *packet.InitPacketType + Input *packet.PacketSender + Output *packet.PacketParser + StartTs time.Time + StderrReader io.ReadCloser + StdinWriter io.WriteCloser + StdoutReader io.ReadCloser + func MakeClientProc(ctx context.Context, ecmd ConnInterface) (*ClientProc, error) + func (cproc *ClientProc) Close() + func (cproc *ClientProc) ProxySingleOutput(ck base.CommandKey, sender *packet.PacketSender, ...) + type CmdWrap struct + Cmd *exec.Cmd + func (cw CmdWrap) Kill() + func (cw CmdWrap) Parser() (*packet.PacketParser, io.ReadCloser, io.ReadCloser, error) + func (cw CmdWrap) Sender() (*packet.PacketSender, io.WriteCloser, error) + func (cw CmdWrap) Start() error + func (cw CmdWrap) StderrPipe() (io.ReadCloser, error) + func (cw CmdWrap) StdinPipe() (io.WriteCloser, error) + func (cw CmdWrap) StdoutPipe() (io.ReadCloser, error) + func (cw CmdWrap) Wait() error + type ConnInterface interface + Kill func() + Parser func() (*packet.PacketParser, io.ReadCloser, io.ReadCloser, error) + Sender func() (*packet.PacketSender, io.WriteCloser, error) + Start func() error + StderrPipe func() (io.ReadCloser, error) + StdinPipe func() (io.WriteCloser, error) + StdoutPipe func() (io.ReadCloser, error) + Wait func() error + type FdContext interface + GetReader func(fdNum int) io.ReadCloser + GetWriter func(fdNum int) io.WriteCloser + type InstallOpts struct + ArchStr string + CmdPty *os.File + Detect bool + OptName string + SSHOpts SSHOpts + type InvalidPacketError struct + InvalidPk *packet.PacketType + func (ipe InvalidPacketError) Error() string + type ReturnStateBuf struct + Buf []byte + Done bool + DoneCh chan bool + EndBytes []byte + Err error + FdNum int + Lock *sync.Mutex + Reader *os.File + func MakeReturnStateBuf() *ReturnStateBuf + func (rs *ReturnStateBuf) Run() + type SSHOpts struct + BatchMode bool + SSHErrorsToTty bool + SSHHost string + SSHIdentity string + SSHOptsStr string + SSHPort int + SSHUser string + func (opts SSHOpts) MakeSSHExecCmd(remoteCommand string, sapi shellapi.ShellApi) *exec.Cmd + type SessionWrap struct + Session *ssh.Session + StartCmd string + func (sw SessionWrap) Kill() + func (sw SessionWrap) Parser() (*packet.PacketParser, io.ReadCloser, io.ReadCloser, error) + func (sw SessionWrap) Sender() (*packet.PacketSender, io.WriteCloser, error) + func (sw SessionWrap) Start() error + func (sw SessionWrap) StderrPipe() (io.ReadCloser, error) + func (sw SessionWrap) StdinPipe() (io.WriteCloser, error) + func (sw SessionWrap) StdoutPipe() (io.ReadCloser, error) + func (sw SessionWrap) Wait() error + type ShExecType struct + CK base.CommandKey + Cmd *exec.Cmd + CmdPty *os.File + Detached bool + DetachedOutput *packet.PacketSender + Exited bool + FileNames *base.CommandFileNames + Lock *sync.Mutex + MaxPtySize int64 + MsgSender *packet.PacketSender + Multiplexer *mpio.Multiplexer + ReturnState *ReturnStateBuf + RunnerOutFd *os.File + SAPI shellapi.ShellApi + ShellPrivKey *ecdh.PrivateKey + StartTs time.Time + SudoWriter *os.File + TmpRcFileName string + func MakeShExec(ck base.CommandKey, upr packet.UnknownPacketReporter, sapi shellapi.ShellApi) *ShExecType + func RunCommandSimple(pk *packet.RunPacketType, sender *packet.PacketSender, fromServer bool) (rtnShExec *ShExecType, rtnErr error) + func (c *ShExecType) Close() + func (c *ShExecType) IsExited() bool + func (c *ShExecType) MakeCmdStartPacket(reqId string) *packet.CmdStartPacketType + func (c *ShExecType) ProcWait() error + func (c *ShExecType) WaitForCommand() *packet.CmdDonePacketType + func (cmd *ShExecType) RunRemoteIOAndWait(packetParser *packet.PacketParser, sender *packet.PacketSender) + func (s *ShExecType) SendSignal(sig syscall.Signal) + type ShExecUPR struct + ShExec *ShExecType + UPR packet.UnknownPacketReporter + func (s ShExecUPR) UnknownPacket(pk packet.PacketType) + type StdContext struct + func (StdContext) GetReader(fdNum int) io.ReadCloser + func (StdContext) GetWriter(fdNum int) io.WriteCloser + type WaveshellBinaryReaderFn func(version string, goos string, goarch string) (io.ReadCloser, error) + type WaveshellLaunchError struct + InitPk *packet.InitPacketType + func (wle WaveshellLaunchError) Error() string