# Technical Documentation: wanghongenpin/proxypin

> ℹ️ **Provenance:** Multi-Tier Ingestion · [CodeWiki Reference](https://codewiki.google/github.com/wanghongenpin/proxypin)

### Overview (`README.md`)

# ProxyPin

English | [中文](README_CN.md)
## Open source free traffic capture HTTP(S)，Support Windows、Mac、Android、IOS、Linux Full platform system

You can use it to intercept, inspect & rewrite HTTP(S) traffic, Support capturing Flutter app traffic, ProxyPin is based on Flutter develop, and the UI is beautiful
and easy to use.

## Features
* Mobile scan code connection: no need to manually configure WiFi proxy, including configuration synchronization. All terminals can scan codes to connect and forward traffic to each other.
* Domain name filtering: Only intercept the traffic you need, and do not intercept other traffic to avoid interference with other applications.
* Search: Search requests according to keywords, response types and other conditions
* Script: Support writing JavaScript scripts to process requests or responses.
* Request Rewrite: Support redirection, support replacement of request or response message, and can also modify request or response according to the increase.
* Request Mapping: Do not request remote services, use local configuration or scripts for response
* Request Decryption: Configure AES decryption key to automatically decrypt HTTP message body
* Request Blocking: Support blocking requests according to URL, and do not send requests to the server.
* History: Automatically save the captured traffic data for easy backtracking and viewing. Support HAR format export and import.
* Others: Favorites, toolbox, common encoding tools, as well as QR codes, regular expressions, etc.

**Mac will prompt untrusted developers when first opened, you need to go to System Preferences-Security & Privacy-Allow any source.**

## Sponsors

If ProxyPin is helpful to you, you are welcome to support us in the following ways to help the project develop in the long term:

* [Buy Me A Coffee](https://buymeacoffee.com/proxypin)
* [AFDIAN](https://afdian.com/a/proxypin)
* Submit feedback and suggestions to help us improve
* Contribute code or documentation to the project

**Your support will be used for project maintenance, feature development, and user experience optimization. Thank you very much!**

## Downloads

Github Releases: https://github.com/wanghongenpin/proxypin/releases

iOS App Store：https://apps.apple.com/app/proxypin/id6450932949

Android Google Play：https://play.google.com/store/apps/details?id=com.network.proxy

TG: https://t.me/proxypin_en

**We will continue to improve the features and experience, as well as optimize the UI.**

<img alt="image"  width="580px" height="420px"  src="https://github.com/user-attachments/assets/6c1345ab-c95c-415d-ac59-470c764b59a2">.<img alt="image"  height="500px" src="https://github.com/user-attachments/assets/3c5572b0-a9e5-497c-8b42-f935e836c164">


### Powered by
[](https://jb.gg/OpenSource)

---

### Overview (`ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md`)

# Launch Screen Assets

You can customize the launch screen with your own desired assets by replacing the image files in this directory.

You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.

---

### Design Implementation Brief (`docs/design/implementation-brief.md`)

# ProxyPin 首页改版 · 实现简报（交接给实现方）

## 设计依据
高保真设计稿 + 每区块实现备注：`docs/design/homepage.html`（浏览器打开，共 6 节：桌面首页 / 设置菜单+规则页 / 快捷工具栏 / 桌面详情 4Tab / 手机端 3 屏 / 手机详情 4Tab）。**实现前先通读该文件。**

## 任务清单（按顺序，每步独立提交）

### ① 桌面详情面板 Overview（`lib/ui/content/panel.dart`）
- 顶部加标题栏：Method + 完整 URL + 快捷操作（复制 / 重发 / 收藏），仅桌面嵌入模式加，不影响手机端与独立窗口模式（`widget.title != null` 时保持现状）。
- 首 Tab `General` 改名并重做为 **Overview**：聚合卡（状态码 / 协议 / 耗时 / 大小 / 远程地址 / 请求时间 / App）+ 响应体预览卡（JSON/Raw/Preview 切换）。原 General 字段不丢。
- 请求 / 响应 / Cookies / WebSocket / SSE / MQTT 逻辑不动。

### ② 设置菜单瘦身 + 左侧「规则」页（桌面）
- `lib/ui/desktop/setting/setting.dart`：`menuChildren` 从 13 项减到 7 项：代理▸ / 域名过滤 / Hosts / 外部代理 / 弱网 / MCP 服务 / 关于，加分组标签与图标。
- `lib/ui/desktop/left_menus/navigation.dart` + `desktop.dart`：NavigationRail 在 历史 与 工具箱 之间加「规则」；`navigationView` 对应加一页。
- 新建规则页（参考 `docs/design/homepage.html` 规则页 mock）：请求屏蔽 / 重写 / 映射 / 加密 / 脚本 / 断点 6 行，每行显示 启用状态 + 规则数，点击复用 `setting.dart` 里现有的打开逻辑（MultiWindow.openWindow / dialog），**被打开的页面零改动**。

### ③ 快捷工具栏（桌面，`lib/ui/desktop/toolbar/toolbar.dart`）
- 功能注册表：id / 图标 / 名称 / 启动动作（动作复用现有 openWindow/dialog 调用）。
- `AppConfiguration` 持久化有序 id 列表（默认：重写/映射/脚本）。
- 工具栏 SSL 图标后渲染已固定的纯图标按钮（样式与其他 IconButton 一致，名称用 tooltip）。
- 末尾 ⋯ 弹流量控制菜单（6 项，行尾 📌 固定/取消固定），底部「自定义快捷工具栏…」打开排序面板（chip 拖拽排序 + 恢复默认）。
- **注意**：项目用定制 Flutter SDK，`ReorderableListView` 的 `onReorderItem` 回调 newIndex **已减过 1**，业务代码不要再减。
- 可固定范围：流量控制 6 项 + 设置菜单项；工具箱功能不参与。

### ④ 手机端（`lib/ui/mobile/`）
- `mobile.dart` 底部导航 4 项不变，「配置」换成「规则」：请求 / 规则 / 工具箱 / 设置。
- 规则 tab = 桌面规则页的移动版（`Navigator.push` 复用现有页面）。
- 原「配置」页（`menu/bottom_navigation.dart` ConfigPage）分流：流量控制 6 项 → 规则 tab；收藏 / 历史 → 请求页 ⋮ MoreMenu；其余（代理 / 过滤 / Hosts / 外部代理 / 弱网 / 环境变量 / MCP / 关于）并入「设置」tab 页面。

## 硬性约束
1. **不准动** `lib/ui/desktop/request/domains.dart` 的数据结构（此前重构被否，只允许最小改动）。
2. 文案走国际化：`lib/l10n/app_zh.arb` + `app_en.arb` 等，用 `AppLocalizations`，不要硬编码中文。
3. 视觉规范：主色 #4A6CF7、圆角 8–10px、语义色 GET 绿 / POST 橙 / PUT 蓝 / DELETE 红 / WS 紫；代码与数值用等宽字体。
4. 代理开关样式（用户拍板）：浅色边框胶囊 = 电源图标 + 绿点 +「运行中 · :9099」，停止时灰点 +「已停止」；运行中带淡绿底 #F0F8F2 + 绿色描边。
5. 每步 `flutter analyze` 无新增警告后再提交。

---

--- METRICS ---
- Files Extracted: 3
- Estimated Token Budget: ~1344 tokens
- Canonical Reference: https://codewiki.google/github.com/wanghongenpin/proxypin
