Skip to content

Commit 17eecbe

Browse files
authored
Merge branch 'master' into master
2 parents 7e2d058 + 5d405d4 commit 17eecbe

File tree

10 files changed

+97
-97
lines changed

10 files changed

+97
-97
lines changed

_config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
title: hiproxy
1+
title: hiproxy documentation
22
subtitle: "A lightweight and powerful proxy tool for front-end developer based on Node.js."
33
description: "hiproxy is a lightweight proxy tool for Front-End developers based on Node.js that supports an NGINX-like configuration."
44
author: hiproxy

db.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"scripts": {
99
"build": "rm -rdf public && hexo generate",
1010
"eslint": "eslint .",
11-
"deploy": "hexo deploy"
11+
"deploy": "npm run build && hexo deploy"
1212
},
1313
"dependencies": {
1414
"hexo": "^3.3.9",
@@ -20,7 +20,8 @@
2020
"hexo-renderer-marked": "^0.2.10",
2121
"hexo-renderer-stylus": "^0.3.1",
2222
"hexo-server": "^0.2.0",
23-
"lodash": "^4.5.1"
23+
"lodash": "^4.5.1",
24+
"lunr": "^2.1.3"
2425
},
2526
"devDependencies": {}
2627
}

source/CNAME

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
hiproxy.js.org
1+
hiproxy.org

source/_data/footerlinks.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ en:
77
Project Code: https://github.com/hiproxy/hiproxy
88
Docmentation Code: https://github.com/hiproxy/documentation
99
libs:
10-
hemsl: https://github.com/hemsl/hemsl
11-
step-flow: https://github.com/hiproxy/step-flow
12-
conf-parser: https://github.com/hiproxy/conf-parser
13-
open-browser: https://github.com/hiproxy/open-browser
10+
hemsl/hemsl: https://github.com/hemsl/hemsl
11+
hiproxy/step-flow: https://github.com/hiproxy/step-flow
12+
hiproxy/conf-parser: https://github.com/hiproxy/conf-parser
13+
hiproxy/open-browser: https://github.com/hiproxy/open-browser
1414
links:
1515
qfight: https://github.com/qfight
1616
YMFE: http://ued.qunar.com/ymfe/about
@@ -26,10 +26,10 @@ zh-cn:
2626
项目源码: https://github.com/hiproxy/hiproxy
2727
文档源码: https://github.com/hiproxy/documentation
2828
libs:
29-
hemsl: https://github.com/hemsl/hemsl
30-
step-flow: https://github.com/hiproxy/step-flow
31-
conf-parser: https://github.com/hiproxy/conf-parser
32-
open-browser: https://github.com/hiproxy/open-browser
29+
hemsl/hemsl: https://github.com/hemsl/hemsl
30+
hiproxy/step-flow: https://github.com/hiproxy/step-flow
31+
hiproxy/conf-parser: https://github.com/hiproxy/conf-parser
32+
hiproxy/open-browser: https://github.com/hiproxy/open-browser
3333
links:
3434
qfight: https://github.com/qfight
3535
YMFE: http://ued.qunar.com/ymfe/about

source/configuration/ssl_certificate.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ You can get the URL from <http://127.0.0.1:5525/> by following below image:
1919

2020
The following describes how the root certificate is installed in OSX, iOS, Windows and Android.
2121

22-
### OSX System
22+
### Mac OSX
2323

2424
1. Double click downloaded `Hiproxy_Custom_CA_Certificate.pem` to import the certificate to keychain.
2525

@@ -38,7 +38,7 @@ The following describes how the root certificate is installed in OSX, iOS, Windo
3838
<img src="../../images/root_cert_trusted.png" width="680" />
3939

4040

41-
### iOS系统
41+
### iOS
4242

4343
1. Send the downloaded certificate to iPhone then open it in iOS.
4444

source/developers/cli_command.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
title: CLI Command
2+
---
23

34
> If you are willing to help hiproxy to write documentation, please contact zdying@live.com, thank you!
45

source/index.jade

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11

22
layout: index
33
description: hiproxy is a lightweight proxy tool for Front-End developers based on Node.js that supports an NGINX-like configuration.
4-
subtitle: A lightweight proxy tool for Front-End developers based on Node.js
4+
subtitle: Lightweight & Extensible Proxy Base on Node.js
55
comments: false
66
---
77
ul#intro-feature-list
88
li.intro-feature-wrap
99
.intro-feature
1010
.intro-feature-icon
1111
i.fa.fa-bolt
12-
h3.intro-feature-title Lightweight and Extensible
12+
h3.intro-feature-title Lightweight & Extensible
1313
p.intro-feature-desc
14-
| hiproxy dependence on fewer libraries so you can install it quickly, developers can extend hiproxy to support with commands, instructions, and pages.
14+
| Hiproxy is a lightweight proxy with few dependencies, quick installing, as well as extensible on commands and pages.
1515
li.intro-feature-wrap
1616
.intro-feature
1717
.intro-feature-icon
1818
i.fa.fa-cog
19-
h3.intro-feature-title Reuse Existing Development Habits
19+
h3.intro-feature-title Keep Your Habits
2020
p.intro-feature-desc
21-
| Using hosts and Nginx style configuration, reuse the development, configuration habits. It's easy to learn and use.
21+
| Keep used to configure in <strong>hosts</strong> or <strong>Nginx</strong> style. Easy to learn, and keep relax in using.
2222
li.intro-feature-wrap
2323
.intro-feature
2424
.intro-feature-icon
2525
i.fa.fa-lock
26-
h3.intro-feature-title HTTPS Certificate Automatically Generate and Manage
26+
h3.intro-feature-title Generate Certificate Automatically
2727
p.intro-feature-desc
28-
| hiproxy can generate root certificate and automatically generate the domain certificate.
28+
| Hiproxy can play the CA role with generated root certificate by itself. It can also generate certificates for each requesting domains.
2929
li.intro-feature-wrap
3030
.intro-feature
3131
.intro-feature-icon
3232
i.fa.fa-chrome
33-
h3.intro-feature-title Highly Integrated With the Browser
33+
h3.intro-feature-title Highly Integrated with Browsers
3434
p.intro-feature-desc
35-
| hiproxy will open a new browser window and automatically configure the agent for you.
35+
| While hiproxy starts, it opens a new browser window and configure its proxy automatically. Such you would feel free.

source/rewrite/directive.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,13 +165,13 @@ They are valid only in then same domain and make directives ignored which has th
165165

166166
Description: specify certificate file
167167

168-
parameter: **ssl_certificate** file.crt(It must be relative path, and would be improve in the furture.)
168+
parameter: **ssl_certificate** file.crt
169169

170170
Example:
171171

172172
```bash
173173
example.com => {
174-
ssl_certificate /user/root/.hiproxy/cert/example.crt;
174+
ssl_certificate /user/root/.hiproxy/cert/example.crt;
175175
}
176176

177177
```
@@ -180,13 +180,13 @@ example.com => {
180180

181181
Description: specify the file storing private key
182182

183-
parameter: **ssl_certificate_key** file.key(It must be relative path, and would be improve in the furture.)
183+
parameter: **ssl_certificate_key** file.key
184184

185185
Example:
186186

187187
```bash
188188
example.com => {
189-
ssl_certificate_key /user/root/.hiproxy/cert/example.key;
189+
ssl_certificate_key /user/root/.hiproxy/cert/example.key;
190190
}
191191

192192
```

source/rewrite/index.md

Lines changed: 67 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ $var_name
3636

3737
```bash
3838
[domain_name|variable] => {
39-
# ...
39+
# ...
4040
}
4141
```
4242
**Example**
@@ -46,12 +46,12 @@ set $domain some.example.com
4646

4747
# use a domain name directly
4848
some.example.com => {
49-
# ...
49+
# ...
5050
}
5151

5252
# or use a variable
5353
$domain => {
54-
# ...
54+
# ...
5555
}
5656
```
5757
### location
@@ -64,30 +64,30 @@ $domain => {
6464

6565
```bash
6666
location [directory|file|regex|variables] {
67-
# ...
67+
# ...
6868
}
6969
```
7070
**Example**
7171

7272
```bash
7373
# directory
7474
location /some/path/ {
75-
# ...
75+
# ...
7676
}
7777

7878
# specific file
7979
location /some/file.htm {
80-
# ...
80+
# ...
8181
}
8282

8383
# regular expression
8484
location ~ ^/some/(path|path1)/.* {
85-
# ...
85+
# ...
8686
}
8787

8888
# variables
8989
location $some/$path {
90-
# ...
90+
# ...
9191
}
9292
```
9393
### Directives
@@ -127,7 +127,7 @@ The brief syntax can define some basic rules, no need `location` or other direct
127127
**Syntax**
128128

129129
```bash
130-
domain ==> domain|path
130+
domain => domain|path
131131
```
132132

133133
**Example**
@@ -149,32 +149,32 @@ api.hiproxy.org/mock => $local/mock;
149149
```bash
150150
# rewrite folder
151151
api.hiproxy.org/user/ => {
152-
proxy_pass local.hiproxy.org/user/;
152+
proxy_pass local.hiproxy.org/user/;
153153

154-
# proxy request config
155-
proxy_set_header Host api.hiproxy.org;
156-
proxy_set_header other value;
157-
proxy_hide_header other;
154+
# proxy request config
155+
proxy_set_header Host api.hiproxy.org;
156+
proxy_set_header other value;
157+
proxy_hide_header other;
158+
159+
proxy_set_cookie userid 20150910121359;
160+
proxy_hide_cookie sessionid;
158161

159-
proxy_set_cookie userid 20150910121359;
160-
proxy_hide_cookie sessionid;
162+
# response config
163+
set_cookie sessionID E3BF86A90ACDD6C5FF49ACB09;
164+
set_header proxy hiproxy;
161165

162-
# response config
163-
set_cookie sessionID E3BF86A90ACDD6C5FF49ACB09;
164-
set_header proxy hiproxy;
166+
# allow CORS
167+
set_header Access-Control-Allow-Origin *;
165168

166-
# allow CORS
167-
set_header Access-Control-Allow-Origin *;
168-
169-
hide_header proxy;
170-
hide_cookie sessionID;
169+
hide_header proxy;
170+
hide_cookie sessionID;
171171
}
172172
```
173173

174174
```bash
175175
# regexp support
176176
~ /(demo|example)/([^\/]*\.(html|htm))$ => {
177-
proxy_pass http://127.0.0.1:9999/$1/src/$2;
177+
proxy_pass http://127.0.0.1:9999/$1/src/$2;
178178
}
179179
```
180180

@@ -187,55 +187,53 @@ set $id 1234567;
187187

188188
# standard rewrite url
189189
$domain => {
190-
proxy_pass http://$local/api/mock/;
191-
set $id 1234;
192-
set $mock_user user_$id;
193-
set_header Host $domain;
194-
set_header UserID $mock_user;
195-
set_header Access-Control-Allow-Origin *;
190+
proxy_pass http://$local/api/mock/;
191+
set $id 1234;
192+
set $mock_user user_$id;
193+
set_header Host $domain;
194+
set_header UserID $mock_user;
195+
set_header Access-Control-Allow-Origin *;
196196
}
197197

198198
blog.hiproxy.org => {
199-
set_header Access-Control-Allow-Origin *;
200-
201-
set $node_server 127.0.0.1:3008;
202-
set $order order;
203-
set $cookie1 login=true;expires=20160909;
204-
205-
location /$api/$order/detail {
206-
proxy_pass http://$node_server/user/?domain=$domain;
207-
set_header Set-Cookie userID 200908204140;
208-
}
209-
210-
location ~ /(usercenter|userinfo)/ {
211-
set $cookie login=true;expires=20180808;
212-
set $id 56789;
213-
214-
proxy_pass http://127.0.0.1:3008/info/;
215-
216-
set_cookie userID 200908204140;
217-
set_cookie userName user_$id;
218-
}
219-
220-
location ~ /local\/(.*)(\?(.*))? {
221-
send_file ./mock/$1.json;
222-
}
223-
224-
location /dev {
225-
#alias /site/path/;
226-
alias ./src/view/;
227-
root app.html
228-
}
229-
230-
location /multiple {
231-
echo <h1>hello_echo</h1>;
232-
echo <p>test echo directive</p>;
233-
echo <p>finish</p>;
234-
}
235-
199+
set_header Access-Control-Allow-Origin *;
200+
201+
set $node_server 127.0.0.1:3008;
202+
set $order order;
203+
set $cookie1 login=true;expires=20160909;
204+
205+
location /$api/$order/detail {
206+
proxy_pass http://$node_server/user/?domain=$domain;
207+
set_header Set-Cookie userID 200908204140;
208+
}
209+
210+
location ~ /(usercenter|userinfo)/ {
211+
set $cookie login=true;expires=20180808;
212+
set $id 56789;
213+
214+
proxy_pass http://127.0.0.1:3008/info/;
215+
216+
set_cookie userID 200908204140;
217+
set_cookie userName user_$id;
218+
}
219+
220+
location ~ /local/(.*)(\?(.*))? {
221+
send_file ./mock/$1.json;
222+
}
223+
224+
location /dev {
225+
#alias /site/path/;
226+
alias ./src/view/;
227+
root app.html
228+
}
229+
230+
location /multiple {
231+
echo <h1>hello_echo</h1>;
232+
echo <p>test echo directive</p>;
233+
echo <p>finish</p>;
234+
}
236235
}
237236
```
238237

239-
240238
[hosts]: ../configuration/hosts.html
241239
[Nginx]: http://nginx.org/en/docs/

0 commit comments

Comments
 (0)