- 修复SSH资产修改终端类型无效的问题
- 增加「预连接 PDU (Hyper-V / VMConnect)」功能
This commit is contained in:
@ -308,6 +308,8 @@ func (api GuacamoleApi) setConfig(propertyMap map[string]string, s model.Session
|
||||
configuration.SetParameter(guacd.DisableOffscreenCaching, propertyMap[guacd.DisableOffscreenCaching])
|
||||
configuration.SetParameter(guacd.ColorDepth, propertyMap[guacd.ColorDepth])
|
||||
configuration.SetParameter(guacd.ForceLossless, propertyMap[guacd.ForceLossless])
|
||||
configuration.SetParameter(guacd.PreConnectionId, propertyMap[guacd.PreConnectionId])
|
||||
configuration.SetParameter(guacd.PreConnectionBlob, propertyMap[guacd.PreConnectionBlob])
|
||||
case "ssh":
|
||||
if len(s.PrivateKey) > 0 && s.PrivateKey != "-" {
|
||||
configuration.SetParameter("username", s.Username)
|
||||
|
@ -2,10 +2,10 @@ package api
|
||||
|
||||
import (
|
||||
"context"
|
||||
"next-terminal/server/service"
|
||||
|
||||
"next-terminal/server/dto"
|
||||
"next-terminal/server/repository"
|
||||
"next-terminal/server/service"
|
||||
|
||||
"github.com/labstack/echo/v4"
|
||||
)
|
||||
|
@ -81,7 +81,7 @@ const (
|
||||
)
|
||||
|
||||
var SSHParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, SshMode, SocksProxyEnable, SocksProxyHost, SocksProxyPort, SocksProxyUsername, SocksProxyPassword}
|
||||
var RDPParameterNames = []string{guacd.Domain, guacd.RemoteApp, guacd.RemoteAppDir, guacd.RemoteAppArgs, guacd.EnableDrive, guacd.DrivePath, guacd.ColorDepth, guacd.ForceLossless}
|
||||
var RDPParameterNames = []string{guacd.Domain, guacd.RemoteApp, guacd.RemoteAppDir, guacd.RemoteAppArgs, guacd.EnableDrive, guacd.DrivePath, guacd.ColorDepth, guacd.ForceLossless, guacd.PreConnectionId, guacd.PreConnectionBlob}
|
||||
var VNCParameterNames = []string{guacd.ColorDepth, guacd.Cursor, guacd.SwapRedBlue, guacd.DestHost, guacd.DestPort}
|
||||
var TelnetParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, guacd.UsernameRegex, guacd.PasswordRegex, guacd.LoginSuccessRegex, guacd.LoginFailureRegex}
|
||||
var KubernetesParameterNames = []string{guacd.FontName, guacd.FontSize, guacd.ColorScheme, guacd.Backspace, guacd.TerminalType, guacd.Namespace, guacd.Pod, guacd.Container, guacd.UesSSL, guacd.ClientCert, guacd.ClientKey, guacd.CaCert, guacd.IgnoreCert}
|
||||
|
@ -83,6 +83,9 @@ func (g *Gateway) OpenSshTunnel(id, ip string, port int) (exposedIP string, expo
|
||||
return "", 0, err
|
||||
}
|
||||
|
||||
// TODO debug
|
||||
hostname = "0.0.0.0"
|
||||
|
||||
localAddr := fmt.Sprintf("%s:%d", hostname, localPort)
|
||||
listener, err := net.Listen("tcp", localAddr)
|
||||
if err != nil {
|
||||
@ -91,8 +94,9 @@ func (g *Gateway) OpenSshTunnel(id, ip string, port int) (exposedIP string, expo
|
||||
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
tunnel := &Tunnel{
|
||||
ID: id,
|
||||
LocalHost: hostname,
|
||||
ID: id,
|
||||
//LocalHost: hostname,
|
||||
LocalHost: "docker.for.mac.host.internal",
|
||||
LocalPort: localPort,
|
||||
Gateway: g,
|
||||
RemoteHost: ip,
|
||||
|
@ -20,6 +20,9 @@ const (
|
||||
Backspace = "backspace"
|
||||
TerminalType = "terminal-type"
|
||||
|
||||
PreConnectionId = "preconnection-id"
|
||||
PreConnectionBlob = "preconnection-blob"
|
||||
|
||||
EnableDrive = "enable-drive"
|
||||
DriveName = "drive-name"
|
||||
DrivePath = "drive-path"
|
||||
|
Reference in New Issue
Block a user