feat: WSS rosbridge proxy + auto-detect wss:// in tracker (Issue #681) #725

Merged
sl-jetson merged 1 commits from sl-jetson/issue-681-wss-rosbridge into main 2026-04-20 19:14:33 -04:00
Collaborator

Summary

  • nginx site added on Orin port 8080 (/etc/nginx/sites-available/saul-tee):
    • Serves /home/seb static files (replaces python3 -m http.server 8080)
    • location /rosbridge → WebSocket reverse proxy to ws://127.0.0.1:9090
    • Headers: proxy_http_version 1.1, Upgrade, Connection: upgrade, proxy_read_timeout 86400
  • saul-tee-tracker.html: auto-detects wss:// vs ws:// based on location.protocol
    • HTTPS page → wss://saul-t-mote.evthings.app/rosbridge (default)
    • HTTP/local → ws://100.64.0.2:9090 (Tailscale direct)
    • localStorage override preserved

Architecture

Browser → router:443 (OpenResty TLS) → Orin:8080 (nginx) → /rosbridge → ws://localhost:9090 (rosbridge)

Test plan

  • wss://saul-t-mote.evthings.app/rosbridge connects from browser
  • Static files still served at https://saul-t-mote.evthings.app/saltylab-firmware/ui/saul-tee-tracker.html
  • Tracker auto-connects via wss:// when opened over HTTPS
  • ws://100.64.0.2:9090 still works for Tailscale/local access

🤖 Generated with Claude Code

## Summary - **nginx site** added on Orin port 8080 (`/etc/nginx/sites-available/saul-tee`): - Serves `/home/seb` static files (replaces `python3 -m http.server 8080`) - `location /rosbridge` → WebSocket reverse proxy to `ws://127.0.0.1:9090` - Headers: `proxy_http_version 1.1`, `Upgrade`, `Connection: upgrade`, `proxy_read_timeout 86400` - **saul-tee-tracker.html**: auto-detects `wss://` vs `ws://` based on `location.protocol` - HTTPS page → `wss://saul-t-mote.evthings.app/rosbridge` (default) - HTTP/local → `ws://100.64.0.2:9090` (Tailscale direct) - localStorage override preserved ## Architecture Browser → router:443 (OpenResty TLS) → Orin:8080 (nginx) → /rosbridge → ws://localhost:9090 (rosbridge) ## Test plan - [ ] `wss://saul-t-mote.evthings.app/rosbridge` connects from browser - [ ] Static files still served at `https://saul-t-mote.evthings.app/saltylab-firmware/ui/saul-tee-tracker.html` - [ ] Tracker auto-connects via wss:// when opened over HTTPS - [ ] ws://100.64.0.2:9090 still works for Tailscale/local access 🤖 Generated with [Claude Code](https://claude.com/claude-code)
sl-jetson added 1 commit 2026-04-04 11:59:57 -04:00
- Default URL auto-selects wss://saul-t-mote.evthings.app/rosbridge when
  page is loaded via https://, falls back to ws://100.64.0.2:9090 for
  local/Tailscale access
- Clears hardcoded ws:// value from input; JS sets it from localStorage
  or the detected default on first load

Companion: nginx config on Orin adds /rosbridge WebSocket reverse proxy
  on port 8080  →  ws://127.0.0.1:9090

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
sl-jetson force-pushed sl-jetson/issue-681-wss-rosbridge from 6b113c1f3e to edc0d6a002 2026-04-04 12:09:28 -04:00 Compare
sl-jetson merged commit 47d0631d81 into main 2026-04-20 19:14:33 -04:00
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seb/saltylab-firmware#725
No description provided.