# Tailscale Funnel — NexStream Scraper HTTPS

## Live Target

**URL:** `https://debian-ai.tailf83ed5.ts.net/manifest.json`

**Default in app:** `BuildConfig.NEXSTREAM_SCRAPER_URL` defaults to `https://debian-ai.tailf83ed5.ts.net`
(in `app/build.gradle.kts`, overridable via `local.properties`).

The old `http://192.168.1.50:3091` HTTP LAN URL is **removed**. Do not reintroduce HTTP for the
scraper — Android cleartext policy blocks it.

## Funnel Setup

The scraper backend (`nexstream-scraper` Docker container, port 3091, plain HTTP internally) is
exposed via Tailscale Funnel:

```bash
sudo tailscale funnel --bg 3091
```

Check status:
```bash
tailscale funnel status
# Should show: https://debian-ai.tailf83ed5.ts.net → proxy http://127.0.0.1:3091
```

## Verification

```bash
curl -sS -o /dev/null -w '%{http_code}\n' https://debian-ai.tailf83ed5.ts.net/manifest.json
# Expected: 200
```

## App-side logging

`StremioAddonClientImpl.loadManifest()` now logs:
- `manifest fetch url=... scheme=https` (resolved URL + protocol)
- `manifest fetch ok: <addon_id> v<version>` (success)
- `manifest fetch FAILED: <error>` (failure with reason)

Filter logcat: `adb logcat -s AddonClient`
