Skip to content

Add option to run over HTTP (no TLS) for local dev and reverse proxy (e.g., ngrok) #13

@nahakiole

Description

@nahakiole

Hi! Could we add a config flag to run Teleop over plain HTTP, bound to a local address, so it can sit behind a reverse proxy like ngrok or Caddy?

Why

  • On iPhone, Firefox AR refuses self-signed certificates, so HTTPS with a self-signed cert blocks usage.
  • For quick local testing and tunneling via ngrok, an HTTP backend behind a trusted proxy is the practical path if not all devices are on the same network.

Patch that we use currently

from teleop import Teleop
import uvicorn

def run_no_ssl(self, host="127.0.0.1", port=8080, log_level="info"):
    """Run without SSL for local development or behind a reverse proxy."""
    host = host or getattr(self, "_Teleop__host", "127.0.0.1")
    port = port or getattr(self, "_Teleop__port", 8080)
    uvicorn.run(self._Teleop__app, host=host, port=port, log_level=log_level)

# monkey-patch for now
Teleop.run = run_no_ssl

Happy to open a PR if the approach sounds good.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions