|
| 1 | +You can launch the proxy directly and configure it with the following arguments: |
| 2 | + |
| 3 | +| Argument | Short | Description | Default Value | Slim version | |
| 4 | +|----------|-------|-------------|---------------|---------------| |
| 5 | +| `--version` | `-v` | Show version information | N/A | | |
| 6 | +| `--debug` | | Enable debug logging | `False` | | |
| 7 | +| `--host` | `-H` | IP address to listen on | `0.0.0.0` | | |
| 8 | +| `--port` | `-P` | Port to listen on | `8080` | | |
| 9 | +| `--config-file` | `-f` | Path to `config.ini` file | `./config.ini` | | |
| 10 | +| `--access-log` | | Path to the access log file | `logs/access.log` | | |
| 11 | +| `--block-log` | | Path to the block log file | `logs/block.log` | | |
| 12 | +| `--html-403` | | Path to the custom 403 Forbidden HTML page | `assets/403.html` | | |
| 13 | +| `--filter-mode` | | Disable URL and domain filtering | `False` | | |
| 14 | +| `--no-filter` | | Filter list mode (local or http) | `local` | | |
| 15 | +| `--blocked-sites` | | Path to the text file containing the list of sites to block | `config/blocked_sites.txt` | | |
| 16 | +| `--blocked-url` | | Path to the text file containing the list of URLs to block | `config/blocked_url.txt` | | |
| 17 | +| `--shortcuts` | | Path to the text file containing the list of shortcuts | `config/shortcuts.txt` | **not included** | |
| 18 | +| `--custom-header` | | Path to the json file containing the list of custom headers | `config/custom_header.json` | **not included** | |
| 19 | +| `--authorized-ips` | | Path to the txt file containing the list of authorized ips | `config/authorized_ips.txt` | | |
| 20 | +| `--no-logging-access` | | Disable access logging | `False` | | |
| 21 | +| `--no-logging-block` | | Disable block logging | `False` | | |
| 22 | +| `--ssl-inspect` | | Enable SSL inspection | `False` | | |
| 23 | +| `--inspect-ca-cert` | | Path to the CA certificate | `certs/ca/cert.pem` | | |
| 24 | +| `--inspect-ca-key` | | Path to the CA key | `certs/ca/key.pem` | | |
| 25 | +| `--inspect-certs-folder` | | Path to the generated certificates folder | `certs/` | | |
| 26 | +| `--cancel-inspect` | | Path to the text file containing the list of URLs without ssl inspection | `config/cancel_inspect.txt` | | |
| 27 | +| `--flask-port` | | Port to listen on for monitoring interface | `5000` | **not included** | |
| 28 | +| `--flask-pass` | | Default password to Flask interface | `password` | **not included** | |
| 29 | +| `--proxy-enable` | | Enable proxy after PyProxy | `False` | | |
| 30 | +| `--proxy-host` | | Proxy IP to use after PyProxy | `127.0.0.1` | | |
| 31 | +| `--proxy-port` | | Proxy Port to use after PyProxy | `8081` | | |
| 32 | + |
| 33 | +## Example |
| 34 | +### With source |
| 35 | +Example of a launch with SSL inspection for HTTPS requests |
| 36 | +```bash |
| 37 | +python3 pyproxy.py --ssl-inspect |
| 38 | +``` |
| 39 | + |
| 40 | +!!! warning |
| 41 | + Please note: for SSL inspection, you must configure a certificate authority to generate SSL certificates. |
| 42 | + Here is the documentation on [SSL Inspection](../features/ssl_inspection.md) |
| 43 | + |
| 44 | +### With Docker image |
| 45 | +Example of a launch with SSL inspection for HTTPS requests |
| 46 | +```bash |
| 47 | +docker run -d ghcr.io/6c656c65/pyproxy:latest --ssl-inspect |
| 48 | +``` |
| 49 | +!!! warning |
| 50 | + Please note: for SSL inspection, you must configure a certificate authority to generate SSL certificates. |
| 51 | + Here is the documentation on [SSL Inspection](../features/ssl_inspection.md) |
| 52 | + |
| 53 | +## With configuration file |
| 54 | +You can configure the proxy using a [From an .ini file](../configuration/from_ini_file.md) instead of arguments. |
0 commit comments