I have made a different approach to this question. I had this question some time ago, and I followed this guide. But it is more complicated and, (I think I remember) the final throughput is low. Please comment if it's not true.
By the way, you only need to tunnel the TCP port 445 for SAMBA Shares to work.
In short, you can create a virtual machine, with VMWare Workstation Player/Pro or any virtualizer sofware, provided they have bridged networking (I only tested with that two versions of VMWare). Install a Linux server distribution of your choice, I chose Ubuntu Server. In network configuration, configure bridged networking. Inside the virtual machine, manually assign an static IP configuration. then create an SSH tunnel to your SAMBA server (obviously through internet), pointing from TCP port 445 in your Virtual Machine, to TCP port 445 too, on the SAMBA server. Once the tunnel is setup, you can access from your Windows 10 computer, typing in your Windows Explorer path bar:
\\<your virtualmachine static IP>\<SAMBA Share in the SAMBA server>\
Now you can access the SAMBA server from your Windows 10 / VMWare-Ubuntu-Server system.
If you need a more broad explanation, you can visit my blog post here.
Notes:
- I think (99% sure) the final throughput, with big files, is what your fiber connection allows. For example, if you have 1Gbps internet in your Windows 10 and 1Gbps in your SAMBA server, for big files, you could see a 130MB/s throughput. I tried with a 300Mbps fiber, and it shows a ~35MB/s throughput. With lots of little files it is different, but it's not because of this approach I made, but, I think, the design of SMB protocol.
- VMWare Workstation Player is free for non-commercial use. You can use it in this setup and there are no drawbacks, related to the Pro version.
- If you want to have this setup in a laptop with Windows, moving in and out of your SAMBA server's LAN, you can do a special trick: assign to the VM-Ubuntu-Server the same local IP as the SAMBA server, so that all your shortcuts to the Samba Shares are the same when you're SSH-tunnelling to your Samba Server, or when you're connecting directly to the SAMBA server, in the same LAN. But don't power on your Virtual Machine inside the SAMBA server's LAN!. I think that would give you some sort of networking problem.
- Regarding the SSH tunnel, you can do a custom
systemctl service, to automate the SSH tunnel at boot, so you only need to power on your virtual machine to get it working.
- I'm not sure whether the bridged networking would work with a wireless connection. If you want to make sure, comment here and I will check it out.
--EDITED 2023-01-13--there was a typo--