GithubHelp home page GithubHelp logo

henryisme / proxyfor Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sigoden/proxyfor

0.0 0.0 0.0 204 KB

A lightweight proxy for capturing HTTP(S) and WS(S) traffic.

License: Apache License 2.0

Rust 71.04% HTML 28.41% Dockerfile 0.55%

proxyfor's Introduction

Proxyfor

CI Crates Docker Pulls

A lightweight proxy for capturing HTTP(S) and WS(S) traffic.

Features

  • Support forward proxy
  • Support reverse proxy
  • Support filtering
  • Support HTTP/HTTPS/WS/WSS protocols
  • Integrate web interface
  • Integrate certificates installation webapp
  • Export in Markdown, cURL, or HAR formats

Installation

With cargo

cargo install proxyfor

With docker

docker run -v ~/.proxyfor:/.proxyfor -p 8080:8080 --rm sigoden/proxyfor --web 

Binaries on macOS, Linux, Windows

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

Usage

Forward Proxy

The client sets the proxy to http://127.0.0.1:8080.

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

forwarding-proxy

Reverse Proxy

The client directly requests http://127.0.0.1:8080.

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

$ proxyfor https://httpbin.org
$ curl http://127.0.0.1:8080/ip

Web Interface

Proxyfor provides a web-based user interface that allows you to interactively inspect the HTTP traffic. All traffic is kept in memory, which means that it’s intended for small-ish samples.

$ proxyfor --web

proxyfor-webui

Command Line

Usage: proxyfor [OPTIONS] [URL]

Arguments:
  [URL]  Reverse proxy 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
  -w, --web                   Enable web interface
  -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

Enable web interface with -w/--web

proxyfor --web

Use -f/--filters to filter traffic by matching {method} {uri}.

proxyfor -f httpbin.org/ip -f httpbin.org/anything
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 view the captured traffic using your favorite editor/IDE with syntax highlighting, folding, 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.

proxyfor's People

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.