# hiproxy
**Repository Path**: vincentJinxin/hiproxy
## Basic Information
- **Project Name**: hiproxy
- **Description**: đ hiproxy is a lightweight proxy tool for Front-End developers based on Node.js that supports an NGINX-like configuration. đĽ
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2021-08-16
- **Last Updated**: 2021-08-24
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
# hiproxy
**hiproxy** is a lightweight web proxy tool based on [Node.js][node]. The primary purpose of **hiproxy** is to solve the problem of host management and reverse proxy needs of developers.
For example, if you are working as a team and each of the developers in the team need a different proxy setting, you will no longer need to modify your hosts file or use a web server like [Nginx][nginx] as a reverse proxy.
**hiproxy** extends the syntax of hosts file to support **port numbers**. Besides, hiproxy also supports configuration through a syntax similar to the [Nginx configuration file][nginx-config].
[nginx]: https://nginx.org/
[nginx-config]: http://nginx.org/en/docs/beginners_guide.html "nginx Beginnerâs Guide"
[node]: https://nodejs.org "Node.js"
[ä¸ćçć楣](https://github.com/hiproxy/hiproxy/blob/master/README-zh.md)
[](https://travis-ci.org/hiproxy/hiproxy)
[](https://ci.appveyor.com/project/zdying/hiproxy/branch/master)
[](https://codecov.io/gh/hiproxy/hiproxy)
[](https://github.com/Flet/semistandard)
[](https://www.npmjs.com/package/hiproxy)
[](https://nodejs.org/)
[](https://github.com/hiproxy/hiproxy/blob/master/LICENSE)
## Why Hiproxy?
If you are a front-end developer, it is not uncommon for you to encounter the following problems:
**Debugging web pages locally**: To develop your web projects in a local development environment, youâll have to run a back-end server (such as a **Node.js** *express* application, or a **Java SpringBoot** application). As a front-end developer, you might not be familiar with the back-end technology stack, simply setting up the development environment can consume a lot of your time.
**Cross-Origin Issues**: While developing your front-end projects locally, you might need to solve cross-domain and cross-origin resource sharing issues. To address these problems, you will need to modify the response header.
**Self-Signed Certificates**: Youâll often need to test https pages. When you visit https pages with a self-signed certificate, your browser will raise security warnings.
One common way to modify the response header is to put a **proxy** as a âman in the middleâ. *NGINX*, for example, has a nice syntax that you can configure as a reverse-proxy to handle all these needs.
Although NGINX is a great tool to address all the above problems, when setting up NGINX, youâll also modify your hosts file a lot to proxy the requests to a local NGINX service. This can especially turn out to be a burden if you are working on multiple projects.
Can we have a better way to solve this problem?
Well, yes. Meet **hiproxy**!
## Features
* **Nginx.config-style configuration** file syntax with a simple and intuitive configuration
* **Extended** hosts configuration with **port numbers**.
* **Plugin extensions** to rewrite *directives*, *command line interface*, and *pages*
* Automatic generation and management of **TLS certificates**
* **Auto-detection** of configuration file
* **Proxy auto-configuration**
* You can run hiproxy as a **background service** and redirect its output to a log file.
* You can open a browser window and configure your proxy from its **web interface**.
* **hiproxy** provides a **Node.js API** for fine-tuning and lower-level control.
## Installation
```bash
npm install -g hiproxy
```
> If you want to experience the latest features of hiproxy, you can install the next version.
```
npm install -g hiproxy@next
```
## Usage
### CLI
Start proxy server:
```bash
hiproxy start -p 5525 --debug --workspace ${PATH_TO_WORKSPACE}
```
Configure proxy:
```bash
127.0.0.1:5525
```
## CLI Usage
```bash
> hiproxy --help
Usage:
hiproxy [command] [option]
Commands:
start Start a local proxy server
stop Stop the local proxy server (Only works in daemon mode)
restart Restart the local proxy service (Only works in daemon mode)
state Show all the servers state (Only works in daemon mode)
open Open browser and set proxy
hello A test command that say hello to you.
Options:
-v, --version Display version information
-h, --help Display help information
--log-dir