{"id":15713074,"url":"https://github.com/derrod/fakehttpindex","last_synced_at":"2026-05-16T18:09:25.622Z","repository":{"id":81185489,"uuid":"122790792","full_name":"derrod/fakehttpindex","owner":"derrod","description":"Python Flask app to create fake directory listing for use with rclone","archived":false,"fork":false,"pushed_at":"2020-07-03T20:07:02.000Z","size":11,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T21:00:20.431Z","etag":null,"topics":["flask","python","rclone"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/derrod.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-24T23:59:02.000Z","updated_at":"2024-01-05T06:43:45.000Z","dependencies_parsed_at":null,"dependency_job_id":"6e5a4eef-0dfd-4c6c-9a5b-19c2c78e85c5","html_url":"https://github.com/derrod/fakehttpindex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrod%2Ffakehttpindex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrod%2Ffakehttpindex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrod%2Ffakehttpindex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/derrod%2Ffakehttpindex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/derrod","download_url":"https://codeload.github.com/derrod/fakehttpindex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246361616,"owners_count":20764962,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["flask","python","rclone"],"created_at":"2024-10-03T21:21:11.742Z","updated_at":"2026-05-16T18:09:20.602Z","avatar_url":"https://github.com/derrod.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fake HTTP Directory Listing for rclone\n\nLittle project that helps copying/backing up data from HTTP sources to any kind of destination supported by rclone.\n\nThe basic idea is to fake a directory listing similar to nginx' that rclone can used as a http remote.\nWhen a file is requested by rclone the response will be a 301 redirect to the real location of the file.\n\nThe directory listing will be created from the files specified in the input file, there are several options that can\nbe used to customize the resulting directory index. This includes the ability to use different filenames and paths\nthan what is present in the original URL. This is possible since rclone will use the name and path of the link\nrather than what it gets redirected to.\n\n**Dependencies:**\n* Python 3 (written in a 3.6 env, not tested with anything below)\n* Flask\n\n### Usage\n\nCommand line options\n```\n$ python3 app.py -h\nusage: app.py [-h] [-f FILE] [-i HOST] [-p PORT] [-k]\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -f FILE, --file FILE  Input file with JSON list of files to include in fake\n                        index. (Default: files.json)\n  -i HOST, --host HOST  Host to listen to, e.g. if rclone is run on a\n                        different machine (default: 127.0.0.1)\n  -p PORT, --port PORT  Port to listen on (default: 8000)\n  -k, --keep-path       Keep path in filename if only url is supplied\n                        (default: false)\n  -l LIMIT, --limit LIMIT\n                        Maximum number of items to show in index (for testing)\n  -o OFFSET, --offset OFFSET\n                        Offset for items to show in index (for testing)\n\n```\n\nRun flask app using python\n```bash\n$ python3 app.py\n```\n\nIn order to add it as a remote to rclone you can now use `rclone config` and create a new http remote,\nalternatively you can edit your `rclone.conf` directly.\n\nExample `rclone.conf` entry:\n```\n[http]\ntype = http\nurl = http://127.0.0.1:8000\n```\n\nNow you can list the files in the remote using rclone:\n```bash\n$ rclone ls http:\n104857600 0.1GB.bin\n104857600 100MB.bin\n 10485760 10Mio.dat\n 10485760 files/10Mio.dat\n104857600 tester/test2/0.1GB.bin\n104857600 test/0.1GB.bin\n104857600 test/filename w_ slash.bin\n104857600 test/test/0.1GB.bin\n```\n\nNote that rclone will make a HEAD request for any item in the directory,\nif you have a lot of files this might take some time depending on how fast the origin server responds.\n\n### `files.json` format\nThe basic format is a JSON array where each item represents a file in the listing.\n\nEach item can have the following properties:\n* `url` (required)\n* `keep_path`\n* `filename`\n* `directory`\n\nWhen only `url` is set and `keep_path` or the cli parameter `--keep-path` are not `true`/used only the last part of the\nURL (i.e. everything after the final `/`) will be used as the filename and the file will be in the root.\nOtherwise the path in the URL will be replicated in the fake index as well.\n\n`filename` overrides the filename that will be used in the listing and subsequently in the rclone target,\nif it contains slashes those will be used for the file's path in the listing. It should not contain any path when used\ntogether with the `directory` property.\n\n`directory` specifies the path to the file that should be used. Note that if the filename already contains a path\n(or any `/`) it will be replaced with underscores and the result used as filename instead.\n\nExample:\n```json\n[\n  {\n    \"url\": \"https://speed.hetzner.de/100MB.bin\"\n  },\n  {\n    \"url\": \"http://www.ovh.net/files/10Mio.dat\"\n  },\n  {\n    \"url\": \"http://www.ovh.net/files/10Mio.dat\",\n    \"keep_path\": true\n  },\n  {\n    \"url\": \"https://speed.hetzner.de/100MB.bin\",\n    \"filename\": \"0.1GB.bin\"\n  },\n  {\n    \"url\": \"https://speed.hetzner.de/100MB.bin\",\n    \"filename\": \"test/0.1GB.bin\"\n  },\n  {\n    \"url\": \"https://speed.hetzner.de/100MB.bin\",\n    \"filename\": \"test/test/0.1GB.bin\"\n  },\n  {\n    \"url\": \"https://speed.hetzner.de/100MB.bin\",\n    \"filename\": \"tester/test2/0.1GB.bin\"\n  },\n  {\n    \"url\": \"https://speed.hetzner.de/100MB.bin\",\n    \"filename\": \"filename w/ slash.bin\",\n    \"directory\": \"test\"\n  }\n]\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderrod%2Ffakehttpindex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderrod%2Ffakehttpindex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderrod%2Ffakehttpindex/lists"}