fix: cleanups
This commit is contained in:
parent
7fc64c457a
commit
c0e2ca0b40
10
README.md
10
README.md
@ -1,7 +1,11 @@
|
|||||||
tlsproxy
|
tlsproxy
|
||||||
=================
|
=================
|
||||||
|
|
||||||
A most basic TLS man-in-the-middle forward proxy using [rustls](https://github.com/ctz/rustls) .
|
A most basic TLS man-in-the-middle forward proxy using [rustls](https://github.com/ctz/rustls) and [Tokio](tokio.rs).
|
||||||
|
|
||||||
|
This proxy allows you, given you have the certificate chain of the server, to replace byte sequences of length N with another byte sequence of length N in outbound requests.
|
||||||
|
For example, you could replace `https://testserver.com/?name=foo` with `?name=bar`
|
||||||
|
This is a toy, proof of concept project. It is not thoroughly tested and will have issues with a very high probability.
|
||||||
|
|
||||||
Sample usage:
|
Sample usage:
|
||||||
```
|
```
|
||||||
@ -23,7 +27,7 @@ curl https://testserver.com:5000 \
|
|||||||
--verbose
|
--verbose
|
||||||
```
|
```
|
||||||
|
|
||||||
Please note this means you need to have a server running at testserver.com:5000, to do so, you can use the sample python server provided:
|
Please note this means you need to have a server running at `testserver.com:5000`, to do so, you can use the sample python server provided:
|
||||||
|
|
||||||
```
|
```
|
||||||
cd sample-server
|
cd sample-server
|
||||||
@ -33,7 +37,7 @@ pip install flask
|
|||||||
python main.py
|
python main.py
|
||||||
```
|
```
|
||||||
|
|
||||||
You will then have a server running on 127.0.0.1:5000. You can then point testserver.com to this server by editing your `/etc/hosts`:
|
You will then have a server running on `127.0.0.1:5000`. You can then point `testserver.com` to this server by editing your `/etc/hosts`:
|
||||||
|
|
||||||
```
|
```
|
||||||
127.0.0.1 testserver.com
|
127.0.0.1 testserver.com
|
||||||
|
@ -9,7 +9,6 @@ mod proxy;
|
|||||||
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
async fn main() -> Result<(), Box<dyn std::error::Error + Send + Sync>> {
|
||||||
let args = command::args();
|
let args = command::args();
|
||||||
|
|
||||||
// We'll bind to 127.0.0.1:3000
|
|
||||||
let addr = SocketAddr::from(([127, 0, 0, 1], args.port));
|
let addr = SocketAddr::from(([127, 0, 0, 1], args.port));
|
||||||
println!("Listening on {:#?}", addr);
|
println!("Listening on {:#?}", addr);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user