Yeah, this is really tricky. Apple has released Network Extension API since iOS 9 which only exposes IP packets. What I did is to parse the IP packets and redirect them into different proxies. (Most tough part though only one sentence)
It's already on the App Store so of course they must've allowed it.
There are several similar apps that do basically the same thing. The original one is called Surge, but it's super expensive. Potatso is one of the cheaper clones.