{"id":21694200,"url":"https://github.com/emadda/worker-tabserve-reverse-proxy","last_synced_at":"2025-04-12T10:50:22.244Z","repository":{"id":237409635,"uuid":"656924968","full_name":"emadda/worker-tabserve-reverse-proxy","owner":"emadda","description":"A Cloudflare Worker for Tabserve.dev","archived":false,"fork":false,"pushed_at":"2024-04-22T13:32:19.000Z","size":95,"stargazers_count":124,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T05:41:48.895Z","etag":null,"topics":["cloudflare","cloudflare-workers"],"latest_commit_sha":null,"homepage":"https://tabserve.dev","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/emadda.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-06-21T23:53:29.000Z","updated_at":"2025-03-18T03:31:43.000Z","dependencies_parsed_at":"2024-05-01T12:49:47.152Z","dependency_job_id":"07e86131-ca29-4283-aef8-6d64ef3c9d6c","html_url":"https://github.com/emadda/worker-tabserve-reverse-proxy","commit_stats":null,"previous_names":["emadda/worker-tabserve-reverse-proxy"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadda%2Fworker-tabserve-reverse-proxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadda%2Fworker-tabserve-reverse-proxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadda%2Fworker-tabserve-reverse-proxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/emadda%2Fworker-tabserve-reverse-proxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/emadda","download_url":"https://codeload.github.com/emadda/worker-tabserve-reverse-proxy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248557844,"owners_count":21124165,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cloudflare","cloudflare-workers"],"created_at":"2024-11-25T18:27:14.716Z","updated_at":"2025-04-12T10:50:22.209Z","avatar_url":"https://github.com/emadda.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Tabserve Reverse Proxy\n\nThis is a [Cloudflare worker](https://workers.cloudflare.com/) that works as reverse proxy for [Tabserve](https://tabserve.dev).\n\nTabserve is a web app that uses browser web workers as a reverse proxy.\n\nThis enables you to have a public HTTPS url and route it to a http://localhost:1234 web server running on your computer.\n\nSee [Tabserve](https://tabserve.dev) for more details.\n\n\n## Deploy this worker to your Cloudflare account.\n\nA [video walkthrough](https://tabserve.dev/#setting-up-the-cloudflare-worker-and-dns) is available.\n\n### A. Deploying the worker\n\n- 1 . Sign up for a CF account.\n- 2 . `git clone https://github.com/emadda/worker-tabserve-reverse-proxy`\n- 3 . `npm install --omit=dev`\n- 4 . Set `AUTH_TOKEN` to a unique string over 40 chars in `wrangler.toml`\n- 5 . Deploy: `wrangler deploy`\n\n\n### B. Setting up your domain\n\n- 1 . Buy a domain (from either Cloudflare or Namecheap).\n- 2 . Add `your-domain.com` to Cloudflare DNS.\n- 3 . Add a CNAME record:\n\n\n| Type  | Name | Content                     | Proxy Status |\n|-------|------|-----------------------------|--------------|\n| CNAME | *    | can.be.anything.example.com | Proxied      |\n\nBecause this is \"Proxied\", the `Content` target is ignored and CF DNS returns the IP of your worker.\n\n- 4 . Add a `Workers Routes` to your domain via the menu on the left when viewing your domain:\n\t- `(*.your-domain.com/*) =\u003e (worker-tabserve-reverse-proxy)`\n\n\nAfter setting up A and B, you can use Tabserve to route requests to a localhost server.\n\n- You will need to paste your `AUTH_TOKEN` into the Tabserve config.\n- When adding a server, use any `\u003cid\u003e.your-domain.com`, where `\u003cid\u003e` is any subdomain you desire.\n\n\n## How this worker works.\n\n- It handles two subdomains:\n\t- 1 . `\u003cid\u003e.your-domain.com`\n\t\t- This is the public URL.\n\n\n\t- 2 . `\u003cid\u003e-ws.your-domain.com`\n\t\t- This is a websocket server that the Tabserve web app connects to.\n\t\t- The Tabserve web app receives the serialized HTTP request, routes it to a localhost server, then sends back the serialized response over the same websocket connection.\n\n- Each unique subdomain `\u003cid\u003e` gets its own Durable Object.\n\t- The hibernation API is used for WebSockets which should allow Tabserve to listen for requests constantly whilst only paying for CPU time when active.\n\t- You can switch off `\u003cid\u003e`s in the Tabserve UI which disconnects the WebSocket preventing any charge.\n\n\n\n\n## Note.\n\n- Workers are optimized for API and HTML traffic, so large files are likely to block the worker event loop. Consider CF R2 for large files.\n\n## To do\n\n- [ ] Support WebSocket connections to the the public URL.\n- [ ] Track request stats.\n\n\n\n\n\nIf you have any issues or feedback, please create an issue on the [Tabserve issues GitHub](https://github.com/emadda/tabserve).\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femadda%2Fworker-tabserve-reverse-proxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Femadda%2Fworker-tabserve-reverse-proxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Femadda%2Fworker-tabserve-reverse-proxy/lists"}