{"id":28455027,"url":"https://github.com/luna-devv/proxy","last_synced_at":"2025-06-28T16:32:33.267Z","repository":{"id":44639154,"uuid":"450531032","full_name":"Luna-devv/proxy","owner":"Luna-devv","description":"My proxymanager for my server","archived":false,"fork":false,"pushed_at":"2023-04-20T15:28:03.000Z","size":57,"stargazers_count":9,"open_issues_count":0,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-28T10:31:01.459Z","etag":null,"topics":["http-proxy","javascript","nodejs","proxy","proxy-server"],"latest_commit_sha":null,"homepage":"https://github.com/Luna-devv/proxy/wiki/2.-Edit-Host-Entries","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/Luna-devv.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}},"created_at":"2022-01-21T14:53:04.000Z","updated_at":"2025-03-30T12:55:18.000Z","dependencies_parsed_at":"2023-01-20T08:32:26.459Z","dependency_job_id":null,"html_url":"https://github.com/Luna-devv/proxy","commit_stats":null,"previous_names":[],"tags_count":5,"template":true,"template_full_name":null,"purl":"pkg:github/Luna-devv/proxy","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luna-devv%2Fproxy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luna-devv%2Fproxy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luna-devv%2Fproxy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luna-devv%2Fproxy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Luna-devv","download_url":"https://codeload.github.com/Luna-devv/proxy/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Luna-devv%2Fproxy/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262460263,"owners_count":23314701,"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":["http-proxy","javascript","nodejs","proxy","proxy-server"],"created_at":"2025-06-06T21:14:46.569Z","updated_at":"2025-06-28T16:32:33.262Z","avatar_url":"https://github.com/Luna-devv.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eP R O X Y\u003c/h1\u003e\n\n[![](https://img.shields.io/discord/828676951023550495?color=5865F2\u0026logo=discord\u0026logoColor=white)](https://lunish.nl/support)\n![](https://img.shields.io/github/downloads/Luna-devv/proxy/total)\n\nBasic proxy script written in [node.js](https://nodejs.org) using [node:http](https://nodejs.org/api/http.html) and [node-http-proxy](https://github.com/http-party/node-http-proxy). \u003cbr /\u003e\nThis script was originally written from [@flamexdev](https://github.com/flamexdev/proxy) and was improved and re-written into [TypeScript](https://www.typescriptlang.org/) by me. \u003cbr\u003e\nA full walk trough can be found on [this GitHub's Wiki](https://github.com/Luna-devv/proxy/wiki).\n\n## Setup\n1. Clone this repository using `git clone https://github.com/Luna-devv/proxy`\n2. Adapt the [`src/hosts.ts`](https://github.com/Luna-devv/proxy/blob/main/src/hosts.ts) to your needs and webservers\n3. Install all external dependencies using `npm install` or `yarn install`\n4. Compile the code using `npx tsc` \n5. Run the script with [PM2](https://pm2.keymetrics.io/) `pm2 start dist/app.js --name proxy`\n\n## Modify records\nExample object for proxing a webserver:\n```ts\n{\n    \"proxy.local\": {\n        target: 3000,\n        type: \"WEB\"\n    }\n}\n```\n### key (\"proxy.local\")\nThis value can only be a [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), this key is required. \u003cbr /\u003e\nThis will be the subdomain (`subdomain.proxy.local`) or the domain (`proxy.local`) that will be managed.\n\n### target\nThis value can only be a [String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String), this key is required. \u003cbr /\u003e\n  - (using `\"WEB\"` or `\"WS\"`): This is the port on which your webserver runs. Please note that this musst run on the same server as this proxy script.\n  - (using `\"REDIRECT\"`): This is the domain/IP the proxy script will redirect to. Note that this can be any domain, it must include the protocal (i.e. `\"https://lunish.nl/luna\"`)\n\n### type\nThis value can only be `WEB`, `WS` or `REDIRECT`, this key is required. \u003cbr /\u003e\nThere are 3 essential types:\n  - `\"WEB\"`: You will use this if you want that for example the content of the page `123.456.789:4000` should be displayed on `api.waya.one`.\n  - `\"WS\"`: You will use this if you have a (server) websocket and you want i.e. to forward it from `123.456.789:4000` to `api.waya.one`.\n  - `\"REDIRECT\"`: YOu will use this if you want to redirect the user to another page, this requires setting `target` to a string.\n\n## Anything else\n**Please read the wiki at https://github.com/Luna-devv/proxy/wiki**\n\n## Any questions left?\nFeel free to open a issue, send me an [E-Mail](mailto:luna@waya.one) or [join](https://lunish.nl/support) my Discord server.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluna-devv%2Fproxy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fluna-devv%2Fproxy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fluna-devv%2Fproxy/lists"}