node.js – How to set a VPN for my backend API, only while it downloads

I have set my own server for my anime collection and as a part of it I want to set a VPN to my backend while it downloads torrents and not while it uploads to a cloud storage like S3 cause the instance to storage transfer speed is super fast and I think VPN will slow it down if I use it while uploads.

The process flows like this:

MagnetLink-from-FrontEnd => Backend-downloads-the-torrent => uploads-to-storage(S3)

If possible I want to enable VPN only for the download part.

I am not sure about which tags to use for this question any suggestion would be greatly appreciated.