videotomp3transcriptor/SMS_FORWARDER_SETUP.md
debian.StillHammer 3735ebdccf feat: YouTube download system complete
 FULLY OPERATIONAL - Tested & working

## Infrastructure
- PO Token Provider (Docker bgutil, port 4416)
- SMS Receiver endpoint (Node.js, port 4417)
- Deno JavaScript runtime (signature decryption)
- Logged-in cookies system

## Features
- Anti-bot bypass (PO Token + cookies)
- Auto-login scripts with SMS forwarding
- Cookie extraction (Camoufox)
- Full automation ready

## Tested
- Multiple videos downloaded successfully
- Audio extraction to MP3 working
- Download speeds 15-30 MB/s

## Documentation
- YOUTUBE_SETUP_COMPLETE.md (full usage guide)
- SMS_FORWARDER_SETUP.md (SMS automation)
- QUICK_SETUP_COOKIES.md (cookie renewal)

## Scripts
- src/sms_receiver.js - SMS webhook endpoint
- src/python/auto_login_full_auto.py - Auto-login with SMS
- test_youtube_download.sh - Test script

Ready for production integration.
2026-01-31 08:21:47 +00:00

199 lines
4.1 KiB
Markdown

# 📱 SMS Forwarder Setup Guide
## ✅ Serveur SMS Receiver Ready
**Endpoint URL:** `http://57.131.33.10:4417/sms`
**Status:** ✅ Running (port 4417)
---
## 📲 Setup Android SMS Forwarder
### Option 1: SMS Forwarder (Recommended)
1. **Install App**
- Play Store: "SMS Forwarder" by bogdanfinn or similar
- Or: https://play.google.com/store/apps/details?id=com.lomza.smsforward
2. **Configure Rule**
- Open app → Add new rule
- **Trigger:** Sender contains "Google" OR body contains "verification code"
- **Action:** HTTP POST
- **URL:** `http://57.131.33.10:4417/sms`
- **Method:** POST
- **Content-Type:** application/json
- **Body:**
```json
{
"from": "$SENDER$",
"body": "$BODY$"
}
```
3. **Test**
- Send test SMS to yourself with "123456" code
- Check server: `curl http://localhost:4417/sms/latest`
---
### Option 2: Tasker + AutoRemote (Advanced)
1. **Install**
- Tasker (paid app)
- AutoRemote plugin
2. **Create Task**
- Trigger: SMS received
- Filter: Sender contains "Google"
- Action: HTTP POST to `http://57.131.33.10:4417/sms`
- Body: `{"from":"%SMSRF","body":"%SMSRB"}`
---
### Option 3: IFTTT (Easiest but slower)
1. **Install IFTTT** app
2. **Create Applet**
- **IF:** SMS received from phone number
- **THEN:** Webhooks → Make a web request
- **URL:** `http://57.131.33.10:4417/sms`
- **Method:** POST
- **Content Type:** application/json
- **Body:**
```json
{
"from": "{{FromNumber}}",
"body": "{{Text}}"
}
```
**Note:** IFTTT peut avoir 5-10 sec de delay
---
## 🧪 Test Setup
### 1. Start SMS Receiver (already running)
```bash
cd /home/debian/videotomp3transcriptor
node src/sms_receiver.js &
```
### 2. Test avec curl (simule SMS)
```bash
curl -X POST http://localhost:4417/sms \
-H "Content-Type: application/json" \
-d '{"from":"Google","body":"Your verification code is 123456"}'
```
### 3. Vérifier réception
```bash
curl http://localhost:4417/sms/latest
# Should return: {"code":"123456", ...}
```
### 4. Test auto-login complet
```bash
cd /home/debian/videotomp3transcriptor
export DISPLAY=:99
python3 src/python/auto_login_full_auto.py
```
**Le script va :**
1. Ouvrir Google login
2. Enter email → phone
3. **ATTENDRE SMS** (tu recevras SMS sur ton tel)
4. SMS Forwarder → envoie au serveur
5. Script lit le code automatiquement
6. Login complet !
---
## 🔒 Sécurité
**⚠️ Important:** Le serveur SMS tourne sur port **4417** ouvert publiquement.
**Pour sécuriser** :
### Option A: Basic Auth (simple)
```javascript
// Add to sms_receiver.js
app.use((req, res, next) => {
const token = req.headers.authorization;
if (token !== 'Bearer SECRET_TOKEN_HERE') {
return res.status(401).json({error: 'Unauthorized'});
}
next();
});
```
Then in SMS Forwarder:
- **Headers:** `Authorization: Bearer SECRET_TOKEN_HERE`
### Option B: Firewall (secure port)
```bash
# Allow only your phone IP
sudo ufw allow from YOUR_PHONE_IP to any port 4417
```
### Option C: VPN/Tunnel (most secure)
Use Tailscale/WireGuard → SMS endpoint only accessible via VPN
---
## 📊 Monitoring
```bash
# Check server status
curl http://localhost:4417/health
# View latest SMS
curl http://localhost:4417/sms/latest
# Clear SMS history
curl -X DELETE http://localhost:4417/sms/clear
```
---
## 🚀 Next Steps After Setup
1. ✅ Configure SMS Forwarder on Android
2. ✅ Test with fake SMS (curl)
3. ✅ Run auto-login script
4. ✅ Test yt-dlp with extracted cookies + PO Token
5. ✅ Integrate into music service API
---
## 🆘 Troubleshooting
**SMS not received by server:**
- Check SMS Forwarder app is running
- Verify URL is correct (public IP, not localhost)
- Check phone has internet connection
- Test endpoint: `curl http://57.131.33.10:4417/health`
**Timeout waiting for SMS:**
- Default timeout: 120 seconds
- Increase in script if needed
- Check SMS Forwarder logs
**Wrong code extracted:**
- Server extracts first 6-digit number
- If multiple codes in message, may extract wrong one
- Check `/sms/latest` to see what was received
---
**Questions? Test it and report back!** 🚀