I have created a script in Node.js to remotely manage a server. To work the script needs to be connected to a VPN. The VPN it needs to connect to is different from the one I want Windows to use. Both VPNs use OpenVPN. I have successfully created two TAP adapters (TAP_WINDOWS
and TAP_MYSCRIPT
) that OpenVPN can be connected to simultaneously.
However, I am stuck trying to figure out how to specify which adapter to send traffic through. My script always needs to send traffic through the TAP_MYSCRIPT
adapter, while all other traffic goes through TAP_WINDOWS
.
I am aware Windows has some routing functionality but am unsure how to configure it or if it is what I need? Is it possible to do this by an app to app basis or is this something I will need to edit my script to be able to use?