WSL and virtual machines
Use the shared proxy to give WSL2, VMs and guests on your LAN access to acceleration.
Why sharing is needed
By default the local proxy only accepts connections from the same machine. WSL2, VMs and containers under native Linux Docker connect from other addresses (usually private ranges), so sharing must be turned on explicitly.
Turn on sharing
Desktop client: Proxy settings → Shared proxy. On Linux:
cnb share on --cidr 172.16.0.0/12 # common range for WSL2 / Docker
cnb share credential create wsl # create guest credentials; the password is shown only once
cnb share status- Only private ranges are allowed (
10.0.0.0/8,172.16.0.0/12,192.168.0.0/16and so on). - Each guest uses its own username and password.
- Turning sharing off or revoking a credential disconnects that guest immediately:
cnb share off,cnb share credential revoke <ID>.
Inside WSL2
HOST_IP=$(ip route show | awk '/default/ {print $3}')
export https_proxy="http://wsl:<password>@${HOST_IP}:<shared-port>"
export http_proxy="$https_proxy"Newer WSL versions support mirrored networking, which can reach 127.0.0.1 directly. Whether it is available depends on your WSL version and configuration.
Virtual machines (VMware, Parallels, VirtualBox, UTM)
- Make sure the VM network is NAT or bridged and note the host's address on that network.
- In the client's shared proxy, allow the VM's range and create credentials.
- In the VM, set the proxy to
http://<username>:<password>@<host-address>:<shared-port>.