{"id":28383569,"url":"https://github.com/moderniselife/domainbridge","last_synced_at":"2026-02-28T18:32:50.572Z","repository":{"id":291697968,"uuid":"978491660","full_name":"moderniselife/DomainBridge","owner":"moderniselife","description":"A lightning-fast local domain proxy for developers","archived":false,"fork":false,"pushed_at":"2025-05-06T04:28:54.000Z","size":40,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-07T03:10:50.524Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/moderniselife.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,"zenodo":null}},"created_at":"2025-05-06T04:25:55.000Z","updated_at":"2025-05-06T04:28:57.000Z","dependencies_parsed_at":null,"dependency_job_id":"6bf43d13-fffd-4f8e-96ae-62dc5abf504e","html_url":"https://github.com/moderniselife/DomainBridge","commit_stats":null,"previous_names":["moderniselife/domainbridge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/moderniselife/DomainBridge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moderniselife%2FDomainBridge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moderniselife%2FDomainBridge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moderniselife%2FDomainBridge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moderniselife%2FDomainBridge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moderniselife","download_url":"https://codeload.github.com/moderniselife/DomainBridge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moderniselife%2FDomainBridge/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29946777,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:21:26.597Z","status":"ssl_error","status_checked_at":"2026-02-28T18:19:38.892Z","response_time":90,"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":[],"created_at":"2025-05-30T06:11:49.361Z","updated_at":"2026-02-28T18:32:50.535Z","avatar_url":"https://github.com/moderniselife.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DomainBridge\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"./assets/logo.webp\" alt=\"DomainBridge Logo\" height=\"400\"\u003e\n  \u003ch3\u003eA lightning-fast local domain proxy for developers\u003c/h3\u003e\n\u003c/div\u003e\n\n## 🚀 Overview\n\nDomainBridge is a powerful yet simple HTTP proxy tool designed for developers who need to map custom domains to local services. It's perfect for testing applications that rely on specific domain names, API endpoints, or complex URL structures.\n\nBuilt with [Bun](https://bun.sh) for maximum performance and minimal overhead.\n\n## ✨ Features\n\n- **Custom Domain Mapping**: Map any domain name to your local services\n- **Path Rewriting**: Redirect requests to specific base paths on your target server\n- **Automatic Hosts Configuration**: Optionally update your `/etc/hosts` file automatically\n- **Fast \u0026 Lightweight**: Built on Bun's native HTTP capabilities for minimal overhead\n- **Dry Run Mode**: Test your configuration without making actual changes\n- **Simple CLI Interface**: Easy-to-use command line interface\n\n## 📦 Installation\n\n### Prerequisites\n\n- [Bun](https://bun.sh) v1.2.10 or higher\n\n### Quick Install\n\n```bash\n# Clone the repository\ngit clone https://github.com/moderniselife/domainbridge.git\ncd domainbridge\n\n# Install dependencies\nbun install\n\n# Build and install globally (optional)\nbun run build\nsudo bun run mkglobal\n```\n\n## 🔧 Usage\n\n### Basic Example\n\nMap `myapp.local` to a local server running on port 3000:\n\n```bash\nbun run index.ts --domain myapp.local --proxy-target http://localhost:3000 --rewrite-base /\n```\n\n### With Hosts File Update\n\nAutomatically add the domain to your `/etc/hosts` file:\n\n```bash\nsudo bun run index.ts --domain api.myapp.local --proxy-target http://localhost:8080 --rewrite-base /api --add-to-hosts\n```\n\n### API Forwarding Example\n\nForward all requests from `api.local` to a specific API endpoint:\n\n```bash\nbun run index.ts --domain api.local --proxy-target http://localhost:4000 --rewrite-base /v1/api\n```\n\nThis will map:\n\n- `http://api.local/users` → `http://localhost:4000/v1/api/users`\n- `http://api.local/products?id=123` → `http://localhost:4000/v1/api/products?id=123`\n\n### Global Installation\n\nIf you've installed the tool globally:\n\n```bash\nlocal-proxy --domain myapp.local --proxy-target http://localhost:3000 --rewrite-base /\n```\n\n## 📋 Command Line Options\n\n| Option           | Alias | Description                                                     | Required | Default |\n| ---------------- | ----- | --------------------------------------------------------------- | -------- | ------- |\n| `--domain`       | `-d`  | Local domain name to map (e.g. \"my-app\")                        | Yes      | -       |\n| `--proxy-target` | `-t`  | Target base URL (e.g. \"http://localhost:5001\")                  | Yes      | -       |\n| `--rewrite-base` | `-r`  | Base path on target to forward requests to (e.g. \"/api/render\") | Yes      | -       |\n| `--port`         | `-p`  | Port to run proxy on                                            | No       | 80      |\n| `--add-to-hosts` | `-a`  | Add domain to /etc/hosts as 127.0.0.1                           | No       | false   |\n| `--dry-run`      | -     | Print actions without executing                                 | No       | false   |\n| `--help`         | -     | Show help                                                       | No       | -       |\n\n## 🛠️ Development\n\n### Building from Source\n\n```bash\n# Build a standalone executable\nbun run build\n\n# The executable will be created as 'local-proxy' in the project directory\n```\n\n### Project Structure\n\n- `index.ts` - Main application code\n- `package.json` - Project configuration and dependencies\n\n## 📝 License\n\n[MIT](LICENSE)\n\n## 🤝 Contributing\n\nContributions, issues, and feature requests are welcome! Feel free to check the [issues page](https://github.com/moderniselife/domainbridge/issues).\n\n1. Fork the project\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n---\n\n\u003cdiv align=\"center\"\u003e\n  \u003cp\u003eBuilt with ❤️ using \u003ca href=\"https://bun.sh\"\u003eBun\u003c/a\u003e\u003c/p\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderniselife%2Fdomainbridge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoderniselife%2Fdomainbridge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoderniselife%2Fdomainbridge/lists"}