Commit Graph

551 Commits

Author SHA1 Message Date
testercengdong
202050b35f fix(macos): use libproc FFI for process info to eliminate fork leak
Replace Process.run('lsof') and Process.run('ps') in the request hot
path with direct libproc syscalls (proc_listpids, proc_pidinfo,
proc_pidfdinfo, proc_pidpath) via dart:ffi.

Each Process.run on macOS goes through fork()+execvp(). In a
multi-threaded Dart VM the forked child can deadlock before exec on
mutexes that were held by other threads at fork time (POSIX fork()
only clones the calling thread, leaving cloned mutex state with no
owners in the child). Under proxy load (~500 concurrent requests),
roughly 2% of the fork()s deadlock; the orphaned children inherit the
listening proxy fd and pin it for the lifetime of the system, so the
port stays bound even after the parent app exits.

libproc syscalls do not spawn child processes, so they avoid the fork
problem entirely. They are also about an order of magnitude faster
than spawning lsof per request.

Windows and Linux paths are unchanged (independent follow-up).

Verified end-to-end on macOS 26.4 / Darwin 25.4:
- 500 concurrent curl through the proxy: 0 fork leaks (was ~2% before)
- Process icons still resolve correctly for .app bundles (Chrome,
  Safari, Lark, etc.)
- 9099 frees immediately on app exit (no orphan listeners)

Fixes #763
2026-05-11 15:23:59 +08:00
wanghongenpin
980b8b3037 feat: add 'Copy as fetch' and other clipboard options to request menu (#685) 2026-05-10 21:20:24 +08:00
wanghongenpin
a950c71d81 feat: add 'Copy as fetch' functionality (#685) 2026-05-10 21:03:41 +08:00
wanghongenpin
1447cd529a feat: implement system proxy cleanup on session end 2026-05-09 14:02:04 +08:00
wanghongenpin
cd86e1dbcb fix: ensure configuration is flushed on enable change 2026-05-08 03:41:00 +08:00
wanghongenpin
e0b29cf08f feat: add minimize to tray functionality (#711) 2026-05-07 23:57:49 +08:00
wanghongenpin
0c6acb2567 feat: add minimize to tray functionality (#711) 2026-05-07 20:31:21 +08:00
wanghongenpin
eb2abd8f29 Merge pull request #753 from Pandaver/main
feat: add split report mode for report server
2026-04-27 03:29:10 +08:00
Pandaver
b887aa4854 fix: handle error phase and sync response param in split report mode
分离模式下 onError 时跳过 response 阶段上报,
同时显式同步 response 参数到 request.response 避免参数被忽略。
2026-04-22 21:24:06 +08:00
Pandaver
9d420d086a Merge branch 'wanghongenpin:main' into main 2026-04-22 20:46:08 +08:00
wanghongenpin
8f9a79f5e3 Merge pull request #745 from Pandaver/fix-non-ascii-report-server-name
fix: URL encode report server name to support non-ASCII characters (#744)
2026-04-22 15:17:37 +08:00
Pandaver
ddad789d6f feat: add split report mode for report server
支持分离上报模式,开启后 request 和 response 分两次独立上报,
通过 _id 关联。解决 response 超时或无响应时请求无法上报的问题。
2026-04-21 12:53:44 +08:00
wanghongenpin
5b440ef43a mac profile v1.2.7 2026-04-14 15:14:51 +08:00
Pandaver
554124d494 fix: URL encode report server name to support non-ASCII characters (#744) 2026-04-13 11:53:06 +08:00
wanghongenpin
3eb4986496 1.2.7-beta 2026-04-12 18:47:18 +08:00
wanghongenpin
841d0fd449 optimize rendering of large texts 2026-04-09 21:32:22 +08:00
wanghongenpin
22fc0d3ba5 feat: add CSS and JS formatting support and improve body text handling 2026-04-09 05:28:34 +08:00
wanghongenpin
055910b4be feat: refactor futureWidget into _FutureWidget for improved state management 2026-04-09 04:15:48 +08:00
wanghongenpin
80df6cbc88 feat: enhance HighlightTextWidget with language support and refactor highlighting logic (#721) 2026-04-08 22:50:19 +08:00
wanghongenpin
bcd8af3e2d feat: add XML and HTML formatting support (#721) 2026-04-04 00:59:46 +08:00
wanghongenpin
87fb5a7f21 Add guidance to remote script loading (#735) 2026-04-02 15:19:13 +08:00
wanghongenpin
5a3ab74ddb add AGENTS.md 2026-03-30 21:23:17 +08:00
wanghongenpin
654d27667a feat: implement batch processing for remote history sharing 2026-03-30 03:12:41 +08:00
wanghongenpin
1aff89ed8c feat: implement quick share functionality for remote devices 2026-03-29 02:14:19 +08:00
wanghongenpin
7c9c4066dd refactor: improve request management and auto-read handling (#718) 2026-03-25 02:44:05 +08:00
wanghongenpin
69cc1aff8d refactor: enhance auto-read request management 2026-03-25 01:29:50 +08:00
wanghongenpin
c706174894 add export functionality for domain HAR files (#725) 2026-03-22 01:43:24 +08:00
wanghongenpin
8ab517bb38 Favorites support WebSocket message persistence (#709) 2026-03-20 19:21:11 +08:00
wanghongenpin
5293171f37 custom repeat supports specifying the selected time (#712) 2026-03-18 01:20:19 +08:00
wanghongenpin
d7a3a2593b Merge pull request #659 from yuuouu/main
optimize camera permission process
2026-03-15 13:34:01 +08:00
wanghongenpin
3fe5ec3f74 update mobile drawer menu 2026-03-12 23:34:33 +08:00
wanghongenpin
25fec1f5e0 fix h2 IPv6 parse v1.2.6 2026-03-11 21:04:49 +08:00
wanghongenpin
42842236ea Update request breakpoint matching to use regular expressions for improved URL matching 2026-03-10 22:06:28 +08:00
wanghongenpin
0095344b50 Validate proxy port input and show error for out-of-range values 2026-03-07 11:51:56 +08:00
wanghongenpin
8013615b4d Refactor request breakpoint management to eliminate instance retrieval and pass manager directly 2026-03-01 23:55:10 +08:00
wanghongenpin
f8345c32c2 1.2.6-beta 2026-03-01 20:46:35 +08:00
wanghongenpin
531732696d Enhance request and response handling to support null values and improve breakpoint execution logic 2026-02-28 21:29:48 +08:00
wanghongenpin
3c4b97380d Refactor request breakpoint handling to use ExpiringCache for paused requests and responses 2026-02-28 21:22:25 +08:00
wanghongenpin
6bf5063bed Add autocomplete suggestions for HTTP headers in request editor 2026-02-27 01:00:03 +08:00
wanghongenpin
905d8932bd Add breakpoint export and import (#669)(#660)(#386) 2026-02-25 16:41:12 +08:00
wanghongenpin
c17066748f add 'Execute' localization for request and response actions (#669)(#660)(#386) 2026-02-24 22:56:07 +08:00
wanghongenpin
1148c837e7 implement request breakpoint management UI and functionality (#669)(#660)(#386) 2026-02-23 17:08:12 +08:00
wanghongenpin
ff06ac924a support additional SOCKS5 address types: domain and IPv6 (#699) 2026-02-19 22:21:33 +08:00
wanghongenpin
d4465bcd29 implement request and response breakpoint functionality with UI integration (#669)(#660)(#386) 2026-02-18 22:59:01 +08:00
wanghongenpin
f418a20568 add request breakpoint functionality (#669)(#660)(#386) 2026-02-16 21:57:09 +08:00
wanghongenpin
c4d3421373 ios proxy pass domains (#527) 2026-02-15 01:25:05 +08:00
wanghongenpin
a3e744ee2e android proxy pass domains (#527) 2026-02-08 12:45:24 +08:00
wanghongenpin
b838bf73b9 fix mac set system proxy (#672) 2026-02-06 16:15:03 +08:00
wanghongenpin
7e6360b4b6 android set system proxy (#574) 2026-02-06 14:27:23 +08:00
wanghongenpin
02bc02880c v1.2.5 2026-01-30 18:11:16 +08:00