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
- Inspect, Monitor, Control and Configure `proxy.py` at runtime.
157
-
- Extend dashboard using plugins.
158
-
- Dashboard is currently in development phase, expect breaking changes.
158
+
- [Inspect, Monitor, Control and Configure](#inspect-traffic) `proxy.py` at runtime
159
+
- [Chrome DevTools Protocol](#chrome-devtools-protocol) support
160
+
- Extend dashboard using plugins
161
+
- Dashboard is currently in development phase, expect breaking changes
159
162
- Secure
160
-
- Enable end-to-end encryption between clients and `proxy.py` using TLS
163
+
- Enable end-to-end encryption between clients and `proxy.py`
161
164
- See [End-to-End Encryption](#end-to-end-encryption)
165
+
- Private
166
+
- Everyone deserves privacy. Browse with malware and adult content protection
167
+
- See [DNS-over-HTTPS](#cloudflarednsresolverplugin)
162
168
- Man-In-The-Middle
163
169
- Can decrypt TLS traffic between clients and upstream servers
164
170
- See [TLS Interception](#tls-interception)
165
171
- Supported proxy protocols
166
172
- `http(s)`
167
173
- `http1`
168
-
- `http1.1` pipeline
174
+
- `http1.1` with pipeline
169
175
- `http2`
170
176
- `websockets`
177
+
- Static file server support
178
+
- See `--enable-static-server` and `--static-server-dir` flags
171
179
- Optimized for large file uploads and downloads
172
-
- IPv4 and IPv6 support
180
+
- See `--client-recvbuf-size` and `--server-recvbuf-size` flag
181
+
- `IPv4` and `IPv6` support
182
+
- See `--hostname` flag
183
+
- Unix domain socket support
184
+
- See `--unix-socket-path` flag
173
185
- Basic authentication support
174
-
- Can serve a [PAC (Proxy Auto-configuration)](https://en.wikipedia.org/wiki/Proxy_auto-config) file
186
+
- See `--basic-auth` flag
187
+
- PAC (Proxy Auto-configuration) support
175
188
- See `--pac-file` and `--pac-file-url-path` flags
176
189
177
190
# Install
178
191
192
+
## Stable vs Develop
193
+
194
+
`master` branch contains latest stable code and is available via `PyPi` repository
195
+
196
+
`develop` branch contains cutting edge changes
197
+
198
+
Development branch is kept stable *(most of the times)*. But if you want 100% reliability and serving users in production environment, always use stable version from `PyPi` or `Docker` container from `hub.docker.com`.
199
+
179
200
## Using PIP
180
201
181
202
### Stable Version with PIP
@@ -200,18 +221,17 @@ or from GitHub `master` branch
200
221
201
222
## Using Docker
202
223
203
-
####Stable Version from Docker Hub
224
+
### Stable Version from Docker Hub
204
225
205
226
```console
206
227
❯ docker run -it -p 8899:8899 --rm abhinavsingh/proxy.py:latest
-`Loaded plugin` - `proxy.py` will load `proxy.http.proxy.HttpProxyPlugin` by default.
258
-
As name suggests, this core plugin adds `http(s)` proxy server capabilities to `proxy.py`
277
+
-`Loaded plugin`
278
+
-`proxy.py` will load `proxy.http.proxy.HttpProxyPlugin` by default
279
+
- As name suggests, this core plugin adds `http(s)` proxy server capabilities to `proxy.py` instance
259
280
260
-
-`Started N workers` - Use `--num-workers` flag to customize number of worker processes.
261
-
By default, `proxy.py` will start as many workers as there are CPU cores on the machine.
281
+
-`Started N threadless workers`
282
+
- By default, `proxy.py` will start as many workers as there are CPU cores on the machine
283
+
- Use `--num-workers` flag to customize number of worker processes
284
+
- See [Threads vs Threadless](#threads-vs-threadless) to understand how to control execution mode
262
285
263
-
-`Started server on ::1:8899` - By default, `proxy.py` listens on IPv6 `::1`,
264
-
which is equivalent of IPv4 `127.0.0.1`. If you want to access `proxy.py` externally,
265
-
use `--hostname ::` or `--hostname 0.0.0.0` or bind to any other interface available
266
-
on your machine. See [CustomNetworkInterface](#customnetworkinterface) for how to customize
267
-
your system public IP as seen by the upstream servers.
286
+
-`Started server on ::1:8899`
287
+
- By default, `proxy.py` listens on IPv6 `::1`, which is equivalent of IPv4 `127.0.0.1`
288
+
- If you want to access `proxy.py` from external host, use `--hostname ::` or `--hostname 0.0.0.0` or bind to any other interface available on your machine.
289
+
- See [CustomNetworkInterface](#customnetworkinterface) for how to customize `proxy.py`*public IP seen by upstream servers*.
268
290
269
-
-`Port 8899` - Use `--port` flag to customize default TCP port.
291
+
-`Port 8899`
292
+
- Use `--port` flag to customize default TCP port.
270
293
271
-
####Enable DEBUG logging
294
+
### Enable DEBUG logging
272
295
273
-
All the logs above are `INFO` level logs, default `--log-level` for `proxy.py`.
296
+
All the logs above are `INFO` level logs, default `--log-level` for `proxy.py`
Browse through internal class hierarchy and documentation using `pydoc3`.
1524
-
Example:
1550
+
Code is well documented. Browse through internal class hierarchy and documentation using `pydoc3`
1525
1551
1526
1552
```console
1527
1553
❯ pydoc3 proxy
@@ -1539,8 +1565,6 @@ FILE
1539
1565
1540
1566
# Run Dashboard
1541
1567
1542
-
**This is a WIP and may not work as documented**
1543
-
1544
1568
Dashboard is currently under development and not yet bundled with `pip` packages.
1545
1569
To run dashboard, you must checkout the source.
1546
1570
@@ -1579,6 +1603,8 @@ Visit dashboard:
1579
1603
1580
1604
## Inspect Traffic
1581
1605
1606
+
***This is a WIP and may not work as documented***
1607
+
1582
1608
Wait for embedded `Chrome Dev Console` to load. Currently, detail about all traffic flowing
1583
1609
through `proxy.py` is pushed to the `Inspect Traffic` tab. However, received payloads are not
1584
1610
yet integrated with the embedded dev console.
@@ -1603,19 +1629,23 @@ Now point your CDT instance to `ws://localhost:8899/devtools`.
1603
1629
1604
1630
## Threads vs Threadless
1605
1631
1606
-
### Pre v2.x
1632
+
### `v1.x`
1607
1633
1608
1634
`proxy.py` used to spawn new threads for handling client requests.
1609
1635
1610
-
### Starting v2.0
1636
+
### `v2.0+`
1611
1637
1612
1638
`proxy.py` added support for threadless execution of client requests using `asyncio`.
1613
1639
1614
-
### Starting v2.4.0
1640
+
### `v2.4.0+`
1641
+
1642
+
Threadless execution was turned ON by default for `Python 3.8+` on `mac` and `linux` environments.
1643
+
1644
+
`proxy.py` threadless execution has been reported safe on these environments by our users. If you are running into trouble, fallback to threaded mode using `--threaded` flag.
1615
1645
1616
-
Threadless execution was turned ON by default for `Python 3.8+` on `mac` and `linux` environments. `proxy.py`threadless execution has been reported safe on these environments by our users. If you are running into trouble, fallback to threaded mode using `--threaded` flag.
1646
+
For `windows` and `Python < 3.8`, you can still try out threadless mode by starting `proxy.py` with `--threadless` flag.
1617
1647
1618
-
For `windows` and `Python < 3.8`, you can still try out threadless mode by starting `proxy.py` with `--threadless` flag. If threadless works for you, consider sending a PR by editing `_env_threadless_compliant` method in the `proxy/common/constants.py` file.
1648
+
If threadless works for you, consider sending a PR by editing `_env_threadless_compliant` method in the `proxy/common/constants.py` file.
0 commit comments