iOS Rclone encrypted media viewer

Hello,

I made a iOS app for Rclone encrypted files.

CryptCloudViewer

In this time, only support Google Drive, Dropbox, OneDrive. I’m planning to add more storages.

1 Like

NIce! How does it work?

This is good, but it needs some work.

I think it would be easier if we could also import existing rclone.conf files. But I think your implementation of the encryption is custom, right? You aren’t using rclone itself (?). I tried creating a crypt remote, but because the app doesn’t ask you for all the same info as rclone, I wasn’t able to get it to work. Specifically, I use rclone on a crypted GDrive that is also using the app folder. Because I wasn’t able to provide my own Google Drive credentials, I wasn’t able to access the app data folder.

The app doesn’t work for me because of that, but this is a good step towards having rclone on iOS. I think the biggest roadblocks for iOS devs is implementing all the ChaCha20 suite as there aren’t any existing libraries for it (that I am aware of). If you got that going, that’s a very good first step.

Thanks for testing!

It’s right that encryption implementation is custom. This app wrote by Swift, I translated Go lang encryption routine.

I’m testing on GDrive’s normal folder, it seems to work correctly. The rclone’s app folder cannot be accessed by any other app or web interface. This app has own credentials so cannot access it. If you need to access in it, this app needs to it’s credentials or token. So this app need to add to provide your own credentials, I will try to implement it in future version.

It’s good idea to import existing rclone.conf files, it is convenience for users, I need implement it in future version too.

1 Like

Hi, is this open sourced ?

Now in developing, the source is private. Some private secrets should be hidden, I need some work to open the source, I’m planning to open source at least encryption framework.

1 Like

can you add something like nplayer for ios have:
inapp, built in webdav server to serve files on some port, like 127.0.0.1:8080
?

It will be implemented future work. I want to know why need webdav local server in iPhone and how to work it. It allows other iPhone webdav capable players will play encrypted media, doesn’t it?

Here is source, https://github.com/lithium0003/ccViewer

2 Likes

This app is viewer and media player on iOS. It is written by swift (and c/c++). Because I want to play MPEG2-TS files with rclone encrypted on iPhone/iPad, I made it. For convenience, it can manage items like move, rename, make folder.

This app consists of 3 parts, main viewer, network/encryption backend and ffmpeg player component. The main viewer is a UI component. The network/encryption backend provides item control on a network storage and read it. The ffmpeg player component is needed for MPEG2, this format is not supported on iOS natively.

To decode and encode with rclone encryption, “RemoteCloud/Storages/CryptRclone.swift” is key component. This file has translated encryption functions from Go lang to swift. This app wants to play encrypted media files, needs to random access, so can seek by encryption chunk. In media play, random access is needed only file header, footer and current position. So it caches first several blocks and last several blocks, pre-read some blocks at current read position.

I tested whole file encryption(upload) and decryption(export, in iPhone) also, it seems work.

thanks, is it compatible with rclone crypt backend?
also wit rclone.config password protected file?

for example lets say you have rclone encrypted backend with rclone config file,
so you do
rclone serve webdav cryptgd:

and now rclone asks for password for config file
and serves conetent of cryptgd on 127.0.0.1:8080 webdav.
So on nplayer app for ios you can go to network and add webdav pointing to this 127.0.0.1:8080 so nplayer can now read directly from rclone serving this cryptgd: content.

can your app also handle rclone serving webdav in similar way?
so nplayer could be connected to your app output, without needing to have rclone binary on jailbroken idevice?

Because currently if someone want to use rclone on ios for serving movies etc, have to use jailbroken idevice and use rclone binary to do that.
If your app could handle this feature of rclone (serve) and be such server, this could be done on non jailbroken device.

So in short:
rclone has capability of serving content to webdav protocol, be local server.
But running rclone binary is needed for that.
If you app could be something as proxy from rclone serve, have built in webdav server functionality, getting content from rclone and serving it to webdav output, it would be awesome.

In release version 1.2.0, app support your own credentials in Google Drive and application data folder. Please try it.

The importing for rclone.conf file is not support yet, I’m working for it. Maybe support it next release.

1 Like

This app is compatible with rclone crypt backend with standard name encryption. I’m using it, files are transferred to Google Drive by original rclone with encryption in local linux server, and they are decoded correctly in iPhone by this app.

In this version, rclone.config file import is not supported but I plan to implement it. So in this time, you need to provide password/password2 again in this app to mount encrypted remote.

It’s good idea serving webdav for another player, I searched around there. Unfortunately, in iOS limitation, it seems to need jailbrake.

In iOS, background app only survive in 2 minutes except playing sound or some limited reasons. My app maybe run as webdav server, but other player will be foreground to play items, my app will go to background and killed after 2 minutes. The other player is marked as playing sound and keep running if it goes to background but my app is not and be killed.