mozilla-vpn-client
mozilla-vpn-client copied to clipboard
VPN-6011: Add a Proxy to allow Containers&Tabs to Selectively Split-Tunnel
#tldr;
This PR adds a sidecar binary, loophole
- a simple socks5 proxy that runs alongside the client and is avoiding the tunnel. This allows containers or the extension to specify that they do not want this traffic to Use the tunnel.
Description
- This pr is based on @bakulf's implementation of socks5 https://github.com/mozilla-mobile/mozilla-vpn-client/pull/4022
- To the socks5 impl i only removed some duplicate code, added passing the config via args.
- I added a Proxycontroller, that can start/stop the proxy if needed and the Webextension class allow Web-Extensions Like FFVPN or MAC to Query the loophole proxy address. This should allow extension to exclude websites on a per-tab/container bases. Also relates to https://github.com/mozilla/multi-account-containers/issues/2259
I aim to add more tests and maybe add UDP/Auth support, but this pr is already big and the sprint is short. As is the new binaries are not shipped and the code is disabled if not in prod so we can land this, if we want.