fix typos, formatting

This commit is contained in:
DarkCat09 2024-07-05 10:41:43 +04:00
parent 7ae88ce853
commit 1d3b25e374
Signed by: DarkCat09
GPG key ID: 0A26CD5B3345D6E3

View file

@ -55,9 +55,12 @@ $ mkdir addon && cd addon
$ curl https://git.dc09.ru/mitm-archive/addon/raw/branch/main/addon.py >addon.py
```
Stop mitmproxy if it's still running (<kbd>q</kbd> and then <kbd>y</kbd> for mitmproxy; <kbd>Ctrl+C</kbd> for mitmweb), then re-launch it with the mitm-archive addon: `mitmproxy -s addon.py` (or mitmweb).
Stop mitmproxy if it's still running (<kbd>q</kbd> and then <kbd>y</kbd> for mitmproxy; <kbd>Ctrl+C</kbd> for mitmweb),
then re-launch it with the mitm-archive addon: `mitmproxy -s addon.py` (or mitmweb).
**Each HTTP response** that comes to mitmproxy is archived: metadata is in `./archive.db` SQLite database, headers and body are in `./storage/{id}/headers` and `./storage/{id}/body` respectively.
**Each HTTP response** that comes to mitmproxy is archived:
metadata is in `./archive.db` SQLite database,
headers and body are in `./storage/{id}/headers` and `./storage/{id}/body` respectively.
To adjust these paths, set the environment variables:
```bash
@ -70,14 +73,19 @@ $ mitmproxy -s addon.py
- Filter host instead of archiving everything (literally 2 lines of code, could be added soon after I figure out the best way to configure this)
- Addon is configured with env vars, Server uses command-line options; should be unified?
Probably useful, but would overcomplicate the project:
- Alphabetically sort query arguments both in addon and server (for now if archive contains `/api?key=val&abc=def`, the same request `/api?abc=def&key=val` gives 404, because URL is not exactly the same)
Probably useful, but would overcomplicate the storage format and server logic:
- Alphabetically sort query arguments both in addon and server
(for now, if an archive contains `/api?key=val&abc=def`,
the same request `/api?abc=def&key=val` gives 404,
because the URLs are not exactly the same)
Harder to implement and definitely will overcomplicate the project while neither I nor anyone else need this:
- Config option to omit some query args (if there is no `/api?key=val&abc=def` and it's allowed to omit abc, then search for `/api?key=val`)
- Store request/response cookies in an archive
- Config option to disable saving cookies specified by key (e.g. in case they contain credentials)
- Config option to omit some cookies
- Invent a custom format (or find existing) for storing query args and cookies that will make the operations listed below more handy
- Invent a custom format or find an existing one (kind of HashMap) for storing query args and cookies that will make the operations listed above more handy
For these usage screnarios, especially with cookies, it's simplier and overall better to self-host the web site server you are trying to archive or re-implement it in your favourite programming language and self-host.
For these usage screnarios, especially with cookies, it's simplier and overall better
to self-host the web site server you are trying to archive
or re-implement it in your favourite programming language and self-host.