We use proprietary client/server software that includes a file browser that displays the file structure of an SMB share. The content is read server-side, and presented to the user in a browser window of sorts.
When interacting with files or folders in this structure, the macOS client automatically browses to the SMB share in a native way (e.g. it invokes Finder to open smb://server/share/path/file.txt).
The business requirement is to avoid using SMB and instead use a local caching agent, which has the added benefit of being much more performant in WAN scenarios. I have done some synthetic testing with tools like rclone and the performance is much better than editing files directly on an SMB share over a WAN connection.
The problem is that the proprietary software always force-opens the files over the SMB share, which disrupts the end-user workflow.
To fix this, we need a solution that presents the local hybrid/cache solution (e.g. provided by rclone mount) to the macOS client as an SMB or AFP share, so that the SMB share on the WAN is never directly accessed.
For Windows there is the --network-mode parameter, but it is not available on macOS.
As a last resort, I thought about editing the hosts file and adding an entry so that the FQDN of the file server points to localhost macOS machine. Then I wanted to create a share with the exact same name, but unfortunately this is prevented by the operating system because the "kind" of the folder is Remote Volume.
rclone is not a requirement.
The same problem is also present with OneDrive or Dropbox for example.
The end goal: accessing smb://server/share/path/file.txt is redirected to/shows the contents of /Volumes/Macintosh\ HD/Users/Shared/share/path/file.txt.
That network share nature is mandatory as the mentioned proprietary client software does not support anything else and cannot be configured in any way.
I am open to any suggestions, no matter how "hacky". AFP would also be an option if it would be any easier to simulate locally.