I’d recommend to look into how v86 does it.
Essentially, they have a websocket proxy that tunnels the connection from the in-browser emulator.
Something like this opens up two options:
- double-proxy, by bouncing that proxy across the browser instance to the IWS host
- single-proxy, by running a local proxy service independent of the browser, and having IWS use that as a tunnel
Also, introducing a fee model puts you in the questionable and unenviable position of being, essentially, a paid VPN provider. That’s a lot of trouble, hence why companies like Proton and Mullvad are very careful about where they operate from, how they handle customer data, and how they handle payment.