Skip to content

Commit 6393f87

Browse files
committed
Update document.
1 parent 246a70e commit 6393f87

1 file changed

Lines changed: 43 additions & 2 deletions

File tree

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,16 @@ It has the following features:
88

99
* URL rewriting
1010

11-
If the upstream HTTP server listens on `127.0.0.1:3000` and you want to get your browser to access to it by a request to `http://example.com`, the configuration should look as follows:
11+
If you want to get your browser to access to the upstream HTTP server listening on `127.0.0.1:3000` by a request to `http://example.com`, the configuration should look as follows:
1212

1313
```
1414
hosts:
1515
http://example.com:
1616
- ^(/*)$: http://127.0.0.1:3000$1
1717
```
1818

19+
This can be done since the name resolution is done in devproxy, which is configured to map any request for http://example.com to http://127.0.0.1:3000.
20+
1921
* Transparent TLS wrapping (simulation of an SSL/TLS-enabled environment)
2022

2123
You can also make it possible to direct the request to `https://example.com/` to the upstream by adding the configuration like the following:
@@ -28,7 +30,7 @@ It has the following features:
2830
- ^(/*)$: http://127.0.0.1:3000$1
2931
```
3032

31-
It is however necessary to set up the private PKI for issuing bogus server certificates and let your browser trust the PKI's root CA certificate. **DO IT ON YOUR OWN RISK.**
33+
Even though you don't have a valid certificate prepared for `example.com`, devproxy automatically generates it on the fly. However, it is necessary to set up the private PKI for issuing bogus server certificates and let your browser trust the PKI's root CA certificate. **DO IT ON YOUR OWN RISK.**
3234

3335
The CA for issuing bogus server certificates is configured as follows:
3436

@@ -68,6 +70,45 @@ It has the following features:
6870
X-Cgi-Path-Info: $3
6971
```
7072

73+
* Proxy chaining
74+
75+
You can direct outgoing requests to another proxy server. This is useful in a restricted network environment.
76+
77+
```
78+
proxy:
79+
http: http://anoother-proxy-server:8080
80+
https: http://another-proxy-server:8080
81+
```
82+
83+
`excluded` directive can be used when you want to prevent the requests to the specific hosts from being proxied.
84+
85+
```
86+
excluded:
87+
- 127.0.0.1
88+
- localhost
89+
- intranet.example.com
90+
```
91+
92+
Or inversely, in case of whitelisting:
93+
94+
```
95+
included:
96+
- intranet.example.com
97+
- foobar.example.com
98+
```
99+
100+
TLS proxy can also be specified.
101+
102+
```
103+
proxy:
104+
http: https://anoother-proxy-server:8443
105+
https: https://another-proxy-server:8443
106+
tls:
107+
ca_certs: cabundle.crt.pem
108+
certs:
109+
- cert: client_crt.pem # this can be either the filename of a PEM-formatted certificate or a PEM string itself.
110+
key: client_key.pem # this can be either the filename of a PEM-formatted private key or a PEM string itself.
111+
```
71112

72113
## Installation
73114

0 commit comments

Comments
 (0)