I was trying to create local transparent proxy using this pf rules:
rdr pass inet proto tcp from $Out to any port 80 -> 127.0.0.1 port 3129
pass out on $Out route-to lo0 inet proto tcp from $Out to any port 80 keep state
but the problem is that when proxy server is trying to connect to remote server(port 80) it also gets redirected creating infinite redirection loop. Is there anything i can do?