{"_id":"@argus-inc/simple-reverse-proxy","_rev":"2-5f94ec78b10d6a1ceef4814b11f17f1c","name":"@argus-inc/simple-reverse-proxy","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.1":{"name":"@argus-inc/simple-reverse-proxy","version":"0.0.1","main":"lib/SimpleReverseProxy.js","types":"lib/SimpleReverseProxy.d.ts","author":{"name":"Burlet Mederic","email":"mederic.burlet@gmail.com","url":"https://github.com/crimson-med/"},"license":"GPL-3-0-only","private":false,"bin":{"simple-reverse-proxy":"lib/Cli.js"},"devDependencies":{"@types/cors":"^2.8.12","@types/express":"^4.17.13","@types/http-proxy":"^1.17.7","@types/morgan":"^1.9.3","@types/node":"^16.7.9","@types/yargs":"^17.0.3","ts-node":"^10.2.1","typescript":"^4.4.2"},"dependencies":{"cors":"^2.8.5","express":"^4.17.1","http-proxy":"^1.18.1","morgan":"^1.10.0","yargs":"^17.2.1"},"keywords":["node","proxy","reverse","hacking","cyber","security","reverse proxy"],"scripts":{"dev":"ts-node src/index.ts","build":"tsc","prepare":"yarn build","tes":"ts-node test/index.ts","version":"git add -A src","postversion":"git push && git push --tags","patch":"npm version patch && npm publish --access public"},"gitHead":"d156b0aff7ffb3994857eb0b90e98c4c9fef1ebf","description":"This library makes it easy to configure multiple reverse proxies with a single config file. The goal is to also make the library programmable so it can be used in code.","_id":"@argus-inc/simple-reverse-proxy@0.0.1","_nodeVersion":"14.17.4","_npmVersion":"6.14.14","dist":{"integrity":"sha512-q1IQC4Ndc2jaEpZQO0KwtqAm7+BQKt/sOt3NbaEMk4NXqZy55Spl0WXg3WzqvtYX2Q4Py+SSLRYDnEWaJzc6ZQ==","shasum":"bd2a3c3a0c419509de351cf466b3c4b5fe864086","tarball":"https://registry.npmjs.org/@argus-inc/simple-reverse-proxy/-/simple-reverse-proxy-0.0.1.tgz","fileCount":10,"unpackedSize":15100,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhzF2FCRA9TVsSAnZWagAAocEQAIF1EANEdwgOGQDWu51p\nuNI8i/a0QVejxq1rb2+e/mX5iHcqVV4OqjTwYwOkp3kAbm/sV13Ujr6U9sg5\nXJdDQtJL3BoTBl3Q/rqTU0IuD08WO4tWb7b4KScn3QwhcIDBH8FqoPDKsein\nfx/cc9G8MLmAXFNhw4fdH3p+83EnM6wW7ujiQ2enArjv+U0zn4ltysh6/E0y\nhhxpSX3haelJfp92/bvYnXkT8owWDo3uId+T7Swt73gdiR/6chO5U5AZln6D\ny2OVXOKi6dxulayk7TGBncbsAgO6IiZXoQgSLk/KsanuCLEEzfjib/mIMjYI\nrCEilsIxdvA3LCLpwtFYoQxde8DJlFtE9Lls+qz/FHx5yIQ1E+HwisjgE7Ds\n8PCeIC1jYheXAlxA3/FwT81nPjEzK+aAdmrwNoNN93qRjPYnK4j63yB7iUyI\nj0H9zxim2Q8RUj/Z2iAHfr6VrAFFER2lt/212UFGZaHAdwZ2WDirROAaBakt\nOlPy3ZJQKgT+Cq77tNTamSCi/Cea1T7O5kSzFNt7NJd92pUeOiLMXPYsctDi\nb6KBsCAdN0N5PlgFnHYqtNDH8t7LbRu9hHgUKYfXXEzI6U9Wc9Ylcu6SDGhI\nFCPZQx5/DkOXT7zg84R67ctf1SzsBqqTggK6hfYrWf7lPhblGeiLO11mTbkQ\nnmqv\r\n=gKvJ\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCN0U1jEoInc/mAmY/wswxS4rABVgyKWGW95DrVdGdzpQIhAKfM+8v2pOxtcgeIED/b+Rl5QdPeE3yTgFsnoANg3Pe1"}]},"_npmUser":{"name":"crimson-med","email":"mederic.burlet@gmail.com"},"directories":{},"maintainers":[{"name":"crimson-med","email":"mederic.burlet@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/simple-reverse-proxy_0.0.1_1633696726327_0.476357828940297"},"_hasShrinkwrap":false}},"time":{"created":"2021-10-08T12:38:46.255Z","0.0.1":"2021-10-08T12:38:46.472Z","modified":"2022-04-04T15:24:37.166Z"},"maintainers":[{"name":"crimson-med","email":"mederic.burlet@gmail.com"}],"description":"This library makes it easy to configure multiple reverse proxies with a single config file. The goal is to also make the library programmable so it can be used in code.","keywords":["node","proxy","reverse","hacking","cyber","security","reverse proxy"],"author":{"name":"Burlet Mederic","email":"mederic.burlet@gmail.com","url":"https://github.com/crimson-med/"},"license":"GPL-3-0-only","readme":"# Simple Reverse Proxy\n\nThis library makes it easy to configure multiple reverse proxies with a single config file.\nThe goal is to also make the library programmable so it can be used in code.\n\n---\n\n## Installation\n\nYou can install it globally with the following:\n\n```\nyarn global add @argus-inc/simple-reverse-proxy\n```\n\nYou can also install it in a project with the following:\n\n```\nyarn add @argus-inc/simple-reverse-proxy\n```\n\n---\n\n## Running\n\nTo run `simple-reverse-proxy` you can do the following globally:\n\n```\nsimple-reverse-proxy --config=\"./myconfig.json\"\n```\n\nIf you are in a project you can simply do the following:\n\n```\nyarn simple-reverse-proxy\n```\n\n**The default file loaded is `srp.json` at the root of the project.**\n\n---\n\n## Configuration \n\nHere is a configuration example: \n\n\n```json\n{\n    \"port\": 8070,\n    \"hostname\": \"proxy.myapp.com\",\n    \"hasSSL\": false,\n    \"environment\": \"local\",\n    \"servers\": [\n        {\n            \"route\": \"/test/*\",\n            \"destination\": \"http://localhost:8000\"\n        }\n    ]\n}\n```\n\nGeneric configuration:\n\n- `port`: This is the port the proxy should run on.\n- `hostname`: This is used if the `environment` is set to live. It is the hostname the proxy will be called.\n- `hasSSL`: If SSL should be used. If this is set to true then you will need to specify: `pathCertificate, pathPrivateKey`.\n- `environment`: Sets the current environment. This means for local the hostname will be ignored.\n- `servers`: An array of server configurations.\n\nServer configuration: \n\n- `route`: The proxy route that should be called for redirection\n- `destination`: The destination of the traffic\n\nExample: \n\n```json\n{\n    \"route\": \"/test/*\",\n    \"destination\": \"http://localhost:8000\"\n}\n```\n\nThis will redirect for instance the request: \n\nRQ: GET http://127.0.0.1:8070/test/random\nFW: GET http://localhost:8000/test/random\n\n---\n\n## Development\n\nFor development the few things to know are:\n\n- Types go in the `src/types.ts` file.\n- Interfaces, Classes, Enums comm capitalized for instance: `MyClass, ConfigType, MyCoolEnum`\n- Function names and variables come non first character capitalized for instance: `myFunctionIsCool, myAwesomeUserVariable`\n\nMake sure to comment your code.\n\nFor stesting locally there is a test server in `test/index.ts`\n\nIt can be started with the following command:\n\n```\nyarn tes\n```\n\nFor starting the dev environement you can use: \n\n```\nyarn dev\n```\n\n---\n\n## Contributions\n\nPRs are welcome to contribute to the project especially the ones tagged: `hacktoberfest`\n\nPlease follow the following standard for commits:\n\n:emoji: action(namespace): Details\n\nExamples:\n\n🚀 deploy(package): Updating package.json configuration for deployment\n🐛 fix(child-manager): Fix buffer overflow issue\n\nMore info for gitmoji here https://gitmoji.dev/\n\n---\n\n## Bugs & Issues\n\nPlease follow the creating an issue template for any bugs or problems\n\n---\n\n## Author\n\nBurlet Mederic mederic.burlet@gmail.com\n\nhttps://medericburlet.com\n\nhttps://mederic.me","readmeFilename":"README.md"}