Skip to content

Commit ec6c432

Browse files
Merge branch 'firefox'
2 parents fd22d28 + 720f9a3 commit ec6c432

File tree

9 files changed

+68
-4
lines changed

9 files changed

+68
-4
lines changed

docs/custom-ca.md renamed to docs/how-to/custom-ca.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ else:
8181

8282
### Persistent CA Example
8383

84-
For a complete example of creating and reusing a CA across multiple proxy runs, see [`examples/persistent_ca_usage.py`](../examples/persistent_ca_usage.py). This example demonstrates:
84+
For a complete example of creating and reusing a CA across multiple proxy runs, see [`examples/persistent_ca_usage.py`](.https://github.com/julien-duponchelle/asyncio-https-proxy/blob/main/examples/persistent_ca_usage.py). This example demonstrates:
8585

8686
- Generating a CA and saving it to disk if it doesn't exist
8787
- Loading an existing CA from disk on subsequent runs
@@ -109,4 +109,8 @@ To use a custom CA bundle with curl, you can use the `--cacert` option to specif
109109

110110
```console
111111
curl --cacert ca_certificate.pem --proxy http://127.0.0.1:8888 https://httpbin.org/get
112-
```
112+
```
113+
114+
### Firefox
115+
116+
See the documentation [here](../how-to/firefox/index.md)

docs/how-to/firefox/error.png

102 KB
Loading

docs/how-to/firefox/import.png

48.8 KB
Loading

docs/how-to/firefox/import2.png

39.6 KB
Loading

docs/how-to/firefox/index.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# Firefox Setup for HTTPS Proxy Interception
2+
3+
Firefox is the recommended browser for HTTPS interception because it allows you to create isolated profiles where you can modify SSL certificate and proxy settings. Unlike some browsers that require system-wide changes, Firefox profiles provide better isolation and security.
4+
5+
!!! warning "Security Considerations"
6+
Firefox supports multiple profiles, and it's strongly recommended to avoid using your main profile for interception as this can create security risks. Always use a dedicated profile for proxy interception.
7+
8+
## Create a Profile
9+
10+
Create a new Firefox profile specifically for proxy interception:
11+
12+
```console
13+
firefox --CreateProfile intercept
14+
```
15+
16+
## Start Firefox with Your Profile
17+
18+
Launch Firefox using the newly created profile:
19+
20+
```console
21+
firefox -P intercept
22+
```
23+
24+
## Setup a Theme (Optional)
25+
26+
!!! tip "Visual Identification"
27+
It's highly recommended to set up a distinctive theme for your interception browser. This visual distinction helps you easily identify when you're using the proxy-enabled browser versus your regular browser, reducing the risk of accidental exposure.
28+
29+
## Configure the Proxy Settings
30+
31+
Navigate to Firefox settings and configure the proxy:
32+
33+
![Firefox settings](./settings.png)
34+
![Proxy settings](./proxy.png)
35+
36+
After configuring the proxy, HTTP sites like http://example.com/ should work normally, but HTTPS pages will display a security error until you trust the CA certificate.
37+
38+
!!! note "Expected Behavior"
39+
This SSL error is expected and normal until you complete the CA certificate trust setup in the next section.
40+
41+
![SSL error](./error.png)
42+
43+
## Trust the CA Certificate
44+
45+
To enable HTTPS interception, you need to import and trust your root CA public certificate.
46+
47+
!!! danger "Certificate Security"
48+
Only trust CA certificates that you have generated yourself or that come from trusted sources. Trusting unknown CA certificates can compromise your security and allow malicious actors to intercept your traffic.
49+
50+
1. Access the certificate settings:
51+
![CA settings](./settings_ca.png)
52+
53+
2. Import the certificate:
54+
![Import](./import.png)
55+
56+
3. Trust the CA to identify websites:
57+
![Import trust for website](./import2.png)
58+
59+
Once the CA certificate is trusted, Firefox will accept the proxy's certificates for HTTPS sites, enabling successful interception.

docs/how-to/firefox/proxy.png

73 KB
Loading

docs/how-to/firefox/settings.png

103 KB
Loading
122 KB
Loading

mkdocs.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ nav:
3333
- How It Works: how-it-works.md
3434
- Advanced Usage: advanced-usage.md
3535
- How to:
36-
- Custom CA: custom-ca.md
36+
- Custom CA: how-to/custom-ca.md
37+
- Firefox: how-to/firefox
3738
- API Reference: reference/index.md
3839
- Development: development.md
3940
- FAQ: faq.md
@@ -89,4 +90,4 @@ extra:
8990
link: https://github.com/julien-duponchelle/asyncio-https-proxy
9091

9192
extra_javascript:
92-
- https://unpkg.com/[email protected]/dist/mermaid.min.js
93+
- https://unpkg.com/[email protected]/dist/mermaid.min.js

0 commit comments

Comments
 (0)