proxyfor 0.1.0

A simple and portable proxy for capturing HTTP and HTTPS traffic.
proxyfor-0.1.0 is not a library.
Visit the last successful build: proxyfor-0.5.0

proxyfor

CI Crates

A simple and portable proxy for capturing HTTP and HTTPS traffic.

Installation

With cargo

cargo install proxyfor

Binaries on macOS, Linux, Windows

Download from Github Releases, unzip and add proxyfor to your $PATH.

Usage

Proxy Mode

The client sets the proxy to http://localhost:8080 for proxyfor to capture the http(s) traffic.

$ proxyfor
$ curl -x http://localhost:8080 httpbin.org/ip

proxy-mode

Forward Mode

This mode is suitable for scenarios where a proxy cannot be set.

The client directly requests http://localhost:8080, and proxyfor forwards the request to https://httpbin.org.

$ proxyfor httpbin.org/ip
$ curl http://localhost:8080/ip

forward-mode

CLI

Usage: proxyfor [OPTIONS] [URL]

Arguments:
  [URL]  Forward url

Options:
  -l, --listen <ADDR>         Listening ip and port address [default: 0.0.0.0:8080]
  -f, --filters <REGEX>       Only inspect http(s) traffic whose `{method} {uri}` matches the regex
  -m, --mime-filters <VALUE>  Only inspect http(s) traffic whose content-type matches the value
  -h, --help                  Print help
  -V, --version               Print version

Change the ip and port.

proxyfor -l 18080
proxyfor -l 127.0.0.1
proxyfor -l 127.0.0.1:18080

Use -f/--filters to filter traffic by title ({method} {uri}).

proxyfor -f httpbin.org -f postman-echo.com
proxyfor -f '/^(get|post) https:\/\/httpbin.org/'       

Use -m/--mime-filters to filter traffic by content-type.

proxyfor -m application/json -m application/ld+json
proxyfor -m text/

Pipe it to a markdown file, then analyze the captured traffic using your favorite editor/IDE with folding, navigation, search capabilities.

proxyfor > proxyfor.md

Certificates

proxyfor can decrypt encrypted traffic on the fly, as long as the client trusts proxyfor’s built-in certificate authority. Usually this means that the proxyfor CA certificate has to be installed on the client device.

By far the easiest way to install the proxyfor CA certificate is to use the built-in certificate installation app. To do this, start proxyfor and configure your target device with the correct proxy settings. Now start a browser on the device, and visit the magic domain proxyfor.local.

proxyfor.local

License

Copyright (c) 2024-∞ proxyfor-developers.

proxyfor is made available under the terms of either the MIT License or the Apache License 2.0, at your option.

See the LICENSE-APACHE and LICENSE-MIT files for license details.