Haven’t done it myself, but his might help you for further research
iptables
https://unix.stackexchange.com/questions/264589/traffic-of-specific-program-through-vpn
network interfaces
https://unix.stackexchange.com/questions/234583/routing-on-per-application-basis
I have it running on my server, and honestly… I almost love it more than kagi. Still evaluating both, to make a decision by the end of the year.