A Matrix-Wechat puppeting bridge, based on https://github.com/ChisBread/wechat-box
Project description
mautrix-wechat
A Matrix-Wechat puppeting bridge, based on https://github.com/ChisBread/wechat-box
Usage
Run wechat-service
Firstly, you need to have a wechat-service (dockerized wine running Wechat Desktop with injected dll) running, to do that, simply run:
docker run -d --name wechat-service --rm \
-e HOOK_PROC_NAME=WeChat \
-e HOOK_DLL=auto.dll \
-e TARGET_AUTO_RESTART="yes" \
-e INJ_CONDITION="[ \"\`sudo netstat -tunlp | grep 5555\`\" != '' ] && exit 0 ; sleep 5 ; curl 'http://127.0.0.1:8680/hi' 2>/dev/null | grep -P 'code.:0'" \
-e TARGET_CMD=wechat-start \
-v "$(pwd)/WeChat Files:/home/app/WeChat Files" \
-p 8080:8080 -p 5555:5555 -p 5900:5900 \
--add-host=dldir1.qq.com:127.0.0.1 \
chisbread/wechat-service:latest
And then, go to localhost:8080/vnc.html
to finish the login step.
Run mautrix-wechat
mkdir mautrix-wechat && cd mautrix-wechat
wget https://raw.githubusercontent.com/LeiShi1313/mautrix-wechat/main/mautrix_wechat/example-config.yaml -o config.yaml
docker run -d --name mautrix-wechat -v $(pwd):/app leishi1313/mautrix-wechat
docker exec -ti mautrix-wechat python -m mautrix_wechat -g
Now copy the generated registration.yaml
to your homeserver config,
TODO:
WeChat box
- Auto reconnect
WeChat -> Matrix
- 接收微信文本消息
- 接收微信图片消息
- 接收微信引用消息
- 接收链接
- 就收Quote消息
Matrix -> WeChat
- 发送文本消息
- 发送图片信息(可能无法做到)
- 发送at消息
- 从matrix端发送DM/群消息(matrix room未创建)
Docker
- python not receiving SIGINT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mautrix-wechat-0.1.0.tar.gz
(32.5 kB
view details)
Built Distribution
File details
Details for the file mautrix-wechat-0.1.0.tar.gz
.
File metadata
- Download URL: mautrix-wechat-0.1.0.tar.gz
- Upload date:
- Size: 32.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.8.3 requests/2.28.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1c28260d516aad043e1f7ca8acf23801ca376081d2b0bad080d50481b0a62f5 |
|
MD5 | 77f678734202b5f9e0e401f232dfe8b3 |
|
BLAKE2b-256 | c46db263bbec0cc23e0963a2f8884fd0c3c462ee5a732b1ffc20e8bac7a7a177 |
File details
Details for the file mautrix_wechat-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: mautrix_wechat-0.1.0-py3-none-any.whl
- Upload date:
- Size: 42.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.8.3 requests/2.28.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e80cd25fa319c31e99dcda1c6e2215c1b0a020050f7d36bdadba132566200bc |
|
MD5 | 353c760008a31566326471ef85be2d34 |
|
BLAKE2b-256 | e934e0a52ec0b861de93c9c995c509d5f11f344a74cdf42fdbe9467473a69ea6 |