Skip to content

Commit

Permalink
added USAGE.md
Browse files Browse the repository at this point in the history
  • Loading branch information
fangfufu committed Nov 18, 2024
1 parent 9e750b9 commit c85c065
Show file tree
Hide file tree
Showing 2 changed files with 96 additions and 32 deletions.
67 changes: 35 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,28 @@ If you only want to access a single file, there is also a simplified
Single File Mode. This can be especially useful if the web server does not
present a HTTP directory listing.

## Installation

Please note if you install HTTDirFS from a repository, it can be outdated.

### Debian 12 "Bookworm"

HTTPDirFS is available as a package in Debian 12 "Bookworm", If you are on
Debian Bookworm, you can simply run the following
command as ``root``:
## Usage
Basic usage:

apt install httpdirfs
./httpdirfs -f --cache $URL $MOUNT_POINT

For more information on the status of HTTDirFS in Debian, please refer to
[Debian package tracker](https://tracker.debian.org/pkg/httpdirfs-fuse)
An example URL would be
[Debian CD Image Server](https://cdimage.debian.org/debian-cd/). The ``-f`` flag
keeps the program in the foreground, which is useful for monitoring which URL
the filesystem is visiting.

### Arch Linux
For more usage related help, run

HTTPDirFS is available in the
[Arch User Repository](https://aur.archlinux.org/packages/httpdirfs).
./httpdirfs --help

### NixOS
or

HTTPDirFS is available as a [package](https://mynixos.com/nixpkgs/package/httpdirfs).
man httpdirfs

### FreeBSD
Please note that the man page only works if you have installed HTTPDirFS
properly.

HTTPDirFS is available in the
[FreeBSD Ports Collection](https://www.freshports.org/sysutils/fusefs-httpdirfs/).
The full usage flags is also documented in the [usage](USAGE.md) page.

## Compilation

Expand Down Expand Up @@ -98,25 +92,34 @@ for these operating systems in the README for now. Please feel free to send me a
pull request to add them back in. It is known that HTTPDirFS
[does compile](https://github.com/fangfufu/httpdirfs/issues/165) on FreeBSD.

## Usage
## Installation

./httpdirfs -f --cache $URL $MOUNT_POINT
Please note if you install HTTDirFS from a repository, it can be outdated.

An example URL would be
[Debian CD Image Server](https://cdimage.debian.org/debian-cd/). The ``-f`` flag
keeps the program in the foreground, which is useful for monitoring which URL
the filesystem is visiting.
### Debian 12 "Bookworm"

For more usage related help, run
HTTPDirFS is available as a package in Debian 12 "Bookworm", If you are on
Debian Bookworm, you can simply run the following
command as ``root``:

./httpdirfs --help
apt install httpdirfs

or
For more information on the status of HTTDirFS in Debian, please refer to
[Debian package tracker](https://tracker.debian.org/pkg/httpdirfs-fuse)

man httpdirfs
### Arch Linux

Please note that the man page only works if you have installed HTTPDirFS
properly.
HTTPDirFS is available in the
[Arch User Repository](https://aur.archlinux.org/packages/httpdirfs).

### NixOS

HTTPDirFS is available as a [package](https://mynixos.com/nixpkgs/package/httpdirfs).

### FreeBSD

HTTPDirFS is available in the
[FreeBSD Ports Collection](https://www.freshports.org/sysutils/fusefs-httpdirfs/).

## Airsonic / Subsonic server support

Expand Down
61 changes: 61 additions & 0 deletions USAGE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## HTTPDirFS Usage
As of commit
[9e750b9b0552bb7e072e97a9f29eba7656f77444](https://github.com/fangfufu/httpdirfs/commit/9e750b9b0552bb7e072e97a9f29eba7656f77444),
HTTPDirFS supports the following usage flags:

usage: ./httpdirfs [options] URL mountpoint

general options:
--config Specify a configuration file
-o opt,[opt...] Mount options
-h --help Print help
-V --version Print version

HTTPDirFS options:
-u --username HTTP authentication username
-p --password HTTP authentication password
-P --proxy Proxy for libcurl, for more details refer to
https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html
--proxy-username Username for the proxy
--proxy-password Password for the proxy
--proxy-cacert Certificate authority for the proxy
--cache Enable cache (default: off)
--cache-location Set a custom cache location
(default: "${XDG_CACHE_HOME}/httpdirfs")
--cache-clear Delete the cache directory or the custom location
specifid with `--cache-location`, if the option is
seen first. Then exit in either case.
--cacert Certificate authority for the server
--dl-seg-size Set cache download segment size, in MB (default: 8)
Note: this setting is ignored if previously
cached data is found for the requested file.
--http-header Set one or more HTTP headers
--max-seg-count Set maximum number of download segments a file
can have. (default: 128*1024)
With the default setting, the maximum memory usage
per file is 128KB. This allows caching files up
to 1TB in size using the default segment size.
--max-conns Set maximum number of network connections that
libcurl is allowed to make. (default: 10)
--refresh-timeout The directories are refreshed after the specified
time, in seconds (default: 3600)
--retry-wait Set delay in seconds before retrying an HTTP request
after encountering an error. (default: 5)
--user-agent Set user agent string (default: "HTTPDirFS")
--no-range-check Disable the built-in check for the server's support
for HTTP range requests
--zero-len-is-dir If a file has a zero length, treat it as a directory
--insecure-tls Disable licurl TLS certificate verification by
setting CURLOPT_SSL_VERIFYHOST to 0
--single-file-mode Single file mode - rather than mounting a whole
directory, present a single file inside a virtual
directory.

For mounting a Airsonic / Subsonic server:
--sonic-username The username for your Airsonic / Subsonic server
--sonic-password The password for your Airsonic / Subsonic server
--sonic-id3 Enable ID3 mode - this present the server content in
Artist/Album/Song layout
--sonic-insecure Authenticate against your Airsonic / Subsonic server
using the insecure username / hex encoded password
scheme

0 comments on commit c85c065

Please sign in to comment.