Rclone http backend

I understand that with rclone http remote I can access the files of a webserver. Therefore if I start a local server it will show my local files and directories.
I tried to create an index.html page with links? Something like this but it did not magically showed them as files, it gave me an error ( ERROR : : error listing: error listing "": directory not found).
Did I do something completely wrong or this can never work with the http remote?


... ....

Sure, you should be able to get that to work, but you need to tweak the format into something that rclone understands, something similar to what Apache, Nginx or Caddy uses for standard file listing. You may take a look at the examples in source code, from unit tests:

I used the nginx.html format. I started my web server using with python SimpleHTTPServer and I see my server is up and listing the two links with the name I gave.
Screenshot 2022-11-29 161034
My server is reachable at http://192.168.x.xx:xxxx/index.html and this is the url I added in the http remote config. No other settings.
Here the output:
xx@raspberrypi:~ $ rclone ls TEST:
2022/11/29 16:06:55 ERROR : : error listing: error listing "": directory not found
2022/11/29 16:06:55 Failed to ls with 2 errors: last error was: error listing "": directory not found

Please what Am I missing?

Post the full source code of index.html, and also the output from the rclone command when running with -vv flag added. Paste into a "preformatted text" section by wrapping with three "backticks":

type or paste here

<head><title>Index of MyFiles</title></head>
<body bgcolor="white">
<h1>Index of MyFiles</h1><hr><pre><a href="../">../</a>
<a href="https://xxx.mp4">Link1</a>
<a href="https://yyy.mp4">Link2</a>
pi@raspberrypi:~ $ rclone ls TEST: -vv
2022/11/29 16:24:11 DEBUG : rclone: Version "v1.59.2" starting with parameters ["rclone" "ls" "TEST:" "-vv"]
2022/11/29 16:24:11 DEBUG : Creating backend with remote "TEST:"
2022/11/29 16:24:11 DEBUG : Using config file from "/home/pi/.config/rclone/rclone.conf"
2022/11/29 16:24:11 DEBUG : Root:
2022/11/29 16:24:11 ERROR : : error listing: error listing "": directory not found
2022/11/29 16:24:11 DEBUG : 2 go routines active
2022/11/29 16:24:11 Failed to ls with 2 errors: last error was: error listing "": directory not found

The href links are a bit strange..?

The http backend expects them to be relative to the "parent", so in your example something like http://192.168.x.xx:xxxx/xxx.mp4, ./xxx.mp4 or xxx.mp4 would work.

these links are to an external server. They are unrestricted URL to video files.
Example: https://download.samplelib.com/mp4/sample-15s.mp4

I m using my local webserver only to list them with an http protocol that I know rclone supports. Or at least this is the idea.

I understand. From what I can tell this is not supported, but I may be wrong. Maybe one can trick it with redirects or something like that, not sure.

if anyone has an idea of a trick, I would like to try it

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.