Compare commits

..

10 Commits

Author SHA1 Message Date
李佳航
0d0eadc3bf Merge pull request #127 from dromara/dev
🐳 修改 docker 配置.
2025-07-10 15:17:18 +08:00
lijiahangmax
ab430d8934 🐳 修改 docker 配置. 2025-07-10 15:16:29 +08:00
李佳航
edcc2cf0c8 Merge pull request #126 from dromara/dev
🐳 修改 docker 配置.
2025-07-10 14:51:48 +08:00
lijiahangmax
2913ddb2e0 🐳 修改 docker 配置. 2025-07-10 14:50:36 +08:00
李佳航
7d35f839df Merge pull request #125 from dromara/dev
🐳 修改 docker 配置.
2025-07-10 14:30:21 +08:00
lijiahangmax
ef9c34f7d9 🐳 修改 docker 配置. 2025-07-10 14:28:45 +08:00
李佳航
f1a4e049ca Merge pull request #124 from dromara/dev
Dev
2025-07-10 03:50:05 +08:00
lijiahangmax
8ee1e6acf1 🐳 修改 docker 配置. 2025-07-10 03:43:56 +08:00
lijiahangmax
d0eddf1e15 升级版本. 2025-07-10 03:34:23 +08:00
lijiahangmax
b42645b0ce 🐛 修复会话打开黑屏. 2025-07-10 03:32:45 +08:00
29 changed files with 85 additions and 46 deletions

View File

@@ -117,11 +117,15 @@ jobs:
type=semver,pattern={{major}}
- name: 🛠️ Build and push Docker image for orion-visor-${{ matrix.service }}
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: ./docker
file: ./docker/${{ matrix.service }}/Dockerfile
push: true
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64,linux/arm64
labels: ${{ steps.meta.outputs.labels }}
tags: |
${{ env.DOCKERHUB_NAMESPACE }}/orion-visor-${{ matrix.service }}:${{ steps.meta.outputs.version }}
${{ env.DOCKERHUB_NAMESPACE }}/orion-visor-${{ matrix.service }}:latest
@@ -129,5 +133,3 @@ jobs:
${{ env.GITHUB_REGISTRY }}/${{ github.repository_owner }}/orion-visor-${{ matrix.service }}:latest
${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_NAMESPACE }}/orion-visor-${{ matrix.service }}:${{ steps.meta.outputs.version }}
${{ env.ALIYUN_REGISTRY }}/${{ env.ALIYUN_NAMESPACE }}/orion-visor-${{ matrix.service }}:latest
labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64

View File

@@ -5,7 +5,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
privileged: true
ports:
- 9200:9200
- "9200:9200"
environment:
SPRING_PROFILES_ACTIVE: prod
MYSQL_HOST: mysql
@@ -37,7 +37,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
privileged: true
ports:
- 3307:3306
- "3307:3306"
environment:
MYSQL_DATABASE: orion_visor
MYSQL_USER: orion
@@ -59,7 +59,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
privileged: true
ports:
- 6380:6379
- "6380:6379"
environment:
REDIS_PASSWORD: Data@123456
volumes:

View File

@@ -1,6 +1,6 @@
version: '3.3'
# latest = 2.4.2
# latest = 2.4.3
# 支持以下源
# lijiahangmax/*
@@ -23,7 +23,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-service:latest
privileged: true
ports:
- 9200:9200
- "9200:9200"
environment:
SPRING_PROFILES_ACTIVE: ${SPRING_PROFILES_ACTIVE:-prod}
MYSQL_HOST: ${MYSQL_HOST:-mysql}
@@ -61,7 +61,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-mysql:latest
privileged: true
ports:
- 3307:3306
- "3307:3306"
environment:
MYSQL_DATABASE: ${MYSQL_DATABASE:-orion_visor}
MYSQL_USER: ${MYSQL_USER:-orion}
@@ -84,7 +84,7 @@ services:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-redis:latest
privileged: true
ports:
- 6380:6379
- "6380:6379"
environment:
REDIS_PASSWORD: ${REDIS_PASSWORD:-Data@123456}
volumes:
@@ -103,7 +103,7 @@ services:
guacd:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-guacd:latest
ports:
- 4822:4822
- "4822:4822"
environment:
GUACD_LOG_LEVEL: info
GUACD_LOG_FILE: /var/log/guacd.log
@@ -125,7 +125,7 @@ services:
adminer:
image: registry.cn-hangzhou.aliyuncs.com/orionsec/orion-visor-adminer:latest
ports:
- 8081:8080
- "8081:8080"
environment:
ADMINER_DEFAULT_SERVER: ${MYSQL_HOST:-mysql}
depends_on:

View File

@@ -1 +1 @@
FROM --platform=$BUILDPLATFORM adminer:latest
FROM --platform=$TARGETPLATFORM adminer:latest

View File

@@ -1,4 +1,5 @@
FROM maven:3.9.10-eclipse-temurin-8-alpine AS builder
#FROM --platform=$BUILDPLATFORM maven:3.9-amazoncorretto-8 AS builder
FROM maven:3.9-amazoncorretto-8 AS builder
# 设置阿里云镜像加速
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories

View File

@@ -1,3 +1,4 @@
#FROM --platform=$BUILDPLATFORM node:18-alpine AS builder
FROM node:18-alpine AS builder
# 设置阿里云镜像加速

View File

@@ -7,7 +7,7 @@ set -e
source ./project-build.sh "$@"
# 版本号
version=2.4.2
version=2.4.3
# 是否推送镜像
push_image=false
# 是否构建 latest
@@ -115,7 +115,7 @@ function modify_dockerfiles() {
if [ -f "$file" ]; then
echo "备份并修改: $file"
cp "$file" "$file$backup_suffix"
sed -i 's/--platform=\$BUILDPLATFORM//g' "$file"
sed -i 's/--platform=\TARGETPLATFORM//g' "$file"
else
echo "文件不存在 -> $file"
fi

View File

@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM guacamole/guacd:1.6.0
FROM --platform=$TARGETPLATFORM guacamole/guacd:1.6.0
USER root

View File

@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM mysql:8.0.28
FROM --platform=$TARGETPLATFORM mysql:8.0.39
# 系统时区
ARG TZ=Asia/Shanghai
@@ -12,3 +12,7 @@ COPY ./mysql/my.cnf /etc/mysql/conf.d/my.cnf
# 复制初始化脚本
COPY ./mysql/sql/init-*.sql /docker-entrypoint-initdb.d/
# 心跳检测
HEALTHCHECK --interval=10s --timeout=3s --start-period=3s --retries=3 \
CMD mysqladmin ping -h localhost -u root --password=${MYSQL_ROOT_PASSWORD} || exit 1

View File

@@ -4,7 +4,7 @@ set -e
# DockerContext: orion-visor
# 版本号
version=2.4.2
version=2.4.3
# 是否构建 service
export build_service=false
# 是否构建 ui

View File

@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM redis:6.0.16-alpine
FROM --platform=$TARGETPLATFORM redis:6.0.16-alpine
WORKDIR /data

View File

@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM openjdk:8-jdk-alpine
FROM --platform=$TARGETPLATFORM openjdk:8-jdk-alpine
USER root
@@ -20,5 +20,9 @@ RUN \
# 复制 jar 包
COPY ./service/orion-visor-launch.jar /app/app.jar
# 启动检测
HEALTHCHECK --interval=15s --timeout=5s --retries=5 --start-period=10s \
CMD wget -T5 -qO- http://127.0.0.1:9200/orion-visor/api/server/bootstrap/health | grep ok || exit 1
# 启动
CMD ["java", "-jar", "/app/app.jar"]

View File

@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM nginx:alpine
FROM --platform=$TARGETPLATFORM nginx:alpine
# 系统时区
ARG TZ=Asia/Shanghai

View File

@@ -36,7 +36,7 @@ public interface AppConst extends OrionConst {
/**
* 同 ${orion.version} 迭代时候需要手动更改
*/
String VERSION = "2.4.2";
String VERSION = "2.4.3";
/**
* 同 ${spring.application.name}

View File

@@ -14,7 +14,7 @@
<url>https://github.com/dromara/orion-visor</url>
<properties>
<revision>2.4.2</revision>
<revision>2.4.3</revision>
<spring.boot.version>2.7.17</spring.boot.version>
<spring.boot.admin.version>2.7.15</spring.boot.admin.version>
<flatten.maven.plugin.version>1.5.0</flatten.maven.plugin.version>

View File

@@ -13,7 +13,7 @@ spring:
host: ${REDIS_HOST:127.0.0.1}
port: ${REDIS_PORT:6379}
password: ${REDIS_PASSWORD:Data@123456}
database: ${REDIS_DATABASE:10}
database: ${REDIS_DATABASE:1}
data-version: ${REDIS_DATA_VERSION:1}
mock: false
redisson:

View File

@@ -39,9 +39,9 @@ import java.util.function.Function;
*/
public class ReplaceVersion {
private static final String TARGET_VERSION = "2.4.1";
private static final String TARGET_VERSION = "2.4.2";
private static final String REPLACE_VERSION = "2.4.2";
private static final String REPLACE_VERSION = "2.4.3";
private static final String PATH = new File("").getAbsolutePath();

View File

@@ -62,6 +62,7 @@ public class HostVncConfigStrategy extends AbstractHostConfigStrategy<HostVncCon
.authType(HostAuthTypeEnum.PASSWORD.name())
.noUsername(false)
.noPassword(false)
.timezone("Asia/Shanghai")
.clipboardEncoding(Const.UTF_8)
.build();
}
@@ -94,7 +95,11 @@ public class HostVncConfigStrategy extends AbstractHostConfigStrategy<HostVncCon
afterModel.setAuthType(HostAuthTypeEnum.PASSWORD.name());
}
// 加密密码
this.checkEncryptPassword(afterModel.getAuthType(), beforeModel, afterModel);
if (Booleans.isTrue(afterModel.getNoPassword())) {
afterModel.setPassword(beforeModel.getPassword());
} else {
this.checkEncryptPassword(afterModel.getAuthType(), beforeModel, afterModel);
}
afterModel.setHasPassword(null);
afterModel.setUseNewPassword(null);
}

View File

@@ -277,6 +277,9 @@ public class TerminalConnectHandler extends AbstractTerminalHandler<ITerminalSen
} else if (TerminalConnectTypeEnum.RDP.name().equals(connectType)) {
// RDP
connectConfig = hostConnectApi.getRdpConnectConfig(host, userId);
} else if (TerminalConnectTypeEnum.VNC.name().equals(connectType)) {
// VNC
connectConfig = hostConnectApi.getVncConnectConfig(host, userId);
} else {
throw Exceptions.unsupported();
}

View File

@@ -3,4 +3,4 @@ VITE_API_BASE_URL=http://127.0.0.1:9200/orion-visor/api
# websocket 路径
VITE_WS_BASE_URL=ws://127.0.0.1:9200/orion-visor/keep-alive
# 版本号
VITE_APP_VERSION=2.4.2
VITE_APP_VERSION=2.4.3

View File

@@ -3,4 +3,4 @@ VITE_API_BASE_URL=/orion-visor/api
# websocket 路径
VITE_WS_BASE_URL=/orion-visor/keep-alive
# 版本号
VITE_APP_VERSION=2.4.2
VITE_APP_VERSION=2.4.3

View File

@@ -1,7 +1,7 @@
{
"name": "orion-visor-ui",
"description": "Orion Visor UI",
"version": "2.4.2",
"version": "2.4.3",
"private": true,
"author": "Jiahang Li",
"license": "Apache 2.0",

View File

@@ -632,7 +632,7 @@ body[terminal-theme='dark'] .arco-modal-container {
align-items: center;
justify-content: center;
:deep(> div) {
& > div {
position: relative;
z-index: 8;
}
@@ -647,7 +647,7 @@ body[terminal-theme='dark'] .arco-modal-container {
display: flex;
align-items: center;
justify-content: center;
z-index: 9999;
z-index: 30;
}
// guacd 工具栏

View File

@@ -96,12 +96,10 @@ export function formatSecond(second: number, p = 'HH:mm') {
/**
* 格式化持续时间
* @param start
* @param end
*/
export function formatDuration(start: number, end?: number): string {
export function formatDuration(start: number, end?: number, none: string = ''): string {
if (!end) {
return '';
return none;
}
const duration = (end - start) / 1000;
if (duration < 1) {

View File

@@ -1,4 +1,5 @@
import type { TableColumnData } from '@arco-design/web-vue';
import { formatDuration } from '@/utils';
export const logColumns = [
{
@@ -46,6 +47,16 @@ export const logColumns = [
align: 'left',
ellipsis: true,
default: true,
}, {
title: '持续时间',
dataIndex: 'duration',
slotName: 'duration',
align: 'left',
width: 142,
render: ({ record }) => {
return formatDuration(record.startTime, record.endTime, '-');
},
default: true,
}, {
title: '连接时间',
dataIndex: 'connectTime',

View File

@@ -11,10 +11,18 @@
</a-button>
<a-button type="primary"
size="small"
title="仅将文本发送到远程剪切板"
:disabled="!clipboardData"
@click="sendClipboardData">
@click="sendClipboardData(false)">
发送
</a-button>
<a-button type="primary"
size="small"
title="将文本发送到远程剪切板并执行粘贴操作"
:disabled="!clipboardData"
@click="sendClipboardData(true)">
粘贴
</a-button>
</a-space>
</template>
@@ -38,8 +46,8 @@
const clipboardData = ref('');
// 发送剪切板数据
const sendClipboardData = () => {
props.session.paste(clipboardData.value);
const sendClipboardData = (sendPaste: boolean) => {
props.session.paste(clipboardData.value, sendPaste);
emits('close');
};

View File

@@ -176,7 +176,7 @@ export interface IGuacdSession extends ITerminalSession<GuacdReactiveSessionStat
// 发送键
sendKeys: (keys: Array<number>) => void;
// 粘贴
paste: (data: string) => void;
paste: (data: string, sendPaste: boolean) => void;
}
// RDP 会话定义

View File

@@ -141,16 +141,18 @@ export default abstract class BaseGuacdSession extends BaseSession<GuacdReactive
}
// 粘贴
paste(data: string): void {
paste(data: string, sendPaste: boolean): void {
if (!this.isWriteable()) {
return;
}
// 发送至远程剪切板
this.clipboardHandler?.sendDataToRemoteClipboard(data);
// 发送粘贴命令
setTimeout(() => {
this.sendKeys([65507, 118]);
}, 100);
if (sendPaste) {
setTimeout(() => {
this.sendKeys([65507, 118]);
}, 100);
}
}
// 聚焦

View File

@@ -22,7 +22,7 @@
</modules>
<properties>
<revision>2.4.2</revision>
<revision>2.4.3</revision>
<maven.compiler.source>8</maven.compiler.source>
<maven.compiler.target>8</maven.compiler.target>
<maven.surefire.plugin.version>3.0.0-M5</maven.surefire.plugin.version>