Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 3cb34ad

Browse files
committed
Add Cloudflare Quick Tunnel controls to endpoint page
1 parent 8af9bd1 commit 3cb34ad

9 files changed

Lines changed: 1052 additions & 41 deletions

File tree

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -876,6 +876,14 @@ docker compose --profile base up -d
876876
docker compose --profile cli up -d
877877
```
878878
879+
Dashboard support for Docker deployments now includes a one-click **Cloudflare Quick Tunnel** on `Dashboard → Endpoints`. The first enable downloads `cloudflared` only when needed, starts a temporary tunnel to your current `/v1` endpoint, and shows the generated `https://*.trycloudflare.com/v1` URL directly below your normal public URL.
880+
881+
Notes:
882+
883+
- Quick Tunnel URLs are temporary and change after every restart.
884+
- Managed install currently supports Linux, macOS, and Windows on `x64` / `arm64`.
885+
- Set `CLOUDFLARED_BIN=/absolute/path/to/cloudflared` if you want OmniRoute to use an existing binary instead of downloading one.
886+
879887
**Using Docker Compose with Caddy (HTTPS Auto-TLS):**
880888
881889
OmniRoute can be securely exposed using Caddy's automatic SSL provisioning. Ensure your domain's DNS A record points to your server's IP.

docs/API_REFERENCE.md

Lines changed: 26 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -216,23 +216,23 @@ Response example:
216216

217217
### Settings
218218

219-
| Endpoint | Method | Description |
220-
| ------------------------------- | ------- | ---------------------- |
221-
| `/api/settings` | GET/PUT/PATCH | General settings |
222-
| `/api/settings/proxy` | GET/PUT | Network proxy config |
223-
| `/api/settings/proxy/test` | POST | Test proxy connection |
224-
| `/api/settings/ip-filter` | GET/PUT | IP allowlist/blocklist |
225-
| `/api/settings/thinking-budget` | GET/PUT | Reasoning token budget |
226-
| `/api/settings/system-prompt` | GET/PUT | Global system prompt |
219+
| Endpoint | Method | Description |
220+
| ------------------------------- | ------------- | ---------------------- |
221+
| `/api/settings` | GET/PUT/PATCH | General settings |
222+
| `/api/settings/proxy` | GET/PUT | Network proxy config |
223+
| `/api/settings/proxy/test` | POST | Test proxy connection |
224+
| `/api/settings/ip-filter` | GET/PUT | IP allowlist/blocklist |
225+
| `/api/settings/thinking-budget` | GET/PUT | Reasoning token budget |
226+
| `/api/settings/system-prompt` | GET/PUT | Global system prompt |
227227

228228
### Monitoring
229229

230-
| Endpoint | Method | Description |
231-
| ------------------------ | ---------- | ----------------------- |
232-
| `/api/sessions` | GET | Active session tracking |
233-
| `/api/rate-limits` | GET | Per-account rate limits |
230+
| Endpoint | Method | Description |
231+
| ------------------------ | ---------- | ---------------------------------------------------------------------------------------------------- |
232+
| `/api/sessions` | GET | Active session tracking |
233+
| `/api/rate-limits` | GET | Per-account rate limits |
234234
| `/api/monitoring/health` | GET | Health check + provider summary (`catalogCount`, `configuredCount`, `activeCount`, `monitoredCount`) |
235-
| `/api/cache/stats` | GET/DELETE | Cache stats / clear |
235+
| `/api/cache/stats` | GET/DELETE | Cache stats / clear |
236236

237237
### Backup & Export/Import
238238

@@ -253,6 +253,13 @@ Response example:
253253
| `/api/sync/initialize` | POST | Initialize sync |
254254
| `/api/cloud/*` | Various | Cloud management |
255255

256+
### Tunnels
257+
258+
| Endpoint | Method | Description |
259+
| -------------------------- | ------ | ----------------------------------------------------------------------- |
260+
| `/api/tunnels/cloudflared` | GET | Read Cloudflare Quick Tunnel install/runtime status for the dashboard |
261+
| `/api/tunnels/cloudflared` | POST | Enable or disable the Cloudflare Quick Tunnel (`action=enable/disable`) |
262+
256263
### CLI Tools
257264

258265
| Endpoint | Method | Description |
@@ -277,12 +284,12 @@ GET response includes `agents[]` (id, name, binary, version, installed, protocol
277284

278285
### Resilience & Rate Limits
279286

280-
| Endpoint | Method | Description |
281-
| ----------------------- | ------- | ------------------------------- |
282-
| `/api/resilience` | GET/PATCH | Get/update resilience profiles |
283-
| `/api/resilience/reset` | POST | Reset circuit breakers |
284-
| `/api/rate-limits` | GET | Per-account rate limit status |
285-
| `/api/rate-limit` | GET | Global rate limit configuration |
287+
| Endpoint | Method | Description |
288+
| ----------------------- | --------- | ------------------------------- |
289+
| `/api/resilience` | GET/PATCH | Get/update resilience profiles |
290+
| `/api/resilience/reset` | POST | Reset circuit breakers |
291+
| `/api/rate-limits` | GET | Per-account rate limit status |
292+
| `/api/rate-limit` | GET | Global rate limit configuration |
286293

287294
### Evals
288295

docs/USER_GUIDE.md

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -507,24 +507,25 @@ post_install() {
507507

508508
### Environment Variables
509509

510-
| Variable | Default | Description |
511-
| ------------------------- | ------------------------------------ | ------------------------------------------------------- |
512-
| `JWT_SECRET` | `omniroute-default-secret-change-me` | JWT signing secret (**change in production**) |
513-
| `INITIAL_PASSWORD` | `123456` | First login password |
514-
| `DATA_DIR` | `~/.omniroute` | Data directory (db, usage, logs) |
515-
| `PORT` | framework default | Service port (`20128` in examples) |
516-
| `HOSTNAME` | framework default | Bind host (Docker defaults to `0.0.0.0`) |
517-
| `NODE_ENV` | runtime default | Set `production` for deploy |
518-
| `BASE_URL` | `http://localhost:20128` | Server-side internal base URL |
519-
| `CLOUD_URL` | `https://omniroute.dev` | Cloud sync endpoint base URL |
520-
| `API_KEY_SECRET` | `endpoint-proxy-api-key-secret` | HMAC secret for generated API keys |
521-
| `REQUIRE_API_KEY` | `false` | Enforce Bearer API key on `/v1/*` |
522-
| `ALLOW_API_KEY_REVEAL` | `false` | Allow Api Manager to copy full API keys on demand |
523-
| `ENABLE_REQUEST_LOGS` | `false` | Enables request/response logs |
524-
| `AUTH_COOKIE_SECURE` | `false` | Force `Secure` auth cookie (behind HTTPS reverse proxy) |
525-
| `OMNIROUTE_MEMORY_MB` | `512` | Node.js heap limit in MB |
526-
| `PROMPT_CACHE_MAX_SIZE` | `50` | Max prompt cache entries |
527-
| `SEMANTIC_CACHE_MAX_SIZE` | `100` | Max semantic cache entries |
510+
| Variable | Default | Description |
511+
| ------------------------- | ------------------------------------ | ---------------------------------------------------------------- |
512+
| `JWT_SECRET` | `omniroute-default-secret-change-me` | JWT signing secret (**change in production**) |
513+
| `INITIAL_PASSWORD` | `123456` | First login password |
514+
| `DATA_DIR` | `~/.omniroute` | Data directory (db, usage, logs) |
515+
| `PORT` | framework default | Service port (`20128` in examples) |
516+
| `HOSTNAME` | framework default | Bind host (Docker defaults to `0.0.0.0`) |
517+
| `NODE_ENV` | runtime default | Set `production` for deploy |
518+
| `BASE_URL` | `http://localhost:20128` | Server-side internal base URL |
519+
| `CLOUD_URL` | `https://omniroute.dev` | Cloud sync endpoint base URL |
520+
| `API_KEY_SECRET` | `endpoint-proxy-api-key-secret` | HMAC secret for generated API keys |
521+
| `REQUIRE_API_KEY` | `false` | Enforce Bearer API key on `/v1/*` |
522+
| `ALLOW_API_KEY_REVEAL` | `false` | Allow Api Manager to copy full API keys on demand |
523+
| `ENABLE_REQUEST_LOGS` | `false` | Enables request/response logs |
524+
| `AUTH_COOKIE_SECURE` | `false` | Force `Secure` auth cookie (behind HTTPS reverse proxy) |
525+
| `CLOUDFLARED_BIN` | unset | Use an existing `cloudflared` binary instead of managed download |
526+
| `OMNIROUTE_MEMORY_MB` | `512` | Node.js heap limit in MB |
527+
| `PROMPT_CACHE_MAX_SIZE` | `50` | Max prompt cache entries |
528+
| `SEMANTIC_CACHE_MAX_SIZE` | `100` | Max semantic cache entries |
528529

529530
For the full environment variable reference, see the [README](../README.md).
530531

@@ -639,6 +640,14 @@ Returns models grouped by provider with types (`chat`, `embedding`, `image`).
639640
- Automatic background sync with timeout + fail-fast
640641
- Prefer server-side `BASE_URL`/`CLOUD_URL` in production
641642

643+
### Cloudflare Quick Tunnel
644+
645+
- Available in **Dashboard → Endpoints** for Docker and other self-hosted deployments
646+
- Creates a temporary `https://*.trycloudflare.com` URL that forwards to your current OpenAI-compatible `/v1` endpoint
647+
- First enable installs `cloudflared` only when needed; later restarts reuse the same managed binary
648+
- Tunnel URLs are ephemeral and change every time you stop/start the tunnel
649+
- Set `CLOUDFLARED_BIN` if you prefer using a preinstalled `cloudflared` binary instead of the managed download
650+
642651
### LLM Gateway Intelligence (Phase 9)
643652

644653
- **Semantic Cache** — Auto-caches non-streaming, temperature=0 responses (bypass with `X-OmniRoute-No-Cache: true`)

0 commit comments

Comments
 (0)