testercengdong 71e49421ae fix(macos,process_info): filter LISTEN sockets + .app suffix + alloc safety
Three issues raised by ultrareview on top of the previous review pass:

1. (regression) findPidByLocalTcpPort accepted any TCP socket whose
   insi_lport matched, including LISTEN sockets. The original
   `lsof | grep "${port}->"` excluded LISTEN entries implicitly via the
   "->" filter (LISTEN renders as `*:port (LISTEN)`, no `->`). When a
   long-running daemon LISTENs on a port that coincides with a client's
   ephemeral source port, proc_listpids hits the lower-PID daemon first
   and misattributes the request; with the new 30s pid cache the wrong
   PID stuck for 30s of follow-up requests. Now skip sockets with
   insi_fport == 0 (the LISTEN signature) to mirror the old grep filter
   exactly.

2. (pre-existing) getProcess in the macOS path unconditionally appended
   ".app" to the executable path, producing non-existent paths like
   "/usr/bin/curl.app" for non-bundle binaries. This poisoned the icon
   cache with empty bytes for 5 minutes. Now only append when the path
   actually contains ".app/"; standalone binaries use the executable
   path verbatim.

3. (nit) pidBuf/sockBuf were allocated before the outer try, leaking on
   the (extremely rare) case that the second calloc throws. Moved both
   allocations inside the try with null-aware free in finally, matching
   the pattern the inner fdBuf loop already uses.

Verified:
- LISTEN-only port -> FFI returns null (matches lsof+grep behavior)
- ESTABLISHED outbound -> FFI returns the correct client PID
- 500 concurrent curl through proxy -> single ProxyPin process, no
  fork leaks (original #763 fix preserved)
2026-05-12 11:28:33 +08:00
2026-03-01 20:46:35 +08:00
2026-04-09 21:32:22 +08:00
2025-03-28 20:19:44 +08:00
2023-07-03 01:41:12 +08:00
2026-03-30 21:23:17 +08:00
2025-04-13 23:10:50 +08:00
2025-05-17 14:18:03 +08:00
2025-09-23 16:37:07 +08:00
2025-11-24 15:47:47 +08:00
2023-06-21 18:29:42 +08:00

ProxyPin

English | 中文

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
  • AFDIAN
  • 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 Storehttps://apps.apple.com/app/proxypin/id6450932949

Android Google Playhttps://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.

image.image

v1.2.2 Latest
2025-10-20 22:48:47 +08:00
Languages
Dart 85.3%
Swift 5%
Kotlin 4.9%
Objective-C 1.5%
C++ 1.1%
Other 2.1%