🔨 初始化程序.
This commit is contained in:
@@ -47,6 +47,9 @@ public class RdpConnectConfig extends BaseConnectConfig {
|
|||||||
@Schema(description = "低带宽模式")
|
@Schema(description = "低带宽模式")
|
||||||
private Boolean lowBandwidthMode;
|
private Boolean lowBandwidthMode;
|
||||||
|
|
||||||
|
@Schema(description = "初始化程序")
|
||||||
|
private String initialProgram;
|
||||||
|
|
||||||
@Schema(description = "RDP 版本是否大于8.1")
|
@Schema(description = "RDP 版本是否大于8.1")
|
||||||
private Boolean versionGt81;
|
private Boolean versionGt81;
|
||||||
|
|
||||||
|
|||||||
@@ -56,4 +56,9 @@ public class HostRdpExtraModel implements GenericsDataModel {
|
|||||||
*/
|
*/
|
||||||
private Boolean lowBandwidthMode;
|
private Boolean lowBandwidthMode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 初始化程序
|
||||||
|
*/
|
||||||
|
private String initialProgram;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -293,8 +293,9 @@ public class HostConnectServiceImpl implements HostConnectService {
|
|||||||
// 填充基础主机信息
|
// 填充基础主机信息
|
||||||
this.setBaseConnectConfig(connectConfig, host);
|
this.setBaseConnectConfig(connectConfig, host);
|
||||||
if (extra != null) {
|
if (extra != null) {
|
||||||
// 设置低带宽模式
|
// 设置额外配置信息
|
||||||
connectConfig.setLowBandwidthMode(extra.getLowBandwidthMode());
|
connectConfig.setLowBandwidthMode(extra.getLowBandwidthMode());
|
||||||
|
connectConfig.setInitialProgram(extra.getInitialProgram());
|
||||||
// 获取自定义认证方式
|
// 获取自定义认证方式
|
||||||
HostExtraAuthTypeEnum extraAuthType = HostExtraAuthTypeEnum.of(extra.getAuthType());
|
HostExtraAuthTypeEnum extraAuthType = HostExtraAuthTypeEnum.of(extra.getAuthType());
|
||||||
if (HostExtraAuthTypeEnum.CUSTOM_IDENTITY.equals(extraAuthType)) {
|
if (HostExtraAuthTypeEnum.CUSTOM_IDENTITY.equals(extraAuthType)) {
|
||||||
|
|||||||
@@ -118,6 +118,11 @@ public class RdpSession extends AbstractGuacdSession<TerminalSessionRdpConfig> i
|
|||||||
String driveMountPath = DriveMountModeEnum.of(extra.getDriveMountMode())
|
String driveMountPath = DriveMountModeEnum.of(extra.getDriveMountMode())
|
||||||
.getDriveMountPath(props.getUserId(), props.getHostId(), props.getId());
|
.getDriveMountPath(props.getUserId(), props.getHostId(), props.getId());
|
||||||
tunnel.setParameter(GuacdConst.DRIVE_PATH, Files1.getPath(guacdConfig.getDrivePath() + "/" + driveMountPath));
|
tunnel.setParameter(GuacdConst.DRIVE_PATH, Files1.getPath(guacdConfig.getDrivePath() + "/" + driveMountPath));
|
||||||
|
// 初始化程序
|
||||||
|
String initialProgram = config.getInitialProgram();
|
||||||
|
if (!Strings.isBlank(initialProgram)) {
|
||||||
|
tunnel.setParameter(GuacdConst.INITIAL_PROGRAM, initialProgram);
|
||||||
|
}
|
||||||
// 预连接
|
// 预连接
|
||||||
String preConnectionId = config.getPreConnectionId();
|
String preConnectionId = config.getPreConnectionId();
|
||||||
if (!Strings.isBlank(preConnectionId)) {
|
if (!Strings.isBlank(preConnectionId)) {
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ export interface HostRdpExtraSettingModel {
|
|||||||
authType: string;
|
authType: string;
|
||||||
identityId: number;
|
identityId: number;
|
||||||
lowBandwidthMode: boolean;
|
lowBandwidthMode: boolean;
|
||||||
|
initialProgram: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 标签额外配置
|
// 标签额外配置
|
||||||
|
|||||||
@@ -21,10 +21,19 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- 低带宽模式 -->
|
<!-- 低带宽模式 -->
|
||||||
<a-form-item field="lowBandwidthMode"
|
<a-form-item field="lowBandwidthMode"
|
||||||
|
style="margin-bottom: 8px;"
|
||||||
label="低带宽模式"
|
label="低带宽模式"
|
||||||
help="调整图形化配置以及禁用音频, 提升慢速网络下的响应速度">
|
help="调整图形化配置以及禁用音频, 提升慢速网络下的响应速度">
|
||||||
<a-switch v-model="formModel.lowBandwidthMode" type="round" />
|
<a-switch v-model="formModel.lowBandwidthMode" type="round" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
<!-- 初始化程序 -->
|
||||||
|
<a-form-item field="initialProgram"
|
||||||
|
label="初始化程序"
|
||||||
|
help="会话启动后自动执行的程序 (若支持)">
|
||||||
|
<a-input v-model="formModel.initialProgram"
|
||||||
|
placeholder="程序的完整路径"
|
||||||
|
allow-clear />
|
||||||
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user