1nbdkit-curl-plugin(1)               NBDKIT               nbdkit-curl-plugin(1)
2
3
4

NAME

6       nbdkit-curl-plugin - nbdkit curl plugin (HTTP, FTP and other protocols)
7

SYNOPSIS

9        nbdkit -r curl [url=]http://example.com/disk.img
10

DESCRIPTION

12       "nbdkit-curl-plugin" is a plugin for nbdkit(1) which turns content
13       served over HTTP, FTP, and more, into a Network Block Device.  It uses
14       a library called libcurl (also known as cURL) to read data from URLs.
15       The exact list of protocols that libcurl can handle depends on how it
16       was compiled, but most versions will handle HTTP, HTTPS, FTP, FTPS and
17       more (see: "curl -V").
18
19       Note: This plugin supports writes.  However for HTTP, you may not want
20       nbdkit to issue PUT requests to the remote server (which probably
21       doesn't understand them).  To force nbdkit to use a readonly
22       connection, pass the -r flag.
23
24       Although this plugin can access SFTP (ie. SSH) servers, it is much
25       better to use nbdkit-ssh-plugin(1).
26

EXAMPLE

28        nbdkit -r curl http://example.com/disk.img
29
30       serves the remote disk image as NBD on TCP port 10809 (to control ports
31       and protocols used to serve NBD see nbdkit(1)).
32

PARAMETERS

34       cookie=COOKIE
35       cookie=+FILENAME
36           Set a cookie in the request header when connecting to the remote
37           server.
38
39           A typical example is:
40
41            cookie='vmware_soap_session="52a01262-bf93-ccce-d379-8dabb3e55560"'
42
43           This option can be used at most once.  It only works for HTTP and
44           HTTPS transports.  To set multiple cookies you must concatenate
45           them yourself, eg:
46
47            cookie='name1=content1; name2=content2;'
48
49           See CURLOPT_COOKIE(3) for more information about this.
50
51           If the cookie is used for authentication then passing it on the
52           command line is not secure on shared machines.  Use the alternate
53           "+FILENAME" syntax to pass it in a file.
54
55       password=PASSWORD
56           Set the password to use when connecting to the remote server.
57
58           Note that passing this on the command line is not secure on shared
59           machines.
60
61       password=-
62           Ask for the password (interactively) when nbdkit starts up.
63
64       password=+FILENAME
65           Read the password from the named file.  This is a secure method to
66           supply a password, as long as you set the permissions on the file
67           appropriately.
68
69       password=-FD
70           Read the password from file descriptor number "FD", inherited from
71           the parent process when nbdkit starts up.  This is also a secure
72           method to supply a password.
73
74       protocols=PROTO,PROTO,...
75           Limit the protocols that are allowed in the URL.  Use this option
76           for extra security if the URL comes from an untrusted source and
77           you want to avoid security isues in the more obscure protocols that
78           curl supports.  (See qemu CVE-2013-0249 for an example of a
79           security bug introduced by allowing unrestricted protocols).
80
81           For example if you only intend HTTP and HTTPS URLs to be used, then
82           add this parameter: "protocols=http,https"
83
84           The value of this parameter is a comma-separated list of protocols.
85           The following protocols are known: dict, file, ftp, ftps, gopher,
86           http, https, imap, imaps, ldap, ldaps, pop3, pop3s, rtmp, rtmpe,
87           rtmps, rtmpt, rtmpte, rtmpts, rtsp, scp, sftp, smb, smbs, smtp,
88           smtps, telnet, tftp.
89
90           The default is to allow any protocol.
91
92       proxy-password=PASSWORD
93       proxy-password=-
94       proxy-password=+FILENAME
95       proxy-password=-FD
96       proxy-user=USERNAME
97           Set the proxy username and password.
98
99       sslverify=false
100           Don't verify the SSL certificate of the remote host.
101
102       timeout=SECS
103           Set the timeout for requests.
104
105       timeout=0
106           Use the default libcurl timeout for requests.
107
108       unix-socket-path=PATH
109           Instead of using a TCP connection, connect to the server over the
110           named Unix domain socket.  See "CURLOPT_UNIX_SOCKET_PATH" in
111           curl_easy_setopt(3).
112
113       [url=]URL
114           The URL of the remote disk image.  This is passed to libcurl
115           directly via "CURLOPT_URL" in curl_easy_setopt(3).
116
117           This parameter is required.
118
119           "url=" is a magic config key and may be omitted in most cases.  See
120           "Magic parameters" in nbdkit(1).
121
122       user=USERNAME
123           Set the username to use when connecting to the remote server.  This
124           may also be set in the URL (eg. "http://foo@example.com/disk.img")
125

DEBUG FLAG

127       -D curl.verbose=1
128           This enables very verbose curl debugging.  See CURLOPT_VERBOSE(3).
129           This is mainly useful if you suspect there is a bug inside libcurl
130           itself.
131

FILES

133       $plugindir/nbdkit-curl-plugin.so
134           The plugin.
135
136           Use "nbdkit --dump-config" to find the location of $plugindir.
137

VERSION

139       "nbdkit-curl-plugin" first appeared in nbdkit 1.2.
140

SEE ALSO

142       curl(1), libcurl(3), CURLOPT_COOKIE(3) CURLOPT_VERBOSE(3), nbdkit(1),
143       nbdkit-readahead-filter(1), nbdkit-retry-filter(1),
144       nbdkit-ssh-plugin(1), nbdkit-plugin(3), http://curl.haxx.se.
145

AUTHORS

147       Richard W.M. Jones
148
149       Parts derived from Alexander Graf's "QEMU Block driver for CURL
150       images".
151
153       Copyright (C) 2014 Red Hat Inc.
154

LICENSE

156       Redistribution and use in source and binary forms, with or without
157       modification, are permitted provided that the following conditions are
158       met:
159
160       ·   Redistributions of source code must retain the above copyright
161           notice, this list of conditions and the following disclaimer.
162
163       ·   Redistributions in binary form must reproduce the above copyright
164           notice, this list of conditions and the following disclaimer in the
165           documentation and/or other materials provided with the
166           distribution.
167
168       ·   Neither the name of Red Hat nor the names of its contributors may
169           be used to endorse or promote products derived from this software
170           without specific prior written permission.
171
172       THIS SOFTWARE IS PROVIDED BY RED HAT AND CONTRIBUTORS ''AS IS'' AND ANY
173       EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
174       IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
175       PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL RED HAT OR CONTRIBUTORS BE
176       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
177       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
178       SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
179       BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
180       WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
181       OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
182       ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
183
184
185
186nbdkit-1.16.1                     2019-12-03             nbdkit-curl-plugin(1)
Impressum