consts.go 56 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337
  1. package yu_curl
  2. const (
  3. GLOBAL_SSL = 1 << 0 /* no purpose since 7.57.0 */
  4. GLOBAL_WIN32 = 1 << 1
  5. GLOBAL_ALL = GLOBAL_SSL | GLOBAL_WIN32
  6. GLOBAL_NOTHING = 0
  7. GLOBAL_DEFAULT = GLOBAL_ALL
  8. GLOBAL_ACK_EINTR = 1 << 2
  9. )
  10. const (
  11. OPTTYPE_LONG = 0
  12. OPTTYPE_OBJECTPOINT = 10000
  13. OPTTYPE_FUNCTIONPOINT = 20000
  14. OPTTYPE_OFF_T = 30000
  15. OPTTYPE_BLOB = 40000
  16. /* 'char *' argument to a string with a trailing zero */
  17. OPTTYPE_STRINGPOINT = OPTTYPE_OBJECTPOINT
  18. /* 'struct curl_slist *' argument */
  19. OPTTYPE_SLISTPOINT = OPTTYPE_OBJECTPOINT
  20. /* 'void *' argument passed untouched to callback */
  21. OPTTYPE_CBPOINT = OPTTYPE_OBJECTPOINT
  22. /* 'long' argument with a set of values/bitmask */
  23. OPTTYPE_VALUES = OPTTYPE_LONG
  24. )
  25. /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
  26. const (
  27. HTTP_VERSION_NONE = iota /* setting this means we don't care, and that we'd like the library to choose the best possible for us! */
  28. HTTP_VERSION_1_0 /* please use HTTP 1.0 in the request */
  29. HTTP_VERSION_1_1 /* please use HTTP 1.1 in the request */
  30. HTTP_VERSION_2_0 /* please use HTTP 2 in the request */
  31. HTTP_VERSION_2TLS /* use version 2 for HTTPS, version 1.1 for HTTP */
  32. HTTP_VERSION_2_PRIOR_KNOWLEDGE /* please use HTTP 2 without HTTP/1.1 Upgrade */
  33. HTTP_VERSION_3 = 30 /* Makes use of explicit HTTP/3 without fallback. Use CURLOPT_ALTSVC to enable HTTP/3 upgrade */
  34. HTTP_VERSION_LAST /* *ILLEGAL* http version */
  35. )
  36. const (
  37. SSLVERSION_DEFAULT = iota
  38. SSLVERSION_TLSv1 /* TLS 1.x */
  39. SSLVERSION_SSLv2
  40. SSLVERSION_SSLv3
  41. SSLVERSION_TLSv1_0
  42. SSLVERSION_TLSv1_1
  43. SSLVERSION_TLSv1_2
  44. SSLVERSION_TLSv1_3
  45. SSLVERSION_LAST /* never use, keep last */
  46. )
  47. const (
  48. /* This is the FILE * or void * the regular output should be written to. */
  49. OPT_WRITEDATA = OPTTYPE_CBPOINT + 1
  50. /* The full URL to get/put */
  51. OPT_URL = OPTTYPE_STRINGPOINT + 2
  52. /* Port number to connect to, if other than default. */
  53. OPT_PORT = OPTTYPE_LONG + 3
  54. /* Name of proxy to use. */
  55. OPT_PROXY = OPTTYPE_STRINGPOINT + 4
  56. /* "user:password;options" to use when fetching. */
  57. OPT_USERPWD = OPTTYPE_STRINGPOINT + 5
  58. /* "user:password" to use with proxy. */
  59. OPT_PROXYUSERPWD = OPTTYPE_STRINGPOINT + 6
  60. /* Range to get, specified as an ASCII string. */
  61. OPT_RANGE = OPTTYPE_STRINGPOINT + 7
  62. /* not used */
  63. /* Specified file stream to upload from (use as input): */
  64. OPT_READDATA = OPTTYPE_CBPOINT + 9
  65. /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
  66. * bytes big. */
  67. OPT_ERRORBUFFER = OPTTYPE_OBJECTPOINT + 10
  68. /* Function that will be called to store the output (instead of fwrite). The
  69. * parameters will use fwrite() syntax, make sure to follow them. */
  70. OPT_WRITEFUNCTION = OPTTYPE_FUNCTIONPOINT + 11
  71. /* Function that will be called to read the input (instead of fread). The
  72. * parameters will use fread() syntax, make sure to follow them. */
  73. OPT_READFUNCTION = OPTTYPE_FUNCTIONPOINT + 12
  74. /* Time-out the read operation after this amount of seconds */
  75. OPT_TIMEOUT = OPTTYPE_LONG + 13
  76. /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
  77. * how large the file being sent really is. That allows better error
  78. * checking and better verifies that the upload was successful. -1 means
  79. * unknown size.
  80. *
  81. * For large file support, there is also a _LARGE version of the key
  82. * which takes an off_t type, allowing platforms with larger off_t
  83. * sizes to handle larger files. See below for INFILESIZE_LARGE.
  84. */
  85. OPT_INFILESIZE = OPTTYPE_LONG + 14
  86. /* POST static input fields. */
  87. OPT_POSTFIELDS = OPTTYPE_OBJECTPOINT + 15
  88. /* Set the referrer page (needed by some CGIs) */
  89. OPT_REFERER = OPTTYPE_STRINGPOINT + 16
  90. /* Set the FTP PORT string (interface name, named or numerical IP address)
  91. Use i.e '-' to use default address. */
  92. OPT_FTPPORT = OPTTYPE_STRINGPOINT + 17
  93. /* Set the User-Agent string (examined by some CGIs) */
  94. OPT_USERAGENT = OPTTYPE_STRINGPOINT + 18
  95. /* If the download receives less than "low speed limit" bytes/second
  96. * during "low speed time" seconds, the operations is aborted.
  97. * You could i.e if you have a pretty high speed connection, abort if
  98. * it is less than 2000 bytes/sec during 20 seconds.
  99. */
  100. /* Set the "low speed limit" */
  101. OPT_LOW_SPEED_LIMIT = OPTTYPE_LONG + 19
  102. /* Set the "low speed time" */
  103. OPT_LOW_SPEED_TIME = OPTTYPE_LONG + 20
  104. /* Set the continuation offset.
  105. *
  106. * Note there is also a _LARGE version of this key which uses
  107. * off_t types, allowing for large file offsets on platforms which
  108. * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
  109. */
  110. OPT_RESUME_FROM = OPTTYPE_LONG + 21
  111. /* Set cookie in request: */
  112. OPT_COOKIE = OPTTYPE_STRINGPOINT + 22
  113. /* This points to a linked list of headers, struct curl_slist kind. This
  114. list is also used for RTSP (in spite of its name) */
  115. OPT_HTTPHEADER = OPTTYPE_SLISTPOINT + 23
  116. /* This points to a linked list of post entries, struct curl_httppost */
  117. OPT_HTTPPOST = OPTTYPE_OBJECTPOINT + 24
  118. /* name of the file keeping your private SSL-certificate */
  119. OPT_SSLCERT = OPTTYPE_STRINGPOINT + 25
  120. /* password for the SSL or SSH private key */
  121. OPT_KEYPASSWD = OPTTYPE_STRINGPOINT + 26
  122. /* send TYPE parameter? */
  123. OPT_CRLF = OPTTYPE_LONG + 27
  124. /* send linked-list of QUOTE commands */
  125. OPT_QUOTE = OPTTYPE_SLISTPOINT + 28
  126. /* send FILE * or void * to store headers to, if you use a callback it
  127. is simply passed to the callback unmodified */
  128. OPT_HEADERDATA = OPTTYPE_CBPOINT + 29
  129. /* point to a file to read the initial cookies from, also enables
  130. "cookie awareness" */
  131. OPT_COOKIEFILE = OPTTYPE_STRINGPOINT + 31
  132. /* What version to specifically try to use.
  133. See CURL_SSLVERSION defines below. */
  134. OPT_SSLVERSION = OPTTYPE_VALUES + 32
  135. /* What kind of HTTP time condition to use, see defines */
  136. OPT_TIMECONDITION = OPTTYPE_VALUES + 33
  137. /* Time to use with the above condition. Specified in number of seconds
  138. since 1 Jan 1970 */
  139. OPT_TIMEVALUE = OPTTYPE_LONG + 34
  140. /* 35 = OBSOLETE */
  141. /* Custom request, for customizing the get command like
  142. HTTP: DELETE, TRACE and others
  143. FTP: to use a different list command
  144. */
  145. OPT_CUSTOMREQUEST = OPTTYPE_STRINGPOINT + 36
  146. /* FILE handle to use instead of stderr */
  147. OPT_STDERR = OPTTYPE_OBJECTPOINT + 37
  148. /* 38 is not used */
  149. /* send linked-list of post-transfer QUOTE commands */
  150. OPT_POSTQUOTE = OPTTYPE_SLISTPOINT + 39
  151. /* OBSOLETE, do not use! */
  152. OPT_OBSOLETE40 = OPTTYPE_OBJECTPOINT + 40
  153. /* talk a lot */
  154. OPT_VERBOSE = OPTTYPE_LONG + 41
  155. /* throw the header out too */
  156. OPT_HEADER = OPTTYPE_LONG + 42
  157. /* shut off the progress meter */
  158. OPT_NOPROGRESS = OPTTYPE_LONG + 43
  159. /* use HEAD to get http document */
  160. OPT_NOBODY = OPTTYPE_LONG + 44
  161. /* no output on http error codes >= 400 */
  162. OPT_FAILONERROR = OPTTYPE_LONG + 45
  163. /* this is an upload */
  164. OPT_UPLOAD = OPTTYPE_LONG + 46
  165. /* HTTP POST method */
  166. OPT_POST = OPTTYPE_LONG + 47
  167. /* bare names when listing directories */
  168. OPT_DIRLISTONLY = OPTTYPE_LONG + 48
  169. /* Append instead of overwrite on upload! */
  170. OPT_APPEND = OPTTYPE_LONG + 50
  171. /* Specify whether to read the user+password from the .netrc or the URL.
  172. * This must be one of the CURL_NETRC_* enums below. */
  173. OPT_NETRC = OPTTYPE_VALUES + 51
  174. // 遵循 HTTP 重定向
  175. OPT_FOLLOWLOCATION = OPTTYPE_LONG + 52
  176. /* transfer data in text/ASCII format */
  177. OPT_TRANSFERTEXT = OPTTYPE_LONG + 53
  178. /* HTTP PUT */
  179. OPT_PUT = OPTTYPE_LONG + 54
  180. /* 55 = OBSOLETE */
  181. /* DEPRECATED
  182. * Function that will be called instead of the internal progress display
  183. * function. This function should be defined as the curl_progress_callback
  184. * prototype defines. */
  185. OPT_PROGRESSFUNCTION = OPTTYPE_FUNCTIONPOINT + 56
  186. /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
  187. callbacks */
  188. OPT_XFERINFODATA = OPTTYPE_CBPOINT + 57
  189. OPT_PROGRESSDATA = OPT_XFERINFODATA
  190. /* We want the referrer field set automatically when following locations */
  191. OPT_AUTOREFERER = OPTTYPE_LONG + 58
  192. /* Port of the proxy, can be set in the proxy string as well with:
  193. "[host]:[port]" */
  194. OPT_PROXYPORT = OPTTYPE_LONG + 59
  195. /* size of the POST input data, if strlen() is not good to use */
  196. OPT_POSTFIELDSIZE = OPTTYPE_LONG + 60
  197. /* tunnel non-http operations through a HTTP proxy */
  198. OPT_HTTPPROXYTUNNEL = OPTTYPE_LONG + 61
  199. /* Set the interface string to use as outgoing network interface */
  200. OPT_INTERFACE = OPTTYPE_STRINGPOINT + 62
  201. /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
  202. * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
  203. * is set but doesn't match one of these, 'private' will be used. */
  204. OPT_KRBLEVEL = OPTTYPE_STRINGPOINT + 63
  205. /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
  206. OPT_SSL_VERIFYPEER = OPTTYPE_LONG + 64
  207. /* The CApath or CAfile used to validate the peer certificate
  208. this option is used only if SSL_VERIFYPEER is true */
  209. OPT_CAINFO = OPTTYPE_STRINGPOINT + 65
  210. /* 66 = OBSOLETE */
  211. /* 67 = OBSOLETE */
  212. /* Maximum number of http redirects to follow */
  213. OPT_MAXREDIRS = OPTTYPE_LONG + 68
  214. /* Pass a long set to 1 to get the date of the requested document (if
  215. possible)! Pass a zero to shut it off. */
  216. OPT_FILETIME = OPTTYPE_LONG + 69
  217. /* This points to a linked list of telnet options */
  218. OPT_TELNETOPTIONS = OPTTYPE_SLISTPOINT + 70
  219. /* Max amount of cached alive connections */
  220. OPT_MAXCONNECTS = OPTTYPE_LONG + 71
  221. /* OBSOLETE, do not use! */
  222. OPT_OBSOLETE72 = OPTTYPE_LONG + 72
  223. /* 73 = OBSOLETE */
  224. /* Set to explicitly use a new connection for the upcoming transfer.
  225. Do not use this unless you're absolutely sure of this, as it makes the
  226. operation slower and is less friendly for the network. */
  227. OPT_FRESH_CONNECT = OPTTYPE_LONG + 74
  228. /* Set to explicitly forbid the upcoming transfer's connection to be re-used
  229. when done. Do not use this unless you're absolutely sure of this, as it
  230. makes the operation slower and is less friendly for the network. */
  231. OPT_FORBID_REUSE = OPTTYPE_LONG + 75
  232. /* Set to a file name that contains random data for libcurl to use to
  233. seed the random engine when doing SSL connects. */
  234. OPT_RANDOM_FILE = OPTTYPE_STRINGPOINT + 76
  235. /* Set to the Entropy Gathering Daemon socket pathname */
  236. OPT_EGDSOCKET = OPTTYPE_STRINGPOINT + 77
  237. /* Time-out connect operations after this amount of seconds, if connects are
  238. OK within this time, then fine... This only aborts the connect phase. */
  239. OPT_CONNECTTIMEOUT = OPTTYPE_LONG + 78
  240. /* Function that will be called to store headers (instead of fwrite). The
  241. * parameters will use fwrite() syntax, make sure to follow them. */
  242. OPT_HEADERFUNCTION = OPTTYPE_FUNCTIONPOINT + 79
  243. /* Set this to force the HTTP request to get back to GET. Only really usable
  244. if POST, PUT or a custom request have been used first.
  245. */
  246. OPT_HTTPGET = OPTTYPE_LONG + 80
  247. /* Set if we should verify the Common name from the peer certificate in ssl
  248. * handshake, set 1 to check existence, 2 to ensure that it matches the
  249. * provided hostname. */
  250. OPT_SSL_VERIFYHOST = OPTTYPE_LONG + 81
  251. /* Specify which file name to write all known cookies in after completed
  252. operation. Set file name to "-" (dash) to make it go to stdout. */
  253. OPT_COOKIEJAR = OPTTYPE_STRINGPOINT + 82
  254. /* Specify which SSL ciphers to use */
  255. OPT_SSL_CIPHER_LIST = OPTTYPE_STRINGPOINT + 83
  256. /* Specify which HTTP version to use! This must be set to one of the
  257. HTTP_VERSION* enums set below. */
  258. OPT_HTTP_VERSION = OPTTYPE_VALUES + 84
  259. /* Specifically switch on or off the FTP engine's use of the EPSV command. By
  260. default, that one will always be attempted before the more traditional
  261. PASV command. */
  262. OPT_FTP_USE_EPSV = OPTTYPE_LONG + 85
  263. /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
  264. OPT_SSLCERTTYPE = OPTTYPE_STRINGPOINT + 86
  265. /* name of the file keeping your private SSL-key */
  266. OPT_SSLKEY = OPTTYPE_STRINGPOINT + 87
  267. /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
  268. OPT_SSLKEYTYPE = OPTTYPE_STRINGPOINT + 88
  269. /* crypto engine for the SSL-sub system */
  270. OPT_SSLENGINE = OPTTYPE_STRINGPOINT + 89
  271. /* set the crypto engine for the SSL-sub system as default
  272. the param has no meaning...
  273. */
  274. OPT_SSLENGINE_DEFAULT = OPTTYPE_LONG + 90
  275. /* Non-zero value means to use the global dns cache */
  276. /* DEPRECATED, do not use! */
  277. OPT_DNS_USE_GLOBAL_CACHE = OPTTYPE_LONG + 91
  278. /* DNS cache timeout */
  279. OPT_DNS_CACHE_TIMEOUT = OPTTYPE_LONG + 92
  280. /* send linked-list of pre-transfer QUOTE commands */
  281. OPT_PREQUOTE = OPTTYPE_SLISTPOINT + 93
  282. /* set the debug function */
  283. OPT_DEBUGFUNCTION = OPTTYPE_FUNCTIONPOINT + 94
  284. /* set the data for the debug function */
  285. OPT_DEBUGDATA = OPTTYPE_CBPOINT + 95
  286. /* mark this as start of a cookie session */
  287. OPT_COOKIESESSION = OPTTYPE_LONG + 96
  288. /* The CApath directory used to validate the peer certificate
  289. this option is used only if SSL_VERIFYPEER is true */
  290. OPT_CAPATH = OPTTYPE_STRINGPOINT + 97
  291. /* Instruct libcurl to use a smaller receive buffer */
  292. OPT_BUFFERSIZE = OPTTYPE_LONG + 98
  293. /* Instruct libcurl to not use any signal/alarm handlers, even when using
  294. timeouts. This option is useful for multi-threaded applications.
  295. See libcurl-the-guide for more background information. */
  296. OPT_NOSIGNAL = OPTTYPE_LONG + 99
  297. /* Provide a CURLShare for mutexing non-ts data */
  298. OPT_SHARE = OPTTYPE_OBJECTPOINT + 100
  299. /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default
  300. CURLPROXY_HTTPS = PROXY_SOCKS4 = PROXY_SOCKS4A and
  301. CURLPROXY_SOCKS5. */
  302. OPT_PROXYTYPE = OPTTYPE_VALUES + 101
  303. /* Set the Accept-Encoding string. Use this to tell a server you would like
  304. the response to be compressed. Before 7.21.6, this was known as
  305. CURLOPT_ENCODING */
  306. OPT_ACCEPT_ENCODING = OPTTYPE_STRINGPOINT + 102
  307. /* Set pointer to private data */
  308. OPT_PRIVATE = OPTTYPE_OBJECTPOINT + 103
  309. /* Set aliases for HTTP 200 in the HTTP Response header */
  310. OPT_HTTP200ALIASES = OPTTYPE_SLISTPOINT + 104
  311. /* Continue to send authentication (user+password) when following locations,
  312. even when hostname changed. This can potentially send off the name
  313. and password to whatever host the server decides. */
  314. OPT_UNRESTRICTED_AUTH = OPTTYPE_LONG + 105
  315. /* Specifically switch on or off the FTP engine's use of the EPRT command (
  316. it also disables the LPRT attempt). By default, those ones will always be
  317. attempted before the good old traditional PORT command. */
  318. OPT_FTP_USE_EPRT = OPTTYPE_LONG + 106
  319. /* Set this to a bitmask value to enable the particular authentications
  320. methods you like. Use this in combination with CURLOPT_USERPWD.
  321. Note that setting multiple bits may cause extra network round-trips. */
  322. OPT_HTTPAUTH = OPTTYPE_VALUES + 107
  323. /* Set the ssl context callback function, currently only for OpenSSL or
  324. WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
  325. The function must match the curl_ssl_ctx_callback prototype. */
  326. OPT_SSL_CTX_FUNCTION = OPTTYPE_FUNCTIONPOINT + 108
  327. /* Set the userdata for the ssl context callback function's third
  328. argument */
  329. OPT_SSL_CTX_DATA = OPTTYPE_CBPOINT + 109
  330. /* FTP Option that causes missing dirs to be created on the remote server.
  331. In 7.19.4 we introduced the convenience enums for this option using the
  332. CURLFTP_CREATE_DIR prefix.
  333. */
  334. OPT_FTP_CREATE_MISSING_DIRS = OPTTYPE_LONG + 110
  335. /* Set this to a bitmask value to enable the particular authentications
  336. methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
  337. Note that setting multiple bits may cause extra network round-trips. */
  338. OPT_PROXYAUTH = OPTTYPE_VALUES + 111
  339. /* Option that changes the timeout, in seconds, associated with getting a
  340. response. This is different from transfer timeout time and essentially
  341. places a demand on the server to acknowledge commands in a timely
  342. manner. For FTP, SMTP, IMAP and POP3. */
  343. OPT_SERVER_RESPONSE_TIMEOUT = OPTTYPE_LONG + 112
  344. /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
  345. tell libcurl to use those IP versions only. This only has effect on
  346. systems with support for more than one, i.e IPv4 _and_ IPv6. */
  347. OPT_IPRESOLVE = OPTTYPE_VALUES + 113
  348. /* Set this option to limit the size of a file that will be downloaded from
  349. an HTTP or FTP server.
  350. Note there is also _LARGE version which adds large file support for
  351. platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
  352. OPT_MAXFILESIZE = OPTTYPE_LONG + 114
  353. /* See the comment for INFILESIZE above, but in short, specifies
  354. * the size of the file being uploaded. -1 means unknown.
  355. */
  356. OPT_INFILESIZE_LARGE = OPTTYPE_OFF_T + 115
  357. /* Sets the continuation offset. There is also a CURLOPTTYPE_LONG version
  358. * of this; look above for RESUME_FROM.
  359. */
  360. OPT_RESUME_FROM_LARGE = OPTTYPE_OFF_T + 116
  361. /* Sets the maximum size of data that will be downloaded from
  362. * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
  363. */
  364. OPT_MAXFILESIZE_LARGE = OPTTYPE_OFF_T + 117
  365. /* Set this option to the file name of your .netrc file you want libcurl
  366. to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
  367. a poor attempt to find the user's home directory and check for a .netrc
  368. file in there. */
  369. OPT_NETRC_FILE = OPTTYPE_STRINGPOINT + 118
  370. /* Enable SSL/TLS for FTP, pick one of:
  371. CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
  372. CURLUSESSL_CONTROL - SSL for the control connection or fail
  373. CURLUSESSL_ALL - SSL for all communication or fail
  374. */
  375. OPT_USE_SSL = OPTTYPE_VALUES + 119
  376. /* The _LARGE version of the standard POSTFIELDSIZE option */
  377. OPT_POSTFIELDSIZE_LARGE = OPTTYPE_OFF_T + 120
  378. /* Enable/disable the TCP Nagle algorithm */
  379. OPT_TCP_NODELAY = OPTTYPE_LONG + 121
  380. /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
  381. /* 123 OBSOLETE. Gone in 7.16.0 */
  382. /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
  383. /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
  384. /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
  385. /* 127 OBSOLETE. Gone in 7.16.0 */
  386. /* 128 OBSOLETE. Gone in 7.16.0 */
  387. /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL this option
  388. can be used to change libcurl's default action which is to first try
  389. "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
  390. response has been received.
  391. Available parameters are:
  392. CURLFTPAUTH_DEFAULT - let libcurl decide
  393. CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
  394. CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
  395. */
  396. OPT_FTPSSLAUTH = OPTTYPE_VALUES + 129
  397. OPT_IOCTLFUNCTION = OPTTYPE_FUNCTIONPOINT + 130
  398. OPT_IOCTLDATA = OPTTYPE_CBPOINT + 131
  399. /* 132 OBSOLETE. Gone in 7.16.0 */
  400. /* 133 OBSOLETE. Gone in 7.16.0 */
  401. /* null-terminated string for pass on to the FTP server when asked for
  402. "account" info */
  403. OPT_FTP_ACCOUNT = OPTTYPE_STRINGPOINT + 134
  404. /* feed cookie into cookie engine */
  405. OPT_COOKIELIST = OPTTYPE_STRINGPOINT + 135
  406. /* ignore Content-Length */
  407. OPT_IGNORE_CONTENT_LENGTH = OPTTYPE_LONG + 136
  408. /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
  409. response. Typically used for FTP-SSL purposes but is not restricted to
  410. that. libcurl will then instead use the same IP address it used for the
  411. control connection. */
  412. OPT_FTP_SKIP_PASV_IP = OPTTYPE_LONG + 137
  413. /* Select "file method" to use when doing FTP, see the curl_ftpmethod
  414. above. */
  415. OPT_FTP_FILEMETHOD = OPTTYPE_VALUES + 138
  416. /* Local port number to bind the socket to */
  417. OPT_LOCALPORT = OPTTYPE_LONG + 139
  418. /* Number of ports to try, including the first one set with LOCALPORT.
  419. Thus, setting it to 1 will make no additional attempts but the first.
  420. */
  421. OPT_LOCALPORTRANGE = OPTTYPE_LONG + 140
  422. /* no transfer, set up connection and let application use the socket by
  423. extracting it with CURLINFO_LASTSOCKET */
  424. OPT_CONNECT_ONLY = OPTTYPE_LONG + 141
  425. /* Function that will be called to convert from the
  426. network encoding (instead of using the iconv calls in libcurl) */
  427. OPT_CONV_FROM_NETWORK_FUNCTION = OPTTYPE_FUNCTIONPOINT + 142
  428. /* Function that will be called to convert to the
  429. network encoding (instead of using the iconv calls in libcurl) */
  430. OPT_CONV_TO_NETWORK_FUNCTION = OPTTYPE_FUNCTIONPOINT + 143
  431. /* Function that will be called to convert from UTF8
  432. (instead of using the iconv calls in libcurl)
  433. Note that this is used only for SSL certificate processing */
  434. OPT_CONV_FROM_UTF8_FUNCTION = OPTTYPE_FUNCTIONPOINT + 144
  435. /* if the connection proceeds too quickly then need to slow it down */
  436. /* limit-rate: maximum number of bytes per second to send or receive */
  437. OPT_MAX_SEND_SPEED_LARGE = OPTTYPE_OFF_T + 145
  438. OPT_MAX_RECV_SPEED_LARGE = OPTTYPE_OFF_T + 146
  439. /* Pointer to command string to send if USER/PASS fails. */
  440. OPT_FTP_ALTERNATIVE_TO_USER = OPTTYPE_STRINGPOINT + 147
  441. /* callback function for setting socket options */
  442. OPT_SOCKOPTFUNCTION = OPTTYPE_FUNCTIONPOINT + 148
  443. OPT_SOCKOPTDATA = OPTTYPE_CBPOINT + 149
  444. /* set to 0 to disable session ID re-use for this transfer, default is
  445. enabled (== 1) */
  446. OPT_SSL_SESSIONID_CACHE = OPTTYPE_LONG + 150
  447. /* allowed SSH authentication methods */
  448. OPT_SSH_AUTH_TYPES = OPTTYPE_VALUES + 151
  449. /* Used by scp/sftp to do public/private key authentication */
  450. OPT_SSH_PUBLIC_KEYFILE = OPTTYPE_STRINGPOINT + 152
  451. OPT_SSH_PRIVATE_KEYFILE = OPTTYPE_STRINGPOINT + 153
  452. /* Send CCC (Clear Command Channel) after authentication */
  453. OPT_FTP_SSL_CCC = OPTTYPE_LONG + 154
  454. /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
  455. OPT_TIMEOUT_MS = OPTTYPE_LONG + 155
  456. OPT_CONNECTTIMEOUT_MS = OPTTYPE_LONG + 156
  457. /* set to zero to disable the libcurl's decoding and thus pass the raw body
  458. data to the application even when it is encoded/compressed */
  459. OPT_HTTP_TRANSFER_DECODING = OPTTYPE_LONG + 157
  460. OPT_HTTP_CONTENT_DECODING = OPTTYPE_LONG + 158
  461. /* Permission used when creating new files and directories on the remote
  462. server for protocols that support it, SFTP/SCP/FILE */
  463. OPT_NEW_FILE_PERMS = OPTTYPE_LONG + 159
  464. OPT_NEW_DIRECTORY_PERMS = OPTTYPE_LONG + 160
  465. /* Set the behavior of POST when redirecting. Values must be set to one
  466. of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
  467. OPT_POSTREDIR = OPTTYPE_VALUES + 161
  468. /* used by scp/sftp to verify the host's public key */
  469. OPT_SSH_HOST_PUBLIC_KEY_MD5 = OPTTYPE_STRINGPOINT + 162
  470. /* Callback function for opening socket (instead of socket(2)). Optionally,
  471. callback is able change the address or refuse to connect returning
  472. CURL_SOCKET_BAD. The callback should have type
  473. curl_opensocket_callback */
  474. OPT_OPENSOCKETFUNCTION = OPTTYPE_FUNCTIONPOINT + 163
  475. OPT_OPENSOCKETDATA = OPTTYPE_CBPOINT + 164
  476. /* POST volatile input fields. */
  477. OPT_COPYPOSTFIELDS = OPTTYPE_OBJECTPOINT + 165
  478. /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
  479. OPT_PROXY_TRANSFER_MODE = OPTTYPE_LONG + 166
  480. /* Callback function for seeking in the input stream */
  481. OPT_SEEKFUNCTION = OPTTYPE_FUNCTIONPOINT + 167
  482. OPT_SEEKDATA = OPTTYPE_CBPOINT + 168
  483. /* CRL file */
  484. OPT_CRLFILE = OPTTYPE_STRINGPOINT + 169
  485. /* Issuer certificate */
  486. OPT_ISSUERCERT = OPTTYPE_STRINGPOINT + 170
  487. /* (IPv6) Address scope */
  488. OPT_ADDRESS_SCOPE = OPTTYPE_LONG + 171
  489. /* Collect certificate chain info and allow it to get retrievable with
  490. CURLINFO_CERTINFO after the transfer is complete. */
  491. OPT_CERTINFO = OPTTYPE_LONG + 172
  492. /* "name" and "pwd" to use when fetching. */
  493. OPT_USERNAME = OPTTYPE_STRINGPOINT + 173
  494. OPT_PASSWORD = OPTTYPE_STRINGPOINT + 174
  495. /* "name" and "pwd" to use with Proxy when fetching. */
  496. OPT_PROXYUSERNAME = OPTTYPE_STRINGPOINT + 175
  497. OPT_PROXYPASSWORD = OPTTYPE_STRINGPOINT + 176
  498. /* Comma separated list of hostnames defining no-proxy zones. These should
  499. match both hostnames directly, and hostnames within a domain. For
  500. example, local.com will match local.com and www.local.com, but NOT
  501. notlocal.com or www.notlocal.com. For compatibility with other
  502. implementations of this, .local.com will be considered to be the same as
  503. local.com. A single * is the only valid wildcard, and effectively
  504. disables the use of proxy. */
  505. OPT_NOPROXY = OPTTYPE_STRINGPOINT + 177
  506. /* block size for TFTP transfers */
  507. OPT_TFTP_BLKSIZE = OPTTYPE_LONG + 178
  508. /* Socks Service */
  509. /* DEPRECATED, do not use! */
  510. OPT_SOCKS5_GSSAPI_SERVICE = OPTTYPE_STRINGPOINT + 179
  511. /* Socks Service */
  512. OPT_SOCKS5_GSSAPI_NEC = OPTTYPE_LONG + 180
  513. /* set the bitmask for the protocols that are allowed to be used for the
  514. transfer, which thus helps the app which takes URLs from users or other
  515. external inputs and want to restrict what protocol(s) to deal
  516. with. Defaults to CURLPROTO_ALL. */
  517. OPT_PROTOCOLS = OPTTYPE_LONG + 181
  518. /* set the bitmask for the protocols that libcurl is allowed to follow to,
  519. as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
  520. to be set in both bitmasks to be allowed to get redirected to. */
  521. OPT_REDIR_PROTOCOLS = OPTTYPE_LONG + 182
  522. /* set the SSH knownhost file name to use */
  523. OPT_SSH_KNOWNHOSTS = OPTTYPE_STRINGPOINT + 183
  524. /* set the SSH host key callback, must point to a curl_sshkeycallback
  525. function */
  526. OPT_SSH_KEYFUNCTION = OPTTYPE_FUNCTIONPOINT + 184
  527. /* set the SSH host key callback custom pointer */
  528. OPT_SSH_KEYDATA = OPTTYPE_CBPOINT + 185
  529. /* set the SMTP mail originator */
  530. OPT_MAIL_FROM = OPTTYPE_STRINGPOINT + 186
  531. /* set the list of SMTP mail receiver(s) */
  532. OPT_MAIL_RCPT = OPTTYPE_SLISTPOINT + 187
  533. /* FTP: send PRET before PASV */
  534. OPT_FTP_USE_PRET = OPTTYPE_LONG + 188
  535. /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
  536. OPT_RTSP_REQUEST = OPTTYPE_VALUES + 189
  537. /* The RTSP session identifier */
  538. OPT_RTSP_SESSION_ID = OPTTYPE_STRINGPOINT + 190
  539. /* The RTSP stream URI */
  540. OPT_RTSP_STREAM_URI = OPTTYPE_STRINGPOINT + 191
  541. /* The Transport: header to use in RTSP requests */
  542. OPT_RTSP_TRANSPORT = OPTTYPE_STRINGPOINT + 192
  543. /* Manually initialize the client RTSP CSeq for this handle */
  544. OPT_RTSP_CLIENT_CSEQ = OPTTYPE_LONG + 193
  545. /* Manually initialize the server RTSP CSeq for this handle */
  546. OPT_RTSP_SERVER_CSEQ = OPTTYPE_LONG + 194
  547. /* The stream to pass to INTERLEAVEFUNCTION. */
  548. OPT_INTERLEAVEDATA = OPTTYPE_CBPOINT + 195
  549. /* Let the application define a custom write method for RTP data */
  550. OPT_INTERLEAVEFUNCTION = OPTTYPE_FUNCTIONPOINT + 196
  551. /* Turn on wildcard matching */
  552. OPT_WILDCARDMATCH = OPTTYPE_LONG + 197
  553. /* Directory matching callback called before downloading of an
  554. individual file (chunk) started */
  555. OPT_CHUNK_BGN_FUNCTION = OPTTYPE_FUNCTIONPOINT + 198
  556. /* Directory matching callback called after the file (chunk)
  557. was downloaded, or skipped */
  558. OPT_CHUNK_END_FUNCTION = OPTTYPE_FUNCTIONPOINT + 199
  559. /* Change match (fnmatch-like) callback for wildcard matching */
  560. OPT_FNMATCH_FUNCTION = OPTTYPE_FUNCTIONPOINT + 200
  561. /* Let the application define custom chunk data pointer */
  562. OPT_CHUNK_DATA = OPTTYPE_CBPOINT + 201
  563. /* FNMATCH_FUNCTION user pointer */
  564. OPT_FNMATCH_DATA = OPTTYPE_CBPOINT + 202
  565. /* send linked-list of name:port:address sets */
  566. OPT_RESOLVE = OPTTYPE_SLISTPOINT + 203
  567. /* Set a username for authenticated TLS */
  568. OPT_TLSAUTH_USERNAME = OPTTYPE_STRINGPOINT + 204
  569. /* Set a password for authenticated TLS */
  570. OPT_TLSAUTH_PASSWORD = OPTTYPE_STRINGPOINT + 205
  571. /* Set authentication type for authenticated TLS */
  572. OPT_TLSAUTH_TYPE = OPTTYPE_STRINGPOINT + 206
  573. /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
  574. compressed transfer-encoded responses. Set to 0 to disable the use of TE:
  575. in outgoing requests. The current default is 0, but it might change in a
  576. future libcurl release.
  577. libcurl will ask for the compressed methods it knows of, and if that
  578. isn't any, it will not ask for transfer-encoding at all even if this
  579. option is set to 1.
  580. */
  581. OPT_TRANSFER_ENCODING = OPTTYPE_LONG + 207
  582. /* Callback function for closing socket (instead of close(2)). The callback
  583. should have type curl_closesocket_callback */
  584. OPT_CLOSESOCKETFUNCTION = OPTTYPE_FUNCTIONPOINT + 208
  585. OPT_CLOSESOCKETDATA = OPTTYPE_CBPOINT + 209
  586. /* allow GSSAPI credential delegation */
  587. OPT_GSSAPI_DELEGATION = OPTTYPE_VALUES + 210
  588. /* Set the name servers to use for DNS resolution */
  589. OPT_DNS_SERVERS = OPTTYPE_STRINGPOINT + 211
  590. /* Time-out accept operations (currently for FTP only) after this amount
  591. of milliseconds. */
  592. OPT_ACCEPTTIMEOUT_MS = OPTTYPE_LONG + 212
  593. /* Set TCP keepalive */
  594. OPT_TCP_KEEPALIVE = OPTTYPE_LONG + 213
  595. /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
  596. OPT_TCP_KEEPIDLE = OPTTYPE_LONG + 214
  597. OPT_TCP_KEEPINTVL = OPTTYPE_LONG + 215
  598. /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
  599. OPT_SSL_OPTIONS = OPTTYPE_VALUES + 216
  600. /* Set the SMTP auth originator */
  601. OPT_MAIL_AUTH = OPTTYPE_STRINGPOINT + 217
  602. /* Enable/disable SASL initial response */
  603. OPT_SASL_IR = OPTTYPE_LONG + 218
  604. /* Function that will be called instead of the internal progress display
  605. * function. This function should be defined as the curl_xferinfo_callback
  606. * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
  607. OPT_XFERINFOFUNCTION = OPTTYPE_FUNCTIONPOINT + 219
  608. /* The XOAUTH2 bearer token */
  609. OPT_XOAUTH2_BEARER = OPTTYPE_STRINGPOINT + 220
  610. /* Set the interface string to use as outgoing network
  611. * interface for DNS requests.
  612. * Only supported by the c-ares DNS backend */
  613. OPT_DNS_INTERFACE = OPTTYPE_STRINGPOINT + 221
  614. /* Set the local IPv4 address to use for outgoing DNS requests.
  615. * Only supported by the c-ares DNS backend */
  616. OPT_DNS_LOCAL_IP4 = OPTTYPE_STRINGPOINT + 222
  617. /* Set the local IPv6 address to use for outgoing DNS requests.
  618. * Only supported by the c-ares DNS backend */
  619. OPT_DNS_LOCAL_IP6 = OPTTYPE_STRINGPOINT + 223
  620. /* Set authentication options directly */
  621. OPT_LOGIN_OPTIONS = OPTTYPE_STRINGPOINT + 224
  622. /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
  623. OPT_SSL_ENABLE_NPN = OPTTYPE_LONG + 225
  624. /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
  625. OPT_SSL_ENABLE_ALPN = OPTTYPE_LONG + 226
  626. /* Time to wait for a response to a HTTP request containing an
  627. * Expect: 100-continue header before sending the data anyway. */
  628. OPT_EXPECT_100_TIMEOUT_MS = OPTTYPE_LONG + 227
  629. /* This points to a linked list of headers used for proxy requests only,
  630. struct curl_slist kind */
  631. OPT_PROXYHEADER = OPTTYPE_SLISTPOINT + 228
  632. /* Pass in a bitmask of "header options" */
  633. OPT_HEADEROPT = OPTTYPE_VALUES + 229
  634. /* The public key in DER form used to validate the peer public key
  635. this option is used only if SSL_VERIFYPEER is true */
  636. OPT_PINNEDPUBLICKEY = OPTTYPE_STRINGPOINT + 230
  637. /* Path to Unix domain socket */
  638. OPT_UNIX_SOCKET_PATH = OPTTYPE_STRINGPOINT + 231
  639. /* Set if we should verify the certificate status. */
  640. OPT_SSL_VERIFYSTATUS = OPTTYPE_LONG + 232
  641. /* Set if we should enable TLS false start. */
  642. OPT_SSL_FALSESTART = OPTTYPE_LONG + 233
  643. /* Do not squash dot-dot sequences */
  644. OPT_PATH_AS_IS = OPTTYPE_LONG + 234
  645. /* Proxy Service Name */
  646. OPT_PROXY_SERVICE_NAME = OPTTYPE_STRINGPOINT + 235
  647. /* Service Name */
  648. OPT_SERVICE_NAME = OPTTYPE_STRINGPOINT + 236
  649. /* Wait/don't wait for pipe/mutex to clarify */
  650. OPT_PIPEWAIT = OPTTYPE_LONG + 237
  651. /* Set the protocol used when curl is given a URL without a protocol */
  652. OPT_DEFAULT_PROTOCOL = OPTTYPE_STRINGPOINT + 238
  653. /* Set stream weight, 1 - 256 (default is 16) */
  654. OPT_STREAM_WEIGHT = OPTTYPE_LONG + 239
  655. /* Set stream dependency on another CURL handle */
  656. OPT_STREAM_DEPENDS = OPTTYPE_OBJECTPOINT + 240
  657. /* Set E-xclusive stream dependency on another CURL handle */
  658. OPT_STREAM_DEPENDS_E = OPTTYPE_OBJECTPOINT + 241
  659. /* Do not send any tftp option requests to the server */
  660. OPT_TFTP_NO_OPTIONS = OPTTYPE_LONG + 242
  661. /* Linked-list of host:port:connect-to-host:connect-to-port,
  662. overrides the URL's host:port (only for the network layer) */
  663. OPT_CONNECT_TO = OPTTYPE_SLISTPOINT + 243
  664. /* Set TCP Fast Open */
  665. OPT_TCP_FASTOPEN = OPTTYPE_LONG + 244
  666. /* Continue to send data if the server responds early with an
  667. * HTTP status code >= 300 */
  668. OPT_KEEP_SENDING_ON_ERROR = OPTTYPE_LONG + 245
  669. /* The CApath or CAfile used to validate the proxy certificate
  670. this option is used only if PROXY_SSL_VERIFYPEER is true */
  671. OPT_PROXY_CAINFO = OPTTYPE_STRINGPOINT + 246
  672. /* The CApath directory used to validate the proxy certificate
  673. this option is used only if PROXY_SSL_VERIFYPEER is true */
  674. OPT_PROXY_CAPATH = OPTTYPE_STRINGPOINT + 247
  675. /* Set if we should verify the proxy in ssl handshake,
  676. set 1 to verify. */
  677. OPT_PROXY_SSL_VERIFYPEER = OPTTYPE_LONG + 248
  678. /* Set if we should verify the Common name from the proxy certificate in ssl
  679. * handshake, set 1 to check existence, 2 to ensure that it matches
  680. * the provided hostname. */
  681. OPT_PROXY_SSL_VERIFYHOST = OPTTYPE_LONG + 249
  682. /* What version to specifically try to use for proxy.
  683. See CURL_SSLVERSION defines below. */
  684. OPT_PROXY_SSLVERSION = OPTTYPE_VALUES + 250
  685. /* Set a username for authenticated TLS for proxy */
  686. OPT_PROXY_TLSAUTH_USERNAME = OPTTYPE_STRINGPOINT + 251
  687. /* Set a password for authenticated TLS for proxy */
  688. OPT_PROXY_TLSAUTH_PASSWORD = OPTTYPE_STRINGPOINT + 252
  689. /* Set authentication type for authenticated TLS for proxy */
  690. OPT_PROXY_TLSAUTH_TYPE = OPTTYPE_STRINGPOINT + 253
  691. /* name of the file keeping your private SSL-certificate for proxy */
  692. OPT_PROXY_SSLCERT = OPTTYPE_STRINGPOINT + 254
  693. /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
  694. proxy */
  695. OPT_PROXY_SSLCERTTYPE = OPTTYPE_STRINGPOINT + 255
  696. /* name of the file keeping your private SSL-key for proxy */
  697. OPT_PROXY_SSLKEY = OPTTYPE_STRINGPOINT + 256
  698. /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
  699. proxy */
  700. OPT_PROXY_SSLKEYTYPE = OPTTYPE_STRINGPOINT + 257
  701. /* password for the SSL private key for proxy */
  702. OPT_PROXY_KEYPASSWD = OPTTYPE_STRINGPOINT + 258
  703. /* Specify which SSL ciphers to use for proxy */
  704. OPT_PROXY_SSL_CIPHER_LIST = OPTTYPE_STRINGPOINT + 259
  705. /* CRL file for proxy */
  706. OPT_PROXY_CRLFILE = OPTTYPE_STRINGPOINT + 260
  707. /* Enable/disable specific SSL features with a bitmask for proxy, see
  708. CURLSSLOPT_* */
  709. OPT_PROXY_SSL_OPTIONS = OPTTYPE_LONG + 261
  710. /* Name of pre proxy to use. */
  711. OPT_PRE_PROXY = OPTTYPE_STRINGPOINT + 262
  712. /* The public key in DER form used to validate the proxy public key
  713. this option is used only if PROXY_SSL_VERIFYPEER is true */
  714. OPT_PROXY_PINNEDPUBLICKEY = OPTTYPE_STRINGPOINT + 263
  715. /* Path to an abstract Unix domain socket */
  716. OPT_ABSTRACT_UNIX_SOCKET = OPTTYPE_STRINGPOINT + 264
  717. /* Suppress proxy CONNECT response headers from user callbacks */
  718. OPT_SUPPRESS_CONNECT_HEADERS = OPTTYPE_LONG + 265
  719. /* The request target, instead of extracted from the URL */
  720. OPT_REQUEST_TARGET = OPTTYPE_STRINGPOINT + 266
  721. /* bitmask of allowed auth methods for connections to SOCKS5 proxies */
  722. OPT_SOCKS5_AUTH = OPTTYPE_LONG + 267
  723. /* Enable/disable SSH compression */
  724. OPT_SSH_COMPRESSION = OPTTYPE_LONG + 268
  725. /* Post MIME data. */
  726. OPT_MIMEPOST = OPTTYPE_OBJECTPOINT + 269
  727. /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of
  728. seconds since 1 Jan 1970. */
  729. OPT_TIMEVALUE_LARGE = OPTTYPE_OFF_T + 270
  730. /* Head start in milliseconds to give happy eyeballs. */
  731. OPT_HAPPY_EYEBALLS_TIMEOUT_MS = OPTTYPE_LONG + 271
  732. /* Function that will be called before a resolver request is made */
  733. OPT_RESOLVER_START_FUNCTION = OPTTYPE_FUNCTIONPOINT + 272
  734. /* User data to pass to the resolver start callback. */
  735. OPT_RESOLVER_START_DATA = OPTTYPE_CBPOINT + 273
  736. /* send HAProxy PROXY protocol header? */
  737. OPT_HAPROXYPROTOCOL = OPTTYPE_LONG + 274
  738. /* shuffle addresses before use when DNS returns multiple */
  739. OPT_DNS_SHUFFLE_ADDRESSES = OPTTYPE_LONG + 275
  740. /* Specify which TLS 1.3 ciphers suites to use */
  741. OPT_TLS13_CIPHERS = OPTTYPE_STRINGPOINT + 276
  742. OPT_PROXY_TLS13_CIPHERS = OPTTYPE_STRINGPOINT + 277
  743. /* Disallow specifying username/login in URL. */
  744. OPT_DISALLOW_USERNAME_IN_URL = OPTTYPE_LONG + 278
  745. /* DNS-over-HTTPS URL */
  746. OPT_DOH_URL = OPTTYPE_STRINGPOINT + 279
  747. /* Preferred buffer size to use for uploads */
  748. OPT_UPLOAD_BUFFERSIZE = OPTTYPE_LONG + 280
  749. /* Time in ms between connection upkeep calls for long-lived connections. */
  750. OPT_UPKEEP_INTERVAL_MS = OPTTYPE_LONG + 281
  751. /* Specify URL using CURL URL API. */
  752. OPT_CURLU = OPTTYPE_OBJECTPOINT + 282
  753. /* add trailing data just after no more data is available */
  754. OPT_TRAILERFUNCTION = OPTTYPE_FUNCTIONPOINT + 283
  755. /* pointer to be passed to HTTP_TRAILER_FUNCTION */
  756. OPT_TRAILERDATA = OPTTYPE_CBPOINT + 284
  757. /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
  758. OPT_HTTP09_ALLOWED = OPTTYPE_LONG + 285
  759. /* alt-svc control bitmask */
  760. OPT_ALTSVC_CTRL = OPTTYPE_LONG + 286
  761. /* alt-svc cache file name to possibly read from/write to */
  762. OPT_ALTSVC = OPTTYPE_STRINGPOINT + 287
  763. /* maximum age (idle time) of a connection to consider it for reuse
  764. * (in seconds) */
  765. OPT_MAXAGE_CONN = OPTTYPE_LONG + 288
  766. /* SASL authorization identity */
  767. OPT_SASL_AUTHZID = OPTTYPE_STRINGPOINT + 289
  768. /* allow RCPT TO command to fail for some recipients */
  769. OPT_MAIL_RCPT_ALLLOWFAILS = OPTTYPE_LONG + 290
  770. /* the private SSL-certificate as a "blob" */
  771. OPT_SSLCERT_BLOB = OPTTYPE_BLOB + 291
  772. OPT_SSLKEY_BLOB = OPTTYPE_BLOB + 292
  773. OPT_PROXY_SSLCERT_BLOB = OPTTYPE_BLOB + 293
  774. OPT_PROXY_SSLKEY_BLOB = OPTTYPE_BLOB + 294
  775. OPT_ISSUERCERT_BLOB = OPTTYPE_BLOB + 295
  776. /* Issuer certificate for proxy */
  777. OPT_PROXY_ISSUERCERT = OPTTYPE_STRINGPOINT + 296
  778. OPT_PROXY_ISSUERCERT_BLOB = OPTTYPE_BLOB + 297
  779. /* the EC curves requested by the TLS client (RFC 8422, 5.1);
  780. * OpenSSL support via 'set_groups'/'set_curves':
  781. * https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups.html
  782. */
  783. OPT_SSL_EC_CURVES = OPTTYPE_STRINGPOINT + 298
  784. /* HSTS bitmask */
  785. OPT_HSTS_CTRL = OPTTYPE_LONG + 299
  786. /* HSTS file name */
  787. OPT_HSTS = OPTTYPE_STRINGPOINT + 300
  788. /* HSTS read callback */
  789. OPT_HSTSREADFUNCTION = OPTTYPE_FUNCTIONPOINT + 301
  790. OPT_HSTSREADDATA = OPTTYPE_CBPOINT + 302
  791. /* HSTS write callback */
  792. OPT_HSTSWRITEFUNCTION = OPTTYPE_FUNCTIONPOINT + 303
  793. OPT_HSTSWRITEDATA = OPTTYPE_CBPOINT + 304
  794. /* Parameters for V4 signature */
  795. OPT_AWS_SIGV4 = OPTTYPE_STRINGPOINT + 305
  796. /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
  797. OPT_DOH_SSL_VERIFYPEER = OPTTYPE_LONG + 306
  798. /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
  799. OPT_DOH_SSL_VERIFYHOST = OPTTYPE_LONG + 307
  800. /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
  801. OPT_DOH_SSL_VERIFYSTATUS = OPTTYPE_LONG + 308
  802. /* The CA certificates as "blob" used to validate the peer certificate
  803. this option is used only if SSL_VERIFYPEER is true */
  804. OPT_CAINFO_BLOB = OPTTYPE_BLOB + 309
  805. /* The CA certificates as "blob" used to validate the proxy certificate
  806. this option is used only if PROXY_SSL_VERIFYPEER is true */
  807. OPT_PROXY_CAINFO_BLOB = OPTTYPE_BLOB + 310
  808. /* used by scp/sftp to verify the host's public key */
  809. OPT_SSH_HOST_PUBLIC_KEY_SHA256 = OPTTYPE_STRINGPOINT + 311
  810. /* Function that will be called immediately before the initial request
  811. is made on a connection (after any protocol negotiation step). */
  812. OPT_PREREQFUNCTION = OPTTYPE_FUNCTIONPOINT + 312
  813. /* Data passed to the CURLOPT_PREREQFUNCTION callback */
  814. OPT_PREREQDATA = OPTTYPE_CBPOINT + 313
  815. /* maximum age (since creation) of a connection to consider it for reuse
  816. * (in seconds) */
  817. OPT_MAXLIFETIME_CONN = OPTTYPE_LONG + 314
  818. /* Set MIME option flags. */
  819. OPT_MIME_OPTIONS = OPTTYPE_LONG + 315
  820. /* set the SSH host key callback, must point to a curl_sshkeycallback
  821. function */
  822. OPT_SSH_HOSTKEYFUNCTION = OPTTYPE_FUNCTIONPOINT + 316
  823. /* set the SSH host key callback custom pointer */
  824. OPT_SSH_HOSTKEYDATA = OPTTYPE_CBPOINT + 317
  825. /* specify which protocols that are allowed to be used for the transfer,
  826. which thus helps the app which takes URLs from users or other external
  827. inputs and want to restrict what protocol(s) to deal with. Defaults to
  828. all built-in protocols. */
  829. OPT_PROTOCOLS_STR = OPTTYPE_STRINGPOINT + 318
  830. /* specify which protocols that libcurl is allowed to follow directs to */
  831. OPT_REDIR_PROTOCOLS_STR = OPTTYPE_STRINGPOINT + 319
  832. /* websockets options */
  833. OPT_WS_OPTIONS = OPTTYPE_LONG + 320
  834. )
  835. const (
  836. E_OK = iota
  837. E_UNSUPPORTED_PROTOCOL /* 1 */
  838. E_FAILED_INIT /* 2 */
  839. E_URL_MALFORMAT /* 3 */
  840. E_NOT_BUILT_IN /* 4 - [was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5] */
  841. E_COULDNT_RESOLVE_PROXY /* 5 */
  842. E_COULDNT_RESOLVE_HOST /* 6 */
  843. E_COULDNT_CONNECT /* 7 */
  844. E_WEIRD_SERVER_REPLY /* 8 */
  845. E_REMOTE_ACCESS_DENIED /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */
  846. E_FTP_ACCEPT_FAILED /* 10 - [was obsoleted in April 2006 for 7.15.4, reused in Dec 2011 for 7.24.0]*/
  847. E_FTP_WEIRD_PASS_REPLY /* 11 */
  848. E_FTP_ACCEPT_TIMEOUT /* 12 - timeout occurred accepting server [was obsoleted in August 2007 for 7.17.0, reused in Dec 2011 for 7.24.0]*/
  849. E_FTP_WEIRD_PASV_REPLY /* 13 */
  850. E_FTP_WEIRD_227_FORMAT /* 14 */
  851. E_FTP_CANT_GET_HOST /* 15 */
  852. E_HTTP2 /* 16 - A problem in the http2 framing layer. [was obsoleted in August 2007 for 7.17.0, reused in July 2014 for 7.38.0] */
  853. E_FTP_COULDNT_SET_TYPE /* 17 */
  854. E_PARTIAL_FILE /* 18 */
  855. E_FTP_COULDNT_RETR_FILE /* 19 */
  856. E_OBSOLETE20 /* 20 - NOT USED */
  857. E_QUOTE_ERROR /* 21 - quote command failure */
  858. E_HTTP_RETURNED_ERROR /* 22 */
  859. E_WRITE_ERROR /* 23 */
  860. E_OBSOLETE24 /* 24 - NOT USED */
  861. E_UPLOAD_FAILED /* 25 - failed upload "command" */
  862. E_READ_ERROR /* 26 - couldn't open/read from file */
  863. E_OUT_OF_MEMORY /* 27 */
  864. E_OPERATION_TIMEDOUT /* 28 - the timeout time was reached */
  865. E_OBSOLETE29 /* 29 - NOT USED */
  866. E_FTP_PORT_FAILED /* 30 - FTP PORT operation failed */
  867. E_FTP_COULDNT_USE_REST /* 31 - the REST command failed */
  868. E_OBSOLETE32 /* 32 - NOT USED */
  869. E_RANGE_ERROR /* 33 - RANGE "command" didn't work */
  870. E_HTTP_POST_ERROR /* 34 */
  871. E_SSL_CONNECT_ERROR /* 35 - wrong when connecting with SSL */
  872. E_BAD_DOWNLOAD_RESUME /* 36 - couldn't resume download */
  873. E_FIE_COULDNT_READ_FILE /* 37 */
  874. E_LDAP_CANNOT_BIND /* 38 */
  875. E_LDAP_SEARCH_FAILED /* 39 */
  876. E_OBSOLETE40 /* 40 - NOT USED */
  877. E_FUNCTION_NOT_FOUND /* 41 - NOT USED starting with 7.53.0 */
  878. E_ABORTED_BY_CALLBACK /* 42 */
  879. E_BAD_FUNCTION_ARGUMENT /* 43 */
  880. E_OBSOLETE44 /* 44 - NOT USED */
  881. E_INTERFACE_FAILED /* 45 - CURLOPT_INTERFACE failed */
  882. E_OBSOLETE46 /* 46 - NOT USED */
  883. E_TOO_MANY_REDIRECTS /* 47 - catch endless re-direct loops */
  884. E_UNKNOWN_OPTION /* 48 - User specified an unknown option */
  885. E_SETOPT_OPTION_SYNTAX /* 49 - Malformed setopt option */
  886. E_OBSOLETE50 /* 50 - NOT USED */
  887. E_OBSOLETE51 /* 51 - NOT USED */
  888. E_GOT_NOTHING /* 52 - when this is a specific error */
  889. E_SSL_ENGINE_NOTFOUND /* 53 - SSL crypto engine not found */
  890. E_SSL_ENGINE_SETFAILED /* 54 - can not set SSL crypto engine as default */
  891. E_SEND_ERROR /* 55 - failed sending network data */
  892. E_RECV_ERROR /* 56 - failure in receiving network data */
  893. E_OBSOLETE57 /* 57 - NOT IN USE */
  894. E_SSL_CERTPROBLEM /* 58 - problem with the local certificate */
  895. E_SSL_CIPHER /* 59 - couldn't use specified cipher */
  896. E_PEER_FAILED_VERIFICATION /* 60 - peer's certificate or fingerprint wasn't verified fine */
  897. E_BAD_CONTENT_ENCODING /* 61 - Unrecognized/bad encoding */
  898. E_OBSOLETE62 /* 62 - NOT IN USE since 7.82.0 */
  899. E_FILESIZE_EXCEEDED /* 63 - Maximum file size exceeded */
  900. E_USE_SSL_FAILED /* 64 - Requested FTP SSL level failed */
  901. E_SEND_FAIL_REWIND /* 65 - Sending the data requires a rewind that failed */
  902. E_SSL_ENGINE_INITFAILED /* 66 - failed to initialise ENGINE */
  903. E_LOGIN_DENIED /* 67 - user, password or similar was not accepted and we failed to login */
  904. E_TFTP_NOTFOUND /* 68 - file not found on server */
  905. E_TFTP_PERM /* 69 - permission problem on server */
  906. E_REMOTE_DISK_FULL /* 70 - out of disk space on server */
  907. E_TFTP_ILLEGAL /* 71 - Illegal TFTP operation */
  908. E_TFTP_UNKNOWNID /* 72 - Unknown transfer ID */
  909. E_REMOTE_FIE_EXISTS /* 73 - File already exists */
  910. E_TFTP_NOSUCHUSER /* 74 - No such user */
  911. E_OBSOLETE75 /* 75 - NOT IN USE since 7.82.0 */
  912. E_OBSOLETE76 /* 76 - NOT IN USE since 7.82.0 */
  913. E_SSL_CACERT_BADFILE /* 77 - could not load CACERT file, missing or wrong format */
  914. E_REMOTE_FIE_NOT_FOUND /* 78 - remote file not found */
  915. E_SSH /* 79 - error from the SSH layer, somewhat generic so the error message will be of interest when this has happened */
  916. E_SSL_SHUTDOWN_FAILED /* 80 - Failed to shut down the SSL connection */
  917. E_AGAIN /* 81 - socket is not ready for send/recv, wait till it's ready and try again (Added in 7.18.2) */
  918. E_SSL_CRL_BADFILE /* 82 - could not load CRL file, missing or wrong format (Added in 7.19.0) */
  919. E_SSL_ISSUER_ERROR /* 83 - Issuer check failed. (Added in 7.19.0) */
  920. E_FTP_PRET_FAILED /* 84 - a PRET command failed */
  921. E_RTSP_CSEQ_ERROR /* 85 - mismatch of RTSP CSeq numbers */
  922. E_RTSP_SESSION_ERROR /* 86 - mismatch of RTSP Session Ids */
  923. E_FTP_BAD_FIE_LIST /* 87 - unable to parse FTP file list */
  924. E_CHUNK_FAILED /* 88 - chunk callback reported error */
  925. E_NO_CONNECTION_AVAILABLE /* 89 - No connection available, the session will be queued */
  926. E_SSL_PINNEDPUBKEYNOTMATCH /* 90 - specified pinned public key did not match */
  927. E_SSL_INVALIDCERTSTATUS /* 91 - invalid certificate status */
  928. E_HTTP2_STREAM /* 92 - stream error in HTTP/2 framing layer */
  929. E_RECURSIVE_API_CALL /* 93 - an api function was called from inside a callback */
  930. E_AUTH_ERROR /* 94 - an authentication function returned an error */
  931. E_HTTP3 /* 95 - An HTTP/3 layer problem */
  932. E_QUIC_CONNECT_ERROR /* 96 - QUIC connection error */
  933. E_PROXY /* 97 - proxy handshake error */
  934. E_SSL_CLIENTCERT /* 98 - client-side certificate required */
  935. E_UNRECOVERABE_POLL /* 99 - poll/select returned fatal error */
  936. )
  937. const (
  938. /* Return code for when the pre-request callback has terminated without
  939. any errors */
  940. PREREQFUNC_OK = 0
  941. /* Return code for when the pre-request callback wants to abort the
  942. request */
  943. PREREQFUNC_ABORT = 1
  944. )
  945. const (
  946. INFO_STRING = 0x100000
  947. INFO_LONG = 0x200000
  948. INFO_DOUBLE = 0x300000
  949. INFO_SLIST = 0x400000
  950. INFO_PTR = 0x400000 /* same as SLIST */
  951. INFO_SOCKET = 0x500000
  952. INFO_OFF_T = 0x600000
  953. INFO_MASK = 0x0fffff
  954. INFO_TYPEMASK = 0xf00000
  955. )
  956. const (
  957. INFO_EFFECTIVE_URL = INFO_STRING + 1 // 获取最后使用的URL,https://curl.se/libcurl/c/curl_easy_getinfo.html
  958. INFO_RESPONSE_CODE = INFO_LONG + 2 // 获取最后响应代码,https://curl.se/libcurl/c/curl_easy_getinfo.html
  959. INFO_TOTAL_TIME = INFO_DOUBLE + 3 // 最后一次传输总耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
  960. INFO_NAMELOOKUP_TIME = INFO_DOUBLE + 4 // 域名解析时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  961. INFO_CONNECT_TIME = INFO_DOUBLE + 5 // 建立连接耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
  962. INFO_PRETRANSFER_TIME = INFO_DOUBLE + 6 // 从建立连接到准备传输所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  963. INFO_SIZE_UPLOAD = INFO_DOUBLE + 7 // (已弃用)上传的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  964. INFO_SIZE_UPLOAD_T = INFO_OFF_T + 7 // 上传的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  965. INFO_SIZE_DOWNLOAD = INFO_DOUBLE + 8 // (已弃用)下载的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  966. INFO_SIZE_DOWNLOAD_T = INFO_OFF_T + 8 // 下载的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  967. INFO_SPEED_DOWNLOAD = INFO_DOUBLE + 9 // (已弃用)平均下载速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
  968. INFO_SPEED_DOWNLOAD_T = INFO_OFF_T + 9 // 平均下载速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
  969. INFO_SPEED_UPLOAD = INFO_DOUBLE + 10 // (已弃用)平均上传速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
  970. INFO_SPEED_UPLOAD_T = INFO_OFF_T + 10 // 平均上传速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
  971. INFO_HEADER_SIZE = INFO_LONG + 11 // 接收到的所有标头的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  972. INFO_REQUEST_SIZE = INFO_LONG + 12 // 发出的 HTTP 请求中发送的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  973. INFO_SSL_VERIFYRESULT = INFO_LONG + 13 // 证书验证结果,https://curl.se/libcurl/c/curl_easy_getinfo.html
  974. INFO_FILETIME = INFO_LONG + 14 // 检索到的文档的远程时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  975. INFO_FILETIME_T = INFO_OFF_T + 14 // 检索到的文档的远程时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  976. INFO_CONTENT_LENGTH_DOWNLOAD = INFO_DOUBLE + 15 // (已弃用)来自 Content-Length 标头的内容长度,https://curl.se/libcurl/c/curl_easy_getinfo.html
  977. INFO_CONTENT_LENGTH_DOWNLOAD_T = INFO_OFF_T + 15 // 来自 Content-Length 标头的内容长度,https://curl.se/libcurl/c/curl_easy_getinfo.html
  978. INFO_CONTENT_LENGTH_UPLOAD = INFO_DOUBLE + 16 // (已弃用)上传大小,https://curl.se/libcurl/c/curl_easy_getinfo.html
  979. INFO_CONTENT_LENGTH_UPLOAD_T = INFO_OFF_T + 16 // 上传大小,https://curl.se/libcurl/c/curl_easy_getinfo.html
  980. INFO_STARTTRANSFER_TIME = INFO_DOUBLE + 17 // 从建立连接到传输开始所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  981. INFO_CONTENT_TYPE = INFO_STRING + 18 // Content-Type 标头中的内容类型,https://curl.se/libcurl/c/curl_easy_getinfo.html
  982. INFO_REDIRECT_TIME = INFO_DOUBLE + 19 // 最终传输前所有重定向步骤所用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  983. INFO_REDIRECT_COUNT = INFO_LONG + 20 // 遵循的重定向总数,https://curl.se/libcurl/c/curl_easy_getinfo.html
  984. INFO_PRIVATE = INFO_STRING + 21 // 用户的私有数据指针,由"SetOpt"时设置的数据,https://curl.se/libcurl/c/curl_easy_getinfo.html
  985. INFO_HTTP_CONNECTCODE = INFO_LONG + 22 // 最后一个代理 CONNECT 响应代码,https://curl.se/libcurl/c/curl_easy_getinfo.html
  986. INFO_HTTPAUTH_AVAIL = INFO_LONG + 23 // 可用的 HTTP 身份验证方法,https://curl.se/libcurl/c/curl_easy_getinfo.html
  987. INFO_PROXYAUTH_AVAIL = INFO_LONG + 24 // 可用的 HTTP 代理身份验证方法,https://curl.se/libcurl/c/curl_easy_getinfo.html
  988. INFO_OS_ERRNO = INFO_LONG + 25 // 上次连接失败的 errno,仅在失败时才重置此值,"Error()"获取错误描述,https://curl.se/libcurl/c/curl_easy_getinfo.html
  989. INFO_NUM_CONNECTS = INFO_LONG + 26 // 创建连接数,必须创建多少新连接才能实现先前的传输(仅计算成功的连接)。结合"INFO_REDIRECT_COUNT",您可以知道 libcurl 成功重用现有连接的次数。https://curl.se/libcurl/c/curl_easy_getinfo.html
  990. INFO_SSL_ENGINES = INFO_SLIST + 27 // OpenSSL 加密引擎列表,https://curl.se/libcurl/c/curl_easy_getinfo.html
  991. INFO_COOKIELIST = INFO_SLIST + 28 // 所有已知 cookie 的列表,https://curl.se/libcurl/c/curl_easy_getinfo.html
  992. INFO_LASTSOCKET = INFO_LONG + 29 // 最后使用的套接字,https://curl.se/libcurl/c/curl_easy_getinfo.html
  993. INFO_FTP_ENTRY_PATH = INFO_STRING + 30 // 登录FTP服务器后的入口路径,https://curl.se/libcurl/c/curl_easy_getinfo.html
  994. INFO_REDIRECT_URL = INFO_STRING + 31 // 重定向URL,如果您启用了重定向,重定向将带您到 URL,https://curl.se/libcurl/c/curl_easy_getinfo.html
  995. INFO_PRIMARY_IP = INFO_STRING + 32 // 最后一次连接的 IP 地址,https://curl.se/libcurl/c/curl_easy_getinfo.html
  996. INFO_APPCONNECT_TIME = INFO_DOUBLE + 33 // 从开始到 SSL/SSH 握手完成的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  997. INFO_CERTINFO = INFO_PTR + 34 // 证书信息,https://curl.se/libcurl/c/curl_easy_getinfo.html
  998. INFO_CONDITION_UNMET = INFO_LONG + 35 // 是否满足时间条件或 304 HTTP 响应,https://curl.se/libcurl/c/curl_easy_getinfo.html
  999. INFO_RTSP_SESSION_ID = INFO_STRING + 36 // RTSP 会话 ID,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1000. INFO_RTSP_CLIENT_CSEQ = INFO_LONG + 37 // RTSP客户端CSEQ,接下来将使用的 RTSP CSeq,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1001. INFO_RTSP_SERVER_CSEQ = INFO_LONG + 38 // RTSP服务器CSEQ,预计接下来的 RTSP CSeq,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1002. INFO_RTSP_CSEQ_RECV = INFO_LONG + 39 // RTSP接收CSEQ,上次收到的 RTSP CSeq,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1003. INFO_PRIMARY_PORT = INFO_LONG + 40 // 最后一个连接的端口,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1004. INFO_LOCAL_IP = INFO_STRING + 41 // 最后一次连接的本端IP地址,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1005. INFO_LOCAL_PORT = INFO_LONG + 42 // 最后一次连接的本端端口,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1006. INFO_TLS_SESSION = INFO_PTR + 43 // 可用于进一步处理的 TLS 会话信息。请改用 INFO_TLS_SSL_PTR,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1007. INFO_ACTIVESOCKET = INFO_SOCKET + 44 // 当前套接字,会话的活动套接字,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1008. INFO_TLS_SSL_PTR = INFO_PTR + 45 // 可用于进一步处理的 TLS 会话信息,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1009. INFO_HTTP_VERSION = INFO_LONG + 46 // 连接中使用的 http 版本,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1010. INFO_PROXY_SSL_VERIFYRESULT = INFO_LONG + 47 // 代理证书验证结果,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1011. INFO_PROTOCOL = INFO_LONG + 48 // 用于连接的协议,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1012. INFO_SCHEME = INFO_STRING + 49 // 用于连接的方案,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1013. INFO_TOTAL_TIME_T = INFO_OFF_T + 50 // 最后一次传输总耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1014. INFO_NAMELOOKUP_TIME_T = INFO_OFF_T + 51 // 域名解析时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1015. INFO_CONNECT_TIME_T = INFO_OFF_T + 52 // 建立连接耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1016. INFO_PRETRANSFER_TIME_T = INFO_OFF_T + 53 // 从建立连接到准备传输所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1017. INFO_STARTTRANSFER_TIME_T = INFO_OFF_T + 54 // 从建立连接到传输开始所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1018. INFO_REDIRECT_TIME_T = INFO_OFF_T + 55 // 最终传输前所有重定向步骤所用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1019. INFO_APPCONNECT_TIME_T = INFO_OFF_T + 56 // 从开始到 SSL/SSH 握手完成的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1020. INFO_RETRY_AFTER = INFO_OFF_T + 57 // 来自 Retry-After 标头的值,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1021. INFO_EFFECTIVE_METHOD = INFO_STRING + 58 // 最后使用的 HTTP 方法,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1022. INFO_PROXY_ERROR = INFO_LONG + 59 // 详细的代理错误,"PX_*",https://curl.se/libcurl/c/curl_easy_getinfo.html
  1023. INFO_REFERER = INFO_STRING + 60 // 推荐人标头,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1024. INFO_CAINFO = INFO_STRING + 61 // 获取CURLOPT_CAINFO的默认值,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1025. INFO_CAPATH = INFO_STRING + 62 // 获取CURLOPT_CAPATH的默认值,https://curl.se/libcurl/c/curl_easy_getinfo.html
  1026. )
  1027. const (
  1028. WS_RAW_MODE = 1 // 告诉curl我们自己处理所有的WebSocket魔法
  1029. )