
Windows File System Proxy – FUSE-Like Capability for Windows - voltagex_
https://github.com/billziss-gh/winfsp
======
skrowl
Is it like [https://dokan-dev.github.io/](https://dokan-dev.github.io/) ?

If not, how does it differ?

~~~
malkia
For comparison probably a good start is the API (I'm somewhat familiar with
dokan, used it several years ago for some project)

[https://github.com/billziss-
gh/winfsp/blob/master/inc/winfsp...](https://github.com/billziss-
gh/winfsp/blob/master/inc/winfsp/winfsp.h)

[https://github.com/dokan-
dev/dokany/blob/master/dokan/dokan....](https://github.com/dokan-
dev/dokany/blob/master/dokan/dokan.h)

It's really the edge cases that one might run into, where things no longer
work well, but I don't recall right now into what problems I've run into (What
I did was for the xbox360 devkit to read files from my HDD, rather to copy to
it, as was required by the sdk, but I've achieved only 5mb/s, while copying
was 10mb/s - the only benefit was if you wanted to read on demand, a bit and
for fun).

Sony later used dokan for their devkit in PS4 I think? just found some info
here:
[http://www.psdevwiki.com/ps4/File_System_Driver](http://www.psdevwiki.com/ps4/File_System_Driver)

------
int_19h
I'm curious whether anyone had ever tried implementing a pure userspace
solution (without a kernel driver) by basically exposing the underlying FS as
a CIFS share on some random local port. Obviously, that would be slower, but
for many applications that doesn't matter much - while the ability to install
and run without administrator privileges would be valuable.

~~~
ComodoHacker
How do I connect to CIFS on non-default port?

~~~
captainmuon
The only way I found was to use (cygwin ssh) port forwarding to map that port
to the standard one, kill the default network SMB process (which restarts),
and hope my process wins the race. Then you could access the remote shares at
\\\127.0.0.1 .

I think I also managed to create a loopback device, put it into its own
subnet, and map the port to that device, and then it was possible to do e.g.
\\\192.168.100.56, but it was a pain to set up.

The reason I needed this was, I wanted to run samba as non-root on a remote
host (on a non-privileged port), and forwarded that with ssh though a
firewall. This way I could access my files on the remote Linux server from my
windows desktop. One problem is that windows does not tolerate hanging
connections much, and a bad or lost connecting can freeze your program or
require a reboot. I'm not sure how much is the kernels fault and how much you
can code around this.

~~~
ComodoHacker
Dirty hacking as it is. In similar situations I just use SFTP.

------
ZoomZoomZoom
For those interested in the same workflow demonstrated on demo GIF, there's
Win-SSHfs, built on Dokany. This fork works pretty well:

[https://github.com/mfrnd/win-sshfs](https://github.com/mfrnd/win-sshfs)

------
jessedhillon
I'm wondering what the rationale is for the usage of `goto` in the C source?
It looks like it's exclusively used to implement a pattern of exiting or
failing early and in a common way. Is this something that's common in modern
C?

~~~
saynsedit
Yes, goto exit and cleanup resources on error is a common and not frowned upon
idiom in C. See Python source.

~~~
creshal
Or the Linux kernel.

(Or Apple's "goto fail" bug for a somewhat infamous example how to not use
it.)

~~~
krylon
> Or Apple's "goto fail" bug for a somewhat infamous example how to not use
> it.

But that problem was not because of the goto, strictly speaking.

------
billziss
I am late to the party as I just found out about this discussion. I am the
author of WinFsp. You can ask me specific questions if you want.

Bill Zissimopoulos

------
ericfrederich
Why not FUSE itself? I wonder if the Windows Subsystem for Linux guys could
get FUSE working.

~~~
billziss
WinFsp does have a FUSE API. It implements the FUSE 2.8 (high-level) API. This
is in addition to its native API. I also have a FUSE package submission to
Cygwin. It needs votes :)

[https://cygwin.com/ml/cygwin-
apps/2016-07/msg00041.html](https://cygwin.com/ml/cygwin-
apps/2016-07/msg00041.html)

Bill Zissimopoulos

------
jorangreef
"WinFsp is available under the AGPLv3 license. If you find the constraints of
the AGPLv3 too onerous, a commercial license is also available. Please contact
Bill Zissimopoulos for more details."

I hope they will soon switch to MIT.

~~~
m_mueller
"Hey, could you make your free thing even free-er so I can make money with it
in your place?"

~~~
drdaeman
"...so I could make a non-free derivative/build?"

Fixed it for you. A lot of people make money by working (or integrating)
strongly copylefted software, with results remaining friendly to end-user
freedoms.

~~~
pjc50
> "remaining friendly to end-user freedoms"

.. which isn't _quite_ the same thing as itself being Free software. Not that
I want to start the license war here.

~~~
drdaeman
Both MIT and AGPL are Free and Open Source Software licenses, by the very
official (FSF and OSI) definitions. I don't think there's any need to disagree
here.

One provides a way to create a proprietary non-free derivatives/builds,
granting more freedom to the non-end-user developers who use the code. Another
provides a way to ensure end-users always have certain freedoms.

Debating which is better is meaningless, as it's just a matter of personal
preference. We should avoid that.

