github.com/10XDev/rclone@v1.52.3-0.20200626220027-16af9ab76b2a/docs/content/http.md (about)

     1  ---
     2  title: "HTTP Remote"
     3  description: "Read only remote for HTTP servers"
     4  ---
     5  
     6  {{< icon "fa fa-globe" >}} HTTP
     7  -------------------------------------------------
     8  
     9  The HTTP remote is a read only remote for reading files of a
    10  webserver.  The webserver should provide file listings which rclone
    11  will read and turn into a remote.  This has been tested with common
    12  webservers such as Apache/Nginx/Caddy and will likely work with file
    13  listings from most web servers.  (If it doesn't then please file an
    14  issue, or send a pull request!)
    15  
    16  Paths are specified as `remote:` or `remote:path/to/dir`.
    17  
    18  Here is an example of how to make a remote called `remote`.  First
    19  run:
    20  
    21       rclone config
    22  
    23  This will guide you through an interactive setup process:
    24  
    25  ```
    26  No remotes found - make a new one
    27  n) New remote
    28  s) Set configuration password
    29  q) Quit config
    30  n/s/q> n
    31  name> remote
    32  Type of storage to configure.
    33  Choose a number from below, or type in your own value
    34  [snip]
    35  XX / http Connection
    36     \ "http"
    37  [snip]
    38  Storage> http
    39  URL of http host to connect to
    40  Choose a number from below, or type in your own value
    41   1 / Connect to example.com
    42     \ "https://example.com"
    43  url> https://beta.rclone.org
    44  Remote config
    45  --------------------
    46  [remote]
    47  url = https://beta.rclone.org
    48  --------------------
    49  y) Yes this is OK
    50  e) Edit this remote
    51  d) Delete this remote
    52  y/e/d> y
    53  Current remotes:
    54  
    55  Name                 Type
    56  ====                 ====
    57  remote               http
    58  
    59  e) Edit existing remote
    60  n) New remote
    61  d) Delete remote
    62  r) Rename remote
    63  c) Copy remote
    64  s) Set configuration password
    65  q) Quit config
    66  e/n/d/r/c/s/q> q
    67  ```
    68  
    69  This remote is called `remote` and can now be used like this
    70  
    71  See all the top level directories
    72  
    73      rclone lsd remote:
    74  
    75  List the contents of a directory
    76  
    77      rclone ls remote:directory
    78  
    79  Sync the remote `directory` to `/home/local/directory`, deleting any excess files.
    80  
    81      rclone sync remote:directory /home/local/directory
    82  
    83  ### Read only ###
    84  
    85  This remote is read only - you can't upload files to an HTTP server.
    86  
    87  ### Modified time ###
    88  
    89  Most HTTP servers store time accurate to 1 second.
    90  
    91  ### Checksum ###
    92  
    93  No checksums are stored.
    94  
    95  ### Usage without a config file ###
    96  
    97  Since the http remote only has one config parameter it is easy to use
    98  without a config file:
    99  
   100      rclone lsd --http-url https://beta.rclone.org :http:
   101  
   102  {{< rem autogenerated options start" - DO NOT EDIT - instead edit fs.RegInfo in backend/http/http.go then run make backenddocs" >}}
   103  ### Standard Options
   104  
   105  Here are the standard options specific to http (http Connection).
   106  
   107  #### --http-url
   108  
   109  URL of http host to connect to
   110  
   111  - Config:      url
   112  - Env Var:     RCLONE_HTTP_URL
   113  - Type:        string
   114  - Default:     ""
   115  - Examples:
   116      - "https://example.com"
   117          - Connect to example.com
   118      - "https://user:pass@example.com"
   119          - Connect to example.com using a username and password
   120  
   121  ### Advanced Options
   122  
   123  Here are the advanced options specific to http (http Connection).
   124  
   125  #### --http-headers
   126  
   127  Set HTTP headers for all transactions
   128  
   129  Use this to set additional HTTP headers for all transactions
   130  
   131  The input format is comma separated list of key,value pairs.  Standard
   132  [CSV encoding](https://godoc.org/encoding/csv) may be used.
   133  
   134  For example to set a Cookie use 'Cookie,name=value', or '"Cookie","name=value"'.
   135  
   136  You can set multiple headers, eg '"Cookie","name=value","Authorization","xxx"'.
   137  
   138  
   139  - Config:      headers
   140  - Env Var:     RCLONE_HTTP_HEADERS
   141  - Type:        CommaSepList
   142  - Default:     
   143  
   144  #### --http-no-slash
   145  
   146  Set this if the site doesn't end directories with /
   147  
   148  Use this if your target website does not use / on the end of
   149  directories.
   150  
   151  A / on the end of a path is how rclone normally tells the difference
   152  between files and directories.  If this flag is set, then rclone will
   153  treat all files with Content-Type: text/html as directories and read
   154  URLs from them rather than downloading them.
   155  
   156  Note that this may cause rclone to confuse genuine HTML files with
   157  directories.
   158  
   159  - Config:      no_slash
   160  - Env Var:     RCLONE_HTTP_NO_SLASH
   161  - Type:        bool
   162  - Default:     false
   163  
   164  #### --http-no-head
   165  
   166  Don't use HEAD requests to find file sizes in dir listing
   167  
   168  If your site is being very slow to load then you can try this option.
   169  Normally rclone does a HEAD request for each potential file in a
   170  directory listing to:
   171  
   172  - find its size
   173  - check it really exists
   174  - check to see if it is a directory
   175  
   176  If you set this option, rclone will not do the HEAD request.  This will mean
   177  
   178  - directory listings are much quicker
   179  - rclone won't have the times or sizes of any files
   180  - some files that don't exist may be in the listing
   181  
   182  
   183  - Config:      no_head
   184  - Env Var:     RCLONE_HTTP_NO_HEAD
   185  - Type:        bool
   186  - Default:     false
   187  
   188  {{< rem autogenerated options stop >}}