注意!
当前为backend分支,纯后端代码,无任何前端(bot)部分,需要前端部分请前往其他分支.
请先进行安装 requirements.txt 里的第三方库:
pip3 install -r requirements.txt
usage: python3 main.py [-h] [-b BIND] -t TOKEN [-f BUILDTOKEN]
FullTClash-纯后端命令行快速启动
options:
-h, --help show this help message and exit
-b BIND, --bind BIND 覆写绑定的外部地址端口,默认为0.0.0.0:8765
-t TOKEN, --token TOKEN
Websocket通信Token,也叫做密码,防止不合法的请求。
-f BUILDTOKEN, --buildtoken BUILDTOKEN
FullTCore代理客户端的buildtoken,不填则为默认值
python3 main.py -t fulltclash -b 0.0.0.0:8765
前提: 类Unix系统需要安装git,python3(python3.9以上),pip3。Windows系统安装python并添加环境变量,以及git。
- powershell
git clone -b backend https://github.com/AirportR/FullTclash.git; cd FullTclash;pip install -r requirements.txt; $randomString = -join ((48..57) + (65..90) + (97..122) | Get-Random -Count 10 | ForEach-Object { [char]$_ });python main.py -t ${randomString} -b 0.0.0.0:8765 --path ${randomString}
- bash等
git clone -b backend https://github.com/AirportR/FullTclash.git && cd FullTclash && pip3 install -r requirements.txt && randomString=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 10 | head -n 1) && python3 main.py -t $randomString -b 0.0.0.0:8765 --path $randomString
Docker镜像是基于alpine构建的
docker run -idt \
--name fulltclash-ws \
-e branch=origin \
-e core=4 \
-e token=114514 \
-e buildtoken=BUILDTOKEN \
-p 8765:8765 \
--restart always \
airportr/fulltclash:ws