I don’t know any suggested way but I can explain what I did by myself in Debian.
- Create file
/home/user/ipx.sh
and make it executable
#!/bin/bash
/usr/local/bin/mitmdump --showhost --ssl-insecure --set upstream_cert=false &>> /var/log/mitmdump.log
- Create file /lib/systemd/system/mitmdump.service
[Unit]
Description=mitmdump service
After=network.target[Service]
Type=simple
User=root
ExecStart=/home/user/ipx.sh
Restart=always
RestartSec=1[Install]
WantedBy=multi-user.target
- Reload system services
systemctl daemon-reload
- Enable service at startup
systemctl enable mitmdump.service
- Start service
systemctl start mitmdump.service
Use mitmdump instead of mitmproxy.