Page 1 of 1

ftps:// or sftp:// uri? or intent?

Posted: 2015-10-07, 12:57 UTC
by sergii
Is there an intent I can sent to TC to open ftps:// or sftp:// uri?

Here's what I'm doing: it's something like the "WiFi Transfer" plugin, but in reverse. Laptop is the server, the phone connects to it.

I have a certain amount of flexibility, on the laptop I can use ftps or sftp, use public keys authentication (sftp) or randomly generate a password (ftps), show a QR code. On the phone I can read the QR code with Tasker+AutoBarcode and do something. But at the end it should be an ftps or sftp client connecting to a server that has a dynamic IP.

Posted: 2015-10-08, 08:49 UTC
by ghisler(Author)
You can send an URI in the following form:
file://///SFTP/connection/subdir

note the 5 slashes, 2 from file:// prefix and 3 for plugin path ///SFTP

You can set it via
intent.setData(Uri.parse("file://///SFTP/connection/subdir"));

Posted: 2015-10-11, 05:40 UTC
by sergii
Thanks, but I wasn't able to make it to work :(

What's the syntax for "connection"?

I tried various combinations from ftps://user:password@host:port/path (with file://///FTP/ prefix, of course) but FTP plugin was only saying "Host not found". I've also tried SFTP and got an error about ECONNREFUSED to localhost/::1, but I've specified a different hostname and port.

So, I take it, I don't know how to specify the connection string correctly for the plugin to understand it.

Posted: 2015-10-12, 09:09 UTC
by ghisler(Author)
Sorry, you cannot add a new connection this way, only a connection already stored by the user. In my example, "connection" is the name the user has given to the connection, which appears in the list of existing connections.

Posted: 2015-10-14, 21:04 UTC
by sergii
Oh, I see. But that was the whole purpose. A laptop might have any IP address, it changes every time. That's why a pre-defined connection cannot be used.

Is there any other way to do it?

Posted: 2015-10-15, 13:35 UTC
by ghisler(Author)
Unfortunately not - Total Commander has no direct influence on the connections offered by the plugins, and they are configured via dialog boxes within these plugins. :(