{"id":20635700,"url":"https://github.com/rokid/node-http-bypass","last_synced_at":"2025-04-15T21:25:34.810Z","repository":{"id":57268079,"uuid":"128387478","full_name":"rokid/node-http-bypass","owner":"rokid","description":"Bypass your HTTP/HTTPS backend service configrablly in an easy way.","archived":false,"fork":false,"pushed_at":"2018-04-07T10:47:22.000Z","size":12,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-29T01:34:13.415Z","etag":null,"topics":["bypass","http","nodejs"],"latest_commit_sha":null,"homepage":null,"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/rokid.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}},"created_at":"2018-04-06T11:41:17.000Z","updated_at":"2018-12-12T10:02:33.000Z","dependencies_parsed_at":"2022-09-02T02:50:15.582Z","dependency_job_id":null,"html_url":"https://github.com/rokid/node-http-bypass","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokid%2Fnode-http-bypass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokid%2Fnode-http-bypass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokid%2Fnode-http-bypass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rokid%2Fnode-http-bypass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rokid","download_url":"https://codeload.github.com/rokid/node-http-bypass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248596786,"owners_count":21130765,"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":["bypass","http","nodejs"],"created_at":"2024-11-16T15:06:37.729Z","updated_at":"2025-04-15T21:25:34.787Z","avatar_url":"https://github.com/rokid.png","language":"JavaScript","readme":"node-http-bypass\n========================\n\nBypass your HTTP/HTTPS backend service configrablly in an easy way.\n\n### Usecase\n\nWe use this tool to develop our new forum project without any changes on server-side, which is based on\nthe discourse API, the CORS-required website.\n\nCORS sometimes take you in a trap, and block your development flow, Yep? With node-http-bypass, \nyou could customize anything that you wanna without changes on your server-side, just start\nwriting code and put the CORS configurations after the demo is ready for production!\n\n\u003e Your usecase? [create Pull Request](https://github.com/Rokid/node-http-bypass/compare) to submit :p\n\n### Usage\n\nYou need to define the following JSON under your working directory:\n\n```json\n{\n  \"listen\": 8888,\n  \"targetURL\": \"https://github.com\",\n  \"outgoing\": {\n    \"access-control-allow-headers\": \"+Content-Type\"\n  }\n}\n```\n\nThis JSON should be named as `.bypassconfig` and under your `CWD`. Run `bypass` or `http-bypass` in your shell,\nthe program reads this config file, and do the followings:\n\n- start the proxy server on `listen` as its port.\n- when requesting to proxy server, it do request based on the `targetURL`.\n- when the target responds to proxy server finally, it rewrites the headers by the field `outgoing`.\n  - for the `+s` rule, it inserts the given string to the header.\n  - for the `s`(string) rule, it replaces the whole value of the specific header.\n\n*Wanna an API to integrate?*\n\nYes, it also provides programming interface for doing what you want. Just like the following:\n\n```js\nconst ByPassServer = require('http-bypass').ByPassServer\nconst proxy = new ByPassServer({\n  listen: 8000,\n  targetURL: 'https://github.com',\n  outgoing: {},\n})\nproxy.start()\n```\n\nThe `config` object structure follows the `.bypassconfig`, so just see [Usage](#usage) for details.\n\n### Installation\n\n```sh\n$ npm i node-http-bypass -g\n```\n\n### License\n\nMIT @ Rokid, Inc.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frokid%2Fnode-http-bypass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frokid%2Fnode-http-bypass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frokid%2Fnode-http-bypass/lists"}