{"id":19427766,"url":"https://github.com/stacksjs/rpx","last_synced_at":"2026-02-25T09:35:10.649Z","repository":{"id":225958283,"uuid":"767342709","full_name":"stacksjs/rpx","owner":"stacksjs","description":"🔀 A modern, smart reverse proxy. For a pretty and powerful local DX.","archived":false,"fork":false,"pushed_at":"2026-02-14T00:56:11.000Z","size":2967,"stargazers_count":26,"open_issues_count":11,"forks_count":3,"subscribers_count":8,"default_branch":"main","last_synced_at":"2026-02-14T01:42:24.320Z","etag":null,"topics":["bun","cli","dev-tool","local-development","nginx","reverse-proxy","zero-config"],"latest_commit_sha":null,"homepage":"https://reverse-proxy.netlify.app","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/stacksjs.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":".github/SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["stacksjs","chrisbbreuer"],"open_collective":"stacksjs"}},"created_at":"2024-03-05T05:49:34.000Z","updated_at":"2026-02-04T23:28:00.000Z","dependencies_parsed_at":"2024-03-05T07:29:56.670Z","dependency_job_id":"9fd9ddbe-2ed4-411f-8524-5816b24b3247","html_url":"https://github.com/stacksjs/rpx","commit_stats":{"total_commits":75,"total_committers":2,"mean_commits":37.5,"dds":0.09333333333333338,"last_synced_commit":"fe84d4386c32a10f8e20b6a0e6cfd52502efd5f0"},"previous_names":["stacksjs/reverse-proxy","stacksjs/rpx"],"tags_count":23,"template":false,"template_full_name":null,"purl":"pkg:github/stacksjs/rpx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Frpx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Frpx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Frpx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Frpx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stacksjs","download_url":"https://codeload.github.com/stacksjs/rpx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stacksjs%2Frpx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29816142,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-25T05:36:42.804Z","status":"ssl_error","status_checked_at":"2026-02-25T05:36:31.934Z","response_time":61,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["bun","cli","dev-tool","local-development","nginx","reverse-proxy","zero-config"],"created_at":"2024-11-10T14:12:50.052Z","updated_at":"2026-02-25T09:35:10.620Z","avatar_url":"https://github.com/stacksjs.png","language":"TypeScript","funding_links":["https://github.com/sponsors/stacksjs","https://github.com/sponsors/chrisbbreuer","https://opencollective.com/stacksjs"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\u003cimg src=\"https://github.com/stacksjs/rpx/blob/main/.github/art/cover.jpg?raw=true\" alt=\"Social Card of this repo\"\u003e\u003c/p\u003e\n\n[![npm version][npm-version-src]][npm-version-href]\n[![GitHub Actions][github-actions-src]][github-actions-href]\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n\u003c!-- [![npm downloads][npm-downloads-src]][npm-downloads-href] --\u003e\n\u003c!-- [![Codecov][codecov-src]][codecov-href] --\u003e\n\n# rpx\n\n\u003e A zero-config reverse proxy for local development with SSL support, custom domains, and more—for a better local developer experience.\n\n## Features\n\n- 🔀 Simple, lightweight Reverse Proxy\n- ♾️ Custom Domains _(with wildcard support)_\n- 0️⃣ Zero-Config Setup\n- 🔒 SSL Support _(HTTPS by default)_\n- 🛣️ Auto HTTP-to-HTTPS Redirection\n- ✏️ `/etc/hosts` Management\n- 🧼 Clean URLs _(removes `.html` extension)_\n- 🤖 CLI \u0026 Library Support\n\n## Install\n\n```bash\nbun install -d @stacksjs/rpx\n```\n\n\u003c!-- _Alternatively, you can install:_\n\n```bash\nbrew install rpx # wip\npkgx install rpx # wip\n``` --\u003e\n\n## Get Started\n\nThere are two ways of using this reverse proxy: _as a library or as a CLI._\n\n### Library\n\nGiven the npm package is installed:\n\n```ts\nimport type { TlsConfig } from '@stacksjs/rpx'\nimport { startProxy } from '@stacksjs/rpx'\n\nexport interface CleanupConfig {\n  hosts: boolean // clean up /etc/hosts, defaults to false\n  certs: boolean // clean up certificates, defaults to false\n}\n\nexport interface ProxyConfig {\n  from: string // domain to proxy from, defaults to localhost:5173\n  to: string // domain to proxy to, defaults to rpx.localhost\n  cleanUrls?: boolean // removes the .html extension from URLs, defaults to false\n  https: boolean | TlsConfig // automatically uses https, defaults to true, also redirects http to https\n  cleanup?: boolean | CleanupConfig // automatically cleans up /etc/hosts, defaults to false\n  start?: StartOptions\n  verbose: boolean // log verbose output, defaults to false\n}\n\nconst config: ProxyOptions = {\n  from: 'localhost:5173',\n  to: 'rpx.localhost',\n  cleanUrls: true,\n  https: true,\n  cleanup: false,\n  start: {\n    command: 'bun run dev:docs',\n    lazy: true,\n  }\n}\n\nstartProxy(config)\n```\n\nIn case you are trying to start multiple proxies, you may use this configuration:\n\n```ts\n// rpx.config.{ts,js}\nimport type { ProxyOptions } from '@stacksjs/rpx'\nimport os from 'node:os'\nimport path from 'node:path'\n\nconst config: ProxyOptions = {\n  https: { // https: true -\u003e also works with sensible defaults\n    caCertPath: path.join(os.homedir(), '.stacks', 'ssl', `rpx.localhost.ca.crt`),\n    certPath: path.join(os.homedir(), '.stacks', 'ssl', `rpx.localhost.crt`),\n    keyPath: path.join(os.homedir(), '.stacks', 'ssl', `rpx.localhost.crt.key`),\n  },\n\n  cleanup: {\n    hosts: true,\n    certs: false,\n  },\n\n  proxies: [\n    {\n      from: 'localhost:5173',\n      to: 'my-app.localhost',\n      cleanUrls: true,\n      start: {\n        command: 'bun run dev',\n        cwd: '/path/to/my-app',\n        env: {\n          NODE_ENV: 'development',\n        },\n      },\n    },\n    {\n      from: 'localhost:5174',\n      to: 'my-api.local',\n    },\n  ],\n\n  verbose: true,\n}\n\nexport default config\n```\n\n### CLI\n\n```bash\nrpx --from localhost:3000 --to my-project.localhost\nrpx --from localhost:8080 --to my-project.test --keyPath ./key.pem --certPath ./cert.pem\nrpx --help\nrpx --version\n```\n\n## Configuration\n\nThe Reverse Proxy can be configured using a `rpx.config.ts` _(or `rpx.config.js`)_ file and it will be automatically loaded when running the `reverse-proxy` command.\n\n```ts\n// rpx.config.{ts,js}\nimport type { ProxyOptions } from '@stacksjs/rpx'\nimport os from 'node:os'\nimport path from 'node:path'\n\nconst config: ProxyOptions = {\n  from: 'localhost:5173',\n  to: 'rpx.localhost',\n\n  https: {\n    domain: 'rpx.localhost',\n    hostCertCN: 'rpx.localhost',\n    caCertPath: path.join(os.homedir(), '.stacks', 'ssl', `rpx.localhost.ca.crt`),\n    certPath: path.join(os.homedir(), '.stacks', 'ssl', `rpx.localhost.crt`),\n    keyPath: path.join(os.homedir(), '.stacks', 'ssl', `rpx.localhost.crt.key`),\n    altNameIPs: ['127.0.0.1'],\n    altNameURIs: ['localhost'],\n    organizationName: 'stacksjs.org',\n    countryName: 'US',\n    stateName: 'California',\n    localityName: 'Playa Vista',\n    commonName: 'rpx.localhost',\n    validityDays: 180,\n    verbose: false,\n  },\n\n  verbose: false,\n}\n\nexport default config\n```\n\n_Then run:_\n\n```bash\n./rpx start\n```\n\nTo learn more, head over to the [documentation](https://reverse-proxy.sh/).\n\n## Testing\n\n```bash\nbun test\n```\n\n## Troubleshooting\n\n### SSL Certificate Issues\n\nIf you're experiencing SSL certificate issues when using RPX (like \"Your connection is not private\" browser warnings):\n\n1. **Automatic Certificate Trust**:\n   RPX automatically attempts to trust certificates during setup with a single password prompt. This works for most users.\n\n2. **Use the certificate fix utility**:\n   If you still see certificate warnings, run our automated certificate fixer:\n\n   ```bash\n   bun scripts/fix-certs.js\n   ```\n\n   This script will:\n   - Detect your operating system\n   - Find all RPX certificates\n   - Install them to the appropriate system trust stores\n   - Provide browser-specific instructions\n\n3. **Browser Workaround**:\n   - **Chrome/Edge/Arc**: Type `thisisunsafe` on the warning page (you won't see what you're typing)\n   - **Firefox**: Click \"Advanced\" then \"Accept the Risk and Continue\"\n   - **Safari**: Click \"Show Details\", then \"visit this website\"\n\n\u003e **Note**: After trusting certificates, restart your browser for changes to take effect.\n\n## Changelog\n\nPlease see our [releases](https://github.com/stacksjs/stacks/releases) page for more information on what has changed recently.\n\n## Contributing\n\nPlease review the [Contributing Guide](https://github.com/stacksjs/contributing) for details.\n\n## Community\n\nFor help, discussion about best practices, or any other conversation that would benefit from being searchable:\n\n[Discussions on GitHub](https://github.com/stacksjs/stacks/discussions)\n\nFor casual chit-chat with others using this package:\n\n[Join the Stacks Discord Server](https://discord.gg/stacksjs)\n\n## Postcardware\n\n\"Software that is free, but hopes for a postcard.\" We love receiving postcards from around the world showing where `rpx` is being used! We showcase them on our website too.\n\nOur address: Stacks.js, 12665 Village Ln #2306, Playa Vista, CA 90094, United States 🌎\n\n## Sponsors\n\nWe would like to extend our thanks to the following sponsors for funding Stacks development. If you are interested in becoming a sponsor, please reach out to us.\n\n- [JetBrains](https://www.jetbrains.com/)\n- [The Solana Foundation](https://solana.com/)\n\n## Credits\n\n- [Chris Breuer](https://github.com/chrisbbreuer)\n- [All Contributors](../../contributors)\n\n## License\n\nThe MIT License (MIT). Please see [LICENSE](https://github.com/stacksjs/stacks/tree/main/LICENSE.md) for more information.\n\nMade with 💙\n\n\u003c!-- Badges --\u003e\n[npm-version-src]: https://img.shields.io/npm/v/@stacksjs/rpx?style=flat-square\n[npm-version-href]: https://npmjs.com/package/@stacksjs/rpx\n[github-actions-src]: https://img.shields.io/github/actions/workflow/status/stacksjs/rpx/ci.yml?style=flat-square\u0026branch=main\n[github-actions-href]: https://github.com/stacksjs/rpx/actions?query=workflow%3Aci\n\n\u003c!-- [codecov-src]: https://img.shields.io/codecov/c/gh/stacksjs/rpx/main?style=flat-square\n[codecov-href]: https://codecov.io/gh/stacksjs/rpx --\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksjs%2Frpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstacksjs%2Frpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstacksjs%2Frpx/lists"}