Skip to content

Commit 05eeb95

Browse files
authored
Update applied_to_existing_projects.md
1 parent b816097 commit 05eeb95

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

source/zh-cn/get_started/applied_to_existing_projects.md

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ title: 运用到现有项目中
55
>
66
> If you are willing to help hiproxy to write documentation, please contact zdying@live.com, thank you!
77
8-
## 全局安装hiproxy
8+
## 1、全局安装hiproxy
99

1010
如果你还没有安装[hiproxy](https://github.com/hiproxy/hiproxy),请查看[如何安装](./installation.html)hiproxy。
1111

1212
我们只需要把hiproxy安装到全局就可以了,**不需要将hiproxy作为一个依赖安装到每个项目中**
1313

14-
## 添加配置文件
14+
## 2、添加配置文件
1515

1616
hiproxy的两个理念:
1717

@@ -56,23 +56,27 @@ workspace
5656
> * 支持的语法:`*`, `?`, `[abc]`, `[a-z]`, `[^a-z]`, `[!a-z]`
5757
> * 不支持的语法:`**`
5858
59-
### hosts
59+
### 2.1、hosts
6060

6161
[hosts](../configuration/hosts.html)跟系统hosts类似,只不过这个hosts是放到项目中的,如果我们在项目根目录下面创建了hosts文件并且文件名称为`hosts`,hiproxy能自动发现并解析它。
6262

6363
如果文件名称不是`hosts`,则需要我们通过`-c, --hosts-file`来指定。
6464

65-
### rewrite
65+
hosts配置详情,请查看[hosts配置](../configuration/hosts.html)
66+
67+
### 2.2、rewrite
6668

6769
[rewrite](../configuration/rewrite.html)跟hosts一样,也是放到项目中的,如果我们在项目根目录下面创建了名称为`rewrite`的文件,hiproxy也能自动发现并解析它。
6870

6971
如果文件名称不是`rewrite`,则需要我们通过`-r, --rewrite-file`来指定。
7072

71-
## 提交git
73+
rewrite配置详情,请查看[rewrite配置](../configuration/rewrite.html)
74+
75+
## 3、提交git
7276

7377
hiproxy希望大家能把上面添加的hosts/rewrite配置文件提交到git中,这样团队中的成员更新代码之后,就能使用这些配置,免去了互相拷贝配置文件的苦恼。
7478

75-
## 启动服务
79+
## 4、启动服务
7680

7781
hiproxy的理念是基于**工作空间**。我们需要在工作空间下启动hiproxy代理服务。假设我们所有的项目都存放在`~/workspace/`,那么这么目录就是我们的工作空间。
7882

@@ -87,7 +91,7 @@ hiproxy start -w ~/workspace/
8791

8892
**提示**:在启动hiproxy代理服务的时候,建议使用`-o, --open [browser-name]`来打开一个浏览器窗口并自动配置好代理。这样就不需要我们自己手动去配置代理。
8993

90-
## 开发调试
94+
## 5、开发调试
9195

9296
启动hiproxy代理服务之后,打开的浏览器窗口里面的所有请求,如果配置了代理规则,都会交给hirpoxy去处理。
9397

0 commit comments

Comments
 (0)