SMS Gateway is a comprehensive solution for receiving, sending, and forwarding SMS messages through GSM modems. It provides a modern web-based interface for managing SMS conversations and offers powerful webhook functionality with extensive filtering capabilities.
- Multi-device Support: Connect to multiple GSM modems simultaneously
- Real-time Messaging: Send and receive SMS with live updates via SSE
- Modern Web Interface: Intuitive conversation-based UI with SIM card management
- Powerful Webhooks: Forward SMS to external services with advanced filtering
- SIM-centric Architecture: Manage multiple SIM cards with individual settings
- Flexible Configuration: TOML-based configuration with comprehensive options
- PDU Support: Full PDU encoding/decoding with UCS2 character support
- Rust 1.60+ and Cargo
- Node.js 16+ and npm/pnpm
- SQLite
# Navigate to the frontend directory
cd frontend
# Install dependencies
pnpm install
# Build the frontend
pnpm run buildThis will generate a dist directory within the frontend folder.
# Return to the project root
cd ..
# Build the backend in release mode
cargo build --releaseThe compiled binary will be available in target/release/sms-gateway.
# Run with default settings
./target/release/sms-gateway
# Specify a custom config file
./target/release/sms-gateway --config /path/to/config.toml
# Set custom log directory
./target/release/sms-gateway --log /path/to/logs
# Set log level
./target/release/sms-gateway --log-level debug
# Update to the latest release
./target/release/sms-gateway update
# Show version
./target/release/sms-gateway versionThe application is configured using a TOML file. By default, it looks for the config file at:
- Debug mode:
./config.toml - Release mode:
/etc/sms-gateway/config.toml
Copy config.toml.example to config.toml and modify according to your setup:
cp config.toml.example config.toml[settings]
server_host = "0.0.0.0"
server_port = 8080
username = "admin"
password = "your_secure_password"
read_sms_frequency = 30
# Multiple device support
[[devices]]
com_port = "/dev/ttyUSB0"
baud_rate = 115200
[[devices]]
com_port = "/dev/ttyUSB1"
baud_rate = 115200[[settings.webhooks]]
url = "https://your-endpoint.com/webhook"
method = "POST"
[settings.webhooks.headers]
"Content-Type" = "application/json"
body = '''
{
"from": "@contact@",
"message": "@message@",
"timestamp": "@timestamp@"
}
'''For detailed configuration options including filtering, see config.toml.example.
This project is licensed under the MIT License - see the LICENSE file for details.