-
Notifications
You must be signed in to change notification settings - Fork 1
/
config-template.toml
77 lines (64 loc) · 4.67 KB
/
config-template.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
### 使用前修改为自己的内容参数并将配置文件更名为:config.toml
### $cp config-template.toml config.toml
### 为了调用本地系统资源或程序,推荐使用系统服务的方式启动而不是docker启动
[telegram]
bot_token = "6763******uQ" #telegram bot token 通过BotFather申请获得:https://t.me/BotFather
ids = [6111119, 6222228] # telegram user id 可使用此bot的id,可多个 获取ID:https://t.me/get_id_bot
[openai] #兼容openai chatgpt请求格式的模型api调用应该都可以正常使用
base_url = "https://api.openai.com/v1/chat/completions" # 请求地址 可更改
model = "gpt-3.5-turbo" # 模型名,可更改"gpt-4"等受支持模型
api_key = "sk-kx****57c71" # API KEY
[command] # 定制常用的命令,使用方式:`/c 1` 或 `/c 跳`,输入不存在的key则显示所有已定制的命令,如/c 999
cmd = [
{"1" = "curl ipinfo.io"},
{"2" = "df -h"},
{"3" = "curl ip.fm"},
{"4" = "curl wttr.in/Hunan"},
# 在rusty_ytdl无法使用可使用yt-dlp下载音频,然后使用tdl上传音频,使用tdl登录tg后指定要发送的群组ID
# 将tdl_dir目录下的文件上传到群组后删除文件(--rm),想保留文件不想删除文件则去掉--rm
{"c" = "tdl up -p /root/tgbot-app/tdl_dir -c 填群组ID --rm -t 8 -s 524288 -l 4"},
{"唱" = "id"},
{"跳" = "curl https://uapis.cn/api/say"},
{"rap" = "curl https://uapis.cn/api/prohibited?text=鸡你太美"},
{ "查看当前所在目录" = "pwd"}
]
[reqwest] #机器人在使用reqwest库发送网络请求时附带的参数 部分网站会检查UA
user_agent = "tgbot-app"
#user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/81.0"
proxy = ""
# proxy = "http://username:password@1.2.3.4:1880"
# proxy = "https://username:password@1.2.3.4:1880"
# proxy = "socks5://1.2.3.4:1880" #好像不支持带账密验证的socks5,HTTP/HTTPS可带可不带
[brute_force]
ssh = { "username" = "root", "port" = "22", "brute_file" = "./ssh_password.txt", "threads" = "16", "display_message_time_interval_seconds" = "5" }
#使用此命令需下载yt-dlp程序到工作目录并添加执行权限chmod +x yt-dlp
[yt_dlp] # 使用yt-dlp时是否使用cookie或代理,或一起使用
cookie = "" #填入文件名,比如:"ytb-cookie.txt" 使用浏览器插件(https://chrome.google.com/webstore/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc)获取youtube cookie的文本文件,然后上传放到工作目录。比如我的是:/root/tgbot-app下
proxy = "" # 为空则不使用代理,默认不使用代理 (由于某些IP会被油管禁止,如果无法下载可以使用cookie或代理,或同时使用) HTTP代理下载速度貌似比socks5更快,推荐
#proxy = "socks5://username:password@1.2.3.4:1080" # 支持HTTP/HTTPS/SOCKS proxy yt-dlp可选身份验证
[y_ytdl] # 目前reqwest好像不支持带身份验证socks5。HTTP/HTTPS可选择带身份验证,推荐
proxy = "" # 为空则不使用代理,默认不使用代理 (由于某些IP会被油管禁止(要求验证),如果无法下载可以使用代理)
#proxy = "http://username:password@1.2.3.4:1880" # HTTP/HTTPS可选身份验证,暂不支持带有账号密码验证的socks5。 reqwest crate本人测试后发现无法使用带身份验证的socks5代理 如果要使用,socks5要没有身份验证的才行,不推荐,推荐HTTP
hight_audio_save = false #在低品质音频发送失败时是否删除高音质音频,serv00建议开启:true
# 如需使用[resend](https://resend.com)需要添加api_key和发送邮箱地址(from)
# 在网站上申请密钥和验证邮箱后填入配置文件中并重启程序服务,如`systemctl restart tgbot-app`
# 使用方式:/resend 接收邮箱地址###邮件标题###邮件正文 ps:使用三个连续的#来分割
# 比如:/resend abc@efg.com###全民制作人们大家好###我喜欢唱跳Rap篮球,CTRL!!!
[resend] #使用此方式发送不会暴露自己的真实邮箱(如:gmail),虽然也会显示代发,实际的发送地址是from,代发的地址显示为:前面随机字符@你的域名。如果使用gmail发送,代发地址会显示gmail地址
api_key = ""
from = ""
# api_key = "re_********U"
# from = "abc@efg.com"
#目前resend限制每天免费发送100次 每月免费3000次
# 以系统服务的方式运行此程序
# vim /etc/systemd/system/tgbot-app.service
# 添加一下内容
# [Unit]
# Description=电报机器人程序
# After=network.target
# [Service]
# ExecStart=/root/tgbot-app/tgbot-app
# WorkingDirectory=/root/tgbot-app
# Restart=always
# [Install]
# WantedBy=default.targe