{"id":35008062,"url":"https://github.com/christianfurr/ultimate-vhost","last_synced_at":"2026-05-22T03:32:02.680Z","repository":{"id":289030334,"uuid":"969364527","full_name":"christianfurr/ultimate-vhost","owner":"christianfurr","description":"A dynamic reverse proxy server with route management, analytics, and logging, built with Node.js, Express, and Prisma.","archived":false,"fork":false,"pushed_at":"2025-04-23T05:14:39.000Z","size":67,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-19T21:22:01.587Z","etag":null,"topics":["home-s","homeser","node","prisma","reverseproxy","routing","vhost"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/christianfurr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-04-20T01:21:11.000Z","updated_at":"2025-04-23T05:15:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"917f1b06-a33c-4ec6-b8e7-0207b64bd52e","html_url":"https://github.com/christianfurr/ultimate-vhost","commit_stats":null,"previous_names":["makashidev/ultimate-vhost","christianfurr/ultimate-vhost"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/christianfurr/ultimate-vhost","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianfurr%2Fultimate-vhost","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianfurr%2Fultimate-vhost/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianfurr%2Fultimate-vhost/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianfurr%2Fultimate-vhost/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/christianfurr","download_url":"https://codeload.github.com/christianfurr/ultimate-vhost/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/christianfurr%2Fultimate-vhost/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33327400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["home-s","homeser","node","prisma","reverseproxy","routing","vhost"],"created_at":"2025-12-27T04:54:38.839Z","updated_at":"2026-05-22T03:32:02.675Z","avatar_url":"https://github.com/christianfurr.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./frontend/public/logo.svg\" alt=\"Logo\" width=\"400\" /\u003e\n\n# ultimate vhost\n\nA dynamic reverse proxy server with route management, analytics, and logging, built with Node.js, Express, and Prisma.\n\n## Project Purpose\nThis project provides a flexible reverse proxy server that allows dynamic management of hostname-to-target URL routes via a REST API. It features real-time server analytics, request/response logging, and persistent route storage using SQLite and Prisma ORM.\n\n## Technology Stack\n- **Node.js**: JavaScript runtime\n- **Express (ultimate-express)**: Web server framework\n- **express-http-proxy**: Proxy middleware\n- **Prisma**: ORM for database management\n- **SQLite**: Lightweight database\n- **systeminformation**: Server analytics\n\n## Features\n- Dynamic proxy routing based on hostname\n- RESTful API for managing routes (add, edit, delete, list)\n- Real-time server analytics (CPU, memory, network, disk)\n- In-memory and console logging for requests, responses, and errors\n- CORS enabled for API endpoints\n- Secure route management (restricted to localhost)\n\n## Setup Instructions\n1. **Install dependencies**\n   ```bash\n   cd server\n   npm install\n   ```\n2. **Set up the database**\n   - The database is configured as SQLite (`server/prisma/schema.prisma`).\n   - To initialize the database, run:\n     ```bash\n     npx prisma migrate dev --name init\n     ```\n3. **Start the server**\n   ```bash\n   node index.js\n   ```\n\n## Usage\n- The server listens for HTTP requests and proxies them based on the hostname.\n- Manage routes via the following API endpoints (localhost only):\n  - `POST /api/routes` — Add a new route `{ hostname, targetUrl }`\n  - `GET /api/routes` — List all routes\n  - `PUT /api/routes/:id` — Edit a route\n  - `DELETE /api/routes/:id` — Delete a route\n- All API requests must be made from `localhost` for security.\n\n## Route Management Example\n```bash\n# Add a route\ncurl -X POST http://localhost:PORT/api/routes -H 'Content-Type: application/json' -d '{\"hostname\":\"example.com\",\"targetUrl\":\"http://localhost:3000\"}'\n\n# List routes\ncurl http://localhost:PORT/api/routes\n\n# Edit a route\ncurl -X PUT http://localhost:PORT/api/routes/1 -H 'Content-Type: application/json' -d '{\"hostname\":\"new.com\",\"targetUrl\":\"http://localhost:4000\"}'\n\n# Delete a route\ncurl -X DELETE http://localhost:PORT/api/routes/1\n```\n\n## Analytics \u0026 Logging\n- Server analytics are available via `/api/analytics` and `/api/server-stats` endpoints.\n- Logs are stored in memory (up to 100 entries) and printed to the console.\n- Each request and proxy event is logged with a unique request ID.\n\n## Database Schema\nSee `server/prisma/schema.prisma`:\n```\nmodel Route {\n  id          Int      @id @default(autoincrement())\n  hostname    String   @unique\n  targetUrl   String\n  createdAt   DateTime @default(now())\n  updatedAt   DateTime @updatedAt\n}\n```\n\n## Contributing\nPull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.\n\n## License\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianfurr%2Fultimate-vhost","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchristianfurr%2Fultimate-vhost","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchristianfurr%2Fultimate-vhost/lists"}