feat: v0.2.0-rc, optimize code

This commit is contained in:
2024-03-30 20:32:27 +08:00
parent 03b4fee86a
commit f75ead77f3

View File

@@ -2,9 +2,10 @@
## Introduction
`proxy-inspector` is a HTTP/HTTPS proxy based on `pingora`, `proxy-inspector` can issue certificate just in time, `proxy-inspector` can dump HTTP/HTTPS request and response.
`proxy-inspector` is a HTTP/HTTPS proxy based on `pingora`, `proxy-inspector` can issue certificate just in
time, `proxy-inspector` can dump HTTP/HTTPS request and response.
## Configure
## Configuration
`proxy_config.json` sample config:
@@ -57,11 +58,9 @@ $ cargo r --example generate_self_signed_ca
When generate success, cert and key will write to files `cert.pem`, `cert.key`, fail if any file is existed.
## Example
## Run Example
Proxy example:
Edit `/etc/hosts` add:
Edit `/etc/hosts` add line:
```text
127.0.0.1 www.baidu.com
@@ -119,7 +118,7 @@ $ curl https://www.baidu.com/not-found -v
</body></html>
```
Log from proxy-inspector:
Log from `proxy-inspector` console:
```text
[2024-03-30T12:21:28Z INFO proxy_inspector::service] SNI provided: www.baidu.com
@@ -152,7 +151,7 @@ Log from proxy-inspector:
]]]
```
proxy-inspector did the follow steps:
`proxy-inspector` do the follow steps:
1. issue certificate for `www.baidu.com`
2. receive request `GET /not-found`, print request to log