Redirect traffic using PF along with Internet Sharing
I found the answer.
I loaded my rules as part of the anchor com.apple/100.InternetSharing/natpmp
which is the one used for Internet Sharing.
The file mitm.pf.conf
contains the rules:
rdr on bridge0 proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr on bridge0 proto tcp from any to any port 443 -> 127.0.0.1 port 8080`
Load it using the Internet Sharing anchor:
sudo pfctl -a com.apple/100.InternetSharing/natpmp -f mitm.pf.conf