bobrofon / easysshfs

SSHFS for Android
MIT License
106 stars 16 forks source link

[Feature Request] mount Server by refresh a folder (even if the server has been restarted) #46

Open chuwza opened 1 year ago

chuwza commented 1 year ago

Hi developers, I found that easysshfs unmount after Server reboot; I don't want to have to manually mount it on my phone every time the Server reboots, so I used the method of refresh the folder in the file manager to mount it manually.

Fortunately, this works after I disconnect and reconnect to the network; unfortunately, it doesn't work after I reboot the Server.

Is it possible to mount Server by refresh the folder even if the Server has been rebooted?

bobrofon commented 1 year ago

Is it possible to mount Server by refresh the folder even if the Server has been rebooted?

It's a tricky question. Technically, there are a few ways it may be implemented:

  1. Using autofs. Usually, on Linux systems, AutoFS solves such kinds of problems completely. Unfortunately, the typical Android version of the Linux kernel doesn't support AutoFS. #39
  2. Implementing part of AutoFS functionality into sshfs. It may work, but sshfs is a separate project, and I would prefer not to fork it. Also, I think that this feature will never be applied to upstream sshfs (just because AutoFS already solves the same problem).
  3. Implementing something like AutoFS but via fuse. It may work, but requires additional research.
  4. Adding a workaround for EasySSHFS, like "ping the server every few minutes and remount it when it becomes available". It may help, but I don't think that it will work well.

Also, you can try to use any sFTP content provider application for Android instead of sshfs. In most cases, they provide the same functionality as sshfs, but they are supported by the Android framework better, and shouldn't have any issues with reconnecting on "folder refresh".

chuwza commented 1 year ago

sFTP content provider

Thanks for the reply, I'm sorry that can't implement this feature, but EasySSHFS works well enough at the moment that it's okay not to have it