Initial commit: SMS Forwarder project with Docker support

This commit is contained in:
zack
2025-07-17 19:30:35 +08:00
commit 152e136673
29 changed files with 3583 additions and 0 deletions

67
config.example.yaml Normal file
View File

@ -0,0 +1,67 @@
# SMS Forwarder 配置文件示例
# 复制此文件为 config.yaml 并根据需要修改
# 服务器配置
server:
host: "0.0.0.0"
port: 12152
# API 密钥,用于验证请求(必须设置)
# 建议使用强密码生成器生成例如python -c "import secrets; print(secrets.token_urlsafe(32))"
api_key: "ayNESyIW2pCQ5Ts-O8FC5t8mzhb26kbDZEr4I7PynHg"
# 日志配置
logging:
level: "INFO" # DEBUG, INFO, WARNING, ERROR
file: "logs/sms_forwarder.log"
# 通知配置
notifications:
# 默认通知服务(必须配置至少一个)
services:
# Pushbullet 示例(推荐)
# 将 your-pushbullet-access-token 替换为你从 Pushbullet 网站获取的 Access Token
- name: "pushbullet"
url: "pbul://o.YV9e3ugEsg2bWKZ0U7HA4IlTLkEp1BtU"
enabled: true
# FCM 示例
# - name: "fcm"
# url: "fcm://project@apikey/DEVICE_ID"
# enabled: false
# Gotify 示例(自托管)
# - name: "gotify"
# url: "gotify://hostname/token"
# enabled: false
# ntfy 示例
# - name: "ntfy"
# url: "ntfy://your-topic/"
# enabled: false
# Discord Webhook 示例
# - name: "discord"
# url: "discord://webhook_id/webhook_token"
# enabled: false
# 通知模板
templates:
# 短信通知模板
sms:
title: "📱 新短信 - {sender}"
body: |
发件人: {sender}
时间: {timestamp}
内容: {content}
# 系统通知模板
system:
title: "🔔 系统通知"
body: "{message}"
# 安全配置
security:
# 允许的来源 IP可选留空表示允许所有
allowed_ips: []
# 请求频率限制(每分钟最大请求数)
rate_limit: 60