소스 검색

auto update script executed

Toby Chui 1 년 전
부모
커밋
29955a63e0
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      mod/sshprox/sshprox.go

+ 3 - 1
mod/sshprox/sshprox.go

@@ -144,7 +144,9 @@ func (i *Instance) CreateNewConnection(listenPort int, username string, remoteIp
 	if remotePort != 22 {
 		title = title + ":" + strconv.Itoa(remotePort)
 	}
-	cmd := exec.Command(i.ExecPath, "-w", "-p", strconv.Itoa(listenPort), "--once", "--config", configPath, "--title-format", title, "ssh", "-t", connAddr, "-p", strconv.Itoa(remotePort))
+
+	sshCommand := []string{"ssh", "-t", connAddr, "-p", strconv.Itoa(remotePort)}
+	cmd := exec.Command(i.ExecPath, "-w", "-p", strconv.Itoa(listenPort), "--once", "--config", configPath, "--title-format", title, "bash", "-c", strings.Join(sshCommand, " "))
 	cmd.Dir = filepath.Dir(i.ExecPath)
 	cmd.Env = append(cmd.Env, "TERM=xterm")
 	cmd.Stdout = os.Stdout