To get a locally running, non-proxy aware app to go anyway through my proxy (running on localhost:8081) I've been trying out various combinations of iptables rules that have all failed.
One that looked like it was supposed to do exactly what I want. Redirect to another port before leaving the computer:
iptables -t nat -A PREROUTING -i ens33 -p tcp --dport 443 -j REDIRECT --to-port 8081
This one just simply didn't redirect anything.
The following one, got the app to redirect everything successfully to my proxy, but something else went wrong. Looking at the proxy logs, the proxy received the answer, but kept requesting the same files. My assumption is that it didn't forward the responses back to the original application.
iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination 127.0.0.1:8081
Despite those two I have tried various other combinations, read all sorts of tutorials and answers on serverfault and stackoverflow and flushed the chains in between also to ensure that it actually starts with a clean slate. Now that all of that failed, I hope someone can point me to the answer.