rdr pass on lo0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass on lo0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
rdr pass on en0 inet proto tcp from any to any port 80 -> 127.0.0.1 port 8080
rdr pass on en0 inet proto tcp from any to any port 443 -> 127.0.0.1 port 8443
注意最后换行
打开, vim /etc/pf.conf文件,在 rdr-anchor "com.apple/*"之后添加:
rdr-anchor "pow"
在 load anchor "com.apple" from "/etc/pf.anchors/com.apple"之后添加:
load anchor "pow" from "/etc/pf.anchors/com.pow"注意最后换行
解决方法,https://github.com/basecamp/pow/issues/452
只是搬运工,给自己看:
touch touch /etc/pf.anchors/com.pow
文件, 输入注意最后换行
vim /etc/pf.conf
文件,在rdr-anchor "com.apple/*"
之后添加:rdr-anchor "pow"
在load anchor "com.apple" from "/etc/pf.anchors/com.apple"
之后添加:load anchor "pow" from "/etc/pf.anchors/com.pow"
注意最后换行sudo pfctl -f /etc/pf.conf&&sudo pfctl -e
就ok