2026-01-09 19:26:48 +05:30
|
|
|
# Proxy Mode
|
|
|
|
|
|
2026-02-02 12:58:28 +05:30
|
|
|
PMG supports proxy based interception as an alternative to the current optimistic dependency resolution. When enabled via `--proxy-mode` flag:
|
2026-01-09 19:26:48 +05:30
|
|
|
|
|
|
|
|
- PMG starts a micro-proxy server on a random localhost port
|
2026-01-09 22:03:42 +05:30
|
|
|
- Runs `npm` and other supported package managers configured to use the proxy
|
|
|
|
|
- Intercepts package registry requests and analyzes packages as they are downloaded
|
|
|
|
|
- Blocks malicious packages and allows trusted packages to be installed
|
2026-01-09 19:26:48 +05:30
|
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
|
|
|
|
|
```bash
|
2026-02-02 12:58:28 +05:30
|
|
|
pmg --proxy-mode npm install lodash
|
2026-01-09 19:26:48 +05:30
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
|
|
|
|
To permanently enable proxy mode, add the following to your `config.yml` file:
|
|
|
|
|
|
|
|
|
|
```yaml
|
2026-02-02 12:58:28 +05:30
|
|
|
proxy_mode: true
|
2026-01-09 19:26:48 +05:30
|
|
|
```
|
|
|
|
|
|
|
|
|
|
## Supported Package Managers
|
|
|
|
|
|
2026-01-21 20:29:15 +05:30
|
|
|
| Package Manager | Status |
|
|
|
|
|
| --------------- | ------ |
|
|
|
|
|
| `npm` | ✅ |
|
|
|
|
|
| `npx` | ✅ |
|
|
|
|
|
| `pnpm` | ✅ |
|
|
|
|
|
| `pnpx` | ✅ |
|
|
|
|
|
| `bun` | ✅ |
|
|
|
|
|
| `yarn` | ✅ |
|
2026-02-05 13:30:27 +05:30
|
|
|
| `pip` | ✅ |
|
|
|
|
|
| `uv` | ✅ |
|
|
|
|
|
| `poetry` | ✅ |
|