Skip to content
This repository has been archived by the owner on Oct 25, 2023. It is now read-only.

Commit

Permalink
更新chrono至0.0.46,适配其配件文件,增加已登陆QQ数据固化
Browse files Browse the repository at this point in the history
  • Loading branch information
yuuki-nya committed Sep 25, 2023
1 parent b043942 commit 1717e49
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 15 deletions.
12 changes: 4 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ RUN apt-get update && apt-get install -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

# 新增用户
RUN useradd -m -s /bin/bash user && echo 'user'

# 安装Linux QQ
RUN curl -o /root/linuxqq_3.1.2-13107_amd64.deb https://dldir1.qq.com/qqfile/qq/QQNT/ad5b5393/linuxqq_3.1.2-13107_amd64.deb
RUN dpkg -i /root/linuxqq_3.1.2-13107_amd64.deb && apt-get -f install -y && rm /root/linuxqq_3.1.2-13107_amd64.deb
Expand All @@ -39,10 +36,9 @@ RUN curl -L -o /tmp/LiteLoaderQQNT.zip https://github.com/LiteLoaderQQNT/LiteLoa
RUN sed -i 's/"main": ".\/app_launcher\/index.js"/"main": ".\/LiteLoader"/' /opt/QQ/resources/app/package.json

# 安装chronocat
RUN curl -L -o /tmp/chronocat-llqqnt.zip https://github.com/chrononeko/chronocat/releases/download/v0.0.45/chronocat-llqqnt-v0.0.45.zip \
&& mkdir -p /home/user/LiteLoaderQQNT/plugins \
&& unzip /tmp/chronocat-llqqnt.zip -d /home/user/LiteLoaderQQNT/plugins/ \
&& chown -R user /home/user/LiteLoaderQQNT \
RUN curl -L -o /tmp/chronocat-llqqnt.zip https://ghproxy.com/https://github.com/chrononeko/chronocat/releases/download/v0.0.46/chronocat-llqqnt-v0.0.46.zip \
&& mkdir -p /root/LiteLoaderQQNT/plugins \
&& unzip /tmp/chronocat-llqqnt.zip -d /root/LiteLoaderQQNT/plugins/ \
&& rm /tmp/chronocat-llqqnt.zip

# 创建必要的目录
Expand All @@ -58,7 +54,7 @@ RUN echo "Xvfb :1 -screen 0 1280x1024x16 &" >> ~/start.sh
RUN echo "export DISPLAY=:1" >> ~/start.sh
RUN echo "fluxbox &" >> ~/start.sh
RUN echo "x11vnc -display :1 -noxrecord -noxfixes -noxdamage -forever -rfbauth ~/.vnc/passwd &" >> ~/start.sh
RUN echo "su -c 'qq' user" >> ~/start.sh
RUN echo "su -c 'qq' root" >> ~/start.sh
RUN chmod +x ~/start.sh

# 配置supervisor
Expand Down
47 changes: 41 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@

## 使用

### 快速运行

容器重建会丢失已登陆QQ数据

```bash
docker run -d --name chronocat-docker -p 16530:16530 -p 5900:5900 yuukinya/chronocat-docker
docker run -d --name chronocat-docker -p 16530:16530 -p 5900:5900 -v ${PWD}/config:/root/.chronocat/config yuukinya/chronocat-docker
```

或者下载代码中的docker-compose.yml,然后执行
Expand All @@ -14,16 +18,37 @@ docker run -d --name chronocat-docker -p 16530:16530 -p 5900:5900 yuukinya/chron
docker-compose up -d
```

### VNC登陆
### QQ登陆数据固化(可选)

使用VNC软件登陆`服务器IP:5900`,默认密码是`vncpasswd`
先完成上面的`快速运行`,保证容器在运行状态

### 获取RED_PROTOCOL_TOKEN
```bash
# 进入项目目录
mkdir data
# 复制数据到data目录
docker cp chronocat-docker:/root/.config/QQ ./data
```

如果之前是docker run运行的,执行

```bash
docker exec chronocat-docker cat /home/user/BetterUniverse/QQNT/RED_PROTOCOL_TOKEN
docker rm -f chronocat-docker && run -d --name chronocat-docker -p 16530:16530 -p 5900:5900 -v ${PWD}/config:/root/.chronocat/config -v ${PWD}/data/QQ:/root/.config/QQ yuukinya/chronocat-docker
```

如果之前是docker-compose运行的,编辑docker-compose.yml,把volumes下两行的开头注释去掉,保存,再执行

```bash
docker-compose up -d
```

### VNC登陆

使用VNC软件登陆`服务器IP:5900`,默认密码是`vncpasswd`

### 修改chronocat配置

修改当前目录/config/chronocat.yml,修改后重启容器即可

### 修改VNC密码

```bash
Expand All @@ -39,8 +64,18 @@ docker exec chronocat-docker sh -c "x11vnc -storepasswd newpasswd /root/.vnc/pas

## TODO

- [x] 能固化已登陆QQ的数据
- [ ] 使用docker的environment来指定VNC密码
- [ ] 能固化已登陆QQ的数据(可能因为容器重建随机生成设备ID而无法实现)

## 更新日志

### 2023-9-25

- 更新chronocat至0.0.46
- 修改chronocat配置映射至宿主机
- 固化已登陆QQ数据

### 2023-9-22

- 初始版本

5 changes: 4 additions & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ services:
- "5900:5900"
- "16530:16530"
environment:
- TZ=Asia/Shanghai
- TZ=Asia/Shanghai
volumes:
- ./config:/root/.chronocat/config
# - ./data/QQ:/root/.config/QQ #QQ数据固化目录,请先阅读README再使用

0 comments on commit 1717e49

Please sign in to comment.