dokan

最後更新: 2021-08-13

 


Dokan

 

https://dokan-dev.github.io/

 


yasfw

 

mounting an arbitrary remote directory as root directory.

https://github.com/DDoSolitary/yasfw

* v0.1.2 require Dokan v1.5 on Win10

Basic

cd C:\tools\yasfw

# 會 mount remote 的 "/"

yasfw.exe --mount-point A --server x.x.x.x --removable --user user

# umount

Ctrl+C

i.e.

yasfw.exe --mount-point A --removable --server 192.168.123.11 --user tim

Adv.

chroot

-C, --chroot <DIR>                 Use the specified directory as root directory.

yasfw.exe --mount-point A --removable --server 192.168.123.11 ^
          --user tim ^
          --chroot /home/vhosts/datahunter

認證

-P, --use-pageant    Try to authenticate using putty's pageant.
-k, --key <KEY_FILE>...            Private key file.

yasfw.exe --mount-point A --removable --server 192.168.123.11 ^
               --user tim --key C:\Users\tim\keys\tools.txt ^
               --chroot /home/vhosts/datahunter

Other Opts

-p, --port <PORT>          # Server port. [default: 22]

-c, --compress                # Enable compression.

Speedtest

 ~ 2.8 MB/s

用 "--compress" 時只有 2.2 MB/s

mount.bat

@echo off & cls

set server=192.168.123.11
set chroot=/home/vhosts/datahunter
set user=tim
set key=C:\Users\tim\keys\tools.txt
set yasfw=C:\tools\yasfw\yasfw.exe

%yasfw% --mount-point A --removable ^
        --server %server% --user %user% ^
        --chroot %chroot% --key %key%