mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-22 07:08:10 +00:00
Update concepts-certificates.md
{{< highlight bash >}} doesn't render properly on the wiki, so converted to codeblock
This commit is contained in:
parent
cf158022d9
commit
c3d3b75517
@ -117,26 +117,26 @@ file roughly looks like this:
|
||||
For example, you can generate a certificate in this format using these
|
||||
instructions:
|
||||
|
||||
{{< highlight bash >}}
|
||||
```
|
||||
openssl genrsa -out cert.key 2048
|
||||
# (Specify the mitm domain as Common Name, e.g. \*.google.com)
|
||||
openssl req -new -x509 -key cert.key -out cert.crt
|
||||
cat cert.key cert.crt > cert.pem
|
||||
{{< / highlight >}}
|
||||
```
|
||||
|
||||
Now, you can run mitmproxy with the generated certificate:
|
||||
|
||||
**For all domain names**
|
||||
|
||||
{{< highlight bash >}}
|
||||
```
|
||||
mitmproxy --cert *=cert.pem
|
||||
{{< / highlight >}}
|
||||
```
|
||||
|
||||
**For specific domain names**
|
||||
|
||||
{{< highlight bash >}}
|
||||
```
|
||||
mitmproxy --cert *.example.com=cert.pem
|
||||
{{< / highlight >}}
|
||||
```
|
||||
|
||||
**Note:** `*.example.com` is for all the subdomains. You can also use
|
||||
`www.example.com` for a particular subdomain.
|
||||
|
Loading…
Reference in New Issue
Block a user