You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[HTTP Web Server Plugins](#http-web-server-plugins)
60
62
-[Reverse Proxy](#reverse-proxy)
61
63
-[Web Server Route](#web-server-route)
@@ -720,6 +722,36 @@ plugin
720
722
721
723
Modify `ModifyChunkResponsePlugin` to your taste. Example, instead of sending hardcoded chunks, parse and modify the original `JSON` chunks received from the upstream server.
722
724
725
+
### CloudflareDnsResolverPlugin
726
+
727
+
This plugin uses `Cloudflare` hosted `DNS-over-HTTPS` [API](https://developers.cloudflare.com/1.1.1.1/encrypted-dns/dns-over-https/make-api-requests/dns-json) (json).
By default, `CloudflareDnsResolverPlugin` runs in`security` mode (provides malware protection). Use `--cloudflare-dns-mode family` to also enable
737
+
adult content protection.
738
+
739
+
### CustomDnsResolverPlugin
740
+
741
+
This plugin demonstrate how to use a custom DNS resolution implementation with `proxy.py`.
742
+
This example plugin currently uses Python's in-built resolution mechanism. Customize code
743
+
to your taste. Example, query your custom DNS server, implement DoH or other mechanisms.
744
+
745
+
Start `proxy.py` as:
746
+
747
+
```bash
748
+
❯ proxy \
749
+
--plugins proxy.plugin.CustomDnsResolverPlugin
750
+
```
751
+
752
+
`HttpProxyBasePlugin.resolve_dns` can also be used to configure `network interface` which
753
+
must be used as the `source_address` for connection to the upstream server.
754
+
723
755
## HTTP Web Server Plugins
724
756
725
757
### Reverse Proxy
@@ -1013,7 +1045,9 @@ with TLS Interception:
1013
1045
1014
1046
**This is a WIP and may not work as documented**
1015
1047
1016
-
Requires `paramiko` to work. See [requirements-tunnel.txt](https://github.com/abhinavsingh/proxy.py/blob/develop/requirements-tunnel.txt)
1048
+
Requires `paramiko` to work.
1049
+
1050
+
See [requirements-tunnel.txt](https://github.com/abhinavsingh/proxy.py/blob/develop/requirements-tunnel.txt)
1017
1051
1018
1052
## Proxy Remote Requests Locally
1019
1053
@@ -1182,7 +1216,8 @@ if __name__ == '__main__':
1182
1216
1183
1217
## Loading Plugins
1184
1218
1185
-
You can, of course, list plugins to load in the input arguments list of `proxy.main` or `Proxy` constructor. Use the `--plugins` flag when starting from command line:
1219
+
You can, of course, list plugins to load in the input arguments list of `proxy.main` or
1220
+
`Proxy` constructor. Use the `--plugins` flag when starting from command line:
1186
1221
1187
1222
```python
1188
1223
import proxy
@@ -1193,7 +1228,8 @@ if __name__ == '__main__':
1193
1228
])
1194
1229
```
1195
1230
1196
-
For simplicity you can pass the list of plugins to load as a keyword argument to `proxy.main` or the `Proxy` constructor:
1231
+
For simplicity you can pass the list of plugins to load as a keyword argument to `proxy.main` or
1232
+
the `Proxy` constructor:
1197
1233
1198
1234
```python
1199
1235
import proxy
@@ -1353,8 +1389,8 @@ Contributors must start `proxy.py` from source to verify and develop new feature
1353
1389
1354
1390
See [Run proxy.py from command line using repo source](#from-command-line-using-repo-source) for details.
(https://github.com/abhinavsingh/proxy.py/issues/642#issuecomment-960819271) On `macOS`
1392
+
1393
+
[](https://github.com/abhinavsingh/proxy.py/issues/642#issuecomment-960819271) On `macOS`
1358
1394
you must install `Python` using `pyenv`, as `Python` installed via `homebrew` tends
1359
1395
to be problematic. See linked thread for more details.
1360
1396
@@ -1575,7 +1611,8 @@ FILE
1575
1611
1576
1612
# Run Dashboard
1577
1613
1578
-
Dashboard is currently under development and not yet bundled with `pip` packages. To run dashboard, you must checkout the source.
1614
+
Dashboard is currently under development and not yet bundled with `pip` packages.
1615
+
To run dashboard, you must checkout the source.
1579
1616
1580
1617
Dashboard is written in Typescript and SCSS, so let's build it first using:
1581
1618
@@ -1606,9 +1643,12 @@ $ open http://localhost:8899/dashboard/
1606
1643
1607
1644
## Inspect Traffic
1608
1645
1609
-
Wait for embedded `Chrome Dev Console` to load. Currently, detail about all traffic flowing through `proxy.py` is pushed to the `Inspect Traffic` tab. However, received payloads are not yet integrated with the embedded dev console.
1646
+
Wait for embedded `Chrome Dev Console` to load. Currently, detail about all traffic flowing
1647
+
through `proxy.py` is pushed to the `Inspect Traffic` tab. However, received payloads are not
1648
+
yet integrated with the embedded dev console.
1610
1649
1611
-
Current functionality can be verified by opening the `Dev Console` of dashboard and inspecting the websocket connection that dashboard established with the `proxy.py` server.
1650
+
Current functionality can be verified by opening the `Dev Console` of dashboard and inspecting
1651
+
the websocket connection that dashboard established with the `proxy.py` server.
0 commit comments