- 修复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 {
|
||||
@ -92,7 +95,8 @@ func (g *Gateway) OpenSshTunnel(id, ip string, port int) (exposedIP string, expo
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
tunnel := &Tunnel{
|
||||
ID: id,
|
||||
LocalHost: hostname,
|
||||
//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"
|
||||
|
@ -558,7 +558,7 @@ class Asset extends Component {
|
||||
const name = record['name'];
|
||||
const sshMode = record['sshMode'];
|
||||
let url = '';
|
||||
if (protocol === 'ssh' && sshMode === 'native') {
|
||||
if (protocol === 'ssh' && (sshMode === 'native' || sshMode === 'naive')) {
|
||||
url = `#/term?assetId=${id}&assetName=${name}`;
|
||||
} else {
|
||||
url = `#/access?assetId=${id}&assetName=${name}&protocol=${protocol}`;
|
||||
|
@ -339,7 +339,7 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa
|
||||
</Col>
|
||||
<Col span={11}>
|
||||
<Collapse
|
||||
defaultActiveKey={['remote-app', '认证', 'VNC中继', 'storage', '模式设置', '显示设置', '控制终端行为', 'socks']}
|
||||
defaultActiveKey={['VNC中继', 'storage', '模式设置', '显示设置', '控制终端行为', 'socks']}
|
||||
ghost>
|
||||
{
|
||||
protocol === 'rdp' ?
|
||||
@ -379,6 +379,21 @@ const AssetModal = function ({title, visible, handleOk, handleCancel, confirmLoa
|
||||
<Input type='text' placeholder="身份验证时使用的域"/>
|
||||
</Form.Item>
|
||||
</Panel>
|
||||
<Panel header={<Text strong>预连接 PDU (Hyper-V / VMConnect)</Text>} key="PDU">
|
||||
<Form.Item
|
||||
name="preconnection-id"
|
||||
label='预连接ID'
|
||||
>
|
||||
<Input type='text' placeholder="RDP 源的数字 ID"/>
|
||||
</Form.Item>
|
||||
|
||||
<Form.Item
|
||||
name="preconnection-blob"
|
||||
label='预连接字符'
|
||||
>
|
||||
<Input type='text' placeholder="标识 RDP 源的任意字符串"/>
|
||||
</Form.Item>
|
||||
</Panel>
|
||||
<Panel header={<Text strong>Remote App</Text>} key="remote-app">
|
||||
<Form.Item
|
||||
name="remote-app"
|
||||
|
Reference in New Issue
Block a user