Skip to content

Commit 53fe861

Browse files
authored
Issue #91: Document localhost proxying. (#104)
1 parent a2ab989 commit 53fe861

File tree

4 files changed

+59
-1
lines changed

4 files changed

+59
-1
lines changed

.markdownlint.json

+2-1
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@
66
"fenced-code-language": false,
77
"no-duplicate-heading": false,
88
"ol-prefix": false,
9-
"no-trailing-punctuation": false
9+
"no-trailing-punctuation": false,
10+
"heading-increment": false
1011
}

.vitepress/sidebars/guides.ts

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,10 @@ export const guidesSidebar: DefaultTheme.SidebarItem[] = [
2424
{
2525
text: 'Running in Docker',
2626
link: '/guides/user_guide/docker'
27+
},
28+
{
29+
text: 'Proxying Local Traffic',
30+
link: '/guides/user_guide/proxy_local'
2731
}
2832
]
2933
},

src/guides/index.md

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
- **[Installation](./user_guide/installation.md)** - step-by-step instructions on downloading Caido.
66
- **[Caido on a VPS](./user_guide/vps.md)** - running Caido on a Virtual Private Server.
77
- **[Caido on Dockerhub](./user_guide/docker.md)** - running Caido in a Docker container.
8+
- **[Proxying Local Traffic](./user_guide/proxy_local.md)** - capturing localhost traffic.
89

910
## Contributions
1011

src/guides/user_guide/proxy_local.md

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Proxying Local Traffic
2+
3+
When running a web page or web application locally, Caido may not be capturing the traffic due to what is known as **implicit bypass rules**. These rules match URLs whose host portion is either a localhost name or a link-local IP literal. If a match is detected - requests will not be routed through a proxy and are instead sent directly.
4+
5+
Implicit bypass rules match against the following:
6+
7+
- localhost
8+
9+
- *.localhost [::1]
10+
11+
- 127.0.0.1/8
12+
13+
- 169.254/16
14+
15+
- [FE80::]/10
16+
17+
## Resolutions
18+
19+
If you are having issues proxying localhost traffic - try the following:
20+
21+
#### Use lvh.me:
22+
23+
This domain name resolves to 127.0.0.1.
24+
25+
- [http://lvh.me/](http://lvh.me/)
26+
27+
#### Edit the proxy bypass rules:
28+
29+
By default, localhost may be included as a proxy bypass address within the list of hosts used by your system/browser/extension. This can be overwritten by supplying `<-loopback>` (_the `-` character inverts the rule_).
30+
31+
- Launch Chrome via the terminal using:
32+
33+
```
34+
google-chrome --proxy-server=127.0.0.1:8080` --proxy-bypass-list="<-loopback>"
35+
```
36+
37+
::: tip
38+
If you customized the listening address/port of Caido - replace the values in the command to match. Click [here](https://chromium.googlesource.com/chromium/src/+/HEAD/net/docs/proxy.md#Overriding-the-implicit-bypass-rules) for more information.
39+
:::
40+
41+
- If you are using the FoxyProxy browser extension: select `Options` and add `<-loopback>` to the `Global Exclude` list.
42+
- In general, this bypass list can be modified in the proxy settings of different systems/browsers/extensions by supplying `<-loopback>` to the hosts list. This input field is usually accompanied with a title or description that includes key-terms/keywords such as: `except these addresses`, `no-proxy for`, `exclude`, etc.
43+
44+
#### Use the Firefox Browser:
45+
46+
::: info
47+
If proxying localhost traffic is not working in Firefox as well:
48+
49+
- Navigate to `about:config`.
50+
- Set `network.proxy.allow_hijacking_localhost` to `true`.
51+
- Restart Firefox.
52+
:::

0 commit comments

Comments
 (0)