{"id":22425767,"url":"https://github.com/fajarnugraha37/node-forwarder","last_synced_at":"2026-04-13T23:32:09.682Z","repository":{"id":261260873,"uuid":"883693768","full_name":"fajarnugraha37/node-forwarder","owner":"fajarnugraha37","description":"[WIP] Node Forwarder A simple, Request forwarder built with Node.js. It includes features like caching, rate limiting, blacklisting, whitelisting, etc.","archived":false,"fork":false,"pushed_at":"2024-11-06T17:18:36.000Z","size":336,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T06:16:02.527Z","etag":null,"topics":["forward-proxy","forwarder","http","https","node","nodejs","typescript"],"latest_commit_sha":null,"homepage":"","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/fajarnugraha37.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,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-11-05T12:14:40.000Z","updated_at":"2024-11-06T17:18:39.000Z","dependencies_parsed_at":"2024-11-05T16:18:56.920Z","dependency_job_id":"8e9b856b-7b56-46e5-b5f7-1b7404b7a6f2","html_url":"https://github.com/fajarnugraha37/node-forwarder","commit_stats":null,"previous_names":["fajarnugraha37/node-forwarder"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fajarnugraha37/node-forwarder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fnode-forwarder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fnode-forwarder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fnode-forwarder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fnode-forwarder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fajarnugraha37","download_url":"https://codeload.github.com/fajarnugraha37/node-forwarder/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fajarnugraha37%2Fnode-forwarder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31775754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T20:17:16.280Z","status":"ssl_error","status_checked_at":"2026-04-13T20:17:08.216Z","response_time":93,"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":["forward-proxy","forwarder","http","https","node","nodejs","typescript"],"created_at":"2024-12-05T19:15:17.046Z","updated_at":"2026-04-13T23:32:09.665Z","avatar_url":"https://github.com/fajarnugraha37.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n  \u003ca href=\"https://github.com/fajarnugraha37/node-forwarder\"\u003e\n    \u003cpicture\u003e\n      \u003cimg height=\"500\" alt=\"node-forwarder\" src=\"https://raw.githubusercontent.com/fajarnugraha37/node-forwarder/refs/heads/main/docs/logo.webp\"\u003e\n    \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/h1\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003e\u003cb\u003eNode Forwarder\u003c/b\u003e A simple, Request forwarder built with Node.js. It includes features like caching, rate limiting, blacklisting, whitelisting, etc. Designed for ease of use, and flexible.\n    \u003c/em\u003e\n\u003c/p\u003e\n\n---\n## ⚠️ **Attention**\n\nThis project, is currently under development and is not yet ready for use.\n\n## Roadmap\n\n- Protocol Support:\n    - [X]  HTTP\n    - [X]  HTTPS  \n    - [ ]  Websocket\n- Configuration support:\n    - [X]  Dot Env file\n    - [X]  JSON file\n    - [ ]  YAML file\n- Middleware Support:\n    - [X]  Custom middleware when request comes (HTTP \u0026 HTTPS)\n    - [X]  Custom middleware when response from remote server comes (HTTP \u0026 HTTPS)\n    - [X]  Middleware when request CONNECT from client (HTTPS only)\n- Rate Limiting Support: \n    - [ ]  By IP Address\n    - [ ]  By Target Host\n    - [ ]  By Path/URL\n- Whitelisting Support:\n    - [ ]  By IP Address\n    - [ ]  By Target Host\n- Blacklisting Support:\n    - [ ]  By IP Address\n    - [ ]  By Target Host\n- Caching Support: \n    - [ ]  TTL for expiration.\n    - [ ]  In-memory adapter\n    - [ ]  Disk adapter\n    - [ ]  Custom adapter \n    - [ ]  Automatic Cache Cleanup\n    - [ ]  Compression support\n    - [ ]  Pre-fetch scheduling\n    - [ ]  Cache invalidation based on URL patterns/cache-control headers\n- Monitoring support:\n    - [X]  logging\n    - [ ]  Trace Header\n    - [ ]  Shadowing Request\n- Authentication Support:\n    - [X]  Proxy auth\n    - [ ]  API key\n    - [ ]  JWT\n    - [ ]  OAuth\n- Optimization:\n    - [ ]  Request Throttling\n    - [ ]  Retry Mechanism\n    - [ ]  Content-Length Limit\n    - [ ]  Request Timeout\n- Deployment support:\n    - [ ]  Docker\n    - [ ]  Kubernetes\n- Admin Dashboard:\n    - [ ]  Admin dashboard\n    - [ ]  Maintenance Mode\n    - [ ]  Dynamic configuration\n    - [ ]  Customize error messages\n\n## Demo\n\n## Request Flow\n\n### HTTP\nThe browser uses plain HTTP (i.e. no TLS). Both forwarding proxies and TLS termination proxies work the same way in this case. \nLet's assume we've typed http://www.yahoo.com into the browser. Let's forget that we get a 302 redirect in the real world and assume that yahoo.com is available over HTTP.\nThe browser makes a TCP connection to the proxy (SYN-SYNACK-ACK) and then sends a GET request to the targeted server:\n\n\u003cimg height=\"500\" alt=\"http-flow\" src=\"https://raw.githubusercontent.com/fajarnugraha37/node-forwarder/refs/heads/main/docs/http-flow.png\"\u003e\n\n### HTTPS\n\n#### Original HTTPS Flow on Proxy:\n\n\u003cimg height=\"1000\" alt=\"https-original-flow.png\" src=\"https://raw.githubusercontent.com/fajarnugraha37/node-forwarder/refs/heads/main/docs/https-original-flow.png\"\u003e\n\n#### HTTPS Flow implemented with TLS Termination: \n\n\u003cimg height=\"1000\" alt=\"https-flow\" src=\"https://raw.githubusercontent.com/fajarnugraha37/node-forwarder/refs/heads/main/docs/https-flow.png\"\u003e\n\n**NOTE:** This approach is used so that the proxy can read packets sent from the client to the target server with the aim that the proxy can manipulate the packet and implement several features. It should be underlined that this approach has security concerns, **make sure you understand it before using it**.\n\n## Quick Start\n\n### Prerequisites\n- Node v18.17.0+\n- NPM 9.6.7+\n\n### Installation\n1. SL/TLS Setup: Generate your SSL certificate and key files (for HTTPS requests). For development, you can create a self-signed certificate:\n```bash\n$ openssl req -x509 -sha256 -nodes -newkey rsa:2048 -days 365 -keyout ./cert/localhost.key -out ./cert/localhost.crt\n```\n2. rename \".env.example\" to \".env\" and adjust its contents to your environment:\n```.env\nCONFIG_TYPE=json\nCONFIG_PATH=.env.json\nNODE_ENV=local\n```\n3. rename \".env.example.json\" to \".env.json\" and adjust its contents to your desired configuration:\n```json\n{\n    \"port\": 9292,\n    \"host\": \"0.0.0.0\",\n    \"ssl\": {\n        \"certPath\": \"cert/localhost.crt\",\n        \"keyPath\": \"cert/localhost.key\"\n    },\n    \"auth\":{ \n        \"type\": \"none\"\n    }\n}\n```\n4. Clone the repository:\n```bash\n$ git clone git@github.com:fajarnugraha37/node-forwarder.git\n$ cd ./node-forwarder/backend\n```\n5. Install dependencies:\n```bash\n$ pnpm install\n```\n6. create main file and initiate application as below:\n```typescript\nimport { configServer, RequestForwarderServer } from './lib';\n\nmain();\nasync function main() {\n    const requestForwarder = new RequestForwarderServer(configServer.get());\n    process.addListener('SIGINT', () =\u003e requestForwarder.stop());\n    process.addListener('SIGTERM', () =\u003e requestForwarder.stop());\n\n    await requestForwarder.start();\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffajarnugraha37%2Fnode-forwarder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffajarnugraha37%2Fnode-forwarder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffajarnugraha37%2Fnode-forwarder/lists"}