Endblc
如果有人在陪你,你又怎么会看这些文字。
使用Docker部署实现TG转发WeChat信息

access_time
brush 262个字
whatshot 28 ℃

使用Docker部署实现TG转发WeChat信息

几乎所有人都在使用微信,导致你不得不也使用微信。为什么不想用微信,因为张小龙没x

这边介绍一个使用TG转发微信消息的项目

TG-EFB-WeChat-Docker

开始部署

环境

  • Debian10.2
  • Telegram
https://telegram.org/dl/desktop/win64
https://telegram.org/dl/android/apk

创建Bot

登录Tg搜索用户名@BotFather
2.png

给他发消息
  1. 点击start
  2. 发送/newbot
  3. 你想要的显示昵称
  4. 用户名ID,以_bot结尾

记住token,等会有用

bot

输入/mybot->Edit bot可以给机器人换头像啥的

服务器

通过SSH连上服务器,安装Docker(已有跳过)

apt update -y
apt install curl -y

使用官方一键脚本安装Docker

curl -fsSL https://get.docker.com | bash -s docker
执行完毕后输入docker看看有没有反应

安装

根据提示进行配置,/root/wechat/config为配置文件目录

docker run --rm -it --name="efb-wechat" -v /root/wechat/config:/app/config xzsk2/efb-wechat-docker:latest efb-wizard

没有特别说明一路回车

Welcome to EH Forwarder Bot Setup Wizard.  This program will guide you
to finish up the last few steps to get EFB ready to use.

To use this wizard in another supported language, please change your
system language or modify the language environment variable and
restart the wizard.

Profile: [default] 
1. Choose master channel
●Telegram Master
Instance name to use with Telegram Master: [default instance] 

方向键选Add,回车

2. Choose slave channels (at least one is required).
[ =: Shift up; -: Shift down; Backspace: Remove ]
●+ Add   
 ✓ Submit

Choose a slave channel to add.
●WeChat Slave
Instance name to use with WeChat Slave: [default instance] 

Submit

2. Choose slave channels (at least one is required).
[ =: Shift up; -: Shift down; Backspace: Remove ]
 WeChat Slave                                                                                                                                                                                                        
 + Add                                                                                                                                                                                                               
●✓ Submit


Submit

3. Choose middlewares (optional).
[ =: Shift up; -: Shift down; Backspace: Remove ]
 + Add                                                                                                                                                                                                               
●✓ Submit

Would you like to continue?
●Save and continue             
 Change master channel settings
 Change slave channel settings 
 Change middleware settings   
Configuration is saved.
Some more advanced settings, such as granulated log control, are not
included in this wizard.  For further details, you may want to refer
to the documentation.

https://ehforwarderbot.readthedocs.io/en/latest/config.html

We will now guide you to set up modules you have enabled, each at a
time.
Press ENTER/RETURN to start setting up blueset.telegram.
This wizard will guide you to setup your EFB Telegram Master channel
(ETM). This would be really fast and simple.

[yN] Do you want to run ETM behind a proxy? [n]
Do you need help creating a bot?
●No, I have already made one according to the docs.
 Yes, please tell me how to make one. 

填入你创建机器人的Token

Your Telegram Bot token: 123456789:AAFUkWQfpkZ2yTA3ASJKLHDJHKAFHJKJLSArk

是否更新命令列表

Your Telegram Bot token: 5023182318:AAFUkWQfpkZ2yTA3AQW0NqCP4U26E7G2ark
Do you want to update the list of commands of your bot?
●Yes, please update.                      
 No, I want to keep the old commands list.

输入管理员ID,使用TG bot@userinfobot查看自己ID

Do you need help getting your ID?
●No, I already know my ID.            
 Yes, I want to know how to get my ID.
List of Admin User IDs, separated with comma: 1233456789

完成

[yN] Do you want to config experimental features? [n]

[yN] Do you want to adjust network configurations? (connection timeout) [n]

To learn about what RPC is and what it does, please visit the module
documentations.

https://etm.1a23.studio/

[yN] Do you want to enable RPC interface? [n]
Saving configurations...OK

Congratulations! You have finished the setup wizard for EFB Telegram
Master Channel.
Press ENTER/RETURN to start setting up blueset.wechat.

运行

docker run -d --restart=always --name="efb-wechat" -v /root/wechat/config:/app/config xzsk2/efb-wechat-docker:latest

登录

会在SSH里面生成二维码及二维码图片URL
docker logs efb-wechat

停止

docker container stop efb-wechat

效果图

可以直接发送Tg贴纸到Wechat
1.png

Docker容器:https://www.runoob.com/docker/docker-container-usage.html
TG Bot创建:https://zhuanlan.zhihu.com/p/59228574

#如无特别声明,该文章均为 Endblc 原创,转载请遵循 署名-非商业性使用 4.0 国际(CC BY-NC 4.0) 协议,即转载请注明文章来源。
#最后编辑时间为: 2022 年 11 月 17 日


create 添加新评论


account_circle
email
language
textsms





关于 DreamCat

主题名称:DreamCat | 版本:2.8.221001(LTS)

主题开发:HanFengA7 | TeddyNight | Dev-Leo | CornWorld | WhiteBearcn | DFFZMXJ

Designed by HanFengA7 Power by Typecho

Copyright © 2015-2022 by LychApe All rights reserved!

加我的QQ
加我的微博
加我的支付宝
加我的微信