Zend certified PHP/Magento developer

How to map a network drive in Windows through a specific proxy server?

My setup looks like this:

I have a virtual machine running using VirtualBox 6.1.22 on my Windows 10 Pro 20H2 host. The virtual machine is running an Ubuntu 20.04.2 server with guest additions installed. This virtual machine is connected to a VPN via openconnect and acts as a transparent proxy using a running Squid Web Proxy Server (version 4.10). The proxy port is accordingly accessible from the host via NAT configuration.

The background behind this setup is that I don’t want all of my computer’s network traffic to go through the VPN, so I don’t want to connect directly to the VPN on Windows.

Now I want to map several network drives (Samba shares) in Windows Explorer, which are only accessible via the VPN. So I am looking for a way to be able to map the network drives via the proxy through the VPN. How can I do this?

Since I also have SSH access to the server from which the network drives are shared, I have already tried to use SSHFS-Win, but I can’t get SSHFS to use the proxy server here either, although I have already set up an SSH config file that works for Git with the corresponding ProxyCommand.

I hope you have an idea how this can be done.