# Funnel on:
#     - https://khalids-mac-mini.tailbd7b77.ts.net

https://khalids-mac-mini.tailbd7b77.ts.net (Funnel on)
|-- / proxy http://127.0.0.1:8090


Now update the start script to use Caddy instead of the Python proxy:


Write

#!/bin/bash
# DEWA PR Tracker — Start all services
cd "$(dirname "$0")"
source venv/bin/activate

# Kill any existing instances
pkill -f "streamlit run dashboard.py" 2>/dev/null
pkill -f "caddy run" 2>/dev/null
sleep 1

# 1. Start Streamlit (port 8501, base path /pr-tracker)
streamlit run dashboard.py &
sleep 4

# 2. Start Caddy reverse proxy (port 8090 — handles WebSockets)
caddy run --config Caddyfile &>/tmp/caddy.log &
sleep 2

echo ""
echo "  ─────────────────────────────────────────────────────────────────"
echo "  DEWA PR Tracker   → https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker"
echo "  Course Dashboard  → https://khalids-mac-mini.tailbd7b77.ts.net/course-dashboard.html"
echo "  ─────────────────────────────────────────────────────────────────"
echo ""

open https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker
wait


The file /Users/khalidbinkalban/Projects/dewa-pr-tracker/start.sh has been updated successfully.

#!/bin/bash
# DEWA PR Tracker — Start all services
cd "$(dirname "$0")"
source venv/bin/activate

# Kill any existing instances
pkill -f "streamlit run dashboard.py" 2>/dev/null
pkill -f "caddy run" 2>/dev/null
sleep 1

# 1. Start Streamlit (port 8501, base path /pr-tracker)
streamlit run dashboard.py &
sleep 4

# 2. Start Caddy reverse proxy (port 8090 — handles WebSockets)
caddy run --config Caddyfile &>/tmp/caddy.log &
sleep 2

echo ""
echo "  ─────────────────────────────────────────────────────────────────"
echo "  DEWA PR Tracker   → https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker"
echo "  Course Dashboard  → https://khalids-mac-mini.tailbd7b77.ts.net/course-dashboard.html"
echo "  ─────────────────────────────────────────────────────────────────"
echo ""

open https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker
wait

-python3 proxy.py 8090 &>/tmp/proxy.log &

+# 2. Start Caddy reverse proxy (port 8090 — handles WebSockets)

+caddy run --config Caddyfile &>/tmp/caddy.log &

-echo "  ─────────────────────────────────────────────────────────"

-echo "  Share URL:  https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker"

+echo "  ─────────────────────────────────────────────────────────────────"

+echo "  DEWA PR Tracker   → https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker"

+echo "  Course Dashboard  → https://khalids-mac-mini.tailbd7b77.ts.net/course-dashboard.html"

-echo "  Share URL:  https://khalids-mac-mini.tailbd7b77.ts.net/course-dashboard.html"

-# Keep script alive so Ctrl+C stops everything

#!/bin/bash
# DEWA PR Tracker — Start all services
cd "$(dirname "$0")"
source venv/bin/activate

# Kill any existing instances
pkill -f "streamlit run dashboard.py" 2>/dev/null
pkill -f "proxy.py" 2>/dev/null
sleep 1

# 1. Start Streamlit (port 8501, base path /pr-tracker)
streamlit run dashboard.py &
sleep 4

# 2. Start reverse proxy (port 8090)
python3 proxy.py 8090 &>/tmp/proxy.log &
sleep 2

echo ""
echo "  ─────────────────────────────────────────────────────────"
echo "  DEWA PR Tracker"
echo "  Share URL:  https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker"
echo ""
echo "  Course Dashboard"
echo "  Share URL:  https://khalids-mac-mini.tailbd7b77.ts.net/course-dashboard.html"
echo "  ─────────────────────────────────────────────────────────"
echo ""

open https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker

# Keep script alive so Ctrl+C stops everything
wait


Try it now — both URLs should work:

| | URL |
|---|---|
| **DEWA PR Tracker** | `https://khalids-mac-mini.tailbd7b77.ts.net/pr-tracker` |
| **Course Dashboard** | `https://khalids-mac-mini.tailbd7b77.ts.net/course-dashboard.html` |

The fix: replaced the simple Python proxy with **Caddy**, which natively handles WebSocket upgrades that Streamlit requires for its live connection (`_stcore/stream`). The old proxy was rejecting those with `400` errors which broke the app.