Driverless User Space File Systems for Windows, macOS, and Linux
thelig.ht
thelig.ht
DAV is arguably easier than p9 since everything has HTTP libraries and most people know it.
Install "Microsoft KM-TEST Loopback Adapter" using Device Manager (Action -> Add Legacy Hardware, Install from a list, network adapter)
From Control Panel -> Network and Sharing Settings, go to Change Adapter Settings
Rename your Loopback network connection to something else (such as LOOPBACK) so you can tell what it is.
Go to Properties
Uncheck everything except for IPV4.
Go to Properties for IPV4, and assign an IP address. You used to be able to assign something beginning with 127 there, but windows doesn't let you do that anymore. It appears that 192.0.2.1 is a reserved private IP address.
Hit "Advanced...", go to WINS page, disable NetBIOS for that connection.
Now you have a custom localhost-only IP address that has no SMB server bound to it!
You can also use this special loopback device with an SSH client. If you forwarding all the local SMB ports on the IP, it will make it looks like 192.0.2.1 is a computer on your network that's sharing files. Hopefully Windows Firewall isn't interfering.
NET USE F: \\localhost\foo /TCPPORT:1234
It also supports QUIC and RDMA. I wonder if it would be possible to achieve zero copy with RDMA.A traditional UNC path becomes "\??\Device\MUP\ComputerName\ShareName" as an NT Object Namespace path (Or "\\?\GLOBALROOT\Device\MUP\ComputerName\ShareName" as a file path)
If you change the port number or protocol, is that encoded somewhere in the native path?
Fun thing to do, you can use "7-Zip File Manager" to explore unusual styles of file paths. A path like "\\?\GLOBALROOT\Device\MUP\ComputerName\ShareName\" will work fine in 7-zip file manager, even though Windows Explorer (and File Dialogs) will reject such a path.
I found the announcement, but not how it works internally: https://techcommunity.microsoft.com/t5/storage-at-microsoft/...
Unfortunately it doesn't look like they are planning to support ports directly in UNC paths.
There are some guides online about it.
PS. Loopback driver is not 3rd party.
I suspect that 127.0.0.0/8 breakage is related to IPv6's existence, since only in IPv4 is the whole class A network usable as loopback - at least, it's broken on Linux (you can't do `ping ::ffff:127.1.2.3` ... actually, now that I try it, it fails even for non-loopback addresses? I thought I tested that before) ... I haven't tried explicitly bind()ing the local socket before connect()ing though (most often, you only bind before listen, and let it autobind when you connect).
Related, `gethostent` enumeration is completely broken for IPv6 under GLIBC at least.
and while I'm ranting about networking, the latest Debian on my laptop "permanently" clobbers the default route (see `ip r`) when the rfkill button is pressed (thus leading to the weird situation where you can access the LAN but not anything beyond it) - to fix, `systemctl restart networking.service`
[1]: https://www.iana.org/assignments/iana-ipv4-special-registry/...
... huh, that's missing the multicast reservations though ... those are admittedly weird.