diff --git a/docs/accounts.md b/docs/accounts.md deleted file mode 100644 index fb5bc9d..0000000 --- a/docs/accounts.md +++ /dev/null @@ -1,159 +0,0 @@ -# πŸ‘€ Accounts & 2FA Setup - -**Add your Microsoft accounts with secure TOTP authentication** - ---- - -## πŸ“ Quick Start - -### Basic Setup (No 2FA) - -**Edit** `src/accounts.json`: -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "your_password" - } - ] -} -``` - -**That's it!** Run `npm start` to test. - ---- - -## πŸ” Add 2FA/TOTP (Recommended) - -### Why Use TOTP? -- βœ… **Automated login** β€” No manual code entry -- βœ… **More secure** β€” Better than SMS -- βœ… **Works 24/7** β€” Scheduler-friendly - -### How to Get Your TOTP Secret - -1. **Open Microsoft Account** β†’ Security β†’ Advanced security options -2. **Add authenticator app** β†’ Click "Set up" -3. **Choose "I want to use a different app"** -4. Microsoft shows a **QR code** + **secret key** -5. **Copy the secret key** (starts with letters/numbers) -6. **Add to** `accounts.json`: - -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "your_password", - "totp": "JBSWY3DPEHPK3PXP" - } - ] -} -``` - ---- - -## 🎯 Multiple Accounts - -```json -{ - "accounts": [ - { - "email": "account1@email.com", - "password": "password1", - "totp": "SECRET1" - }, - { - "email": "account2@email.com", - "password": "password2", - "totp": "SECRET2" - } - ] -} -``` - ---- - -## 🌐 Per-Account Proxy (Optional) - -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "password", - "totp": "", - "proxy": { - "proxyAxios": true, - "url": "proxy.example.com", - "port": 8080, - "username": "proxyuser", - "password": "proxypass" - } - } - ] -} -``` - -β†’ **[Full Proxy Guide](./proxy.md)** - ---- - -## πŸ”’ Environment Variables (Docker/CI) - -### Option 1: File Path -```bash -export ACCOUNTS_FILE=/path/to/accounts.json -``` - -### Option 2: Inline JSON -```bash -export ACCOUNTS_JSON='{"accounts":[{"email":"test@example.com","password":"pass"}]}' -``` - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **"accounts.json not found"** | Create file or set `ACCOUNTS_FILE` env var | -| **"2FA prompt not auto-filled"** | Check TOTP secret is valid Base32 | -| **"Invalid TOTP"** | Verify system time is correct | -| **"Account locked"** | Manually unlock in Microsoft Account | -| **"Login timeout"** | Check internet connection, try proxy | - -### 2FA Not Working? - -1. **Check secret format** β€” Should be Base32 (only letters/numbers, no spaces) -2. **Verify system time** β€” Must be accurate (NTP sync) -3. **Test manually** β€” Use authenticator app to verify code works -4. **Remove backup codes** β€” Some security settings block TOTP - ---- - -## πŸ”’ Security Tips - -- πŸ” **Use strong passwords** β€” Unique for each account -- πŸ”‘ **Enable TOTP** β€” More secure than SMS -- πŸ“ **Restrict file permissions** β€” `chmod 600 accounts.json` (Linux) -- πŸ”„ **Rotate passwords** β€” Change every 90 days -- 🚫 **Never commit** β€” Add `accounts.json` to `.gitignore` - ---- - -## πŸ“š Next Steps - -**TOTP setup?** -β†’ **[Security Guide](./security.md)** for best practices - -**Ready for automation?** -β†’ **[Scheduler Setup](./schedule.md)** - -**Need proxies?** -β†’ **[Proxy Guide](./proxy.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Getting Started](./getting-started.md)** diff --git a/docs/buy-mode.md b/docs/buy-mode.md deleted file mode 100644 index 8f29b3f..0000000 --- a/docs/buy-mode.md +++ /dev/null @@ -1,108 +0,0 @@ -# πŸ’³ Buy Mode - -**Manually redeem rewards while monitoring points** - ---- - -## πŸ’‘ What Is It? - -Launches browser and **passively monitors** your points balance while you manually shop/redeem. - -**Use case:** Safely redeem gift cards without automation interference. - ---- - -## ⚑ Quick Start - -```bash -npm start -- -buy your@email.com -``` - -**What happens:** -1. Opens 2 browser tabs: - - **Monitor tab** β€” Background point tracking (auto-refresh) - - **Your tab** β€” Use this for manual purchases -2. Monitors points every ~10 seconds -3. Alerts you when spending detected - ---- - -## 🎯 Example Usage - -### Redeem Gift Card - -```bash -npm start -- -buy myaccount@outlook.com -``` - -1. Script opens Microsoft Rewards in browser -2. Use the **user tab** to browse and redeem -3. **Monitor tab** tracks your balance in background -4. Get notification when points decrease - ---- - -## βš™οΈ Configuration - -**Set max session time:** - -**Edit** `src/config.jsonc`: -```jsonc -{ - "buyMode": { - "enabled": false, - "maxMinutes": 45 - } -} -``` - ---- - -## πŸ”” Notifications - -Buy mode sends alerts when: -- πŸ’³ **Points spent** β€” Shows amount and new balance -- πŸ“‰ **Balance changes** β€” Tracks cumulative spending - -**Example alert:** -``` -πŸ’³ Spend detected (Buy Mode) -Account: user@email.com -Spent: -500 points -Current: 12,500 points -Session spent: 1,200 points -``` - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **Monitor tab closes** | Script auto-reopens it | -| **No spending alerts** | Check webhook/NTFY config | -| **Session too short** | Increase `maxMinutes` in config | - ---- - -## ⚠️ Important Notes - -- βœ… **Browser visible** β€” Always runs in visible mode -- βœ… **No automation** β€” Script only monitors, never clicks -- βœ… **Safe** β€” Use your browsing tab normally -- βœ… **Notifications** β€” Uses existing webhook/NTFY settings - ---- - -## πŸ“š Next Steps - -**Setup notifications?** -β†’ **[Discord Webhooks](./conclusionwebhook.md)** -β†’ **[NTFY Push](./ntfy.md)** - -**Back to automation?** -β†’ **[Getting Started](./getting-started.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/conclusionwebhook.md b/docs/conclusionwebhook.md deleted file mode 100644 index 92f1339..0000000 --- a/docs/conclusionwebhook.md +++ /dev/null @@ -1,199 +0,0 @@ -# πŸ“Š Discord Webhooks - -**Get beautiful run summaries in Discord** - ---- - -## πŸ’‘ What Is It? - -Sends a **professional, rich embed** to your Discord server after each run with: -- πŸ“Š **Total accounts processed** with success/warning/banned breakdown -- πŸ’Ž **Points earned** β€” clear before/after comparison -- ⚑ **Performance metrics** β€” average points and execution time -- πŸ“ˆ **Per-account breakdown** β€” detailed stats for each account -- 🎨 **Beautiful formatting** β€” color-coded status, emojis, and clean layout -- ⏱️ **Timestamp** and version info in footer - ---- - -## ⚑ Quick Start - -### 1. Create Webhook in Discord - -1. **Open Discord** β†’ Right-click channel -2. **Edit Channel** β†’ **Integrations** tab -3. **Create Webhook** -4. **Copy webhook URL** - -### 2. Configure Script - -**Edit** `src/config.jsonc`: -```jsonc -{ - "notifications": { - "conclusionWebhook": { - "enabled": true, - "url": "https://discord.com/api/webhooks/123456789/abcdef-your-webhook-token", - // Optional: Customize webhook appearance - "username": "Microsoft Rewards", - "avatarUrl": "https://media.discordapp.net/attachments/1421163952972369931/1421929950377939125/Gc.png" - } - } -} -``` - -**That's it!** You'll get a summary after each run. - ---- - -## πŸ“‹ Example Summary - -The new webhook format provides a **clean, professional Discord embed** with: - -### Main Summary Card -``` -🎯 Microsoft Rewards β€” Daily Summary - -Status: βœ… Success -Version: v2.4.0 β€’ Run ID: abc123xyz -━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ - -πŸ“Š Global Statistics -πŸ’Ž Total Points Earned -15,230 β†’ 16,890 (+1,660) - -πŸ“Š Accounts Processed -βœ… Success: 3 | ⚠️ Errors: 0 | 🚫 Banned: 0 -Total: 3 accounts - -⚑ Performance -Average: 553pts/account in 8m 32s -Total Runtime: 25m 36s -``` - -### Per-Account Details -``` -οΏ½ Account Details - -βœ… user1@example.com -β”” Points: +720 (πŸ–₯️ 450 β€’ πŸ“± 270) -β”” Duration: 7m 23s - -βœ… user2@example.com -β”” Points: +940 (πŸ–₯️ 540 β€’ πŸ“± 400) -β”” Duration: 9m 41s - -βœ… user3@example.com -β”” Points: +0 (πŸ–₯️ 0 β€’ πŸ“± 0) -β”” Duration: 8m 32s -``` - -**Color coding:** -- 🟒 **Green** β€” All accounts successful -- 🟠 **Orange** β€” Some accounts with errors -- πŸ”΄ **Red** β€” Banned accounts detected - ---- - -## 🎯 Advanced: Separate Channels - -Use different webhooks for different notifications: - -```jsonc -{ - "notifications": { - "webhook": { - "enabled": true, - "url": "https://discord.com/api/webhooks/.../errors-channel", - "username": "Rewards Errors", - "avatarUrl": "https://example.com/error-icon.png" - }, - "conclusionWebhook": { - "enabled": true, - "url": "https://discord.com/api/webhooks/.../summary-channel", - "username": "Rewards Summary", - "avatarUrl": "https://example.com/success-icon.png" - } - } -} -``` - -- **`webhook`** β€” Real-time errors during execution -- **`conclusionWebhook`** β€” End-of-run summary - -### 🎨 Customize Webhook Appearance - -You can personalize how your webhook appears in Discord: - -- **`username`** β€” The display name shown in Discord (default: "Microsoft Rewards") -- **`avatarUrl`** β€” Direct URL to an image for the webhook's avatar - -**Example:** -```jsonc -"conclusionWebhook": { - "enabled": true, - "url": "YOUR_WEBHOOK_URL", - "username": "My Custom Bot Name", - "avatarUrl": "https://i.imgur.com/YourImage.png" -} -``` - -> **πŸ’‘ Tip:** If you set custom values for both `webhook` and `conclusionWebhook`, the conclusion webhook will use its own settings. Otherwise, it falls back to the main webhook settings. - ---- - -## 🎨 New Enhanced Format Features - -The **v2.4+** webhook format includes: - -### Visual Improvements -- ✨ **Clean, professional layout** with clear sections -- 🎨 **Color-coded status** (Green/Orange/Red based on results) -- πŸ“Š **Thumbnail image** for brand recognition -- ⏰ **Footer with timestamp** and version info -- πŸ”’ **Formatted numbers** with thousands separators - -### Better Organization -- **Main embed** β€” Global statistics and summary -- **Detail fields** β€” Per-account breakdown (auto-splits for many accounts) -- **Smart truncation** β€” Long emails and errors are shortened intelligently -- **Status icons** β€” βœ… Success, ⚠️ Warning, 🚫 Banned - -### More Information -- **Before/After points** β€” Clear progression tracking -- **Desktop vs Mobile** breakdown per account -- **Success rate** β€” Quick glance at account health -- **Performance metrics** β€” Average time and points per account - -### Smart Splitting -If you have many accounts (5+), the webhook automatically splits details into multiple fields to avoid hitting Discord's character limits. - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **No message received** | Check webhook URL is complete | -| **"Invalid webhook"** | Regenerate webhook in Discord | -| **Partial data** | Ensure script completed fully | - -### Test Webhook Manually - -```bash -curl -X POST -H "Content-Type: application/json" -d '{"content":"Test message"}' "YOUR_WEBHOOK_URL" -``` - ---- - -## πŸ“š Next Steps - -**Want mobile alerts?** -β†’ **[NTFY Push Notifications](./ntfy.md)** - -**Need detailed logs?** -β†’ **[Diagnostics Guide](./diagnostics.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/config.md b/docs/config.md deleted file mode 100644 index 4664b28..0000000 --- a/docs/config.md +++ /dev/null @@ -1,605 +0,0 @@ -# βš™οΈ Configuration Guide# βš™οΈ Configuration Guide - - - -**Customize script behavior in `src/config.jsonc`**This page documents every field in the configuration file. The default ships as `src/config.jsonc` so you get inline `//` guidance without editor warnings, and the loader still accepts traditional `config.json` files if you prefer plain JSON. - - - ----Looking for ready-to-use presets? Check `docs/config-presets/` for curated examples such as `balanced.jsonc` (full automation with humanization) and `minimal.jsonc` (lean runs with quick scheduling). - - - -## ⚑ Quick Start (Essentials)> NOTE: Previous versions had `logging.live` (live streaming webhook); it was removed and replaced by a simple `logging.redactEmails` flag. - - - -### Minimal Working Config--- - -## Top-Level Fields - -```jsonc - -{### baseURL - - "humanization": {Internal Microsoft Rewards base. Leave it unless you know what you are doing. - - "enabled": true // Natural behavior (recommended) - - },### sessionPath - - "workers": {Directory where session data (cookies / fingerprints / job-state) is stored. - - "doDailySet": true, - - "doDesktopSearch": true,--- - - "doMobileSearch": true## browser - - }| Key | Type | Default | Description | - -}|-----|------|---------|-------------| - -```| headless | boolean | false | Run browser UI-less. Set to `false` to keep the browser visible (default). | - -| globalTimeout | string/number | "30s" | Max time for common Playwright operations. Accepts ms number or time string (e.g. `"45s"`, `"2min"`). | - -**That's all you need!** Everything else has good defaults. - ---- - ----## execution - -| Key | Type | Default | Description | - -## 🎯 Popular Configurations|-----|------|---------|-------------| - -| parallel | boolean | false | Run desktop + mobile simultaneously (higher resource usage). | - -### 1. Daily Automation| runOnZeroPoints | boolean | false | Skip full run early if there are zero points available (saves time). | - -| clusters | number | 1 | Number of process clusters (multi-process concurrency). | - -```jsonc| passesPerRun | number | 1 | Advanced: extra full passes per started run. | - -{ - - "humanization": { "enabled": true },--- - - "schedule": {## buyMode - - "enabled": true,Manual redeem / purchase assistance. - - "time": "09:00",| Key | Type | Default | Description | - - "timeZone": "America/New_York"|-----|------|---------|-------------| - - }| enabled (CLI `-buy`) | boolean | false | Enable buy mode (usually via CLI argument). | - -}| maxMinutes | number | 45 | Max session length for buy mode. | - -``` - ---- - -β†’ **[Full Scheduler Guide](./schedule.md)**## fingerprinting.saveFingerprint - -Persist browser fingerprints per device type for consistency. - ----| Key | Type | Default | Description | - -|-----|------|---------|-------------| - -### 2. With Notifications| mobile | boolean | false | Save/reuse a consistent mobile fingerprint. | - -| desktop | boolean | false | Save/reuse a consistent desktop fingerprint. | - -```jsonc - -{--- - - "humanization": { "enabled": true },## search - - "conclusionWebhook": {| Key | Type | Default | Description | - - "enabled": true,|-----|------|---------|-------------| - - "url": "https://discord.com/api/webhooks/YOUR_WEBHOOK"| useLocalQueries | boolean | false | Use locale-specific query sources instead of global ones. | - - } - -}### search.settings - -```| Key | Type | Default | Description | - -|-----|------|---------|-------------| - -β†’ **[Discord Setup](./conclusionwebhook.md)** | **[NTFY Setup](./ntfy.md)**| useGeoLocaleQueries | boolean | false | Blend geo / locale into chosen queries. | - -| scrollRandomResults | boolean | true | Random scroll during search pages to look natural. | - ----| clickRandomResults | boolean | true | Occasionally click safe results. | - -| retryMobileSearchAmount | number | 2 | Retries if mobile searches didn’t yield points. | - -### 3. Background Mode (Headless)| delay.min / delay.max | string/number | 3–5min | Delay between searches (ms or time string). | - - - -```jsonc--- - -{## humanization - - "browser": {Human‑like behavior simulation. - - "headless": true| Key | Type | Default | Description | - - },|-----|------|---------|-------------| - - "humanization": { "enabled": true }| enabled | boolean | true | Global on/off. | - -}| stopOnBan | boolean | true | Stop processing further accounts if a ban is detected. | - -```| immediateBanAlert | boolean | true | Fire notification immediately upon ban detection. | - -| actionDelay.min/max | number/string | 150–450ms | Random micro-delay per action. | - -**Note:** Set `headless: false` to see the browser during development.| gestureMoveProb | number | 0.4 | Probability of a small mouse move gesture. | - -| gestureScrollProb | number | 0.2 | Probability of a small scroll gesture. | - ----| allowedWindows | string[] | [] | Local time windows (e.g. `["08:30-11:00","19:00-22:00"]`). Outside windows, run waits. | - - - -### 4. Skip When No Points--- - -## vacation - -```jsoncRandom contiguous block of days off per month. - -{| Key | Type | Default | Description | - - "execution": {|-----|------|---------|-------------| - - "runOnZeroPoints": false| enabled | boolean | false | Activate monthly break behavior. | - - }| minDays | number | 3 | Minimum skipped days per month. | - -}| maxDays | number | 5 | Maximum skipped days per month. | - -``` - ---- - -Saves time by skipping accounts with 0 available points.## retryPolicy - -Generic transient retry/backoff. - ----| Key | Type | Default | Description | - -|-----|------|---------|-------------| - -### 5. Multiple Accounts Faster| maxAttempts | number | 3 | Max tries for retryable blocks. | - -| baseDelay | number | 1000 | Initial delay in ms. | - -```jsonc| maxDelay | number/string | 30s | Max backoff delay. | - -{| multiplier | number | 2 | Exponential backoff multiplier. | - - "execution": {| jitter | number | 0.2 | Randomization factor (0..1). | - - "parallel": false, // Desktop + mobile simultaneously - - "clusters": 1 // Process multiple accounts in parallel--- - - }## workers - -}Enable/disable scripted task categories. - -```| Key | Default | Description | - -|-----|---------|-------------| - -⚠️ **Higher detection risk** with parallel execution.| doDailySet | true | Daily set activities. | - -| doMorePromotions | true | Promotional tasks. | - ----| doPunchCards | true | Punch card flows. | - -| doDesktopSearch | true | Desktop searches. | - -## πŸ›‘οΈ Anti-Ban Settings| doMobileSearch | true | Mobile searches. | - -| doDailyCheckIn | true | Daily check-in. | - -### Humanization (Recommended)| doReadToEarn | true | Reading tasks. | - -| bundleDailySetWithSearch | false | Immediately start desktop search bundle after daily set. | - -```jsonc - -{--- - - "humanization": {## proxy - - "enabled": true,| Key | Default | Description | - - "actionDelay": { "min": 150, "max": 450 },|-----|---------|-------------| - - "gestureMoveProb": 0.4,| proxyGoogleTrends | true | Route Google Trends fetch through proxy if set. | - - "gestureScrollProb": 0.2,| proxyBingTerms | true | Route Bing query source fetch through proxy if set. | - - "randomOffDaysPerWeek": 1 - - }--- - -}## notifications - -```Manages notification channels (Discord webhooks, NTFY, etc.). - - - -β†’ **[Full Humanization Guide](./humanization.md)**### notifications.webhook - -Primary webhook (can be used for summary or generic messages). - ----| Key | Default | Description | - -|-----|---------|-------------| - -### Vacation Mode| enabled | false | Allow sending webhook-based notifications and live log streaming. | - -| url | "" | Webhook endpoint. | - -```jsonc - -{### notifications.conclusionWebhook - - "vacation": {Rich end-of-run summary (if enabled separately). - - "enabled": true,| Key | Default | Description | - - "minDays": 3,|-----|---------|-------------| - - "maxDays": 5| enabled | false | Enable run summary posting. | - - }| url | "" | Webhook endpoint. | - -} - -```### notifications.ntfy - -Lightweight push notifications. - -Skips 3-5 random consecutive days per month.| Key | Default | Description | - -|-----|---------|-------------| - ----| enabled | false | Enable NTFY push. | - -| url | "" | Base NTFY server URL (e.g. https://ntfy.sh). | - -## πŸ”§ Advanced Options| topic | rewards | Topic/channel name. | - -| authToken | "" | Bearer token if your server requires auth. | - -
- -Click to expand all options--- - -## logging - -### Browser| Key | Type | Description | - -|-----|------|-------------| - -```jsonc| excludeFunc | string[] | Log buckets suppressed in console + any webhook usage. | - -{| webhookExcludeFunc | string[] | Buckets suppressed specifically for webhook output. | - - "browser": {| redactEmails | boolean | If true, email addresses are partially masked in logs. | - - "headless": false,| liveWebhookUrl | string | Optional override URL for live log streaming (falls back to `notifications.webhook.url`). | - - "globalTimeout": "30s" - - }_Removed fields_: `live.enabled`, `live.url`, `live.redactEmails` β€” replaced by `redactEmails` only. - -} - -```--- - -## diagnostics - -### Workers (Tasks)Capture evidence when something fails. - -| Key | Default | Description | - -```jsonc|-----|---------|-------------| - -{| enabled | true | Master switch for diagnostics. | - - "workers": {| saveScreenshot | true | Save screenshot on failure. | - - "doDailySet": true,| saveHtml | true | Save HTML snapshot on failure. | - - "doMorePromotions": true,| maxPerRun | 2 | Cap artifacts per run per failure type. | - - "doPunchCards": true,| retentionDays | 7 | Old run artifacts pruned after this many days. | - - "doDesktopSearch": true, - - "doMobileSearch": true,--- - - "doDailyCheckIn": true,## jobState - - "doReadToEarn": trueCheckpoint system to avoid duplicate work. - - }| Key | Default | Description | - -}|-----|---------|-------------| - -```| enabled | true | Enable job state tracking. | - -| dir | "" | Custom directory (default: `/job-state`). | - -### Search Behavior - ---- - -```jsonc## schedule - -{Built-in scheduler (avoids external cron inside container or host). - - "search": {| Key | Default | Description | - - "useLocalQueries": false,|-----|---------|-------------| - - "settings": {| enabled | false | Enable scheduling loop. | - - "useGeoLocaleQueries": false,| useAmPm | false | If true, parse `time12`; else use `time24`. | - - "scrollRandomResults": true,| time12 | 9:00 AM | 12‑hour format time (only if useAmPm=true). | - - "clickRandomResults": true| time24 | 09:00 | 24‑hour format time (only if useAmPm=false). | - - }| timeZone | America/New_York | IANA zone string (e.g. Europe/Paris). | - - }| runImmediatelyOnStart | false | Run one pass instantly in addition to daily schedule. | - -} - -```_Legacy_: If both `time12` and `time24` are empty, a legacy `time` (HH:mm) may still be read. - - - -### Diagnostics--- - -## update - -```jsoncAuto-update behavior after a run. - -{| Key | Default | Description | - - "diagnostics": {|-----|---------|-------------| - - "enabled": true,| git | true | Pull latest git changes after run. | - - "saveScreenshot": true,| docker | false | Recreate container (if running in Docker orchestration). | - - "saveHtml": true,| scriptPath | setup/update/update.mjs | Custom script executed for update flow. | - - "maxPerRun": 2, - - "retentionDays": 7--- - - }## Security / Best Practices - -}- Keep `redactEmails` true if you share logs publicly. - -```- Use a private NTFY instance or secure Discord webhooks (do not leak URLs). - -- Avoid setting `headless` false on untrusted remote servers. - -### Job State - ---- - -```jsonc## Minimal Example - -{```jsonc - - "jobState": {{ - - "enabled": true, "browser": { "headless": true }, - - "dir": "" // Empty = use default location "execution": { "parallel": false }, - - } "workers": { "doDailySet": true, "doDesktopSearch": true, "doMobileSearch": true }, - -} "logging": { "redactEmails": true } - -```} - -``` - -### Auto-Update - -## Common Tweaks - -```jsonc| Goal | Change | - -{|------|--------| - - "update": {| Faster dev feedback | Set `browser.headless` to false and shorten search delays. | - - "git": true,| Reduce detection risk | Keep humanization enabled, add vacation window. | - - "docker": false,| Silent mode | Add more buckets to `excludeFunc`. | - - "scriptPath": "setup/update/update.mjs"| Skip mobile searches | Set `workers.doMobileSearch=false`. | - - }| Use daily schedule | Set `schedule.enabled=true` and adjust `time24` + `timeZone`. | - -} - -```--- - -## NEW INTELLIGENT FEATURES - -
- -### riskManagement - ----Dynamic risk assessment and ban prediction. - - - -## πŸŽ›οΈ Intelligent Features (v2.2+)| Key | Type | Default | Description | - -|-----|------|---------|-------------| - -### Risk Management| enabled | boolean | true | Enable risk-aware throttling. | - -| autoAdjustDelays | boolean | true | Automatically increase delays when captchas/errors are detected. | - -```jsonc| stopOnCritical | boolean | false | Stop execution if risk score exceeds threshold. | - -{| banPrediction | boolean | true | Enable ML-style pattern analysis to predict ban risk. | - - "riskManagement": {| riskThreshold | number | 75 | Risk score (0-100) above which bot pauses or alerts. | - - "enabled": true, - - "autoAdjustDelays": true,**How it works:** Monitors captchas, errors, timeouts, and account patterns. Dynamically adjusts delays (e.g., 1x β†’ 2.5x) and warns you before bans happen. - - "banPrediction": true, - - "riskThreshold": 75--- - - }### analytics - -}Performance dashboard and metrics tracking. - -``` - -| Key | Type | Default | Description | - -Dynamically adjusts delays when detecting captchas/errors.|-----|------|---------|-------------| - -| enabled | boolean | true | Track points earned, success rates, execution times. | - ----| retentionDays | number | 30 | How long to keep analytics data. | - -| exportMarkdown | boolean | true | Generate human-readable markdown reports. | - -### Query Diversity| webhookSummary | boolean | false | Send analytics summary via webhook. | - - - -```jsonc**Output location:** `analytics/` folder (JSON files per account per day). - -{ - - "queryDiversity": {--- - - "enabled": true,### queryDiversity - - "sources": ["google-trends", "reddit", "local-fallback"],Multi-source search query generation. - - "maxQueriesPerSource": 10 - - }| Key | Type | Default | Description | - -}|-----|------|---------|-------------| - -```| enabled | boolean | true | Use diverse sources instead of just Google Trends. | - -| sources | array | `["google-trends", "reddit", "local-fallback"]` | Which sources to query (google-trends, reddit, news, wikipedia, local-fallback). | - -Uses multiple search sources to avoid patterns.| maxQueriesPerSource | number | 10 | Max queries to fetch per source. | - -| cacheMinutes | number | 30 | Cache duration to avoid hammering APIs. | - ---- - -**Why?** Reduces patterns by mixing Reddit posts, news headlines, Wikipedia topics instead of predictable Google Trends. - -### Analytics - ---- - -```jsonc### dryRun - -{Test mode: simulate execution without actually running tasks. - - "analytics": { - - "enabled": true,| Key | Type | Default | Description | - - "retentionDays": 30,|-----|------|---------|-------------| - - "exportMarkdown": true| dryRun | boolean | false | When true, logs actions but doesn't execute (useful for testing config). | - - } - -}**Use case:** Validate new config changes, estimate execution time, debug issues without touching accounts. - -``` - ---- - -Tracks points earned, success rates, execution times.## Changelog Notes - -- **v2.2.0**: Added risk-aware throttling, analytics dashboard, query diversity, ban prediction, dry-run mode. - ----- Removed live webhook streaming complexity; now simpler logging. - -- Centralized redaction logic under `logging.redactEmails`. - -### Dry Run (Test Mode) - -If something feels undocumented or unclear, open a documentation issue or extend this page. - -```jsonc -{ - "dryRun": true -} -``` - -**Or via CLI:** -```bash -npm start -- --dry-run -``` - -Simulates execution without actually running tasks. - ---- - -## πŸ› οΈ Troubleshooting - -| Issue | Solution | -|-------|----------| -| **Config not loading** | Check JSON syntax (trailing commas OK in `.jsonc`) | -| **Script ignoring config** | Verify file is `src/config.jsonc` | -| **Errors after update** | Compare with example config | - ---- - -## πŸ“š Next Steps - -**Setup scheduler?** -β†’ **[Scheduler Guide](./schedule.md)** - -**Want notifications?** -β†’ **[Discord Webhooks](./conclusionwebhook.md)** - -**Need proxies?** -β†’ **[Proxy Guide](./proxy.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Getting Started](./getting-started.md)** diff --git a/docs/diagnostics.md b/docs/diagnostics.md deleted file mode 100644 index fafd182..0000000 --- a/docs/diagnostics.md +++ /dev/null @@ -1,103 +0,0 @@ -# πŸ” Diagnostics - -**Auto-capture errors with screenshots and HTML** - ---- - -## πŸ’‘ What Is It? - -When errors occur, the script automatically saves: -- πŸ“Έ **Screenshots** β€” Visual error capture -- πŸ“„ **HTML snapshots** β€” Page source - -Helps you debug issues without re-running the script. - ---- - -## ⚑ Quick Start - -**Already enabled by default!** - -```jsonc -{ - "diagnostics": { - "enabled": true, - "saveScreenshot": true, - "saveHtml": true, - "maxPerRun": 2, - "retentionDays": 7 - } -} -``` - ---- - -## πŸ“ Where Are Files Saved? - -``` -reports/ -β”œβ”€β”€ 2025-10-16/ -β”‚ β”œβ”€β”€ error_abc123_001.png -β”‚ β”œβ”€β”€ error_abc123_001.html -β”‚ └── error_def456_002.png -└── 2025-10-17/ - └── ... -``` - -**Auto-cleanup:** Files older than 7 days are deleted automatically. - ---- - -## 🎯 When It Captures - -- ⏱️ **Timeouts** β€” Page navigation failures -- 🎯 **Element not found** β€” Selector errors -- πŸ” **Login failures** β€” Authentication issues -- 🌐 **Network errors** β€” Request failures - ---- - -## πŸ”§ Configuration Options - -| Setting | Default | Description | -|---------|---------|-------------| -| `enabled` | `true` | Enable diagnostics | -| `saveScreenshot` | `true` | Capture PNG screenshots | -| `saveHtml` | `true` | Save page HTML | -| `maxPerRun` | `2` | Max captures per run | -| `retentionDays` | `7` | Auto-delete after N days | - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **No captures despite errors** | Check `enabled: true` | -| **Too many files** | Reduce `retentionDays` | -| **Permission denied** | Check `reports/` write access | - -### Manual Cleanup - -```powershell -# Delete all diagnostic reports -Remove-Item -Recurse -Force reports/ - -# Keep last 3 days only -Get-ChildItem reports/ | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-3)} | Remove-Item -Recurse -``` - ---- - -## πŸ“š Next Steps - -**Need live notifications?** -β†’ **[Discord Webhooks](./conclusionwebhook.md)** -β†’ **[NTFY Push](./ntfy.md)** - -**Security issues?** -β†’ **[Security Guide](./security.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/docker.md b/docs/docker.md deleted file mode 100644 index 073bb46..0000000 --- a/docs/docker.md +++ /dev/null @@ -1,167 +0,0 @@ -# 🐳 Docker Guide - -**Run the script in a container** - ---- - -## ⚑ Quick Start - -### 1. Create Required Files - -Ensure you have: -- `src/accounts.json` with your credentials -- `src/config.jsonc` (uses defaults if missing) - -### 2. Start Container - -```bash -docker compose up -d -``` - -### 3. View Logs - -```bash -docker logs -f microsoft-rewards-script -``` - -**That's it!** Script runs automatically. - ---- - -## 🎯 What's Included - -The Docker setup: -- βœ… **Chromium Headless Shell** β€” Lightweight browser -- βœ… **Scheduler enabled** β€” Daily automation -- βœ… **Volume mounts** β€” Persistent sessions -- βœ… **Force headless** β€” Required for containers - ---- - -## πŸ“ Mounted Volumes - -| Host Path | Container Path | Purpose | -|-----------|----------------|---------| -| `./src/accounts.json` | `/usr/src/.../accounts.json` | Account credentials (read-only) | -| `./src/config.jsonc` | `/usr/src/.../config.json` | Configuration (read-only) | -| `./sessions` | `/usr/src/.../sessions` | Cookies & fingerprints | - ---- - -## 🌍 Environment Variables - -### Set Timezone - -```yaml -services: - rewards: - environment: - TZ: Europe/Paris -``` - -### Use Inline JSON - -```bash -docker run -e ACCOUNTS_JSON='{"accounts":[...]}' ... -``` - -### Custom Config Path - -```bash -docker run -e ACCOUNTS_FILE=/custom/path/accounts.json ... -``` - ---- - -## πŸ”§ Common Commands - -```bash -# Start container -docker compose up -d - -# View logs -docker logs -f microsoft-rewards-script - -# Stop container -docker compose down - -# Rebuild image -docker compose build --no-cache - -# Restart container -docker compose restart -``` - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **"accounts.json not found"** | Mount file in `docker-compose.yml` | -| **"Browser launch failed"** | Ensure `FORCE_HEADLESS=1` is set | -| **"Permission denied"** | Check file permissions (`chmod 644`) | -| **Scheduler not running** | Verify `schedule.enabled: true` in config | - -### Debug Container - -```bash -# Enter container shell -docker exec -it microsoft-rewards-script /bin/bash - -# Check Node.js version -docker exec -it microsoft-rewards-script node --version - -# View config -docker exec -it microsoft-rewards-script cat config.json -``` - ---- - -## πŸŽ›οΈ Custom Configuration - -### Use Built-in Scheduler - -**Default** `docker-compose.yml`: -```yaml -services: - rewards: - build: . - command: ["npm", "run", "start:schedule"] -``` - -### Single Run (Manual) - -```yaml -services: - rewards: - build: . - command: ["node", "./dist/index.js"] -``` - -### External Cron (Alternative) - -```yaml -services: - rewards: - environment: - CRON_SCHEDULE: "0 7,16,20 * * *" - RUN_ON_START: "true" -``` - ---- - -## πŸ“š Next Steps - -**Need 2FA?** -β†’ **[Accounts & TOTP Setup](./accounts.md)** - -**Want notifications?** -β†’ **[Discord Webhooks](./conclusionwebhook.md)** - -**Scheduler config?** -β†’ **[Scheduler Guide](./schedule.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Getting Started](./getting-started.md)** diff --git a/docs/humanization.md b/docs/humanization.md deleted file mode 100644 index c77e3ea..0000000 --- a/docs/humanization.md +++ /dev/null @@ -1,160 +0,0 @@ -# πŸ€– Humanization - -**Make automation look natural to avoid detection** - ---- - -## πŸ’‘ What Is It? - -Humanization adds **random delays** and **subtle gestures** to mimic real human behavior. - -### Why Use It? -- βœ… **Lower detection risk** β€” Looks less like a bot -- βœ… **Natural patterns** β€” Random timing, mouse moves -- βœ… **Built-in** β€” No configuration needed - ---- - -## ⚑ Quick Start - -**Edit** `src/config.jsonc`: -```jsonc -{ - "humanization": { - "enabled": true - } -} -``` - -**That's it!** Default settings work for most users. - ---- - -## 🎯 What It Does - -### Random Delays -- **150-450ms pauses** between actions -- Mimics human decision-making time -- Prevents robotic patterns - -### Subtle Gestures -- **Mouse movements** β€” Small cursor adjustments (40% chance) -- **Scrolling** β€” Minor page movements (20% chance) -- **Never clicks** random elements (safe by design) - -### Temporal Patterns -- **Random off days** β€” Skip 1 day per week by default -- **Time windows** β€” Run only during certain hours (optional) - ---- - -## πŸŽ›οΈ Presets - -### Default (Recommended) -```jsonc -{ - "humanization": { - "enabled": true - } -} -``` - -Balanced safety and speed. - ---- - -### Conservative (More Natural) -```jsonc -{ - "humanization": { - "enabled": true, - "actionDelay": { "min": 300, "max": 800 }, - "gestureMoveProb": 0.6, - "gestureScrollProb": 0.4, - "randomOffDaysPerWeek": 2 - } -} -``` - -Slower but safer. - ---- - -### Fast (Less Natural) -```jsonc -{ - "humanization": { - "enabled": true, - "actionDelay": { "min": 100, "max": 250 }, - "gestureMoveProb": 0.2, - "gestureScrollProb": 0.1, - "randomOffDaysPerWeek": 0 - } -} -``` - -Faster execution, higher risk. - ---- - -## ⏰ Time Windows (Optional) - -Run only during specific hours: - -```jsonc -{ - "humanization": { - "enabled": true, - "allowedWindows": ["08:00-10:30", "20:00-22:30"] - } -} -``` - -Script **waits** until next allowed window if started outside. - ---- - -## πŸ“… Random Off Days - -Skip random days per week: - -```jsonc -{ - "humanization": { - "enabled": true, - "randomOffDaysPerWeek": 1 // Skip 1 random day/week - } -} -``` - -**Options:** -- `0` β€” Never skip days -- `1` β€” Skip 1 day/week (default) -- `2` β€” Skip 2 days/week - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **Too slow** | Lower `actionDelay`, reduce probabilities | -| **Too fast/robotic** | Increase delays, higher probabilities | -| **Not running at all** | Check `allowedWindows` time format | - ---- - -## πŸ“š Next Steps - -**Need vacation mode?** -β†’ See [Scheduler Vacation](./schedule.md#vacation-mode) - -**Want scheduling?** -β†’ **[Scheduler Guide](./schedule.md)** - -**More security?** -β†’ **[Security Guide](./security.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/index.md b/docs/index.md deleted file mode 100644 index 7224f39..0000000 --- a/docs/index.md +++ /dev/null @@ -1,79 +0,0 @@ -# πŸ“š Documentation Hub - -**Complete guide to automate Microsoft Rewards** - ---- - -## πŸš€ Start Here (In Order) - -### For Complete Beginners - -1. **[Getting Started](./getting-started.md)** β€” Install and run in 10 minutes -2. **[Accounts & 2FA](./accounts.md)** β€” Add your Microsoft accounts -3. **[Basic Config](./config.md#quick-start)** β€” 5 essential options -4. **[Scheduler](./schedule.md#quick-start)** β€” Automate daily runs - -**You're all set! πŸŽ‰** - ---- - -## πŸ”₯ Popular Features - -### Notifications & Monitoring -- **[Discord Webhooks](./conclusionwebhook.md)** β€” Get run summaries -- **[NTFY Push](./ntfy.md)** β€” Mobile alerts - -### Anti-Ban & Privacy -- **[Humanization](./humanization.md)** β€” Natural behavior simulation -- **[Proxy Setup](./proxy.md)** β€” Change your IP (optional) - -### Deployment -- **[Docker](./docker.md)** β€” Container deployment -- **[Diagnostics](./diagnostics.md)** β€” Troubleshooting - ---- - -## πŸ“– All Documentation - -### Configuration & Setup -- [Complete Configuration Reference](./config.md) β€” All options explained -- [Scheduler Setup](./schedule.md) β€” Automated timing -- [Job State](./jobstate.md) β€” Progress tracking -- [Auto-Update](./update.md) β€” Keep script current - -### Advanced Features -- [Buy Mode](./buy-mode.md) β€” Manual purchase monitoring -- [Security Guide](./security.md) β€” Privacy & incident response - ---- - -## πŸ†˜ Need Help? - -**Technical issue?** β†’ [Diagnostics Guide](./diagnostics.md) -**Login problem?** β†’ [Accounts & 2FA](./accounts.md#troubleshooting) -**Banned?** β†’ [Security Guide](./security.md) - -**Join Discord** β†’ [Support Server](https://discord.gg/KRBFxxsU) - ---- - -## 🎯 Quick Links by Use Case - -### "I just installed the script" -β†’ [Getting Started](./getting-started.md) β†’ [Accounts](./accounts.md) β†’ [Scheduler](./schedule.md) - -### "I want daily automation" -β†’ [Scheduler Guide](./schedule.md) β†’ [Humanization](./humanization.md) - -### "I need notifications" -β†’ [Discord Webhooks](./conclusionwebhook.md) or [NTFY](./ntfy.md) - -### "I want to use Docker" -β†’ [Docker Guide](./docker.md) - -### "Something's broken" -β†’ [Diagnostics](./diagnostics.md) β†’ [Security](./security.md) - ---- - -**[← Back to README](../README.md)** diff --git a/docs/jobstate.md b/docs/jobstate.md deleted file mode 100644 index f92e052..0000000 --- a/docs/jobstate.md +++ /dev/null @@ -1,112 +0,0 @@ -# πŸ’Ύ Job State - -**Resume interrupted tasks automatically** - ---- - -## πŸ’‘ What Is It? - -Saves progress after each completed task. If script crashes or stops, it resumes exactly where it left off. - -**Already enabled by default!** - ---- - -## ⚑ How It Works - -### Progress Tracking - -``` -sessions/job-state/ -β”œβ”€β”€ account1@email.com/ -β”‚ β”œβ”€β”€ daily-set-2025-10-16.json -β”‚ β”œβ”€β”€ desktop-search-2025-10-16.json -β”‚ └── mobile-search-2025-10-16.json -└── account2@email.com/ - └── ... -``` - -- βœ… **Per-account** β€” Independent progress -- βœ… **Date-specific** β€” Fresh start each day -- βœ… **Auto-cleanup** β€” Old files remain for history - ---- - -## 🎯 Benefits - -### Interrupted Runs - -| Scenario | Without Job State | With Job State | -|----------|-------------------|----------------| -| **Power outage** | Start from beginning | Resume from last task | -| **Manual stop** | Lose all progress | Pick up where left off | -| **Network failure** | Redo everything | Continue remaining tasks | - ---- - -## βš™οΈ Configuration - -**Already enabled:** -```jsonc -{ - "jobState": { - "enabled": true, - "dir": "" // Empty = use default location - } -} -``` - -**Custom location:** -```jsonc -{ - "jobState": { - "enabled": true, - "dir": "/custom/path/job-state" - } -} -``` - ---- - -## 🧹 Maintenance - -### Reset Progress (Fresh Start) - -```powershell -# Reset all accounts -Remove-Item -Recurse -Force sessions/job-state/ - -# Reset one account -Remove-Item -Recurse -Force sessions/job-state/user@email.com/ -``` - -### Cleanup Old Files - -```powershell -# Keep last 7 days only -Get-ChildItem sessions/job-state -Recurse -Filter "*.json" | Where-Object {$_.LastWriteTime -lt (Get-Date).AddDays(-7)} | Remove-Item -``` - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **Tasks not resuming** | Check file permissions | -| **Duplicate execution** | Ensure system time is accurate | -| **Excessive files** | Implement cleanup schedule | - ---- - -## πŸ“š Next Steps - -**Need scheduler?** -β†’ **[Scheduler Guide](./schedule.md)** - -**Want diagnostics?** -β†’ **[Diagnostics Guide](./diagnostics.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/ntfy.md b/docs/ntfy.md deleted file mode 100644 index d6cdc59..0000000 --- a/docs/ntfy.md +++ /dev/null @@ -1,118 +0,0 @@ -# πŸ“± NTFY Push Notifications - -**Get alerts on your phone instantly** - ---- - -## πŸ’‘ What Is NTFY? - -Simple push notification service that sends alerts to your phone/desktop. - -**Free to use:** No account required for basic features. - ---- - -## ⚑ Quick Start - -### 1. Install NTFY App - -- **Android:** [Google Play](https://play.google.com/store/apps/details?id=io.heckel.ntfy) -- **iOS:** [App Store](https://apps.apple.com/app/ntfy/id1625396347) - -### 2. Choose a Topic Name - -Pick any unique name (e.g., `rewards-myname-2025`) - -### 3. Subscribe in App - -Open NTFY app β†’ Add subscription β†’ Enter your topic name - -### 4. Configure Script - -**Edit** `src/config.jsonc`: -```jsonc -{ - "notifications": { - "ntfy": { - "enabled": true, - "url": "https://ntfy.sh", - "topic": "rewards-myname-2025" - } - } -} -``` - -**That's it!** You'll get push notifications on your phone. - ---- - -## πŸ”” What Notifications You Get - -- 🚨 **Errors** β€” Script crashes, login failures -- ⚠️ **Warnings** β€” Missing points, suspicious activity -- πŸ† **Milestones** β€” Account completed successfully -- πŸ’³ **Buy mode** β€” Point spending detected -- πŸ“Š **Summary** β€” End-of-run report - ---- - -## πŸ”’ Use Private Server (Optional) - -### Self-Host NTFY - -**Docker:** -```yaml -services: - ntfy: - image: binwiederhier/ntfy - ports: - - "80:80" - volumes: - - ./ntfy-data:/var/lib/ntfy - command: serve -``` - -**Then configure:** -```jsonc -{ - "notifications": { - "ntfy": { - "enabled": true, - "url": "https://ntfy.yourdomain.com", - "topic": "rewards", - "authToken": "tk_your_token_here" - } - } -} -``` - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **No notifications** | Check topic name matches exactly | -| **Wrong server** | Verify URL includes `https://` | -| **Auth failures** | Token must start with `tk_` | - -### Test Manually - -```bash -# Send test message -curl -d "Test from rewards script" https://ntfy.sh/your-topic -``` - ---- - -## πŸ“š Next Steps - -**Want Discord too?** -β†’ **[Discord Webhooks](./conclusionwebhook.md)** - -**Need detailed logs?** -β†’ **[Diagnostics Guide](./diagnostics.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/proxy.md b/docs/proxy.md deleted file mode 100644 index 94c15fe..0000000 --- a/docs/proxy.md +++ /dev/null @@ -1,126 +0,0 @@ -# 🌐 Proxy Setup - -**Route traffic through proxy servers** - ---- - -## πŸ’‘ Do You Need a Proxy? - -**Most users DON'T need proxies.** Only use if: -- βœ… You run many accounts from same IP -- βœ… You want geographic flexibility -- βœ… Your IP is already flagged - -**Otherwise, skip this guide.** - ---- - -## ⚑ Quick Start - -### Per-Account Proxy - -**Edit** `src/accounts.json`: -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "password", - "proxy": { - "proxyAxios": true, - "url": "proxy.example.com", - "port": 8080, - "username": "proxyuser", - "password": "proxypass" - } - } - ] -} -``` - -**That's it!** Script uses proxy for this account only. - ---- - -## 🎯 Proxy Types - -### HTTP Proxy (Most Common) - -```json -{ - "proxy": { - "proxyAxios": true, - "url": "http://proxy.example.com", - "port": 8080, - "username": "user", - "password": "pass" - } -} -``` - -### SOCKS5 Proxy - -```json -{ - "proxy": { - "proxyAxios": true, - "url": "socks5://proxy.example.com", - "port": 1080, - "username": "user", - "password": "pass" - } -} -``` - ---- - -## 🏒 Recommended Providers - -### Residential Proxies (Best) -- **Bright Data** β€” Premium quality, expensive -- **Smartproxy** β€” User-friendly -- **Oxylabs** β€” Enterprise-grade - -### Datacenter Proxies (Cheaper) -- **SquidProxies** β€” Reliable -- **MyPrivateProxy** β€” Dedicated IPs - -⚠️ **Avoid free proxies** β€” Unreliable and often blocked. - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **"Connection refused"** | Check proxy URL and port | -| **"407 Auth required"** | Verify username/password | -| **"Timeout"** | Try different proxy server | -| **"SSL error"** | Use HTTP instead of HTTPS | - -### Test Proxy Manually - -```bash -# Windows (PowerShell) -curl --proxy http://user:pass@proxy.com:8080 http://httpbin.org/ip - -# Linux/macOS -curl --proxy http://user:pass@proxy.com:8080 http://httpbin.org/ip -``` - ---- - -## πŸ“š Next Steps - -**Proxy working?** -β†’ **[Setup Scheduler](./schedule.md)** - -**Need humanization?** -β†’ **[Humanization Guide](./humanization.md)** - -**Multiple accounts?** -β†’ **[Accounts Guide](./accounts.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/schedule.md b/docs/schedule.md deleted file mode 100644 index 155a1ec..0000000 --- a/docs/schedule.md +++ /dev/null @@ -1,179 +0,0 @@ -# ⏰ Scheduler - -**Automate daily script execution** - ---- - -## ⚑ Quick Start - -### Basic Setup - -**Edit** `src/config.jsonc`: -```jsonc -{ - "schedule": { - "enabled": true, - "time": "09:00", - "timeZone": "America/New_York" - } -} -``` - -**Start scheduler:** -```bash -npm run start:schedule -``` - -**That's it!** Script runs automatically at 9 AM daily. - ---- - -## 🎯 Common Configurations - -### Morning Run -```jsonc -{ - "schedule": { - "enabled": true, - "time": "08:00", - "timeZone": "America/New_York" - } -} -``` - -### Evening Run -```jsonc -{ - "schedule": { - "enabled": true, - "time": "20:00", - "timeZone": "Europe/Paris" - } -} -``` - -### Multiple Passes Per Day -```jsonc -{ - "schedule": { - "enabled": true, - "time": "10:00", - "timeZone": "America/Los_Angeles" - }, - "passesPerRun": 2 -} -``` - ---- - -## 🌍 Common Timezones - -| Region | Timezone | -|--------|----------| -| **US East** | `America/New_York` | -| **US West** | `America/Los_Angeles` | -| **UK** | `Europe/London` | -| **France** | `Europe/Paris` | -| **Germany** | `Europe/Berlin` | - -[All timezones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) - ---- - -## 🎲 Advanced: Cron Expressions - -Want more control? Use cron: - -```jsonc -{ - "schedule": { - "enabled": true, - "cron": "0 9 * * *", // Every day at 9 AM - "timeZone": "America/New_York" - } -} -``` - -### Cron Examples -```bash -"0 7 * * *" # Every day at 7:00 AM -"30 20 * * *" # Every day at 8:30 PM -"0 9,21 * * *" # Twice daily: 9 AM and 9 PM -"0 10 * * 1-5" # Weekdays only at 10 AM -``` - -[Cron syntax helper](https://crontab.guru/) - ---- - -## πŸ–οΈ Vacation Mode (Optional) - -Skip random days each month to look more natural: - -```jsonc -{ - "vacation": { - "enabled": true, - "minDays": 3, - "maxDays": 5 - } -} -``` - -**Example:** Script will randomly skip 3-5 consecutive days per month. - ---- - -## πŸ› οΈ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **Scheduler not running** | Check `enabled: true` in config | -| **Wrong execution time** | Verify timezone spelling | -| **Runs multiple times** | Only use ONE scheduler instance | -| **Missed run** | Check if computer was off/sleeping | - -### Debug Commands - -**Check timezone:** -```powershell -node -e "console.log(new Date().toLocaleString('en-US', {timeZone: 'America/New_York'}))" -``` - -**Validate config:** -```powershell -npm run typecheck -``` - ---- - -## 🐳 Docker Integration - -### Built-in Scheduler (Recommended) -```yaml -services: - rewards: - build: . - command: ["npm", "run", "start:schedule"] - environment: - TZ: Europe/Paris -``` - -Uses config from `src/config.jsonc`. - ---- - -## πŸ“š Next Steps - -**Want natural behavior?** -β†’ **[Humanization Guide](./humanization.md)** - -**Need notifications?** -β†’ **[Discord Webhooks](./conclusionwebhook.md)** - -**Docker setup?** -β†’ **[Docker Guide](./docker.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Getting Started](./getting-started.md)** diff --git a/docs/security.md b/docs/security.md deleted file mode 100644 index 9e7b692..0000000 --- a/docs/security.md +++ /dev/null @@ -1,201 +0,0 @@ -# πŸ”’ Security Guide - -**Protect your accounts and handle security incidents** - ---- - -## ⚠️ Important Disclaimer - -**Using automation violates Microsoft's Terms of Service.** - -Your accounts **may be banned**. Use at your own risk. - ---- - -## πŸ›‘οΈ Best Practices - -### βœ… DO - -- **Enable humanization** β€” Natural behavior reduces detection -- **Use 2FA/TOTP** β€” More secure authentication -- **Run 1-2x daily max** β€” Don't be greedy -- **Test on secondary accounts** β€” Never risk your main account -- **Enable vacation mode** β€” Random off days look natural -- **Monitor regularly** β€” Check diagnostics and logs - -### ❌ DON'T - -- **Run on main account** β€” Too risky -- **Schedule hourly** β€” Obvious bot pattern -- **Ignore warnings** β€” Security alerts matter -- **Use shared proxies** β€” Higher detection risk -- **Skip humanization** β€” Robotic behavior gets caught - ---- - -## 🚨 Security Incidents - -### Recovery Email Mismatch - -**What:** Login shows unfamiliar recovery email (e.g., `ko*****@hacker.net`) - -**Action:** -1. **Stop immediately** β€” Script halts automatically -2. **Check Microsoft Account** β†’ Security settings -3. **Update config** if you changed email yourself: - ```json - { - "recoveryEmail": "ko*****@hacker.net" - } - ``` -4. **Change password** if compromise suspected - ---- - -### "We Can't Sign You In" (Blocked) - -**What:** Microsoft blocks login attempt - -**Action:** -1. **Wait 24-48 hours** β€” Temporary locks usually lift -2. **Complete any challenges** β€” SMS, authenticator, etc. -3. **Reduce frequency** β€” Run less often -4. **Enable humanization** β€” If not already enabled -5. **Check proxy** β€” Ensure consistent IP/location - ---- - -## πŸ” Account Security - -### Strong Credentials - -```json -{ - "accounts": [ - { - "email": "your@email.com", - "password": "strong-unique-password", - "totp": "JBSWY3DPEHPK3PXP" - } - ] -} -``` - -- βœ… **Unique passwords** per account -- βœ… **TOTP enabled** for all accounts -- βœ… **Strong passwords** (16+ characters) -- πŸ”„ **Rotate every 90 days** - -### File Permissions - -```bash -# Linux/macOS - Restrict access -chmod 600 src/accounts.json - -# Windows - Right-click β†’ Properties β†’ Security -# Remove all users except yourself -``` - ---- - -## 🌐 Network Security - -### Use Proxies (Optional) - -```json -{ - "proxy": { - "proxyAxios": true, - "url": "proxy.example.com", - "port": 8080, - "username": "user", - "password": "pass" - } -} -``` - -**Benefits:** -- IP masking -- Geographic flexibility -- Reduces pattern detection - -β†’ **[Full Proxy Guide](./proxy.md)** - ---- - -## πŸ“Š Monitoring - -### Enable Diagnostics - -```jsonc -{ - "diagnostics": { - "enabled": true, - "saveScreenshot": true, - "saveHtml": true - } -} -``` - -β†’ **[Diagnostics Guide](./diagnostics.md)** - -### Enable Notifications - -```jsonc -{ - "conclusionWebhook": { - "enabled": true, - "url": "https://discord.com/api/webhooks/..." - } -} -``` - -β†’ **[Webhook Setup](./conclusionwebhook.md)** - ---- - -## πŸ› οΈ Incident Response - -### Account Compromised - -1. **Stop all automation** -2. **Change password immediately** -3. **Check sign-in activity** in Microsoft Account -4. **Enable 2FA** if not already -5. **Review security info** (recovery email, phone) -6. **Contact Microsoft** if unauthorized access - -### Temporary Ban - -1. **Pause automation** for 48-72 hours -2. **Reduce frequency** when resuming -3. **Increase delays** in humanization -4. **Use proxy** from your region -5. **Monitor closely** after resuming - ---- - -## πŸ”— Privacy Tips - -- πŸ” **Local-only** β€” All data stays on your machine -- 🚫 **No telemetry** β€” Script doesn't phone home -- πŸ“ **File security** β€” Restrict permissions -- πŸ”„ **Regular backups** β€” Keep config backups -- πŸ—‘οΈ **Clean logs** β€” Delete old diagnostics - ---- - -## πŸ“š Next Steps - -**Setup humanization?** -β†’ **[Humanization Guide](./humanization.md)** - -**Need proxies?** -β†’ **[Proxy Guide](./proxy.md)** - -**Want monitoring?** -β†’ **[Diagnostics](./diagnostics.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)** diff --git a/docs/update.md b/docs/update.md deleted file mode 100644 index 2c86c69..0000000 --- a/docs/update.md +++ /dev/null @@ -1,104 +0,0 @@ -# πŸ”„ Auto-Update - -**Keep script up to date automatically** - ---- - -## πŸ’‘ What Is It? - -After each run, script checks for updates and installs them automatically. - -**Already enabled by default!** - ---- - -## ⚑ How It Works - -### After Each Run - -1. **Fetch latest** from GitHub -2. **Pull changes** (safe fast-forward only) -3. **Install dependencies** (`npm ci`) -4. **Rebuild** (`npm run build`) - -**No action needed from you!** - ---- - -## βš™οΈ Configuration - -```jsonc -{ - "update": { - "git": true, // Auto-update from Git - "docker": false // Docker container updates (if using Docker) - } -} -``` - ---- - -## 🐳 Docker Updates - -If using Docker: - -```jsonc -{ - "update": { - "git": false, - "docker": true - } -} -``` - -Pulls latest Docker image and restarts container. - ---- - -## πŸ› οΈ Manual Update - -### Git -```bash -git pull -npm ci -npm run build -``` - -### Docker -```bash -docker compose pull -docker compose up -d -``` - ---- - -## ⚠️ Troubleshooting - -| Problem | Solution | -|---------|----------| -| **"Not a git repository"** | Clone repo (don't download ZIP) | -| **"Local changes"** | Commit or stash your changes | -| **"Update failed"** | Check internet connection | - -### Reset to Remote - -```bash -git fetch origin -git reset --hard origin/v2 -npm ci -npm run build -``` - ---- - -## πŸ“š Next Steps - -**Need security tips?** -β†’ **[Security Guide](./security.md)** - -**Setup scheduler?** -β†’ **[Scheduler Guide](./schedule.md)** - ---- - -**[← Back to Hub](./index.md)** | **[Config Guide](./config.md)**