Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/devside/tiny-reverse-proxy
Single command line proxy for HTTP and Websocket requests
https://github.com/devside/tiny-reverse-proxy
Last synced: 24 days ago
JSON representation
Single command line proxy for HTTP and Websocket requests
- Host: GitHub
- URL: https://github.com/devside/tiny-reverse-proxy
- Owner: DevSide
- Created: 2019-09-09T00:23:39.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-10T06:24:51.000Z (almost 2 years ago)
- Last Synced: 2024-10-10T07:31:01.961Z (28 days ago)
- Language: JavaScript
- Homepage:
- Size: 2.03 MB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# tiny-reverse-proxy
It is a single command line HTTP and Websocket proxy built on top of node-http-proxy.
## Install
Install with `npm`:
```bash
npm install --save-dev --save-exact tiny-reverse-proxy
# or globally
npm install --global tiny-reverse-proxy
```Install with `yarn`:
```bash
yarn add tiny-reverse-proxy --dev --exact
# or globally
yarn global add tiny-reverse-proxy
```## Usage
Forward requests from 127.0.0.1:8000 to 10.0.2.2:8000
```bash
tiny-reverse-proxy --proxy=10.0.2.2,8000
```Forward requests from 127.0.0.1:3000 to my.host:8000
```bash
tiny-reverse-proxy --proxy=my.host,8000,3000
```Multiple proxies at the same time
```bash
tiny-reverse-proxy --proxy=10.0.2.2,8000 --proxy=my.host,8000,3000
```You can also use the environment variable `TINY_REVERSE_PROXY` with the same options
```bash
TINY_REVERSE_PROXY="--proxy=10.0.2.2,8000 --proxy=my.host,8000,3000" tiny-reverse-proxy
```## Limitations
It doesn't handle HTTPS requests.
It can't send a single request to multiple hosts.Feel free to open pull requests.