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

Support for Android version of Total Commander

Moderators: white, Hacker, petermad, Stefan2

Post Reply
sergii
Junior Member
Junior Member
Posts: 3
Joined: 2015-10-07, 12:47 UTC

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

Post 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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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"));
Author of Total Commander
https://www.ghisler.com
sergii
Junior Member
Junior Member
Posts: 3
Joined: 2015-10-07, 12:47 UTC

Post 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.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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.
Author of Total Commander
https://www.ghisler.com
sergii
Junior Member
Junior Member
Posts: 3
Joined: 2015-10-07, 12:47 UTC

Post 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?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48083
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post 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. :(
Author of Total Commander
https://www.ghisler.com
Post Reply