Commit 35af5ed
committed
feat: add proxy middleware with circuit breaker fallback
Smart proxy to Bose servers with automatic fallback to local handlers.
Controlled via SOUNDCORK_MODE env var (default: local).
- ProxyMiddleware intercepts /marge, /bmx, /updates prefixes
- Circuit breaker per upstream server (opens on errors/404/5xx)
- 5-minute cooldown before retrying failed upstreams
- Traffic logging to JSONL file
- Adds httpx dependency
Addresses #1521 parent 672029a commit 35af5ed
4 files changed
+397
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
| 24 | + | |
23 | 25 | | |
24 | 26 | | |
25 | 27 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
| |||
0 commit comments