12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337 |
- package yu_curl
- const (
- GLOBAL_SSL = 1 << 0 /* no purpose since 7.57.0 */
- GLOBAL_WIN32 = 1 << 1
- GLOBAL_ALL = GLOBAL_SSL | GLOBAL_WIN32
- GLOBAL_NOTHING = 0
- GLOBAL_DEFAULT = GLOBAL_ALL
- GLOBAL_ACK_EINTR = 1 << 2
- )
- const (
- OPTTYPE_LONG = 0
- OPTTYPE_OBJECTPOINT = 10000
- OPTTYPE_FUNCTIONPOINT = 20000
- OPTTYPE_OFF_T = 30000
- OPTTYPE_BLOB = 40000
- /* 'char *' argument to a string with a trailing zero */
- OPTTYPE_STRINGPOINT = OPTTYPE_OBJECTPOINT
- /* 'struct curl_slist *' argument */
- OPTTYPE_SLISTPOINT = OPTTYPE_OBJECTPOINT
- /* 'void *' argument passed untouched to callback */
- OPTTYPE_CBPOINT = OPTTYPE_OBJECTPOINT
- /* 'long' argument with a set of values/bitmask */
- OPTTYPE_VALUES = OPTTYPE_LONG
- )
- /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
- const (
- 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! */
- HTTP_VERSION_1_0 /* please use HTTP 1.0 in the request */
- HTTP_VERSION_1_1 /* please use HTTP 1.1 in the request */
- HTTP_VERSION_2_0 /* please use HTTP 2 in the request */
- HTTP_VERSION_2TLS /* use version 2 for HTTPS, version 1.1 for HTTP */
- HTTP_VERSION_2_PRIOR_KNOWLEDGE /* please use HTTP 2 without HTTP/1.1 Upgrade */
- HTTP_VERSION_3 = 30 /* Makes use of explicit HTTP/3 without fallback. Use CURLOPT_ALTSVC to enable HTTP/3 upgrade */
- HTTP_VERSION_LAST /* *ILLEGAL* http version */
- )
- const (
- SSLVERSION_DEFAULT = iota
- SSLVERSION_TLSv1 /* TLS 1.x */
- SSLVERSION_SSLv2
- SSLVERSION_SSLv3
- SSLVERSION_TLSv1_0
- SSLVERSION_TLSv1_1
- SSLVERSION_TLSv1_2
- SSLVERSION_TLSv1_3
- SSLVERSION_LAST /* never use, keep last */
- )
- const (
- /* This is the FILE * or void * the regular output should be written to. */
- OPT_WRITEDATA = OPTTYPE_CBPOINT + 1
- /* The full URL to get/put */
- OPT_URL = OPTTYPE_STRINGPOINT + 2
- /* Port number to connect to, if other than default. */
- OPT_PORT = OPTTYPE_LONG + 3
- /* Name of proxy to use. */
- OPT_PROXY = OPTTYPE_STRINGPOINT + 4
- /* "user:password;options" to use when fetching. */
- OPT_USERPWD = OPTTYPE_STRINGPOINT + 5
- /* "user:password" to use with proxy. */
- OPT_PROXYUSERPWD = OPTTYPE_STRINGPOINT + 6
- /* Range to get, specified as an ASCII string. */
- OPT_RANGE = OPTTYPE_STRINGPOINT + 7
- /* not used */
- /* Specified file stream to upload from (use as input): */
- OPT_READDATA = OPTTYPE_CBPOINT + 9
- /* Buffer to receive error messages in, must be at least CURL_ERROR_SIZE
- * bytes big. */
- OPT_ERRORBUFFER = OPTTYPE_OBJECTPOINT + 10
- /* Function that will be called to store the output (instead of fwrite). The
- * parameters will use fwrite() syntax, make sure to follow them. */
- OPT_WRITEFUNCTION = OPTTYPE_FUNCTIONPOINT + 11
- /* Function that will be called to read the input (instead of fread). The
- * parameters will use fread() syntax, make sure to follow them. */
- OPT_READFUNCTION = OPTTYPE_FUNCTIONPOINT + 12
- /* Time-out the read operation after this amount of seconds */
- OPT_TIMEOUT = OPTTYPE_LONG + 13
- /* If the CURLOPT_INFILE is used, this can be used to inform libcurl about
- * how large the file being sent really is. That allows better error
- * checking and better verifies that the upload was successful. -1 means
- * unknown size.
- *
- * For large file support, there is also a _LARGE version of the key
- * which takes an off_t type, allowing platforms with larger off_t
- * sizes to handle larger files. See below for INFILESIZE_LARGE.
- */
- OPT_INFILESIZE = OPTTYPE_LONG + 14
- /* POST static input fields. */
- OPT_POSTFIELDS = OPTTYPE_OBJECTPOINT + 15
- /* Set the referrer page (needed by some CGIs) */
- OPT_REFERER = OPTTYPE_STRINGPOINT + 16
- /* Set the FTP PORT string (interface name, named or numerical IP address)
- Use i.e '-' to use default address. */
- OPT_FTPPORT = OPTTYPE_STRINGPOINT + 17
- /* Set the User-Agent string (examined by some CGIs) */
- OPT_USERAGENT = OPTTYPE_STRINGPOINT + 18
- /* If the download receives less than "low speed limit" bytes/second
- * during "low speed time" seconds, the operations is aborted.
- * You could i.e if you have a pretty high speed connection, abort if
- * it is less than 2000 bytes/sec during 20 seconds.
- */
- /* Set the "low speed limit" */
- OPT_LOW_SPEED_LIMIT = OPTTYPE_LONG + 19
- /* Set the "low speed time" */
- OPT_LOW_SPEED_TIME = OPTTYPE_LONG + 20
- /* Set the continuation offset.
- *
- * Note there is also a _LARGE version of this key which uses
- * off_t types, allowing for large file offsets on platforms which
- * use larger-than-32-bit off_t's. Look below for RESUME_FROM_LARGE.
- */
- OPT_RESUME_FROM = OPTTYPE_LONG + 21
- /* Set cookie in request: */
- OPT_COOKIE = OPTTYPE_STRINGPOINT + 22
- /* This points to a linked list of headers, struct curl_slist kind. This
- list is also used for RTSP (in spite of its name) */
- OPT_HTTPHEADER = OPTTYPE_SLISTPOINT + 23
- /* This points to a linked list of post entries, struct curl_httppost */
- OPT_HTTPPOST = OPTTYPE_OBJECTPOINT + 24
- /* name of the file keeping your private SSL-certificate */
- OPT_SSLCERT = OPTTYPE_STRINGPOINT + 25
- /* password for the SSL or SSH private key */
- OPT_KEYPASSWD = OPTTYPE_STRINGPOINT + 26
- /* send TYPE parameter? */
- OPT_CRLF = OPTTYPE_LONG + 27
- /* send linked-list of QUOTE commands */
- OPT_QUOTE = OPTTYPE_SLISTPOINT + 28
- /* send FILE * or void * to store headers to, if you use a callback it
- is simply passed to the callback unmodified */
- OPT_HEADERDATA = OPTTYPE_CBPOINT + 29
- /* point to a file to read the initial cookies from, also enables
- "cookie awareness" */
- OPT_COOKIEFILE = OPTTYPE_STRINGPOINT + 31
- /* What version to specifically try to use.
- See CURL_SSLVERSION defines below. */
- OPT_SSLVERSION = OPTTYPE_VALUES + 32
- /* What kind of HTTP time condition to use, see defines */
- OPT_TIMECONDITION = OPTTYPE_VALUES + 33
- /* Time to use with the above condition. Specified in number of seconds
- since 1 Jan 1970 */
- OPT_TIMEVALUE = OPTTYPE_LONG + 34
- /* 35 = OBSOLETE */
- /* Custom request, for customizing the get command like
- HTTP: DELETE, TRACE and others
- FTP: to use a different list command
- */
- OPT_CUSTOMREQUEST = OPTTYPE_STRINGPOINT + 36
- /* FILE handle to use instead of stderr */
- OPT_STDERR = OPTTYPE_OBJECTPOINT + 37
- /* 38 is not used */
- /* send linked-list of post-transfer QUOTE commands */
- OPT_POSTQUOTE = OPTTYPE_SLISTPOINT + 39
- /* OBSOLETE, do not use! */
- OPT_OBSOLETE40 = OPTTYPE_OBJECTPOINT + 40
- /* talk a lot */
- OPT_VERBOSE = OPTTYPE_LONG + 41
- /* throw the header out too */
- OPT_HEADER = OPTTYPE_LONG + 42
- /* shut off the progress meter */
- OPT_NOPROGRESS = OPTTYPE_LONG + 43
- /* use HEAD to get http document */
- OPT_NOBODY = OPTTYPE_LONG + 44
- /* no output on http error codes >= 400 */
- OPT_FAILONERROR = OPTTYPE_LONG + 45
- /* this is an upload */
- OPT_UPLOAD = OPTTYPE_LONG + 46
- /* HTTP POST method */
- OPT_POST = OPTTYPE_LONG + 47
- /* bare names when listing directories */
- OPT_DIRLISTONLY = OPTTYPE_LONG + 48
- /* Append instead of overwrite on upload! */
- OPT_APPEND = OPTTYPE_LONG + 50
- /* Specify whether to read the user+password from the .netrc or the URL.
- * This must be one of the CURL_NETRC_* enums below. */
- OPT_NETRC = OPTTYPE_VALUES + 51
- // 遵循 HTTP 重定向
- OPT_FOLLOWLOCATION = OPTTYPE_LONG + 52
- /* transfer data in text/ASCII format */
- OPT_TRANSFERTEXT = OPTTYPE_LONG + 53
- /* HTTP PUT */
- OPT_PUT = OPTTYPE_LONG + 54
- /* 55 = OBSOLETE */
- /* DEPRECATED
- * Function that will be called instead of the internal progress display
- * function. This function should be defined as the curl_progress_callback
- * prototype defines. */
- OPT_PROGRESSFUNCTION = OPTTYPE_FUNCTIONPOINT + 56
- /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
- callbacks */
- OPT_XFERINFODATA = OPTTYPE_CBPOINT + 57
- OPT_PROGRESSDATA = OPT_XFERINFODATA
- /* We want the referrer field set automatically when following locations */
- OPT_AUTOREFERER = OPTTYPE_LONG + 58
- /* Port of the proxy, can be set in the proxy string as well with:
- "[host]:[port]" */
- OPT_PROXYPORT = OPTTYPE_LONG + 59
- /* size of the POST input data, if strlen() is not good to use */
- OPT_POSTFIELDSIZE = OPTTYPE_LONG + 60
- /* tunnel non-http operations through a HTTP proxy */
- OPT_HTTPPROXYTUNNEL = OPTTYPE_LONG + 61
- /* Set the interface string to use as outgoing network interface */
- OPT_INTERFACE = OPTTYPE_STRINGPOINT + 62
- /* Set the krb4/5 security level, this also enables krb4/5 awareness. This
- * is a string, 'clear', 'safe', 'confidential' or 'private'. If the string
- * is set but doesn't match one of these, 'private' will be used. */
- OPT_KRBLEVEL = OPTTYPE_STRINGPOINT + 63
- /* Set if we should verify the peer in ssl handshake, set 1 to verify. */
- OPT_SSL_VERIFYPEER = OPTTYPE_LONG + 64
- /* The CApath or CAfile used to validate the peer certificate
- this option is used only if SSL_VERIFYPEER is true */
- OPT_CAINFO = OPTTYPE_STRINGPOINT + 65
- /* 66 = OBSOLETE */
- /* 67 = OBSOLETE */
- /* Maximum number of http redirects to follow */
- OPT_MAXREDIRS = OPTTYPE_LONG + 68
- /* Pass a long set to 1 to get the date of the requested document (if
- possible)! Pass a zero to shut it off. */
- OPT_FILETIME = OPTTYPE_LONG + 69
- /* This points to a linked list of telnet options */
- OPT_TELNETOPTIONS = OPTTYPE_SLISTPOINT + 70
- /* Max amount of cached alive connections */
- OPT_MAXCONNECTS = OPTTYPE_LONG + 71
- /* OBSOLETE, do not use! */
- OPT_OBSOLETE72 = OPTTYPE_LONG + 72
- /* 73 = OBSOLETE */
- /* Set to explicitly use a new connection for the upcoming transfer.
- Do not use this unless you're absolutely sure of this, as it makes the
- operation slower and is less friendly for the network. */
- OPT_FRESH_CONNECT = OPTTYPE_LONG + 74
- /* Set to explicitly forbid the upcoming transfer's connection to be re-used
- when done. Do not use this unless you're absolutely sure of this, as it
- makes the operation slower and is less friendly for the network. */
- OPT_FORBID_REUSE = OPTTYPE_LONG + 75
- /* Set to a file name that contains random data for libcurl to use to
- seed the random engine when doing SSL connects. */
- OPT_RANDOM_FILE = OPTTYPE_STRINGPOINT + 76
- /* Set to the Entropy Gathering Daemon socket pathname */
- OPT_EGDSOCKET = OPTTYPE_STRINGPOINT + 77
- /* Time-out connect operations after this amount of seconds, if connects are
- OK within this time, then fine... This only aborts the connect phase. */
- OPT_CONNECTTIMEOUT = OPTTYPE_LONG + 78
- /* Function that will be called to store headers (instead of fwrite). The
- * parameters will use fwrite() syntax, make sure to follow them. */
- OPT_HEADERFUNCTION = OPTTYPE_FUNCTIONPOINT + 79
- /* Set this to force the HTTP request to get back to GET. Only really usable
- if POST, PUT or a custom request have been used first.
- */
- OPT_HTTPGET = OPTTYPE_LONG + 80
- /* Set if we should verify the Common name from the peer certificate in ssl
- * handshake, set 1 to check existence, 2 to ensure that it matches the
- * provided hostname. */
- OPT_SSL_VERIFYHOST = OPTTYPE_LONG + 81
- /* Specify which file name to write all known cookies in after completed
- operation. Set file name to "-" (dash) to make it go to stdout. */
- OPT_COOKIEJAR = OPTTYPE_STRINGPOINT + 82
- /* Specify which SSL ciphers to use */
- OPT_SSL_CIPHER_LIST = OPTTYPE_STRINGPOINT + 83
- /* Specify which HTTP version to use! This must be set to one of the
- HTTP_VERSION* enums set below. */
- OPT_HTTP_VERSION = OPTTYPE_VALUES + 84
- /* Specifically switch on or off the FTP engine's use of the EPSV command. By
- default, that one will always be attempted before the more traditional
- PASV command. */
- OPT_FTP_USE_EPSV = OPTTYPE_LONG + 85
- /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") */
- OPT_SSLCERTTYPE = OPTTYPE_STRINGPOINT + 86
- /* name of the file keeping your private SSL-key */
- OPT_SSLKEY = OPTTYPE_STRINGPOINT + 87
- /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") */
- OPT_SSLKEYTYPE = OPTTYPE_STRINGPOINT + 88
- /* crypto engine for the SSL-sub system */
- OPT_SSLENGINE = OPTTYPE_STRINGPOINT + 89
- /* set the crypto engine for the SSL-sub system as default
- the param has no meaning...
- */
- OPT_SSLENGINE_DEFAULT = OPTTYPE_LONG + 90
- /* Non-zero value means to use the global dns cache */
- /* DEPRECATED, do not use! */
- OPT_DNS_USE_GLOBAL_CACHE = OPTTYPE_LONG + 91
- /* DNS cache timeout */
- OPT_DNS_CACHE_TIMEOUT = OPTTYPE_LONG + 92
- /* send linked-list of pre-transfer QUOTE commands */
- OPT_PREQUOTE = OPTTYPE_SLISTPOINT + 93
- /* set the debug function */
- OPT_DEBUGFUNCTION = OPTTYPE_FUNCTIONPOINT + 94
- /* set the data for the debug function */
- OPT_DEBUGDATA = OPTTYPE_CBPOINT + 95
- /* mark this as start of a cookie session */
- OPT_COOKIESESSION = OPTTYPE_LONG + 96
- /* The CApath directory used to validate the peer certificate
- this option is used only if SSL_VERIFYPEER is true */
- OPT_CAPATH = OPTTYPE_STRINGPOINT + 97
- /* Instruct libcurl to use a smaller receive buffer */
- OPT_BUFFERSIZE = OPTTYPE_LONG + 98
- /* Instruct libcurl to not use any signal/alarm handlers, even when using
- timeouts. This option is useful for multi-threaded applications.
- See libcurl-the-guide for more background information. */
- OPT_NOSIGNAL = OPTTYPE_LONG + 99
- /* Provide a CURLShare for mutexing non-ts data */
- OPT_SHARE = OPTTYPE_OBJECTPOINT + 100
- /* indicates type of proxy. accepted values are CURLPROXY_HTTP (default
- CURLPROXY_HTTPS = PROXY_SOCKS4 = PROXY_SOCKS4A and
- CURLPROXY_SOCKS5. */
- OPT_PROXYTYPE = OPTTYPE_VALUES + 101
- /* Set the Accept-Encoding string. Use this to tell a server you would like
- the response to be compressed. Before 7.21.6, this was known as
- CURLOPT_ENCODING */
- OPT_ACCEPT_ENCODING = OPTTYPE_STRINGPOINT + 102
- /* Set pointer to private data */
- OPT_PRIVATE = OPTTYPE_OBJECTPOINT + 103
- /* Set aliases for HTTP 200 in the HTTP Response header */
- OPT_HTTP200ALIASES = OPTTYPE_SLISTPOINT + 104
- /* Continue to send authentication (user+password) when following locations,
- even when hostname changed. This can potentially send off the name
- and password to whatever host the server decides. */
- OPT_UNRESTRICTED_AUTH = OPTTYPE_LONG + 105
- /* Specifically switch on or off the FTP engine's use of the EPRT command (
- it also disables the LPRT attempt). By default, those ones will always be
- attempted before the good old traditional PORT command. */
- OPT_FTP_USE_EPRT = OPTTYPE_LONG + 106
- /* Set this to a bitmask value to enable the particular authentications
- methods you like. Use this in combination with CURLOPT_USERPWD.
- Note that setting multiple bits may cause extra network round-trips. */
- OPT_HTTPAUTH = OPTTYPE_VALUES + 107
- /* Set the ssl context callback function, currently only for OpenSSL or
- WolfSSL ssl_ctx, or mbedTLS mbedtls_ssl_config in the second argument.
- The function must match the curl_ssl_ctx_callback prototype. */
- OPT_SSL_CTX_FUNCTION = OPTTYPE_FUNCTIONPOINT + 108
- /* Set the userdata for the ssl context callback function's third
- argument */
- OPT_SSL_CTX_DATA = OPTTYPE_CBPOINT + 109
- /* FTP Option that causes missing dirs to be created on the remote server.
- In 7.19.4 we introduced the convenience enums for this option using the
- CURLFTP_CREATE_DIR prefix.
- */
- OPT_FTP_CREATE_MISSING_DIRS = OPTTYPE_LONG + 110
- /* Set this to a bitmask value to enable the particular authentications
- methods you like. Use this in combination with CURLOPT_PROXYUSERPWD.
- Note that setting multiple bits may cause extra network round-trips. */
- OPT_PROXYAUTH = OPTTYPE_VALUES + 111
- /* Option that changes the timeout, in seconds, associated with getting a
- response. This is different from transfer timeout time and essentially
- places a demand on the server to acknowledge commands in a timely
- manner. For FTP, SMTP, IMAP and POP3. */
- OPT_SERVER_RESPONSE_TIMEOUT = OPTTYPE_LONG + 112
- /* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to
- tell libcurl to use those IP versions only. This only has effect on
- systems with support for more than one, i.e IPv4 _and_ IPv6. */
- OPT_IPRESOLVE = OPTTYPE_VALUES + 113
- /* Set this option to limit the size of a file that will be downloaded from
- an HTTP or FTP server.
- Note there is also _LARGE version which adds large file support for
- platforms which have larger off_t sizes. See MAXFILESIZE_LARGE below. */
- OPT_MAXFILESIZE = OPTTYPE_LONG + 114
- /* See the comment for INFILESIZE above, but in short, specifies
- * the size of the file being uploaded. -1 means unknown.
- */
- OPT_INFILESIZE_LARGE = OPTTYPE_OFF_T + 115
- /* Sets the continuation offset. There is also a CURLOPTTYPE_LONG version
- * of this; look above for RESUME_FROM.
- */
- OPT_RESUME_FROM_LARGE = OPTTYPE_OFF_T + 116
- /* Sets the maximum size of data that will be downloaded from
- * an HTTP or FTP server. See MAXFILESIZE above for the LONG version.
- */
- OPT_MAXFILESIZE_LARGE = OPTTYPE_OFF_T + 117
- /* Set this option to the file name of your .netrc file you want libcurl
- to parse (using the CURLOPT_NETRC option). If not set, libcurl will do
- a poor attempt to find the user's home directory and check for a .netrc
- file in there. */
- OPT_NETRC_FILE = OPTTYPE_STRINGPOINT + 118
- /* Enable SSL/TLS for FTP, pick one of:
- CURLUSESSL_TRY - try using SSL, proceed anyway otherwise
- CURLUSESSL_CONTROL - SSL for the control connection or fail
- CURLUSESSL_ALL - SSL for all communication or fail
- */
- OPT_USE_SSL = OPTTYPE_VALUES + 119
- /* The _LARGE version of the standard POSTFIELDSIZE option */
- OPT_POSTFIELDSIZE_LARGE = OPTTYPE_OFF_T + 120
- /* Enable/disable the TCP Nagle algorithm */
- OPT_TCP_NODELAY = OPTTYPE_LONG + 121
- /* 122 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 123 OBSOLETE. Gone in 7.16.0 */
- /* 124 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 125 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 126 OBSOLETE, used in 7.12.3. Gone in 7.13.0 */
- /* 127 OBSOLETE. Gone in 7.16.0 */
- /* 128 OBSOLETE. Gone in 7.16.0 */
- /* When FTP over SSL/TLS is selected (with CURLOPT_USE_SSL this option
- can be used to change libcurl's default action which is to first try
- "AUTH SSL" and then "AUTH TLS" in this order, and proceed when a OK
- response has been received.
- Available parameters are:
- CURLFTPAUTH_DEFAULT - let libcurl decide
- CURLFTPAUTH_SSL - try "AUTH SSL" first, then TLS
- CURLFTPAUTH_TLS - try "AUTH TLS" first, then SSL
- */
- OPT_FTPSSLAUTH = OPTTYPE_VALUES + 129
- OPT_IOCTLFUNCTION = OPTTYPE_FUNCTIONPOINT + 130
- OPT_IOCTLDATA = OPTTYPE_CBPOINT + 131
- /* 132 OBSOLETE. Gone in 7.16.0 */
- /* 133 OBSOLETE. Gone in 7.16.0 */
- /* null-terminated string for pass on to the FTP server when asked for
- "account" info */
- OPT_FTP_ACCOUNT = OPTTYPE_STRINGPOINT + 134
- /* feed cookie into cookie engine */
- OPT_COOKIELIST = OPTTYPE_STRINGPOINT + 135
- /* ignore Content-Length */
- OPT_IGNORE_CONTENT_LENGTH = OPTTYPE_LONG + 136
- /* Set to non-zero to skip the IP address received in a 227 PASV FTP server
- response. Typically used for FTP-SSL purposes but is not restricted to
- that. libcurl will then instead use the same IP address it used for the
- control connection. */
- OPT_FTP_SKIP_PASV_IP = OPTTYPE_LONG + 137
- /* Select "file method" to use when doing FTP, see the curl_ftpmethod
- above. */
- OPT_FTP_FILEMETHOD = OPTTYPE_VALUES + 138
- /* Local port number to bind the socket to */
- OPT_LOCALPORT = OPTTYPE_LONG + 139
- /* Number of ports to try, including the first one set with LOCALPORT.
- Thus, setting it to 1 will make no additional attempts but the first.
- */
- OPT_LOCALPORTRANGE = OPTTYPE_LONG + 140
- /* no transfer, set up connection and let application use the socket by
- extracting it with CURLINFO_LASTSOCKET */
- OPT_CONNECT_ONLY = OPTTYPE_LONG + 141
- /* Function that will be called to convert from the
- network encoding (instead of using the iconv calls in libcurl) */
- OPT_CONV_FROM_NETWORK_FUNCTION = OPTTYPE_FUNCTIONPOINT + 142
- /* Function that will be called to convert to the
- network encoding (instead of using the iconv calls in libcurl) */
- OPT_CONV_TO_NETWORK_FUNCTION = OPTTYPE_FUNCTIONPOINT + 143
- /* Function that will be called to convert from UTF8
- (instead of using the iconv calls in libcurl)
- Note that this is used only for SSL certificate processing */
- OPT_CONV_FROM_UTF8_FUNCTION = OPTTYPE_FUNCTIONPOINT + 144
- /* if the connection proceeds too quickly then need to slow it down */
- /* limit-rate: maximum number of bytes per second to send or receive */
- OPT_MAX_SEND_SPEED_LARGE = OPTTYPE_OFF_T + 145
- OPT_MAX_RECV_SPEED_LARGE = OPTTYPE_OFF_T + 146
- /* Pointer to command string to send if USER/PASS fails. */
- OPT_FTP_ALTERNATIVE_TO_USER = OPTTYPE_STRINGPOINT + 147
- /* callback function for setting socket options */
- OPT_SOCKOPTFUNCTION = OPTTYPE_FUNCTIONPOINT + 148
- OPT_SOCKOPTDATA = OPTTYPE_CBPOINT + 149
- /* set to 0 to disable session ID re-use for this transfer, default is
- enabled (== 1) */
- OPT_SSL_SESSIONID_CACHE = OPTTYPE_LONG + 150
- /* allowed SSH authentication methods */
- OPT_SSH_AUTH_TYPES = OPTTYPE_VALUES + 151
- /* Used by scp/sftp to do public/private key authentication */
- OPT_SSH_PUBLIC_KEYFILE = OPTTYPE_STRINGPOINT + 152
- OPT_SSH_PRIVATE_KEYFILE = OPTTYPE_STRINGPOINT + 153
- /* Send CCC (Clear Command Channel) after authentication */
- OPT_FTP_SSL_CCC = OPTTYPE_LONG + 154
- /* Same as TIMEOUT and CONNECTTIMEOUT, but with ms resolution */
- OPT_TIMEOUT_MS = OPTTYPE_LONG + 155
- OPT_CONNECTTIMEOUT_MS = OPTTYPE_LONG + 156
- /* set to zero to disable the libcurl's decoding and thus pass the raw body
- data to the application even when it is encoded/compressed */
- OPT_HTTP_TRANSFER_DECODING = OPTTYPE_LONG + 157
- OPT_HTTP_CONTENT_DECODING = OPTTYPE_LONG + 158
- /* Permission used when creating new files and directories on the remote
- server for protocols that support it, SFTP/SCP/FILE */
- OPT_NEW_FILE_PERMS = OPTTYPE_LONG + 159
- OPT_NEW_DIRECTORY_PERMS = OPTTYPE_LONG + 160
- /* Set the behavior of POST when redirecting. Values must be set to one
- of CURL_REDIR* defines below. This used to be called CURLOPT_POST301 */
- OPT_POSTREDIR = OPTTYPE_VALUES + 161
- /* used by scp/sftp to verify the host's public key */
- OPT_SSH_HOST_PUBLIC_KEY_MD5 = OPTTYPE_STRINGPOINT + 162
- /* Callback function for opening socket (instead of socket(2)). Optionally,
- callback is able change the address or refuse to connect returning
- CURL_SOCKET_BAD. The callback should have type
- curl_opensocket_callback */
- OPT_OPENSOCKETFUNCTION = OPTTYPE_FUNCTIONPOINT + 163
- OPT_OPENSOCKETDATA = OPTTYPE_CBPOINT + 164
- /* POST volatile input fields. */
- OPT_COPYPOSTFIELDS = OPTTYPE_OBJECTPOINT + 165
- /* set transfer mode (;type=<a|i>) when doing FTP via an HTTP proxy */
- OPT_PROXY_TRANSFER_MODE = OPTTYPE_LONG + 166
- /* Callback function for seeking in the input stream */
- OPT_SEEKFUNCTION = OPTTYPE_FUNCTIONPOINT + 167
- OPT_SEEKDATA = OPTTYPE_CBPOINT + 168
- /* CRL file */
- OPT_CRLFILE = OPTTYPE_STRINGPOINT + 169
- /* Issuer certificate */
- OPT_ISSUERCERT = OPTTYPE_STRINGPOINT + 170
- /* (IPv6) Address scope */
- OPT_ADDRESS_SCOPE = OPTTYPE_LONG + 171
- /* Collect certificate chain info and allow it to get retrievable with
- CURLINFO_CERTINFO after the transfer is complete. */
- OPT_CERTINFO = OPTTYPE_LONG + 172
- /* "name" and "pwd" to use when fetching. */
- OPT_USERNAME = OPTTYPE_STRINGPOINT + 173
- OPT_PASSWORD = OPTTYPE_STRINGPOINT + 174
- /* "name" and "pwd" to use with Proxy when fetching. */
- OPT_PROXYUSERNAME = OPTTYPE_STRINGPOINT + 175
- OPT_PROXYPASSWORD = OPTTYPE_STRINGPOINT + 176
- /* Comma separated list of hostnames defining no-proxy zones. These should
- match both hostnames directly, and hostnames within a domain. For
- example, local.com will match local.com and www.local.com, but NOT
- notlocal.com or www.notlocal.com. For compatibility with other
- implementations of this, .local.com will be considered to be the same as
- local.com. A single * is the only valid wildcard, and effectively
- disables the use of proxy. */
- OPT_NOPROXY = OPTTYPE_STRINGPOINT + 177
- /* block size for TFTP transfers */
- OPT_TFTP_BLKSIZE = OPTTYPE_LONG + 178
- /* Socks Service */
- /* DEPRECATED, do not use! */
- OPT_SOCKS5_GSSAPI_SERVICE = OPTTYPE_STRINGPOINT + 179
- /* Socks Service */
- OPT_SOCKS5_GSSAPI_NEC = OPTTYPE_LONG + 180
- /* set the bitmask for the protocols that are allowed to be used for the
- transfer, which thus helps the app which takes URLs from users or other
- external inputs and want to restrict what protocol(s) to deal
- with. Defaults to CURLPROTO_ALL. */
- OPT_PROTOCOLS = OPTTYPE_LONG + 181
- /* set the bitmask for the protocols that libcurl is allowed to follow to,
- as a subset of the CURLOPT_PROTOCOLS ones. That means the protocol needs
- to be set in both bitmasks to be allowed to get redirected to. */
- OPT_REDIR_PROTOCOLS = OPTTYPE_LONG + 182
- /* set the SSH knownhost file name to use */
- OPT_SSH_KNOWNHOSTS = OPTTYPE_STRINGPOINT + 183
- /* set the SSH host key callback, must point to a curl_sshkeycallback
- function */
- OPT_SSH_KEYFUNCTION = OPTTYPE_FUNCTIONPOINT + 184
- /* set the SSH host key callback custom pointer */
- OPT_SSH_KEYDATA = OPTTYPE_CBPOINT + 185
- /* set the SMTP mail originator */
- OPT_MAIL_FROM = OPTTYPE_STRINGPOINT + 186
- /* set the list of SMTP mail receiver(s) */
- OPT_MAIL_RCPT = OPTTYPE_SLISTPOINT + 187
- /* FTP: send PRET before PASV */
- OPT_FTP_USE_PRET = OPTTYPE_LONG + 188
- /* RTSP request method (OPTIONS, SETUP, PLAY, etc...) */
- OPT_RTSP_REQUEST = OPTTYPE_VALUES + 189
- /* The RTSP session identifier */
- OPT_RTSP_SESSION_ID = OPTTYPE_STRINGPOINT + 190
- /* The RTSP stream URI */
- OPT_RTSP_STREAM_URI = OPTTYPE_STRINGPOINT + 191
- /* The Transport: header to use in RTSP requests */
- OPT_RTSP_TRANSPORT = OPTTYPE_STRINGPOINT + 192
- /* Manually initialize the client RTSP CSeq for this handle */
- OPT_RTSP_CLIENT_CSEQ = OPTTYPE_LONG + 193
- /* Manually initialize the server RTSP CSeq for this handle */
- OPT_RTSP_SERVER_CSEQ = OPTTYPE_LONG + 194
- /* The stream to pass to INTERLEAVEFUNCTION. */
- OPT_INTERLEAVEDATA = OPTTYPE_CBPOINT + 195
- /* Let the application define a custom write method for RTP data */
- OPT_INTERLEAVEFUNCTION = OPTTYPE_FUNCTIONPOINT + 196
- /* Turn on wildcard matching */
- OPT_WILDCARDMATCH = OPTTYPE_LONG + 197
- /* Directory matching callback called before downloading of an
- individual file (chunk) started */
- OPT_CHUNK_BGN_FUNCTION = OPTTYPE_FUNCTIONPOINT + 198
- /* Directory matching callback called after the file (chunk)
- was downloaded, or skipped */
- OPT_CHUNK_END_FUNCTION = OPTTYPE_FUNCTIONPOINT + 199
- /* Change match (fnmatch-like) callback for wildcard matching */
- OPT_FNMATCH_FUNCTION = OPTTYPE_FUNCTIONPOINT + 200
- /* Let the application define custom chunk data pointer */
- OPT_CHUNK_DATA = OPTTYPE_CBPOINT + 201
- /* FNMATCH_FUNCTION user pointer */
- OPT_FNMATCH_DATA = OPTTYPE_CBPOINT + 202
- /* send linked-list of name:port:address sets */
- OPT_RESOLVE = OPTTYPE_SLISTPOINT + 203
- /* Set a username for authenticated TLS */
- OPT_TLSAUTH_USERNAME = OPTTYPE_STRINGPOINT + 204
- /* Set a password for authenticated TLS */
- OPT_TLSAUTH_PASSWORD = OPTTYPE_STRINGPOINT + 205
- /* Set authentication type for authenticated TLS */
- OPT_TLSAUTH_TYPE = OPTTYPE_STRINGPOINT + 206
- /* Set to 1 to enable the "TE:" header in HTTP requests to ask for
- compressed transfer-encoded responses. Set to 0 to disable the use of TE:
- in outgoing requests. The current default is 0, but it might change in a
- future libcurl release.
- libcurl will ask for the compressed methods it knows of, and if that
- isn't any, it will not ask for transfer-encoding at all even if this
- option is set to 1.
- */
- OPT_TRANSFER_ENCODING = OPTTYPE_LONG + 207
- /* Callback function for closing socket (instead of close(2)). The callback
- should have type curl_closesocket_callback */
- OPT_CLOSESOCKETFUNCTION = OPTTYPE_FUNCTIONPOINT + 208
- OPT_CLOSESOCKETDATA = OPTTYPE_CBPOINT + 209
- /* allow GSSAPI credential delegation */
- OPT_GSSAPI_DELEGATION = OPTTYPE_VALUES + 210
- /* Set the name servers to use for DNS resolution */
- OPT_DNS_SERVERS = OPTTYPE_STRINGPOINT + 211
- /* Time-out accept operations (currently for FTP only) after this amount
- of milliseconds. */
- OPT_ACCEPTTIMEOUT_MS = OPTTYPE_LONG + 212
- /* Set TCP keepalive */
- OPT_TCP_KEEPALIVE = OPTTYPE_LONG + 213
- /* non-universal keepalive knobs (Linux, AIX, HP-UX, more) */
- OPT_TCP_KEEPIDLE = OPTTYPE_LONG + 214
- OPT_TCP_KEEPINTVL = OPTTYPE_LONG + 215
- /* Enable/disable specific SSL features with a bitmask, see CURLSSLOPT_* */
- OPT_SSL_OPTIONS = OPTTYPE_VALUES + 216
- /* Set the SMTP auth originator */
- OPT_MAIL_AUTH = OPTTYPE_STRINGPOINT + 217
- /* Enable/disable SASL initial response */
- OPT_SASL_IR = OPTTYPE_LONG + 218
- /* Function that will be called instead of the internal progress display
- * function. This function should be defined as the curl_xferinfo_callback
- * prototype defines. (Deprecates CURLOPT_PROGRESSFUNCTION) */
- OPT_XFERINFOFUNCTION = OPTTYPE_FUNCTIONPOINT + 219
- /* The XOAUTH2 bearer token */
- OPT_XOAUTH2_BEARER = OPTTYPE_STRINGPOINT + 220
- /* Set the interface string to use as outgoing network
- * interface for DNS requests.
- * Only supported by the c-ares DNS backend */
- OPT_DNS_INTERFACE = OPTTYPE_STRINGPOINT + 221
- /* Set the local IPv4 address to use for outgoing DNS requests.
- * Only supported by the c-ares DNS backend */
- OPT_DNS_LOCAL_IP4 = OPTTYPE_STRINGPOINT + 222
- /* Set the local IPv6 address to use for outgoing DNS requests.
- * Only supported by the c-ares DNS backend */
- OPT_DNS_LOCAL_IP6 = OPTTYPE_STRINGPOINT + 223
- /* Set authentication options directly */
- OPT_LOGIN_OPTIONS = OPTTYPE_STRINGPOINT + 224
- /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
- OPT_SSL_ENABLE_NPN = OPTTYPE_LONG + 225
- /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
- OPT_SSL_ENABLE_ALPN = OPTTYPE_LONG + 226
- /* Time to wait for a response to a HTTP request containing an
- * Expect: 100-continue header before sending the data anyway. */
- OPT_EXPECT_100_TIMEOUT_MS = OPTTYPE_LONG + 227
- /* This points to a linked list of headers used for proxy requests only,
- struct curl_slist kind */
- OPT_PROXYHEADER = OPTTYPE_SLISTPOINT + 228
- /* Pass in a bitmask of "header options" */
- OPT_HEADEROPT = OPTTYPE_VALUES + 229
- /* The public key in DER form used to validate the peer public key
- this option is used only if SSL_VERIFYPEER is true */
- OPT_PINNEDPUBLICKEY = OPTTYPE_STRINGPOINT + 230
- /* Path to Unix domain socket */
- OPT_UNIX_SOCKET_PATH = OPTTYPE_STRINGPOINT + 231
- /* Set if we should verify the certificate status. */
- OPT_SSL_VERIFYSTATUS = OPTTYPE_LONG + 232
- /* Set if we should enable TLS false start. */
- OPT_SSL_FALSESTART = OPTTYPE_LONG + 233
- /* Do not squash dot-dot sequences */
- OPT_PATH_AS_IS = OPTTYPE_LONG + 234
- /* Proxy Service Name */
- OPT_PROXY_SERVICE_NAME = OPTTYPE_STRINGPOINT + 235
- /* Service Name */
- OPT_SERVICE_NAME = OPTTYPE_STRINGPOINT + 236
- /* Wait/don't wait for pipe/mutex to clarify */
- OPT_PIPEWAIT = OPTTYPE_LONG + 237
- /* Set the protocol used when curl is given a URL without a protocol */
- OPT_DEFAULT_PROTOCOL = OPTTYPE_STRINGPOINT + 238
- /* Set stream weight, 1 - 256 (default is 16) */
- OPT_STREAM_WEIGHT = OPTTYPE_LONG + 239
- /* Set stream dependency on another CURL handle */
- OPT_STREAM_DEPENDS = OPTTYPE_OBJECTPOINT + 240
- /* Set E-xclusive stream dependency on another CURL handle */
- OPT_STREAM_DEPENDS_E = OPTTYPE_OBJECTPOINT + 241
- /* Do not send any tftp option requests to the server */
- OPT_TFTP_NO_OPTIONS = OPTTYPE_LONG + 242
- /* Linked-list of host:port:connect-to-host:connect-to-port,
- overrides the URL's host:port (only for the network layer) */
- OPT_CONNECT_TO = OPTTYPE_SLISTPOINT + 243
- /* Set TCP Fast Open */
- OPT_TCP_FASTOPEN = OPTTYPE_LONG + 244
- /* Continue to send data if the server responds early with an
- * HTTP status code >= 300 */
- OPT_KEEP_SENDING_ON_ERROR = OPTTYPE_LONG + 245
- /* The CApath or CAfile used to validate the proxy certificate
- this option is used only if PROXY_SSL_VERIFYPEER is true */
- OPT_PROXY_CAINFO = OPTTYPE_STRINGPOINT + 246
- /* The CApath directory used to validate the proxy certificate
- this option is used only if PROXY_SSL_VERIFYPEER is true */
- OPT_PROXY_CAPATH = OPTTYPE_STRINGPOINT + 247
- /* Set if we should verify the proxy in ssl handshake,
- set 1 to verify. */
- OPT_PROXY_SSL_VERIFYPEER = OPTTYPE_LONG + 248
- /* Set if we should verify the Common name from the proxy certificate in ssl
- * handshake, set 1 to check existence, 2 to ensure that it matches
- * the provided hostname. */
- OPT_PROXY_SSL_VERIFYHOST = OPTTYPE_LONG + 249
- /* What version to specifically try to use for proxy.
- See CURL_SSLVERSION defines below. */
- OPT_PROXY_SSLVERSION = OPTTYPE_VALUES + 250
- /* Set a username for authenticated TLS for proxy */
- OPT_PROXY_TLSAUTH_USERNAME = OPTTYPE_STRINGPOINT + 251
- /* Set a password for authenticated TLS for proxy */
- OPT_PROXY_TLSAUTH_PASSWORD = OPTTYPE_STRINGPOINT + 252
- /* Set authentication type for authenticated TLS for proxy */
- OPT_PROXY_TLSAUTH_TYPE = OPTTYPE_STRINGPOINT + 253
- /* name of the file keeping your private SSL-certificate for proxy */
- OPT_PROXY_SSLCERT = OPTTYPE_STRINGPOINT + 254
- /* type of the file keeping your SSL-certificate ("DER", "PEM", "ENG") for
- proxy */
- OPT_PROXY_SSLCERTTYPE = OPTTYPE_STRINGPOINT + 255
- /* name of the file keeping your private SSL-key for proxy */
- OPT_PROXY_SSLKEY = OPTTYPE_STRINGPOINT + 256
- /* type of the file keeping your private SSL-key ("DER", "PEM", "ENG") for
- proxy */
- OPT_PROXY_SSLKEYTYPE = OPTTYPE_STRINGPOINT + 257
- /* password for the SSL private key for proxy */
- OPT_PROXY_KEYPASSWD = OPTTYPE_STRINGPOINT + 258
- /* Specify which SSL ciphers to use for proxy */
- OPT_PROXY_SSL_CIPHER_LIST = OPTTYPE_STRINGPOINT + 259
- /* CRL file for proxy */
- OPT_PROXY_CRLFILE = OPTTYPE_STRINGPOINT + 260
- /* Enable/disable specific SSL features with a bitmask for proxy, see
- CURLSSLOPT_* */
- OPT_PROXY_SSL_OPTIONS = OPTTYPE_LONG + 261
- /* Name of pre proxy to use. */
- OPT_PRE_PROXY = OPTTYPE_STRINGPOINT + 262
- /* The public key in DER form used to validate the proxy public key
- this option is used only if PROXY_SSL_VERIFYPEER is true */
- OPT_PROXY_PINNEDPUBLICKEY = OPTTYPE_STRINGPOINT + 263
- /* Path to an abstract Unix domain socket */
- OPT_ABSTRACT_UNIX_SOCKET = OPTTYPE_STRINGPOINT + 264
- /* Suppress proxy CONNECT response headers from user callbacks */
- OPT_SUPPRESS_CONNECT_HEADERS = OPTTYPE_LONG + 265
- /* The request target, instead of extracted from the URL */
- OPT_REQUEST_TARGET = OPTTYPE_STRINGPOINT + 266
- /* bitmask of allowed auth methods for connections to SOCKS5 proxies */
- OPT_SOCKS5_AUTH = OPTTYPE_LONG + 267
- /* Enable/disable SSH compression */
- OPT_SSH_COMPRESSION = OPTTYPE_LONG + 268
- /* Post MIME data. */
- OPT_MIMEPOST = OPTTYPE_OBJECTPOINT + 269
- /* Time to use with the CURLOPT_TIMECONDITION. Specified in number of
- seconds since 1 Jan 1970. */
- OPT_TIMEVALUE_LARGE = OPTTYPE_OFF_T + 270
- /* Head start in milliseconds to give happy eyeballs. */
- OPT_HAPPY_EYEBALLS_TIMEOUT_MS = OPTTYPE_LONG + 271
- /* Function that will be called before a resolver request is made */
- OPT_RESOLVER_START_FUNCTION = OPTTYPE_FUNCTIONPOINT + 272
- /* User data to pass to the resolver start callback. */
- OPT_RESOLVER_START_DATA = OPTTYPE_CBPOINT + 273
- /* send HAProxy PROXY protocol header? */
- OPT_HAPROXYPROTOCOL = OPTTYPE_LONG + 274
- /* shuffle addresses before use when DNS returns multiple */
- OPT_DNS_SHUFFLE_ADDRESSES = OPTTYPE_LONG + 275
- /* Specify which TLS 1.3 ciphers suites to use */
- OPT_TLS13_CIPHERS = OPTTYPE_STRINGPOINT + 276
- OPT_PROXY_TLS13_CIPHERS = OPTTYPE_STRINGPOINT + 277
- /* Disallow specifying username/login in URL. */
- OPT_DISALLOW_USERNAME_IN_URL = OPTTYPE_LONG + 278
- /* DNS-over-HTTPS URL */
- OPT_DOH_URL = OPTTYPE_STRINGPOINT + 279
- /* Preferred buffer size to use for uploads */
- OPT_UPLOAD_BUFFERSIZE = OPTTYPE_LONG + 280
- /* Time in ms between connection upkeep calls for long-lived connections. */
- OPT_UPKEEP_INTERVAL_MS = OPTTYPE_LONG + 281
- /* Specify URL using CURL URL API. */
- OPT_CURLU = OPTTYPE_OBJECTPOINT + 282
- /* add trailing data just after no more data is available */
- OPT_TRAILERFUNCTION = OPTTYPE_FUNCTIONPOINT + 283
- /* pointer to be passed to HTTP_TRAILER_FUNCTION */
- OPT_TRAILERDATA = OPTTYPE_CBPOINT + 284
- /* set this to 1L to allow HTTP/0.9 responses or 0L to disallow */
- OPT_HTTP09_ALLOWED = OPTTYPE_LONG + 285
- /* alt-svc control bitmask */
- OPT_ALTSVC_CTRL = OPTTYPE_LONG + 286
- /* alt-svc cache file name to possibly read from/write to */
- OPT_ALTSVC = OPTTYPE_STRINGPOINT + 287
- /* maximum age (idle time) of a connection to consider it for reuse
- * (in seconds) */
- OPT_MAXAGE_CONN = OPTTYPE_LONG + 288
- /* SASL authorization identity */
- OPT_SASL_AUTHZID = OPTTYPE_STRINGPOINT + 289
- /* allow RCPT TO command to fail for some recipients */
- OPT_MAIL_RCPT_ALLLOWFAILS = OPTTYPE_LONG + 290
- /* the private SSL-certificate as a "blob" */
- OPT_SSLCERT_BLOB = OPTTYPE_BLOB + 291
- OPT_SSLKEY_BLOB = OPTTYPE_BLOB + 292
- OPT_PROXY_SSLCERT_BLOB = OPTTYPE_BLOB + 293
- OPT_PROXY_SSLKEY_BLOB = OPTTYPE_BLOB + 294
- OPT_ISSUERCERT_BLOB = OPTTYPE_BLOB + 295
- /* Issuer certificate for proxy */
- OPT_PROXY_ISSUERCERT = OPTTYPE_STRINGPOINT + 296
- OPT_PROXY_ISSUERCERT_BLOB = OPTTYPE_BLOB + 297
- /* the EC curves requested by the TLS client (RFC 8422, 5.1);
- * OpenSSL support via 'set_groups'/'set_curves':
- * https://www.openssl.org/docs/manmaster/man3/SSL_CTX_set1_groups.html
- */
- OPT_SSL_EC_CURVES = OPTTYPE_STRINGPOINT + 298
- /* HSTS bitmask */
- OPT_HSTS_CTRL = OPTTYPE_LONG + 299
- /* HSTS file name */
- OPT_HSTS = OPTTYPE_STRINGPOINT + 300
- /* HSTS read callback */
- OPT_HSTSREADFUNCTION = OPTTYPE_FUNCTIONPOINT + 301
- OPT_HSTSREADDATA = OPTTYPE_CBPOINT + 302
- /* HSTS write callback */
- OPT_HSTSWRITEFUNCTION = OPTTYPE_FUNCTIONPOINT + 303
- OPT_HSTSWRITEDATA = OPTTYPE_CBPOINT + 304
- /* Parameters for V4 signature */
- OPT_AWS_SIGV4 = OPTTYPE_STRINGPOINT + 305
- /* Same as CURLOPT_SSL_VERIFYPEER but for DoH (DNS-over-HTTPS) servers. */
- OPT_DOH_SSL_VERIFYPEER = OPTTYPE_LONG + 306
- /* Same as CURLOPT_SSL_VERIFYHOST but for DoH (DNS-over-HTTPS) servers. */
- OPT_DOH_SSL_VERIFYHOST = OPTTYPE_LONG + 307
- /* Same as CURLOPT_SSL_VERIFYSTATUS but for DoH (DNS-over-HTTPS) servers. */
- OPT_DOH_SSL_VERIFYSTATUS = OPTTYPE_LONG + 308
- /* The CA certificates as "blob" used to validate the peer certificate
- this option is used only if SSL_VERIFYPEER is true */
- OPT_CAINFO_BLOB = OPTTYPE_BLOB + 309
- /* The CA certificates as "blob" used to validate the proxy certificate
- this option is used only if PROXY_SSL_VERIFYPEER is true */
- OPT_PROXY_CAINFO_BLOB = OPTTYPE_BLOB + 310
- /* used by scp/sftp to verify the host's public key */
- OPT_SSH_HOST_PUBLIC_KEY_SHA256 = OPTTYPE_STRINGPOINT + 311
- /* Function that will be called immediately before the initial request
- is made on a connection (after any protocol negotiation step). */
- OPT_PREREQFUNCTION = OPTTYPE_FUNCTIONPOINT + 312
- /* Data passed to the CURLOPT_PREREQFUNCTION callback */
- OPT_PREREQDATA = OPTTYPE_CBPOINT + 313
- /* maximum age (since creation) of a connection to consider it for reuse
- * (in seconds) */
- OPT_MAXLIFETIME_CONN = OPTTYPE_LONG + 314
- /* Set MIME option flags. */
- OPT_MIME_OPTIONS = OPTTYPE_LONG + 315
- /* set the SSH host key callback, must point to a curl_sshkeycallback
- function */
- OPT_SSH_HOSTKEYFUNCTION = OPTTYPE_FUNCTIONPOINT + 316
- /* set the SSH host key callback custom pointer */
- OPT_SSH_HOSTKEYDATA = OPTTYPE_CBPOINT + 317
- /* specify which protocols that are allowed to be used for the transfer,
- which thus helps the app which takes URLs from users or other external
- inputs and want to restrict what protocol(s) to deal with. Defaults to
- all built-in protocols. */
- OPT_PROTOCOLS_STR = OPTTYPE_STRINGPOINT + 318
- /* specify which protocols that libcurl is allowed to follow directs to */
- OPT_REDIR_PROTOCOLS_STR = OPTTYPE_STRINGPOINT + 319
- /* websockets options */
- OPT_WS_OPTIONS = OPTTYPE_LONG + 320
- )
- const (
- E_OK = iota
- E_UNSUPPORTED_PROTOCOL /* 1 */
- E_FAILED_INIT /* 2 */
- E_URL_MALFORMAT /* 3 */
- E_NOT_BUILT_IN /* 4 - [was obsoleted in August 2007 for 7.17.0, reused in April 2011 for 7.21.5] */
- E_COULDNT_RESOLVE_PROXY /* 5 */
- E_COULDNT_RESOLVE_HOST /* 6 */
- E_COULDNT_CONNECT /* 7 */
- E_WEIRD_SERVER_REPLY /* 8 */
- E_REMOTE_ACCESS_DENIED /* 9 a service was denied by the server due to lack of access - when login fails this is not returned. */
- E_FTP_ACCEPT_FAILED /* 10 - [was obsoleted in April 2006 for 7.15.4, reused in Dec 2011 for 7.24.0]*/
- E_FTP_WEIRD_PASS_REPLY /* 11 */
- 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]*/
- E_FTP_WEIRD_PASV_REPLY /* 13 */
- E_FTP_WEIRD_227_FORMAT /* 14 */
- E_FTP_CANT_GET_HOST /* 15 */
- 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] */
- E_FTP_COULDNT_SET_TYPE /* 17 */
- E_PARTIAL_FILE /* 18 */
- E_FTP_COULDNT_RETR_FILE /* 19 */
- E_OBSOLETE20 /* 20 - NOT USED */
- E_QUOTE_ERROR /* 21 - quote command failure */
- E_HTTP_RETURNED_ERROR /* 22 */
- E_WRITE_ERROR /* 23 */
- E_OBSOLETE24 /* 24 - NOT USED */
- E_UPLOAD_FAILED /* 25 - failed upload "command" */
- E_READ_ERROR /* 26 - couldn't open/read from file */
- E_OUT_OF_MEMORY /* 27 */
- E_OPERATION_TIMEDOUT /* 28 - the timeout time was reached */
- E_OBSOLETE29 /* 29 - NOT USED */
- E_FTP_PORT_FAILED /* 30 - FTP PORT operation failed */
- E_FTP_COULDNT_USE_REST /* 31 - the REST command failed */
- E_OBSOLETE32 /* 32 - NOT USED */
- E_RANGE_ERROR /* 33 - RANGE "command" didn't work */
- E_HTTP_POST_ERROR /* 34 */
- E_SSL_CONNECT_ERROR /* 35 - wrong when connecting with SSL */
- E_BAD_DOWNLOAD_RESUME /* 36 - couldn't resume download */
- E_FIE_COULDNT_READ_FILE /* 37 */
- E_LDAP_CANNOT_BIND /* 38 */
- E_LDAP_SEARCH_FAILED /* 39 */
- E_OBSOLETE40 /* 40 - NOT USED */
- E_FUNCTION_NOT_FOUND /* 41 - NOT USED starting with 7.53.0 */
- E_ABORTED_BY_CALLBACK /* 42 */
- E_BAD_FUNCTION_ARGUMENT /* 43 */
- E_OBSOLETE44 /* 44 - NOT USED */
- E_INTERFACE_FAILED /* 45 - CURLOPT_INTERFACE failed */
- E_OBSOLETE46 /* 46 - NOT USED */
- E_TOO_MANY_REDIRECTS /* 47 - catch endless re-direct loops */
- E_UNKNOWN_OPTION /* 48 - User specified an unknown option */
- E_SETOPT_OPTION_SYNTAX /* 49 - Malformed setopt option */
- E_OBSOLETE50 /* 50 - NOT USED */
- E_OBSOLETE51 /* 51 - NOT USED */
- E_GOT_NOTHING /* 52 - when this is a specific error */
- E_SSL_ENGINE_NOTFOUND /* 53 - SSL crypto engine not found */
- E_SSL_ENGINE_SETFAILED /* 54 - can not set SSL crypto engine as default */
- E_SEND_ERROR /* 55 - failed sending network data */
- E_RECV_ERROR /* 56 - failure in receiving network data */
- E_OBSOLETE57 /* 57 - NOT IN USE */
- E_SSL_CERTPROBLEM /* 58 - problem with the local certificate */
- E_SSL_CIPHER /* 59 - couldn't use specified cipher */
- E_PEER_FAILED_VERIFICATION /* 60 - peer's certificate or fingerprint wasn't verified fine */
- E_BAD_CONTENT_ENCODING /* 61 - Unrecognized/bad encoding */
- E_OBSOLETE62 /* 62 - NOT IN USE since 7.82.0 */
- E_FILESIZE_EXCEEDED /* 63 - Maximum file size exceeded */
- E_USE_SSL_FAILED /* 64 - Requested FTP SSL level failed */
- E_SEND_FAIL_REWIND /* 65 - Sending the data requires a rewind that failed */
- E_SSL_ENGINE_INITFAILED /* 66 - failed to initialise ENGINE */
- E_LOGIN_DENIED /* 67 - user, password or similar was not accepted and we failed to login */
- E_TFTP_NOTFOUND /* 68 - file not found on server */
- E_TFTP_PERM /* 69 - permission problem on server */
- E_REMOTE_DISK_FULL /* 70 - out of disk space on server */
- E_TFTP_ILLEGAL /* 71 - Illegal TFTP operation */
- E_TFTP_UNKNOWNID /* 72 - Unknown transfer ID */
- E_REMOTE_FIE_EXISTS /* 73 - File already exists */
- E_TFTP_NOSUCHUSER /* 74 - No such user */
- E_OBSOLETE75 /* 75 - NOT IN USE since 7.82.0 */
- E_OBSOLETE76 /* 76 - NOT IN USE since 7.82.0 */
- E_SSL_CACERT_BADFILE /* 77 - could not load CACERT file, missing or wrong format */
- E_REMOTE_FIE_NOT_FOUND /* 78 - remote file not found */
- E_SSH /* 79 - error from the SSH layer, somewhat generic so the error message will be of interest when this has happened */
- E_SSL_SHUTDOWN_FAILED /* 80 - Failed to shut down the SSL connection */
- E_AGAIN /* 81 - socket is not ready for send/recv, wait till it's ready and try again (Added in 7.18.2) */
- E_SSL_CRL_BADFILE /* 82 - could not load CRL file, missing or wrong format (Added in 7.19.0) */
- E_SSL_ISSUER_ERROR /* 83 - Issuer check failed. (Added in 7.19.0) */
- E_FTP_PRET_FAILED /* 84 - a PRET command failed */
- E_RTSP_CSEQ_ERROR /* 85 - mismatch of RTSP CSeq numbers */
- E_RTSP_SESSION_ERROR /* 86 - mismatch of RTSP Session Ids */
- E_FTP_BAD_FIE_LIST /* 87 - unable to parse FTP file list */
- E_CHUNK_FAILED /* 88 - chunk callback reported error */
- E_NO_CONNECTION_AVAILABLE /* 89 - No connection available, the session will be queued */
- E_SSL_PINNEDPUBKEYNOTMATCH /* 90 - specified pinned public key did not match */
- E_SSL_INVALIDCERTSTATUS /* 91 - invalid certificate status */
- E_HTTP2_STREAM /* 92 - stream error in HTTP/2 framing layer */
- E_RECURSIVE_API_CALL /* 93 - an api function was called from inside a callback */
- E_AUTH_ERROR /* 94 - an authentication function returned an error */
- E_HTTP3 /* 95 - An HTTP/3 layer problem */
- E_QUIC_CONNECT_ERROR /* 96 - QUIC connection error */
- E_PROXY /* 97 - proxy handshake error */
- E_SSL_CLIENTCERT /* 98 - client-side certificate required */
- E_UNRECOVERABE_POLL /* 99 - poll/select returned fatal error */
- )
- const (
- /* Return code for when the pre-request callback has terminated without
- any errors */
- PREREQFUNC_OK = 0
- /* Return code for when the pre-request callback wants to abort the
- request */
- PREREQFUNC_ABORT = 1
- )
- const (
- INFO_STRING = 0x100000
- INFO_LONG = 0x200000
- INFO_DOUBLE = 0x300000
- INFO_SLIST = 0x400000
- INFO_PTR = 0x400000 /* same as SLIST */
- INFO_SOCKET = 0x500000
- INFO_OFF_T = 0x600000
- INFO_MASK = 0x0fffff
- INFO_TYPEMASK = 0xf00000
- )
- const (
- INFO_EFFECTIVE_URL = INFO_STRING + 1 // 获取最后使用的URL,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_RESPONSE_CODE = INFO_LONG + 2 // 获取最后响应代码,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_TOTAL_TIME = INFO_DOUBLE + 3 // 最后一次传输总耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_NAMELOOKUP_TIME = INFO_DOUBLE + 4 // 域名解析时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONNECT_TIME = INFO_DOUBLE + 5 // 建立连接耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PRETRANSFER_TIME = INFO_DOUBLE + 6 // 从建立连接到准备传输所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SIZE_UPLOAD = INFO_DOUBLE + 7 // (已弃用)上传的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SIZE_UPLOAD_T = INFO_OFF_T + 7 // 上传的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SIZE_DOWNLOAD = INFO_DOUBLE + 8 // (已弃用)下载的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SIZE_DOWNLOAD_T = INFO_OFF_T + 8 // 下载的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SPEED_DOWNLOAD = INFO_DOUBLE + 9 // (已弃用)平均下载速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SPEED_DOWNLOAD_T = INFO_OFF_T + 9 // 平均下载速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SPEED_UPLOAD = INFO_DOUBLE + 10 // (已弃用)平均上传速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SPEED_UPLOAD_T = INFO_OFF_T + 10 // 平均上传速度,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_HEADER_SIZE = INFO_LONG + 11 // 接收到的所有标头的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_REQUEST_SIZE = INFO_LONG + 12 // 发出的 HTTP 请求中发送的字节数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SSL_VERIFYRESULT = INFO_LONG + 13 // 证书验证结果,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_FILETIME = INFO_LONG + 14 // 检索到的文档的远程时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_FILETIME_T = INFO_OFF_T + 14 // 检索到的文档的远程时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONTENT_LENGTH_DOWNLOAD = INFO_DOUBLE + 15 // (已弃用)来自 Content-Length 标头的内容长度,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONTENT_LENGTH_DOWNLOAD_T = INFO_OFF_T + 15 // 来自 Content-Length 标头的内容长度,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONTENT_LENGTH_UPLOAD = INFO_DOUBLE + 16 // (已弃用)上传大小,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONTENT_LENGTH_UPLOAD_T = INFO_OFF_T + 16 // 上传大小,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_STARTTRANSFER_TIME = INFO_DOUBLE + 17 // 从建立连接到传输开始所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONTENT_TYPE = INFO_STRING + 18 // Content-Type 标头中的内容类型,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_REDIRECT_TIME = INFO_DOUBLE + 19 // 最终传输前所有重定向步骤所用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_REDIRECT_COUNT = INFO_LONG + 20 // 遵循的重定向总数,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PRIVATE = INFO_STRING + 21 // 用户的私有数据指针,由"SetOpt"时设置的数据,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_HTTP_CONNECTCODE = INFO_LONG + 22 // 最后一个代理 CONNECT 响应代码,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_HTTPAUTH_AVAIL = INFO_LONG + 23 // 可用的 HTTP 身份验证方法,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PROXYAUTH_AVAIL = INFO_LONG + 24 // 可用的 HTTP 代理身份验证方法,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_OS_ERRNO = INFO_LONG + 25 // 上次连接失败的 errno,仅在失败时才重置此值,"Error()"获取错误描述,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_NUM_CONNECTS = INFO_LONG + 26 // 创建连接数,必须创建多少新连接才能实现先前的传输(仅计算成功的连接)。结合"INFO_REDIRECT_COUNT",您可以知道 libcurl 成功重用现有连接的次数。https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SSL_ENGINES = INFO_SLIST + 27 // OpenSSL 加密引擎列表,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_COOKIELIST = INFO_SLIST + 28 // 所有已知 cookie 的列表,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_LASTSOCKET = INFO_LONG + 29 // 最后使用的套接字,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_FTP_ENTRY_PATH = INFO_STRING + 30 // 登录FTP服务器后的入口路径,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_REDIRECT_URL = INFO_STRING + 31 // 重定向URL,如果您启用了重定向,重定向将带您到 URL,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PRIMARY_IP = INFO_STRING + 32 // 最后一次连接的 IP 地址,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_APPCONNECT_TIME = INFO_DOUBLE + 33 // 从开始到 SSL/SSH 握手完成的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CERTINFO = INFO_PTR + 34 // 证书信息,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONDITION_UNMET = INFO_LONG + 35 // 是否满足时间条件或 304 HTTP 响应,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_RTSP_SESSION_ID = INFO_STRING + 36 // RTSP 会话 ID,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_RTSP_CLIENT_CSEQ = INFO_LONG + 37 // RTSP客户端CSEQ,接下来将使用的 RTSP CSeq,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_RTSP_SERVER_CSEQ = INFO_LONG + 38 // RTSP服务器CSEQ,预计接下来的 RTSP CSeq,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_RTSP_CSEQ_RECV = INFO_LONG + 39 // RTSP接收CSEQ,上次收到的 RTSP CSeq,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PRIMARY_PORT = INFO_LONG + 40 // 最后一个连接的端口,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_LOCAL_IP = INFO_STRING + 41 // 最后一次连接的本端IP地址,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_LOCAL_PORT = INFO_LONG + 42 // 最后一次连接的本端端口,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_TLS_SESSION = INFO_PTR + 43 // 可用于进一步处理的 TLS 会话信息。请改用 INFO_TLS_SSL_PTR,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_ACTIVESOCKET = INFO_SOCKET + 44 // 当前套接字,会话的活动套接字,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_TLS_SSL_PTR = INFO_PTR + 45 // 可用于进一步处理的 TLS 会话信息,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_HTTP_VERSION = INFO_LONG + 46 // 连接中使用的 http 版本,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PROXY_SSL_VERIFYRESULT = INFO_LONG + 47 // 代理证书验证结果,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PROTOCOL = INFO_LONG + 48 // 用于连接的协议,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_SCHEME = INFO_STRING + 49 // 用于连接的方案,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_TOTAL_TIME_T = INFO_OFF_T + 50 // 最后一次传输总耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_NAMELOOKUP_TIME_T = INFO_OFF_T + 51 // 域名解析时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CONNECT_TIME_T = INFO_OFF_T + 52 // 建立连接耗时,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PRETRANSFER_TIME_T = INFO_OFF_T + 53 // 从建立连接到准备传输所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_STARTTRANSFER_TIME_T = INFO_OFF_T + 54 // 从建立连接到传输开始所使用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_REDIRECT_TIME_T = INFO_OFF_T + 55 // 最终传输前所有重定向步骤所用的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_APPCONNECT_TIME_T = INFO_OFF_T + 56 // 从开始到 SSL/SSH 握手完成的时间,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_RETRY_AFTER = INFO_OFF_T + 57 // 来自 Retry-After 标头的值,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_EFFECTIVE_METHOD = INFO_STRING + 58 // 最后使用的 HTTP 方法,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_PROXY_ERROR = INFO_LONG + 59 // 详细的代理错误,"PX_*",https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_REFERER = INFO_STRING + 60 // 推荐人标头,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CAINFO = INFO_STRING + 61 // 获取CURLOPT_CAINFO的默认值,https://curl.se/libcurl/c/curl_easy_getinfo.html
- INFO_CAPATH = INFO_STRING + 62 // 获取CURLOPT_CAPATH的默认值,https://curl.se/libcurl/c/curl_easy_getinfo.html
- )
- const (
- WS_RAW_MODE = 1 // 告诉curl我们自己处理所有的WebSocket魔法
- )
|