{"id":13821174,"url":"https://github.com/sigoden/proxyfor","last_synced_at":"2025-05-15T04:07:48.566Z","repository":{"id":225932496,"uuid":"767274746","full_name":"sigoden/proxyfor","owner":"sigoden","description":"A powerful and flexible proxy CLI for capturing and inspecting HTTP(S) and WS(S) traffic, with TUI and WebUI.","archived":false,"fork":false,"pushed_at":"2025-01-19T08:20:48.000Z","size":259,"stargazers_count":415,"open_issues_count":0,"forks_count":28,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-14T05:56:40.730Z","etag":null,"topics":["cli","forward-proxy","http","http2","https","man-in-the-middle","proxy","proxy-server","reverse-proxy","rust","websocket"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sigoden.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-05T01:56:58.000Z","updated_at":"2025-04-03T13:54:17.000Z","dependencies_parsed_at":"2024-08-04T08:05:59.008Z","dependency_job_id":"ecc96441-d70f-4062-a9e1-fa75f3d2a3fd","html_url":"https://github.com/sigoden/proxyfor","commit_stats":null,"previous_names":["sigoden/forproxy","sigoden/proxyfor"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Fproxyfor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Fproxyfor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Fproxyfor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sigoden%2Fproxyfor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sigoden","download_url":"https://codeload.github.com/sigoden/proxyfor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254270656,"owners_count":22042860,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","forward-proxy","http","http2","https","man-in-the-middle","proxy","proxy-server","reverse-proxy","rust","websocket"],"created_at":"2024-08-04T08:01:16.775Z","updated_at":"2025-05-15T04:07:43.513Z","avatar_url":"https://github.com/sigoden.png","language":"Rust","readme":"# Proxyfor\n\n[![CI](https://github.com/sigoden/proxyfor/actions/workflows/ci.yaml/badge.svg)](https://github.com/sigoden/proxyfor/actions/workflows/ci.yaml)\n[![Crates](https://img.shields.io/crates/v/proxyfor.svg)](https://crates.io/crates/proxyfor)\n[![Docker Pulls](https://img.shields.io/docker/pulls/sigoden/proxyfor)](https://hub.docker.com/r/sigoden/proxyfor)\n\nA powerful and flexible proxy CLI for capturing and inspecting HTTP(S) and WS(S) traffic.\n\n## Features\n\n- Supports forward/reverse proxy\n- Provides TUI \u0026 WebUI\n- Enables filtering \u0026 searching\n- Handles HTTP/HTTPS/WS/WSS protocols\n- Comes with a tool for installing CA certificates\n- Allows export in Markdown, cURL, or HAR formats\n- Captures request/response in a non-blocking, streaming way\n- Offers a single-file portable executable for use across Windows/macOS/Linux\n\n## Screenshots\n\n**Terminal User Interface (TUI)**\n![proxyfor-tui](https://github.com/user-attachments/assets/87a93e09-4783-4273-85b6-002762909fc3)\n\n**Web User Interface (WebUI)**\n![proxyfor-webui](https://github.com/user-attachments/assets/4f1f921a-95ec-44e0-8a2f-671614c0b934)\n\n## Installation\n\n### With cargo\n\n```\ncargo install proxyfor\n```\n\n### With docker\n\n```\ndocker run -v ~/.proxyfor:/.proxyfor -p 8080:8080 --rm sigoden/proxyfor --web \n```\n\n### Binaries on macOS, Linux, Windows\n\nDownload from [Github Releases](https://github.com/sigoden/proxyfor/releases), unzip and add proxyfor to your $PATH.\n\n## Proxy Modes Explained\n\n### Forward Proxy\n\nIn this mode, your client applications (e.g., web browsers, curl) are configured to send their requests to `proxyfor`, which then forwards them to the target servers. You would configure your client to use a proxy at `http://127.0.0.1:8080`.\n\n```bash\nproxyfor\ncurl -x http://127.0.0.1:8080 httpbin.org/ip\n```\n\n### Reverse Proxy\n\nIn reverse proxy mode, `proxyfor` sits in front of a target server. Clients access `proxyfor` and it forwards the requests to the defined URL. This mode is ideal when clients cannot be configured to use a proxy.\n\n```bash\nproxyfor https://httpbin.org\ncurl http://127.0.0.1:8080/ip\n```\n\n## Command Line Interface (CLI)\n\n```\nUsage: proxyfor [OPTIONS] [URL]\n\nArguments:\n  [URL]  Reverse proxy url\n\nOptions:\n  -l, --listen \u003cADDR\u003e         Listening ip and port address [default: 0.0.0.0:8080]\n  -f, --filters \u003cREGEX\u003e       Only inspect http(s) traffic whose `{method} {uri}` matches the regex\n  -m, --mime-filters \u003cVALUE\u003e  Only inspect http(s) traffic whose content-type matches the value\n  -W, --web                   Enable user-friendly web interface\n  -T, --tui                   Eenter TUI\n  -D, --dump                  Dump all traffics\n  -h, --help                  Print help\n  -V, --version               Print version\n```\n\n### Choosing User Interface\n\n`proxyfor` provides several ways to interact with captured traffic:\n\n```sh\nproxyfor                   # Enter TUI, equal to `proxyfor --tui`\nproxyfor --web             # Serve WebUI\nproxyfor --web --tui       # Serve WebUI + Enter TUI\nproxyfor --dump            # Dump all traffics to console\nproxyfor \u003e proxyfor.md     # Dump all traffics to markdown file\n```\n\n### Specifying Address and Port\n\nCustomize the listening address and port:\n\n```sh\nproxyfor -l 8081\nproxyfor -l 127.0.0.1\nproxyfor -l 127.0.0.1:8081\n```\n\n### Filtering Traffic\n\nApply regex filters to limit captured traffic based on method and URI:\n\n```sh\nproxyfor -f httpbin.org/ip -f httpbin.org/anything\nproxyfor -f '/^(get|post) https:\\/\\/httpbin.org/'\n```\n\nFilter based on MIME types:\n\n```sh\nproxyfor -m application/json -m application/ld+json\nproxyfor -m text/\n```\n\n## CA Certificate Installation\n\nTo decrypt HTTPS traffic, you must install `proxyfor`'s CA certificate on your device. The easiest way to do this is to use the built-in certificate installation app.\n\n1. Start `proxyfor` with desired proxy settings.\n2. On your target device, configure the device to use `proxyfor` as the proxy.\n3. Open a web browser on the target device and navigate to [proxyfor.local](http://proxyfor.local).\n4. Follow the on-screen instructions to download and install the CA certificate.\n\n![proxyfor.local](https://github.com/sigoden/proxyfor/assets/4012553/a5276872-8ab1-4794-9e97-ac7038ca5e4a)\n\n## License\n\nCopyright (c) 2024-∞ proxyfor-developers.\n\nProxyfor is made available under the terms of either the MIT License or the Apache License 2.0, at your option.\n\nSee the LICENSE-APACHE and LICENSE-MIT files for license details.","funding_links":[],"categories":["Rust","cli","命令行工具"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Fproxyfor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsigoden%2Fproxyfor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsigoden%2Fproxyfor/lists"}