106 lines
2.9 KiB
TOML
106 lines
2.9 KiB
TOML
# SMS 转发器配置文件
|
||
|
||
# 存储配置
|
||
[storage]
|
||
enabled = true
|
||
path = "./sms.json" # 短信保存路径
|
||
|
||
# Web 服务器配置
|
||
[server]
|
||
enabled = true
|
||
listen = ":8080" # 监听地址,访问 http://localhost:8080
|
||
# 允许的 WebSocket Origin(可填完整 Origin 或 host:port)。
|
||
# 为空时仅允许同源 Origin。
|
||
allowed_origins = ["*"]
|
||
|
||
# 通知通道配置
|
||
# 支持多个通道,按顺序尝试发送
|
||
|
||
# Email 通道
|
||
[[channels]]
|
||
type = "email"
|
||
enabled = true # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
host = "smtp.example.com"
|
||
port = 587
|
||
username = "your-email@example.com"
|
||
password = "your-password"
|
||
from = "your-email@example.com"
|
||
to = ["recipient@example.com"]
|
||
# use_tls = true # 可选,默认 true
|
||
|
||
# Bark 通道 (iOS)
|
||
[[channels]]
|
||
type = "bark"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
endpoint = "https://api.day.app/your-device-key"
|
||
# title = "SMS 通知" # 可选
|
||
|
||
# Gotify 通道
|
||
[[channels]]
|
||
type = "gotify"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
endpoint = "https://gotify.example.com"
|
||
token = "your-app-token"
|
||
# priority = 5 # 可选,默认 5
|
||
|
||
# ServerChan (Server酱) 通道
|
||
[[channels]]
|
||
type = "serverchan"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
send_key = "your-sendkey"
|
||
|
||
# Webhook 通道
|
||
[[channels]]
|
||
type = "webhook"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
allow_private_network = false # 默认禁止私网/本地地址,降低 SSRF 风险
|
||
url = "https://your-webhook-endpoint.com/notify"
|
||
method = "POST" # GET 或 POST
|
||
# headers 可选
|
||
[channels.headers]
|
||
Authorization = "Bearer your-token"
|
||
|
||
# 企业微信 (WeCom) 通道
|
||
[[channels]]
|
||
type = "wecom"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
corp_id = "your-corp-id" # 企业 ID
|
||
corp_secret = "your-app-secret" # 应用 Secret
|
||
agent_id = 1000002 # 应用 AgentId
|
||
# to_user = "UserID1|UserID2" # 可选,留空则推送给所有人
|
||
|
||
# 飞书通道(使用飞书应用 SDK)
|
||
[[channels]]
|
||
type = "feishu"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
app_id = "your-app-id" # 飞书应用 App ID
|
||
app_secret = "your-app-secret" # 飞书应用 App Secret
|
||
receive_id = "ou_xxx" # 接收者 ID
|
||
receive_id_type = "open_id" # open_id / user_id / union_id / email / chat_id
|
||
# title = "短信通知" # 可选,消息标题
|
||
|
||
# 钉钉机器人通道
|
||
[[channels]]
|
||
type = "dingtalk"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
webhook_url = "https://oapi.dingtalk.com/robot/send?access_token=your-token"
|
||
# sign_secret = "SECxxx" # 可选,加签密钥
|
||
# title = "短信通知" # 可选,消息前缀
|
||
|
||
# Telegram Bot 通道
|
||
[[channels]]
|
||
type = "telegram"
|
||
enabled = false # 是否启用此通道
|
||
request_timeout_sec = 10
|
||
bot_token = "123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"
|
||
chat_id = "123456789"
|
||
# api_url = "https://api.telegram.org"
|