🆕 新增显示vnc页面

This commit is contained in:
李寻欢 2024-01-09 10:48:21 +08:00
parent 6d127d1492
commit f0bb46b9ab
6 changed files with 20 additions and 4 deletions

View File

@ -3,6 +3,7 @@ package app
import ( import (
"fmt" "fmt"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
"go-wechat/config"
"go-wechat/service" "go-wechat/service"
"net/http" "net/http"
) )
@ -21,6 +22,7 @@ func Index(ctx *gin.Context) {
} }
result["friends"] = friends result["friends"] = friends
result["groups"] = groups result["groups"] = groups
result["vnc"] = config.Conf.Wechat.VncUrl
// 渲染页面 // 渲染页面
ctx.HTML(http.StatusOK, "index.html", result) ctx.HTML(http.StatusOK, "index.html", result)
} }

View File

@ -2,6 +2,8 @@
wechat: wechat:
# 微信HOOK接口地址 # 微信HOOK接口地址
host: 10.0.0.73:19088 host: 10.0.0.73:19088
# 微信容器映射出来的vnc页面地址没有就不填
vncUrl: http://192.168.1.175:19087/vnc_lite.html
# 是否在启动的时候自动设置hook服务的回调 # 是否在启动的时候自动设置hook服务的回调
autoSetCallback: false autoSetCallback: false
# 回调IP如果是Docker运行本参数必填(填auto表示自动不适用于 docker 环境)如果Docker修改了映射格式为 ip:port # 回调IP如果是Docker运行本参数必填(填auto表示自动不适用于 docker 环境)如果Docker修改了映射格式为 ip:port

View File

@ -6,6 +6,7 @@ import "strings"
// @description: 微信助手 // @description: 微信助手
type wechat struct { type wechat struct {
Host string `json:"host" yaml:"host"` // 接口地址 Host string `json:"host" yaml:"host"` // 接口地址
VncUrl string `json:"vncUrl" yaml:"vncUrl"` // vnc页面地址
AutoSetCallback bool `json:"autoSetCallback" yaml:"autoSetCallback"` // 是否自动设置回调地址 AutoSetCallback bool `json:"autoSetCallback" yaml:"autoSetCallback"` // 是否自动设置回调地址
Callback string `json:"callback" yaml:"callback"` // 回调地址 Callback string `json:"callback" yaml:"callback"` // 回调地址
Forward []string `json:"forward" yaml:"forward"` // 转发地址 Forward []string `json:"forward" yaml:"forward"` // 转发地址

View File

@ -2,7 +2,7 @@ version: '3.9'
services: services:
wechat: wechat:
image: lxh01/wxhelper-docker:3.9.5.81 image: lxh01/wxhelper-docker:3.9.5.81-v11
container_name: gw-wechat container_name: gw-wechat
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -10,7 +10,7 @@ services:
volumes: volumes:
- ./data/wechat:/home/app/.wine/drive_c/users/app/Documents/WeChat\ Files - ./data/wechat:/home/app/.wine/drive_c/users/app/Documents/WeChat\ Files
ports: ports:
- "8080:8080" - "19087:8080"
- "19088:19088" - "19088:19088"
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:19088/api/checkLogin"] test: ["CMD", "curl", "-f", "http://localhost:19088/api/checkLogin"]

View File

@ -14,6 +14,8 @@ vim config.yaml # 编辑配置文件,内容如下,最新配置请参考项
wechat: wechat:
# 微信HOOK接口地址 # 微信HOOK接口地址
host: wechat:19088 host: wechat:19088
# 微信容器映射出来的vnc页面地址没有就不填
vncUrl: http://192.168.1.175:19087/vnc_lite.html
# 是否在启动的时候自动设置hook服务的回调 # 是否在启动的时候自动设置hook服务的回调
autoSetCallback: true autoSetCallback: true
# 回调IP如果是Docker运行本参数必填如果Docker修改了映射格式为 ip:port如果使用项目提供的docker-compsoe.yaml文件启动可以填`auto` # 回调IP如果是Docker运行本参数必填如果Docker修改了映射格式为 ip:port如果使用项目提供的docker-compsoe.yaml文件启动可以填`auto`
@ -46,7 +48,7 @@ version: '3.9'
services: services:
wechat: wechat:
image: lxh01/wxhelper-docker:3.9.5.81 image: lxh01/wxhelper-docker:3.9.5.81-v11
container_name: gw-wechat container_name: gw-wechat
restart: unless-stopped restart: unless-stopped
environment: environment:
@ -54,7 +56,7 @@ services:
volumes: volumes:
- ./data/wechat:/home/app/.wine/drive_c/users/app/Documents/WeChat\ Files - ./data/wechat:/home/app/.wine/drive_c/users/app/Documents/WeChat\ Files
ports: ports:
- "8080:8080" - "19087:8080"
- "19088:19088" - "19088:19088"
healthcheck: healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:19088/api/checkLogin"] test: ["CMD", "curl", "-f", "http://localhost:19088/api/checkLogin"]

View File

@ -151,6 +151,15 @@
</tbody> </tbody>
</table> </table>
</div> </div>
{{ if ne .vnc "" }}
<input type="radio" name="friend_tab" role="tab" class="tab" aria-label="运行状态"/>
<div role="tabpanel" class="tab-content p-6">
<div style="height: 747px;width: 1280px;overflow: hidden !important;">
<iframe src="{{ .vnc }}" frameborder="0" style="width: 100%;height: 100%;pointer-events: none;"></iframe>
</div>
</div>
{{ end }}
</div> </div>