fullclash安装

介绍

FullTclash bot 是承载其测试任务的 Telegram 机器人(以下简称 bot),目前支持以 clash 配置文件为载体的批量联通性测试,支持以下测试条目:
Netflix Youtube DisneyPlus Bilibili steam货币 OpenAI(ChatGPT) 落地ip风险(IP欺诈度) 维基百科

环境准备(python>=3.9)

编译安装 Python 3.9

1
2
3
4
5
6
7
curl -O https://www.python.org/ftp/python/3.9.13/Python-3.9.13.tgz
tar -xf Python-3.9.13.tgz
cd Python-3.9.13
./configure --enable-optimizations
make -j$(nproc)
sudo make altinstall
python3.9 --version

git仓库

1
2
3
4
5
apt update && apt upgrade
apt install -y git && git clone https://github.com/AirportR/FullTclash.git && cd FullTclash
apt install python3-pip screen fontconfig
cd FullTclash
pip3.9 install -r requirements.txt

Bot 环境准备

Telegram 的 api_id、api_hash 获取地址 (部分 TG 账号已被拉黑,无法正常使用)

去 @BotFather 那里创建一个机器人,获得该机器人的 bot_token,应形如:bot_token = “123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11”

去 @userinfobo 获取用户 ID

运行

1
2
3
4
screen  # 创建新的终端
cd FullTclash/./resources
cp config.yaml.example config.yaml
vim config.yaml

修改 config.yaml 文件,以下是要修改的内容:

1
2
3
4
5
6
bot:
api_id: 123456 # 改成自己的 api_id
api_hash: 123456ABCDefg # 改成自己的 api_hash
bot_token: 123456:ABCDefgh123455 # bot_token, 从 @BotFather 获取
# 如果是在中国大陆地区使用,则程序需要代理才能连接上 Telegram 服务器。写入如下信息:
proxy: 127.0.0.1:7890 # socks5 替换成自己的代理地址和端口

执行服务

1
python3.9 -c 'import sys; sys.stdout.reconfigure(encoding="utf-8"); exec(open("main.py").read())'