1. 部署微信

这里推荐使用docker-comspose的方式运行

1.1 安装docker-compose(以下两种均可,二选一)

先安装docker

curl -fsSL https://get.docker.com | bash

or

apt -y install docker

然后安装docker-compose

apt -y install docker-compose

or

pip3 install docker-compose

1.2 配置文件

新建docker-compose.yaml文件,COMWECHAT字段可以从项目处替换为最新版本

version: '3.3'
services:
    wechatpchook:
        container_name: comwechat
        environment:
            - VNCPASS=YourPassword
            - COMWECHAT=https://github.com/ljc545w/ComWeChatRobot/releases/download/3.7.0.30-0.1.0-pre/3.7.0.30-0.1.0-pre.zip
        volumes:
            - "/root/WeChat/Files/:/home/user/.wine/drive_c/users/user/My Documents/WeChat Files/"
            - "/root/WeChat/Data/:/home/user/.wine/drive_c/users/user/Application Data/"
        privileged: true
        network_mode: host
        image: tomsnow1999/docker-com_wechat_robot:latest

1.3 启动docker镜像

docker-compose up -d 等待下载完成即可

1.4 使用VNC客户端连接进行扫码登陆操作

可以使用VNC Viewer或者MobaXterm,端口5905,如果登陆之后微信报错可以重启docker即可

2.配置Slave

2.1 安装依赖

apt-get install libopus0 ffmpeg libmagic1 python3-pip git libssl-dev
pip3 install -U git+https://github.com/ehForwarderBot/efb-telegram-master.git
pip3 install -U git+https://github.com/0honus0/python-comwechatrobot-http.git
pip3 install -U git+https://github.com/0honus0/efb-wechat-comwechat-slave.git
pip3 install lottie
pip3 install cairosvg

或者从pypi下载稳定版

pip3 install efb-telegram-master
pip3 install efb-wechat-comwechat-slave
pip3 install python-comwechatrobot-http

2.2 创建配置文件

mkdir -p ~/.ehforwarderbot/profiles/ComWeChat
mkdir -p ~/.ehforwarderbot/profiles/ComWeChat/blueset.telegram
mkdir -p ~/.ehforwarderbot/profiles/ComWeChat/honus.comwechat
touch ~/.ehforwarderbot/profiles/ComWeChat/config.yaml
touch ~/.ehforwarderbot/profiles/ComWeChat/blueset.telegram/config.yaml
touch ~/.ehforwarderbot/profiles/ComWeChat/honus.comwechat/config.yaml

建好之后的文件结构如图所示

ComWeChat/
├── blueset.telegram
│   ├── config.yaml
├── config.yaml
└── honus.comwechat
    └── config.yaml

2.3 主端配置文件

点击跳转 与之前配置相同,可以直接跳转查看

2.4 从端配置文件

编辑 /.ehforwarderbot/profiles/ComWeChat/honus.comwechat

dir: "/root/WeChat/Files/"

3. 启动EFB

ehforwarderbot -p ComWeChat

最后修改:2022 年 12 月 29 日
如果觉得我的文章对你有用,请随意赞赏