Configuring Redwood on MacOS - miheerdew/delayed-admin GitHub Wiki
- Install go and
go get github.com/andybalholm/redwood
- Clone
https://github.com/andybalholm/redwood-config
in/etc/redwood
directory. - Setup certificates and change the
tls-cert/tls-key
config in/etc/redwood/redwood.conf
accordingly. Add the certificates to system keychain (https://docs.mitmproxy.org/stable/concepts-certificates/). - Add proxy details under Network settings.
- Add line
block return proto tcp to any port {http, https} user = myadmin
to/etc/pf.conf
and configure PF to enable on startup (https://apple.stackexchange.com/questions/308182/how-to-launch-pf-at-startup) sudo cp ~/go/bin/redwood /usr/local/bin
Save this file as /Library/LaunchDaemons/com.github.andybalholm.redwood.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>KeepAlive</key>
<true/>
<key>Label</key>
<string>com.github.andybalholm.redwood</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/redwood</string>
</array>
<key>UserName</key>
<string>nobody</string>
<key>StandardOutPath</key>
<string>/var/log/redwood/stdout.log</string>
<key>StandardErrorPath</key>
<string>/var/log/redwood/stderr.log</string>
</dict>
</plist>