Go to file
Fufu Fang d3e5282e85 Update README.md 2019-04-24 04:20:50 +01:00
.gitignore first ever published version 2018-07-23 01:27:03 +01:00
.kateproject fixed memory leak 2019-04-24 04:20:50 +01:00
LICENSE Create LICENSE 2018-07-23 04:12:07 +01:00
Makefile now uses curl-multi interface, it is so much faster 2019-04-24 04:20:50 +01:00
README.md Update README.md 2019-04-24 04:20:50 +01:00
data.h working version 2018-07-23 02:39:26 +01:00
main.c fixed memory leak 2019-04-24 04:20:50 +01:00
network.c now uses curl-multi interface, it is so much faster 2019-04-24 04:20:50 +01:00
network.h fixed memory leak 2019-04-24 04:20:50 +01:00

README.md

HTTPDirFS

Have you ever wanted to mount those HTTP directory listings as if it was a partition? Look no further, this is your solution. HTTPDirFS stands for Hyper Text Transfer Protocol Directory Filesystem

The performance of the program is excellent, due to the use of curl-multi interface. HTTP connections are reused. I haven't benchmarked it, but I feel this is faster than rclone mount.

Usage

	./httpdirfs -f $URL $YOUR_MOUNT_POINT

An example URL would be Debian CD Image Server. The -f flag keeps the program in the foreground, which is useful for monitoring which URL the filesystem is visiting.

The Technical Details

I noticed that most HTTP directory listings don't provide the file size for the web page itself. I suppose this makes perfect sense, as they are generated on the fly. Whereas the actual files have got file sizes. So the listing pages can be treated as folders, and the rest are files.

This program downloads the HTML web pages/files using libcurl, then parses the listing pages using Gumbo, and presents them using libfuse

LICENSE

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.