# SMS Forwarder 🚀 一个将 iOS 短信转发到 Android 设备的高性能通知服务器 [![Docker](https://img.shields.io/badge/Docker-支持-blue?logo=docker)](https://www.docker.com/) [![Python](https://img.shields.io/badge/Python-3.10+-green?logo=python)](https://www.python.org/) [![FastAPI](https://img.shields.io/badge/FastAPI-框架-red?logo=fastapi)](https://fastapi.tiangolo.com/) [![License](https://img.shields.io/badge/License-MIT-yellow)](LICENSE) ## ✨ 功能特性 - 📱 **iPhone 集成**:通过快捷指令自动转发短信 - 🔔 **多种推送**:支持 Gotify、ntfy、Pushbullet 等 80+ 种通知服务 - ⚡ **低延迟**:Gotify 1-3秒,ntfy 5-15秒延迟 - 🐳 **Docker 部署**:一键部署,环境隔离 - 🔒 **安全认证**:API 密钥 + IP 白名单 + 速率限制 - 📊 **监控完善**:健康检查、状态监控、详细日志 - 🎯 **高性能**:基于 FastAPI,支持高并发 - 🛠️ **易于管理**:提供完整的管理脚本 ## 🚀 快速开始(推荐 Docker) ### 1. 克隆项目 ```bash git clone https://gitea.nosuchip.de/zack/sms_forwarder.git cd sms_forwarder ``` ### 2. 配置服务 ```bash # 复制配置文件 cp config.example.yaml config.yaml # 编辑配置(必须修改 API 密钥和推送服务) nano config.yaml ``` ### 3. 一键部署 ```bash # 自动部署(推荐) ./scripts/deploy.sh # 或手动部署 docker-compose up -d ``` ### 4. 验证部署 ```bash # 测试服务 ./scripts/test-docker.sh # 查看状态 ./scripts/docker-manage.sh status ``` 服务启动后访问: - 🌐 **API 文档**:http://localhost:12152/docs - 💚 **健康检查**:http://localhost:12152/health - 📊 **服务状态**:http://localhost:12152/status ## 📋 支持的推送服务 | 服务 | 延迟 | 特点 | 推荐度 | |------|------|------|--------| | **Gotify** | 1-3秒 | 自托管,完全控制 | ⭐⭐⭐⭐⭐ | | **ntfy** | 5-15秒 | 免费,无需注册 | ⭐⭐⭐⭐ | | **Pushbullet** | 30秒-2分钟 | 设置简单 | ⭐⭐⭐ | | **其他** | 变化 | Discord、Telegram、Slack 等 80+ 种 | ⭐⭐ | ## 📱 客户端配置 ### iPhone 快捷指令 详见 [iPhone 配置指南](docs/simple-iphone-setup.md) ### Android 客户端 - **Gotify**:[F-Droid](https://f-droid.org/packages/com.github.gotify/) | [GitHub](https://github.com/gotify/android) - **ntfy**:[Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy) | [F-Droid](https://f-droid.org/packages/io.heckel.ntfy/) ## 🛠️ 管理命令 ```bash # 服务管理 ./scripts/docker-manage.sh status # 查看状态 ./scripts/docker-manage.sh logs # 查看日志 ./scripts/docker-manage.sh restart # 重启服务 ./scripts/docker-manage.sh test # 测试通知 # 部署管理 ./scripts/deploy.sh # 重新部署 ./scripts/test-docker.sh # 完整测试 ``` ## 📚 文档 - 📖 [部署指南](docs/deployment.md) - 详细的 Docker 部署说明 - 📱 [iPhone 配置](docs/simple-iphone-setup.md) - 快捷指令设置 - 🔧 [高级配置](docs/iphone-setup.md) - 完整配置选项 ## 🤝 贡献 欢迎提交 Issue 和 Pull Request! ## 📄 许可证 MIT License - 详见 [LICENSE](LICENSE) 文件