working on remote runtime

This commit is contained in:
sawka 2022-07-01 14:57:42 -07:00
parent 60199713e8
commit f08bd2427e
2 changed files with 21 additions and 20 deletions

View File

@ -14,23 +14,24 @@ import (
const RemoteTypeMShell = "mshell"
type Store struct {
Lock *sync.Mutex
Map map[string]*MShellProc
}
type MShellProc struct {
Lock *sync.Mutex
RemoteId string
WindowId string
RemoteName string
Cmd *exec.Cmd
Input *packet.PacketSender
Output *packet.PacketParser
Local bool
DoneCh chan bool
CurDir string
HomeDir string
User string
Host string
Env []string
Connected bool
RpcMap map[string]*RpcEntry
Lock *sync.Mutex
Remote *RemoteType
// runtime
Connected bool
InitPk *packet.InitPacketType
Cmd *exec.Cmd
Input *packet.PacketSender
Output *packet.PacketParser
Local bool
DoneCh chan bool
RpcMap map[string]*RpcEntry
}
type RpcEntry struct {
@ -38,6 +39,10 @@ type RpcEntry struct {
RespCh chan packet.RpcPacketType
}
func LoadRemotes() {
}
func LaunchMShell() (*MShellProc, error) {
msPath, err := base.GetMShellPath()
if err != nil {

View File

@ -93,10 +93,6 @@ type RemoteType struct {
HostName string `json:"hostname"`
LastConnectTs int64 `json:"lastconnectts"`
ConnectOpts string `json:"connectopts"`
// runtime
Connected bool `json:"connected"`
InitPk *packet.InitPacketType `json:"-"`
}
type CmdType struct {