Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@bsdayo
Copy link

@bsdayo bsdayo commented Jun 13, 2024

概述

目前使用 OCS 基本只能挂在电脑上,一直占着也挺烦的,于是研究了一会尝试加了简单的 Docker 支持,就可以扔服务器上不用管了(

镜像基于 Alpine,可以通过 VNC 连接至容器内的 Chromium 来随时监控脚本的运行状态。

实现

大致流程如下:

  1. 使用 Xvnc 启动一个虚拟 X Server + VNC Server
  2. Chromium 通过 --load-extension 加载 Tampermonkey,渲染在虚拟 X Server 上
  3. 使用 Playwright 脚本控制 Tampermonkey 及 OCS 的初始化

启动 URL、VNC 相关环境都可以配置

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant