Intercept own macOS traffic (from the box running pf itself)?

I built a transparent-proxy app but currently I have to use workaround to redirect traffic coming from the same machine where I run pf, this because I can’t distinguish between an outbound connection from a non-transparent-proxy app, and an outbound connection from transparent-proxy app itself.

The only solution I found is to launch the transparent-proxy app from a fancy nobody user and add an exception in pf.conf to that nobody user.

I read something about NETransparentProxyNetworkSettings in #658631 thread but the solution is not clear and probably out dated

thanks for helping

Intercept own macOS traffic (from the box running pf itself)?
 
 
Q