Isn’t Telegram nice?
References
The small cover image is referenced from: Github - EFB WeChat Slave Channel:EFB 微信从端 (EWS)
Reference materials:
- 使用EH Forwarder Bot实现Telegram同时收发多个微信/QQ消息
- EH Forwarder Bot - Documents
- EH Forwarder Bot - Github
- 用 Telegram 收发微信消息
- 安装并使用 EFB:在 Telegram 收发微信消息
Premeditated
Yesterday I was researching how to send/receive WeChat messages via tg (Telegram) (I’ve wanted this for a long time).
Hit an error and paused.
Today while browsing Twitter I saw 逃离微信宣言|FreeFromWechat Manifesto, got motivated again, and kept going. In the end, I got WeChat running inside tg.
But before it even warmed up, after logging in twice, it stopped working. Turns out WeChat blocked the web interface…
Quickly recording the setup process.
Environment Setup
apt update
# install dependenciesapt install libwebp-dev libmagic-dev git screen ffmpeg -y
# install python3apt install python3-pip python3-setuptools python3-dev -y
# install dev frameworkpip3 install git+https://github.com/blueset/ehforwarderbot.git
# install tg、wechat modulespip3 install efb-telegram-master efb-wechat-slaveConfiguration
Framework config
- Enable tg and wechat modules
mkdir -p ~/.ehforwarderbot/profiles/defaultvim ~/.ehforwarderbot/profiles/default/config.yaml
# config content:master_channel: blueset.telegramslave_channels:- blueset.wechattg config
- Set up the bot and Telegram account
This article explains how to create a bot and get tg id: 用 Telegram 收发微信消息
mkdir ~/.ehforwarderbot/profiles/default/blueset.telegramvim ~/.ehforwarderbot/profiles/default/blueset.telegram/config.yaml
# content below. Just replace bot_token and tg_id with yours.# For further customization, see docs.################### Required items ###################
# [Bot Token]# This is the token you obtained from @BotFathertoken: "bot_token"
# [List of Admin User IDs]# ETM will only process messages and commands from users# listed below. This ID can be obtained from various ways# on Telegram.admins:- tg_id
################### Optional items #################### [Experimental Flags]# This section can be used to toggle experimental functionality.# These features may be changed or removed at any time.# Options in this section is explained afterward.flags: chats_per_page: 10
# [Network Configurations]# [RPC Interface]# Refer to relevant sections afterwards for details.Start
Start the service with ehforwarderbot. After it initializes successfully, it will show a QR code. Scan it with WeChat to log in.
I got stuck here yesterday with a
VersionConflict. Today I searched and found someone asked in the comments of 使用EH Forwarder Bot实现Telegram同时收发多个微信/QQ消息 and there was a fix:pip3 install --upgrade docker-compose
After trying it, everything worked. Then just Ctrl C to stop it, and run screen -dmS EHF ehforwarderbot in the background.
This does work. Receiving/sending WeChat messages in tg is pretty fun. Too bad that after I logged in a couple times, the web interface got banned…