Show HN: vpnns – Per-app VPN using Linux namespaces
github.com
github.com
Or, the same for Tor. I ended up using Transparent Proxy and creating a separate linux user for Tor browsing, mostly because iptables stopped being able to filter by PID. Also, it provides a bit more encapsulation. (Note, in my use case I was not too much concerned about being RE-identifyable, rather that my "ISP" and anyone nefarious on my WiFi should not see my traffic, and that I appear anonymous to websites. Most users should use something like TorBrowser to minimize their uniqueness!)
Long disgression, but I really wish you could right click on the title bar of any app, and say "route this through VPN / TOR / over cable". I never got around to implement a prototype unfortunately.