Commit graph

5 commits

Author SHA1 Message Date
09f92c6738
feat(mobile): rate-limit socket + batch historical packet delivery
- MobileUserSocket: cap new socket connections per IP at 30/min via
  Aprsme.RateLimiter. Denials log and return :error at handshake.
  Tests bypass the check (no real peer_data).

- MobileChannel: rate-limit the expensive client-initiated handlers
  (subscribe_bounds, subscribe_callsign, search_callsign) at
  30/minute per socket. Streaming packet delivery is unaffected.

- MobileChannel: historical packet loads now arrive as a batched
  `packets` event (100 per frame) instead of one `packet` frame per
  row. Live streaming still uses the single `packet` event.

- Updated docs/mobile-api.md with the `packets` event and rate-limit
  semantics; migration note preserves compatibility for clients that
  only handle live `packet` events.
2026-04-21 09:38:51 -05:00
f6730b282a
Fix API documentation to match implementation
- REST API: Fix id type from integer to UUID, add device/equipment
  fields, correct rate limiting info (100 req/min, not "none"),
  add 429 status code
- Mobile API: Fix search_callsign response field (lon not lng),
  add path to packet fields, correct rate limiting/timeout docs,
  clarify update_bounds behavior
- Fix flaky pipeline tests (async race on global Application config)
2026-02-19 10:22:10 -06:00
2da935b1af
Add callsign search and tracking to mobile API
Implements comprehensive callsign search and live tracking:

- search_callsign: Search for callsigns with wildcard support
  - "W5ISP" finds W5ISP and all SSIDs (W5ISP-1, W5ISP-9, etc.)
  - "W5ISP-9" finds only that specific SSID
  - "W5ISP*" finds all callsigns starting with W5ISP

- subscribe_callsign: Subscribe to live updates for a callsign
  - Loads historical packets for the callsign
  - Receives real-time streaming updates
  - Supports wildcard patterns
  - Works with or without geographic bounds

- unsubscribe_callsign: Stop tracking callsign

When both bounds and callsign are subscribed, packets are filtered
by both criteria (callsign AND within bounds).

Generated with Claude Code https://claude.com/claude-code
2025-10-25 13:11:10 -05:00
d6c3ada6c4
Add historical packet loading to mobile API
When mobile clients subscribe to bounds, the server now loads and sends
historical packets immediately, followed by real-time streaming packets.
This matches the web UI behavior and provides a complete view of APRS
activity in the requested area.

Optional parameters:
- limit: Max historical packets to load (default: 1000, max: 5000)
- hours_back: Hours of historical data (default: 1, max: 24)

Generated with Claude Code https://claude.com/claude-code
2025-10-25 12:31:30 -05:00
ddbb72b1b2
Add mobile API for iOS/Android real-time packet streaming
- Create MobileChannel for geographic bounds-based packet filtering
- Add MobileUserSocket for mobile client connections
- Implement subscribe_bounds, update_bounds, and unsubscribe events
- Leverage existing StreamingPacketsPubSub infrastructure
- Add comprehensive mobile API documentation with Swift examples
- WebSocket endpoint: wss://aprs.me/mobile/websocket
- Channel: mobile:packets

This enables iOS/Android apps to receive real-time APRS packets
filtered by geographic viewport, with efficient bandwidth usage.
2025-10-25 11:25:18 -05:00