def-file: v2.5
- change current domain names
- add auto tor login change when cloudflare ( maybe later option to turn
off this fuction )
- fix smal outdated doc errors
This commit is contained in:
M4RKUS28 2023-09-12 04:22:53 +02:00
parent 43ab7ae760
commit 925b9fec72
22 changed files with 675 additions and 388 deletions

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


/* /*
@ -31,6 +33,23 @@
#define CURL_STRICTER #define CURL_STRICTER
#endif #endif


/* Compile-time deprecation macros. */
#if defined(__GNUC__) && \
((__GNUC__ > 12) || ((__GNUC__ == 12) && (__GNUC_MINOR__ >= 1 ))) && \
!defined(__INTEL_COMPILER) && \
!defined(CURL_DISABLE_DEPRECATION) && !defined(BUILDING_LIBCURL)
#define CURL_DEPRECATED(version, message) \
__attribute__((deprecated("since " # version ". " message)))
#define CURL_IGNORE_DEPRECATION(statements) \
_Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
statements \
_Pragma("GCC diagnostic pop")
#else
#define CURL_DEPRECATED(version, message)
#define CURL_IGNORE_DEPRECATION(statements) statements
#endif

#include "curlver.h" /* libcurl version defines */ #include "curlver.h" /* libcurl version defines */
#include "system.h" /* determine things run-time */ #include "system.h" /* determine things run-time */


@ -73,7 +92,8 @@
defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \ defined(ANDROID) || defined(__ANDROID__) || defined(__OpenBSD__) || \
defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \ defined(__CYGWIN__) || defined(AMIGA) || defined(__NuttX__) || \
(defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \ (defined(__FreeBSD_version) && (__FreeBSD_version < 800000)) || \
(defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) (defined(__MidnightBSD_version) && (__MidnightBSD_version < 100000)) || \
defined(__sun__) || defined(__serenity__) || defined(__vxworks__)
#include <sys/select.h> #include <sys/select.h>
#endif #endif


@ -142,20 +162,21 @@ typedef enum {
CURLSSLBACKEND_NSS = 3, CURLSSLBACKEND_NSS = 3,
CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */ CURLSSLBACKEND_OBSOLETE4 = 4, /* Was QSOSSL. */
CURLSSLBACKEND_GSKIT = 5, CURLSSLBACKEND_GSKIT = 5,
CURLSSLBACKEND_POLARSSL = 6, CURLSSLBACKEND_POLARSSL CURL_DEPRECATED(7.69.0, "") = 6,
CURLSSLBACKEND_WOLFSSL = 7, CURLSSLBACKEND_WOLFSSL = 7,
CURLSSLBACKEND_SCHANNEL = 8, CURLSSLBACKEND_SCHANNEL = 8,
CURLSSLBACKEND_SECURETRANSPORT = 9, CURLSSLBACKEND_SECURETRANSPORT = 9,
CURLSSLBACKEND_AXTLS = 10, /* never used since 7.63.0 */ CURLSSLBACKEND_AXTLS CURL_DEPRECATED(7.61.0, "") = 10,
CURLSSLBACKEND_MBEDTLS = 11, CURLSSLBACKEND_MBEDTLS = 11,
CURLSSLBACKEND_MESALINK = 12, CURLSSLBACKEND_MESALINK CURL_DEPRECATED(7.82.0, "") = 12,
CURLSSLBACKEND_BEARSSL = 13, CURLSSLBACKEND_BEARSSL = 13,
CURLSSLBACKEND_RUSTLS = 14 CURLSSLBACKEND_RUSTLS = 14
} curl_sslbackend; } curl_sslbackend;


/* aliases for library clones and renames */ /* aliases for library clones and renames */
#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL #define CURLSSLBACKEND_AWSLC CURLSSLBACKEND_OPENSSL
#define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL #define CURLSSLBACKEND_BORINGSSL CURLSSLBACKEND_OPENSSL
#define CURLSSLBACKEND_LIBRESSL CURLSSLBACKEND_OPENSSL


/* deprecated names: */ /* deprecated names: */
#define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL #define CURLSSLBACKEND_CYASSL CURLSSLBACKEND_WOLFSSL
@ -229,7 +250,7 @@ typedef int (*curl_xferinfo_callback)(void *clientp,


#ifndef CURL_MAX_READ_SIZE #ifndef CURL_MAX_READ_SIZE
/* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */ /* The maximum receive buffer size configurable via CURLOPT_BUFFERSIZE. */
#define CURL_MAX_READ_SIZE 524288 #define CURL_MAX_READ_SIZE (10*1024*1024)
#endif #endif


#ifndef CURL_MAX_WRITE_SIZE #ifndef CURL_MAX_WRITE_SIZE
@ -253,6 +274,10 @@ typedef int (*curl_xferinfo_callback)(void *clientp,
will signal libcurl to pause receiving on the current transfer. */ will signal libcurl to pause receiving on the current transfer. */
#define CURL_WRITEFUNC_PAUSE 0x10000001 #define CURL_WRITEFUNC_PAUSE 0x10000001


/* This is a magic return code for the write callback that, when returned,
will signal an error from the callback. */
#define CURL_WRITEFUNC_ERROR 0xFFFFFFFF

typedef size_t (*curl_write_callback)(char *buffer, typedef size_t (*curl_write_callback)(char *buffer,
size_t size, size_t size,
size_t nitems, size_t nitems,
@ -307,7 +332,8 @@ struct curl_fileinfo {


unsigned int flags; unsigned int flags;


/* used internally */ /* These are libcurl private struct fields. Previously used by libcurl, so
they must never be interfered with. */
char *b_data; char *b_data;
size_t b_size; size_t b_size;
size_t b_used; size_t b_used;
@ -365,7 +391,7 @@ typedef int (*curl_seek_callback)(void *instream,
#define CURL_READFUNC_PAUSE 0x10000001 #define CURL_READFUNC_PAUSE 0x10000001


/* Return code for when the trailing headers' callback has terminated /* Return code for when the trailing headers' callback has terminated
without any errors*/ without any errors */
#define CURL_TRAILERFUNC_OK 0 #define CURL_TRAILERFUNC_OK 0
/* Return code for when was an error in the trailing header's list and we /* Return code for when was an error in the trailing header's list and we
want to abort the request */ want to abort the request */
@ -447,7 +473,7 @@ typedef void *(*curl_calloc_callback)(size_t nmemb, size_t size);
#define CURL_DID_MEMORY_FUNC_TYPEDEFS #define CURL_DID_MEMORY_FUNC_TYPEDEFS
#endif #endif


/* the kind of data that is passed to information_callback*/ /* the kind of data that is passed to information_callback */
typedef enum { typedef enum {
CURLINFO_TEXT = 0, CURLINFO_TEXT = 0,
CURLINFO_HEADER_IN, /* 1 */ CURLINFO_HEADER_IN, /* 1 */
@ -575,7 +601,7 @@ typedef enum {
CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */ CURLE_TFTP_UNKNOWNID, /* 72 - Unknown transfer ID */
CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */ CURLE_REMOTE_FILE_EXISTS, /* 73 - File already exists */
CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */ CURLE_TFTP_NOSUCHUSER, /* 74 - No such user */
CURLE_CONV_FAILED, /* 75 - conversion failed */ CURLE_OBSOLETE75, /* 75 - NOT IN USE since 7.82.0 */
CURLE_OBSOLETE76, /* 76 - NOT IN USE since 7.82.0 */ CURLE_OBSOLETE76, /* 76 - NOT IN USE since 7.82.0 */
CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing CURLE_SSL_CACERT_BADFILE, /* 77 - could not load CACERT file, missing
or wrong format */ or wrong format */
@ -613,6 +639,7 @@ typedef enum {
CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */ CURLE_QUIC_CONNECT_ERROR, /* 96 - QUIC connection error */
CURLE_PROXY, /* 97 - proxy handshake error */ CURLE_PROXY, /* 97 - proxy handshake error */
CURLE_SSL_CLIENTCERT, /* 98 - client-side certificate required */ CURLE_SSL_CLIENTCERT, /* 98 - client-side certificate required */
CURLE_UNRECOVERABLE_POLL, /* 99 - poll/select returned fatal error */
CURL_LAST /* never use! */ CURL_LAST /* never use! */
} CURLcode; } CURLcode;


@ -677,6 +704,7 @@ typedef enum {
#define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME #define CURLE_FTP_BAD_DOWNLOAD_RESUME CURLE_BAD_DOWNLOAD_RESUME
#define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62 #define CURLE_LDAP_INVALID_URL CURLE_OBSOLETE62
#define CURLE_CONV_REQD CURLE_OBSOLETE76 #define CURLE_CONV_REQD CURLE_OBSOLETE76
#define CURLE_CONV_FAILED CURLE_OBSOLETE75


/* This was the error code 50 in 7.7.3 and a few earlier versions, this /* This was the error code 50 in 7.7.3 and a few earlier versions, this
is no longer used by libcurl but is instead #defined here only to not is no longer used by libcurl but is instead #defined here only to not
@ -693,7 +721,7 @@ typedef enum {
#define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40 #define CURLOPT_WRITEINFO CURLOPT_OBSOLETE40
#define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72 #define CURLOPT_CLOSEPOLICY CURLOPT_OBSOLETE72


#endif /*!CURL_NO_OLDIES*/ #endif /* !CURL_NO_OLDIES */


/* /*
* Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was * Proxy error codes. Returned in CURLINFO_PROXY_ERROR if CURLE_PROXY was
@ -752,7 +780,8 @@ typedef enum {
CONNECT HTTP/1.1 */ CONNECT HTTP/1.1 */
CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT CURLPROXY_HTTP_1_0 = 1, /* added in 7.19.4, force to use CONNECT
HTTP/1.0 */ HTTP/1.0 */
CURLPROXY_HTTPS = 2, /* added in 7.52.0 */ CURLPROXY_HTTPS = 2, /* HTTPS but stick to HTTP/1 added in 7.52.0 */
CURLPROXY_HTTPS2 = 3, /* HTTPS and attempt HTTP/2 added in 8.2.0 */
CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already CURLPROXY_SOCKS4 = 4, /* support added in 7.15.2, enum existed already
in 7.10 */ in 7.10 */
CURLPROXY_SOCKS5 = 5, /* added in 7.10 */ CURLPROXY_SOCKS5 = 5, /* added in 7.10 */
@ -835,10 +864,10 @@ enum curl_khstat {
CURLKHSTAT_FINE_ADD_TO_FILE, CURLKHSTAT_FINE_ADD_TO_FILE,
CURLKHSTAT_FINE, CURLKHSTAT_FINE,
CURLKHSTAT_REJECT, /* reject the connection, return an error */ CURLKHSTAT_REJECT, /* reject the connection, return an error */
CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now so CURLKHSTAT_DEFER, /* do not accept it, but we can't answer right now.
this causes a CURLE_DEFER error but otherwise the Causes a CURLE_PEER_FAILED_VERIFICATION error but the
connection will be left intact etc */ connection will be left intact etc */
CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key*/ CURLKHSTAT_FINE_REPLACE, /* accept and replace the wrong key */
CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */ CURLKHSTAT_LAST /* not for use, only a marker for last-in-list */
}; };


@ -855,7 +884,18 @@ typedef int
const struct curl_khkey *knownkey, /* known */ const struct curl_khkey *knownkey, /* known */
const struct curl_khkey *foundkey, /* found */ const struct curl_khkey *foundkey, /* found */
enum curl_khmatch, /* libcurl's view on the keys */ enum curl_khmatch, /* libcurl's view on the keys */
void *clientp); /* custom pointer passed from app */ void *clientp); /* custom pointer passed with */
/* CURLOPT_SSH_KEYDATA */

typedef int
(*curl_sshhostkeycallback) (void *clientp,/* custom pointer passed */
/* with CURLOPT_SSH_HOSTKEYDATA */
int keytype, /* CURLKHTYPE */
const char *key, /* hostkey to check */
size_t keylen); /* length of the key */
/* return CURLE_OK to accept */
/* or something else to refuse */



/* parameter for the CURLOPT_USE_SSL option */ /* parameter for the CURLOPT_USE_SSL option */
typedef enum { typedef enum {
@ -916,7 +956,7 @@ typedef enum {
#define CURLFTPSSL_ALL CURLUSESSL_ALL #define CURLFTPSSL_ALL CURLUSESSL_ALL
#define CURLFTPSSL_LAST CURLUSESSL_LAST #define CURLFTPSSL_LAST CURLUSESSL_LAST
#define curl_ftpssl curl_usessl #define curl_ftpssl curl_usessl
#endif /*!CURL_NO_OLDIES*/ #endif /* !CURL_NO_OLDIES */


/* parameter for the CURLOPT_FTP_SSL_CCC option */ /* parameter for the CURLOPT_FTP_SSL_CCC option */
typedef enum { typedef enum {
@ -995,7 +1035,8 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,
#define CURLHSTS_ENABLE (long)(1<<0) #define CURLHSTS_ENABLE (long)(1<<0)
#define CURLHSTS_READONLYFILE (long)(1<<1) #define CURLHSTS_READONLYFILE (long)(1<<1)


/* CURLPROTO_ defines are for the CURLOPT_*PROTOCOLS options */ /* The CURLPROTO_ defines below are for the **deprecated** CURLOPT_*PROTOCOLS
options. Do not use. */
#define CURLPROTO_HTTP (1<<0) #define CURLPROTO_HTTP (1<<0)
#define CURLPROTO_HTTPS (1<<1) #define CURLPROTO_HTTPS (1<<1)
#define CURLPROTO_FTP (1<<2) #define CURLPROTO_FTP (1<<2)
@ -1041,6 +1082,7 @@ typedef CURLSTScode (*curl_hstswrite_callback)(CURL *easy,




#define CURLOPT(na,t,nu) na = t + nu #define CURLOPT(na,t,nu) na = t + nu
#define CURLOPTDEPRECATED(na,t,nu,v,m) na CURL_DEPRECATED(v,m) = t + nu


/* CURLOPT aliases that make no run-time difference */ /* CURLOPT aliases that make no run-time difference */


@ -1102,7 +1144,7 @@ typedef enum {
/* Time-out the read operation after this amount of seconds */ /* Time-out the read operation after this amount of seconds */
CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13), CURLOPT(CURLOPT_TIMEOUT, CURLOPTTYPE_LONG, 13),


/* If the CURLOPT_INFILE is used, this can be used to inform libcurl about /* If CURLOPT_READDATA is used, this can be used to inform libcurl about
* how large the file being sent really is. That allows better error * how large the file being sent really is. That allows better error
* checking and better verifies that the upload was successful. -1 means * checking and better verifies that the upload was successful. -1 means
* unknown size. * unknown size.
@ -1154,7 +1196,8 @@ typedef enum {
CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23), CURLOPT(CURLOPT_HTTPHEADER, CURLOPTTYPE_SLISTPOINT, 23),


/* This points to a linked list of post entries, struct curl_httppost */ /* This points to a linked list of post entries, struct curl_httppost */
CURLOPT(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24), CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
7.56.0, "Use CURLOPT_MIMEPOST"),


/* name of the file keeping your private SSL-certificate */ /* name of the file keeping your private SSL-certificate */
CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25), CURLOPT(CURLOPT_SSLCERT, CURLOPTTYPE_STRINGPOINT, 25),
@ -1244,7 +1287,8 @@ typedef enum {
CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53), CURLOPT(CURLOPT_TRANSFERTEXT, CURLOPTTYPE_LONG, 53),


/* HTTP PUT */ /* HTTP PUT */
CURLOPT(CURLOPT_PUT, CURLOPTTYPE_LONG, 54), CURLOPTDEPRECATED(CURLOPT_PUT, CURLOPTTYPE_LONG, 54,
7.12.1, "Use CURLOPT_UPLOAD"),


/* 55 = OBSOLETE */ /* 55 = OBSOLETE */


@ -1252,7 +1296,8 @@ typedef enum {
* Function that will be called instead of the internal progress display * Function that will be called instead of the internal progress display
* function. This function should be defined as the curl_progress_callback * function. This function should be defined as the curl_progress_callback
* prototype defines. */ * prototype defines. */
CURLOPT(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56), CURLOPTDEPRECATED(CURLOPT_PROGRESSFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 56,
7.32.0, "Use CURLOPT_XFERINFOFUNCTION"),


/* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION /* Data passed to the CURLOPT_PROGRESSFUNCTION and CURLOPT_XFERINFOFUNCTION
callbacks */ callbacks */
@ -1269,7 +1314,7 @@ typedef enum {
/* size of the POST input data, if strlen() is not good to use */ /* size of the POST input data, if strlen() is not good to use */
CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60), CURLOPT(CURLOPT_POSTFIELDSIZE, CURLOPTTYPE_LONG, 60),


/* tunnel non-http operations through a HTTP proxy */ /* tunnel non-http operations through an HTTP proxy */
CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61), CURLOPT(CURLOPT_HTTPPROXYTUNNEL, CURLOPTTYPE_LONG, 61),


/* Set the interface string to use as outgoing network interface */ /* Set the interface string to use as outgoing network interface */
@ -1320,10 +1365,12 @@ typedef enum {


/* Set to a file name that contains random data for libcurl to use to /* Set to a file name that contains random data for libcurl to use to
seed the random engine when doing SSL connects. */ seed the random engine when doing SSL connects. */
CURLOPT(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76), CURLOPTDEPRECATED(CURLOPT_RANDOM_FILE, CURLOPTTYPE_STRINGPOINT, 76,
7.84.0, "Serves no purpose anymore"),


/* Set to the Entropy Gathering Daemon socket pathname */ /* Set to the Entropy Gathering Daemon socket pathname */
CURLOPT(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77), CURLOPTDEPRECATED(CURLOPT_EGDSOCKET, CURLOPTTYPE_STRINGPOINT, 77,
7.84.0, "Serves no purpose anymore"),


/* Time-out connect operations after this amount of seconds, if connects are /* Time-out connect operations after this amount of seconds, if connects are
OK within this time, then fine... This only aborts the connect phase. */ OK within this time, then fine... This only aborts the connect phase. */
@ -1378,7 +1425,8 @@ typedef enum {


/* Non-zero value means to use the global dns cache */ /* Non-zero value means to use the global dns cache */
/* DEPRECATED, do not use! */ /* DEPRECATED, do not use! */
CURLOPT(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91), CURLOPTDEPRECATED(CURLOPT_DNS_USE_GLOBAL_CACHE, CURLOPTTYPE_LONG, 91,
7.11.1, "Use CURLOPT_SHARE"),


/* DNS cache timeout */ /* DNS cache timeout */
CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92), CURLOPT(CURLOPT_DNS_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 92),
@ -1461,12 +1509,11 @@ typedef enum {
Note that setting multiple bits may cause extra network round-trips. */ Note that setting multiple bits may cause extra network round-trips. */
CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111), CURLOPT(CURLOPT_PROXYAUTH, CURLOPTTYPE_VALUES, 111),


/* FTP option that changes the timeout, in seconds, associated with /* Option that changes the timeout, in seconds, associated with getting a
getting a response. This is different from transfer timeout time and response. This is different from transfer timeout time and essentially
essentially places a demand on the FTP server to acknowledge commands places a demand on the server to acknowledge commands in a timely
in a timely manner. */ manner. For FTP, SMTP, IMAP and POP3. */
CURLOPT(CURLOPT_FTP_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112), CURLOPT(CURLOPT_SERVER_RESPONSE_TIMEOUT, CURLOPTTYPE_LONG, 112),
#define CURLOPT_SERVER_RESPONSE_TIMEOUT CURLOPT_FTP_RESPONSE_TIMEOUT


/* Set this option to one of the CURL_IPRESOLVE_* defines (see below) to /* 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 tell libcurl to use those IP versions only. This only has effect on
@ -1534,8 +1581,10 @@ typedef enum {
*/ */
CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129), CURLOPT(CURLOPT_FTPSSLAUTH, CURLOPTTYPE_VALUES, 129),


CURLOPT(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130), CURLOPTDEPRECATED(CURLOPT_IOCTLFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 130,
CURLOPT(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131), 7.18.0, "Use CURLOPT_SEEKFUNCTION"),
CURLOPTDEPRECATED(CURLOPT_IOCTLDATA, CURLOPTTYPE_CBPOINT, 131,
7.18.0, "Use CURLOPT_SEEKDATA"),


/* 132 OBSOLETE. Gone in 7.16.0 */ /* 132 OBSOLETE. Gone in 7.16.0 */
/* 133 OBSOLETE. Gone in 7.16.0 */ /* 133 OBSOLETE. Gone in 7.16.0 */
@ -1574,16 +1623,22 @@ typedef enum {


/* Function that will be called to convert from the /* Function that will be called to convert from the
network encoding (instead of using the iconv calls in libcurl) */ network encoding (instead of using the iconv calls in libcurl) */
CURLOPT(CURLOPT_CONV_FROM_NETWORK_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 142), CURLOPTDEPRECATED(CURLOPT_CONV_FROM_NETWORK_FUNCTION,
CURLOPTTYPE_FUNCTIONPOINT, 142,
7.82.0, "Serves no purpose anymore"),


/* Function that will be called to convert to the /* Function that will be called to convert to the
network encoding (instead of using the iconv calls in libcurl) */ network encoding (instead of using the iconv calls in libcurl) */
CURLOPT(CURLOPT_CONV_TO_NETWORK_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 143), CURLOPTDEPRECATED(CURLOPT_CONV_TO_NETWORK_FUNCTION,
CURLOPTTYPE_FUNCTIONPOINT, 143,
7.82.0, "Serves no purpose anymore"),


/* Function that will be called to convert from UTF8 /* Function that will be called to convert from UTF8
(instead of using the iconv calls in libcurl) (instead of using the iconv calls in libcurl)
Note that this is used only for SSL certificate processing */ Note that this is used only for SSL certificate processing */
CURLOPT(CURLOPT_CONV_FROM_UTF8_FUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 144), CURLOPTDEPRECATED(CURLOPT_CONV_FROM_UTF8_FUNCTION,
CURLOPTTYPE_FUNCTIONPOINT, 144,
7.82.0, "Serves no purpose anymore"),


/* if the connection proceeds too quickly then need to slow it down */ /* if the connection proceeds too quickly then need to slow it down */
/* limit-rate: maximum number of bytes per second to send or receive */ /* limit-rate: maximum number of bytes per second to send or receive */
@ -1684,7 +1739,9 @@ typedef enum {


/* Socks Service */ /* Socks Service */
/* DEPRECATED, do not use! */ /* DEPRECATED, do not use! */
CURLOPT(CURLOPT_SOCKS5_GSSAPI_SERVICE, CURLOPTTYPE_STRINGPOINT, 179), CURLOPTDEPRECATED(CURLOPT_SOCKS5_GSSAPI_SERVICE,
CURLOPTTYPE_STRINGPOINT, 179,
7.49.0, "Use CURLOPT_PROXY_SERVICE_NAME"),


/* Socks Service */ /* Socks Service */
CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180), CURLOPT(CURLOPT_SOCKS5_GSSAPI_NEC, CURLOPTTYPE_LONG, 180),
@ -1693,12 +1750,14 @@ typedef enum {
transfer, which thus helps the app which takes URLs from users or other transfer, which thus helps the app which takes URLs from users or other
external inputs and want to restrict what protocol(s) to deal external inputs and want to restrict what protocol(s) to deal
with. Defaults to CURLPROTO_ALL. */ with. Defaults to CURLPROTO_ALL. */
CURLOPT(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181), CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
7.85.0, "Use CURLOPT_PROTOCOLS_STR"),


/* set the bitmask for the protocols that libcurl is allowed to follow to, /* 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 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. */ to be set in both bitmasks to be allowed to get redirected to. */
CURLOPT(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182), CURLOPTDEPRECATED(CURLOPT_REDIR_PROTOCOLS, CURLOPTTYPE_LONG, 182,
7.85.0, "Use CURLOPT_REDIR_PROTOCOLS_STR"),


/* set the SSH knownhost file name to use */ /* set the SSH knownhost file name to use */
CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183), CURLOPT(CURLOPT_SSH_KNOWNHOSTS, CURLOPTTYPE_STRINGPOINT, 183),
@ -1843,12 +1902,13 @@ typedef enum {
CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224), CURLOPT(CURLOPT_LOGIN_OPTIONS, CURLOPTTYPE_STRINGPOINT, 224),


/* Enable/disable TLS NPN extension (http2 over ssl might fail without) */ /* Enable/disable TLS NPN extension (http2 over ssl might fail without) */
CURLOPT(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225), CURLOPTDEPRECATED(CURLOPT_SSL_ENABLE_NPN, CURLOPTTYPE_LONG, 225,
7.86.0, "Has no function"),


/* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */ /* Enable/disable TLS ALPN extension (http2 over ssl might fail without) */
CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226), CURLOPT(CURLOPT_SSL_ENABLE_ALPN, CURLOPTTYPE_LONG, 226),


/* Time to wait for a response to a HTTP request containing an /* Time to wait for a response to an HTTP request containing an
* Expect: 100-continue header before sending the data anyway. */ * Expect: 100-continue header before sending the data anyway. */
CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227), CURLOPT(CURLOPT_EXPECT_100_TIMEOUT_MS, CURLOPTTYPE_LONG, 227),


@ -2049,11 +2109,11 @@ typedef enum {
* (in seconds) */ * (in seconds) */
CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288), CURLOPT(CURLOPT_MAXAGE_CONN, CURLOPTTYPE_LONG, 288),


/* SASL authorisation identity */ /* SASL authorization identity */
CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289), CURLOPT(CURLOPT_SASL_AUTHZID, CURLOPTTYPE_STRINGPOINT, 289),


/* allow RCPT TO command to fail for some recipients */ /* allow RCPT TO command to fail for some recipients */
CURLOPT(CURLOPT_MAIL_RCPT_ALLLOWFAILS, CURLOPTTYPE_LONG, 290), CURLOPT(CURLOPT_MAIL_RCPT_ALLOWFAILS, CURLOPTTYPE_LONG, 290),


/* the private SSL-certificate as a "blob" */ /* the private SSL-certificate as a "blob" */
CURLOPT(CURLOPT_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 291), CURLOPT(CURLOPT_SSLCERT_BLOB, CURLOPTTYPE_BLOB, 291),
@ -2122,6 +2182,34 @@ typedef enum {
/* Set MIME option flags. */ /* Set MIME option flags. */
CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315), CURLOPT(CURLOPT_MIME_OPTIONS, CURLOPTTYPE_LONG, 315),


/* set the SSH host key callback, must point to a curl_sshkeycallback
function */
CURLOPT(CURLOPT_SSH_HOSTKEYFUNCTION, CURLOPTTYPE_FUNCTIONPOINT, 316),

/* set the SSH host key callback custom pointer */
CURLOPT(CURLOPT_SSH_HOSTKEYDATA, CURLOPTTYPE_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. */
CURLOPT(CURLOPT_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 318),

/* specify which protocols that libcurl is allowed to follow directs to */
CURLOPT(CURLOPT_REDIR_PROTOCOLS_STR, CURLOPTTYPE_STRINGPOINT, 319),

/* websockets options */
CURLOPT(CURLOPT_WS_OPTIONS, CURLOPTTYPE_LONG, 320),

/* CA cache timeout */
CURLOPT(CURLOPT_CA_CACHE_TIMEOUT, CURLOPTTYPE_LONG, 321),

/* Can leak things, gonna exit() soon */
CURLOPT(CURLOPT_QUICK_EXIT, CURLOPTTYPE_LONG, 322),

/* set a specific client IP for HAProxy PROXY protocol header? */
CURLOPT(CURLOPT_HAPROXY_CLIENT_IP, CURLOPTTYPE_STRINGPOINT, 323),

CURLOPT_LASTENTRY /* the last unused */ CURLOPT_LASTENTRY /* the last unused */
} CURLoption; } CURLoption;


@ -2147,6 +2235,12 @@ typedef enum {
#define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD #define CURLOPT_SSLCERTPASSWD CURLOPT_KEYPASSWD
#define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL #define CURLOPT_KRB4LEVEL CURLOPT_KRBLEVEL


/* */
#define CURLOPT_FTP_RESPONSE_TIMEOUT CURLOPT_SERVER_RESPONSE_TIMEOUT

/* Added in 8.2.0 */
#define CURLOPT_MAIL_RCPT_ALLLOWFAILS CURLOPT_MAIL_RCPT_ALLOWFAILS

#else #else
/* This is set if CURL_NO_OLDIES is defined at compile-time */ /* This is set if CURL_NO_OLDIES is defined at compile-time */
#undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */ #undef CURLOPT_DNS_USE_GLOBAL_CACHE /* soon obsolete */
@ -2161,7 +2255,7 @@ typedef enum {
#define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */ #define CURL_IPRESOLVE_V4 1 /* uses only IPv4 addresses/connections */
#define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */ #define CURL_IPRESOLVE_V6 2 /* uses only IPv6 addresses/connections */


/* three convenient "aliases" that follow the name scheme better */ /* Convenient "aliases" */
#define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER #define CURLOPT_RTSPHEADER CURLOPT_HTTPHEADER


/* These enums are for use with the CURLOPT_HTTP_VERSION option. */ /* These enums are for use with the CURLOPT_HTTP_VERSION option. */
@ -2175,8 +2269,13 @@ enum {
CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */ CURL_HTTP_VERSION_2TLS, /* use version 2 for HTTPS, version 1.1 for HTTP */
CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1 CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE, /* please use HTTP 2 without HTTP/1.1
Upgrade */ Upgrade */
CURL_HTTP_VERSION_3 = 30, /* Makes use of explicit HTTP/3 without fallback. CURL_HTTP_VERSION_3 = 30, /* Use HTTP/3, fallback to HTTP/2 or HTTP/1 if
Use CURLOPT_ALTSVC to enable HTTP/3 upgrade */ needed. For HTTPS only. For HTTP, this option
makes libcurl return error. */
CURL_HTTP_VERSION_3ONLY = 31, /* Use HTTP/3 without fallback. For HTTPS
only. For HTTP, this makes libcurl
return error. */

CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */ CURL_HTTP_VERSION_LAST /* *ILLEGAL* http version */
}; };


@ -2406,30 +2505,32 @@ CURL_EXTERN CURLcode curl_mime_headers(curl_mimepart *part,
int take_ownership); int take_ownership);


typedef enum { typedef enum {
CURLFORM_NOTHING, /********* the first one is unused ************/ /********* the first one is unused ************/
CURLFORM_COPYNAME, CURLFORM_NOTHING CURL_DEPRECATED(7.56.0, ""),
CURLFORM_PTRNAME, CURLFORM_COPYNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
CURLFORM_NAMELENGTH, CURLFORM_PTRNAME CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
CURLFORM_COPYCONTENTS, CURLFORM_NAMELENGTH CURL_DEPRECATED(7.56.0, ""),
CURLFORM_PTRCONTENTS, CURLFORM_COPYCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_CONTENTSLENGTH, CURLFORM_PTRCONTENTS CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_FILECONTENT, CURLFORM_CONTENTSLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_ARRAY, CURLFORM_FILECONTENT CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
CURLFORM_ARRAY CURL_DEPRECATED(7.56.0, ""),
CURLFORM_OBSOLETE, CURLFORM_OBSOLETE,
CURLFORM_FILE, CURLFORM_FILE CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),


CURLFORM_BUFFER, CURLFORM_BUFFER CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
CURLFORM_BUFFERPTR, CURLFORM_BUFFERPTR CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),
CURLFORM_BUFFERLENGTH, CURLFORM_BUFFERLENGTH CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),


CURLFORM_CONTENTTYPE, CURLFORM_CONTENTTYPE CURL_DEPRECATED(7.56.0, "Use curl_mime_type()"),
CURLFORM_CONTENTHEADER, CURLFORM_CONTENTHEADER CURL_DEPRECATED(7.56.0, "Use curl_mime_headers()"),
CURLFORM_FILENAME, CURLFORM_FILENAME CURL_DEPRECATED(7.56.0, "Use curl_mime_filename()"),
CURLFORM_END, CURLFORM_END,
CURLFORM_OBSOLETE2, CURLFORM_OBSOLETE2,


CURLFORM_STREAM, CURLFORM_STREAM CURL_DEPRECATED(7.56.0, "Use curl_mime_data_cb()"),
CURLFORM_CONTENTLEN, /* added in 7.46.0, provide a curl_off_t length */ CURLFORM_CONTENTLEN /* added in 7.46.0, provide a curl_off_t length */
CURL_DEPRECATED(7.56.0, "Use curl_mime_data()"),


CURLFORM_LASTENTRY /* the last unused */ CURLFORM_LASTENTRY /* the last unused */
} CURLformoption; } CURLformoption;
@ -2457,15 +2558,16 @@ struct curl_forms {
* *
***************************************************************************/ ***************************************************************************/
typedef enum { typedef enum {
CURL_FORMADD_OK, /* first, no error */ CURL_FORMADD_OK CURL_DEPRECATED(7.56.0, ""), /* 1st, no error */


CURL_FORMADD_MEMORY, CURL_FORMADD_MEMORY CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_OPTION_TWICE, CURL_FORMADD_OPTION_TWICE CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_NULL, CURL_FORMADD_NULL CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_UNKNOWN_OPTION, CURL_FORMADD_UNKNOWN_OPTION CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_INCOMPLETE, CURL_FORMADD_INCOMPLETE CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_ILLEGAL_ARRAY, CURL_FORMADD_ILLEGAL_ARRAY CURL_DEPRECATED(7.56.0, ""),
CURL_FORMADD_DISABLED, /* libcurl was built with this disabled */ /* libcurl was built with form api disabled */
CURL_FORMADD_DISABLED CURL_DEPRECATED(7.56.0, ""),


CURL_FORMADD_LAST /* last */ CURL_FORMADD_LAST /* last */
} CURLFORMcode; } CURLFORMcode;
@ -2479,9 +2581,10 @@ typedef enum {
* adds one part that together construct a full post. Then use * adds one part that together construct a full post. Then use
* CURLOPT_HTTPPOST to send it off to libcurl. * CURLOPT_HTTPPOST to send it off to libcurl.
*/ */
CURL_EXTERN CURLFORMcode curl_formadd(struct curl_httppost **httppost, CURL_EXTERN CURLFORMcode CURL_DEPRECATED(7.56.0, "Use curl_mime_init()")
struct curl_httppost **last_post, curl_formadd(struct curl_httppost **httppost,
...); struct curl_httppost **last_post,
...);


/* /*
* callback function for curl_formget() * callback function for curl_formget()
@ -2504,8 +2607,9 @@ typedef size_t (*curl_formget_callback)(void *arg, const char *buf,
* the curl_formget_callback function. * the curl_formget_callback function.
* Returns 0 on success. * Returns 0 on success.
*/ */
CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg, CURL_EXTERN int CURL_DEPRECATED(7.56.0, "")
curl_formget_callback append); curl_formget(struct curl_httppost *form, void *arg,
curl_formget_callback append);
/* /*
* NAME curl_formfree() * NAME curl_formfree()
* *
@ -2513,7 +2617,8 @@ CURL_EXTERN int curl_formget(struct curl_httppost *form, void *arg,
* *
* Free a multipart formpost previously built with curl_formadd(). * Free a multipart formpost previously built with curl_formadd().
*/ */
CURL_EXTERN void curl_formfree(struct curl_httppost *form); CURL_EXTERN void CURL_DEPRECATED(7.56.0, "Use curl_mime_free()")
curl_formfree(struct curl_httppost *form);


/* /*
* NAME curl_getenv() * NAME curl_getenv()
@ -2589,8 +2694,10 @@ CURL_EXTERN void curl_free(void *p);
* *
* curl_global_init() should be invoked exactly once for each application that * curl_global_init() should be invoked exactly once for each application that
* uses libcurl and before any call of other libcurl functions. * uses libcurl and before any call of other libcurl functions.
*
* This function is not thread-safe! * This function is thread-safe if CURL_VERSION_THREADSAFE is set in the
* curl_version_info_data.features flag (fetch by curl_version_info()).

*/ */
CURL_EXTERN CURLcode curl_global_init(long flags); CURL_EXTERN CURLcode curl_global_init(long flags);


@ -2680,8 +2787,8 @@ CURL_EXTERN CURLsslset curl_global_sslset(curl_sslbackend id, const char *name,
* Appends a string to a linked list. If no list exists, it will be created * Appends a string to a linked list. If no list exists, it will be created
* first. Returns the new list, after appending. * first. Returns the new list, after appending.
*/ */
CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *, CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *list,
const char *); const char *data);


/* /*
* NAME curl_slist_free_all() * NAME curl_slist_free_all()
@ -2690,7 +2797,7 @@ CURL_EXTERN struct curl_slist *curl_slist_append(struct curl_slist *,
* *
* free a previously built curl_slist. * free a previously built curl_slist.
*/ */
CURL_EXTERN void curl_slist_free_all(struct curl_slist *); CURL_EXTERN void curl_slist_free_all(struct curl_slist *list);


/* /*
* NAME curl_getdate() * NAME curl_getdate()
@ -2738,22 +2845,35 @@ typedef enum {
CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4, CURLINFO_NAMELOOKUP_TIME = CURLINFO_DOUBLE + 4,
CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5, CURLINFO_CONNECT_TIME = CURLINFO_DOUBLE + 5,
CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6, CURLINFO_PRETRANSFER_TIME = CURLINFO_DOUBLE + 6,
CURLINFO_SIZE_UPLOAD = CURLINFO_DOUBLE + 7, CURLINFO_SIZE_UPLOAD CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_UPLOAD_T")
= CURLINFO_DOUBLE + 7,
CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7, CURLINFO_SIZE_UPLOAD_T = CURLINFO_OFF_T + 7,
CURLINFO_SIZE_DOWNLOAD = CURLINFO_DOUBLE + 8, CURLINFO_SIZE_DOWNLOAD
CURL_DEPRECATED(7.55.0, "Use CURLINFO_SIZE_DOWNLOAD_T")
= CURLINFO_DOUBLE + 8,
CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8, CURLINFO_SIZE_DOWNLOAD_T = CURLINFO_OFF_T + 8,
CURLINFO_SPEED_DOWNLOAD = CURLINFO_DOUBLE + 9, CURLINFO_SPEED_DOWNLOAD
CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_DOWNLOAD_T")
= CURLINFO_DOUBLE + 9,
CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9, CURLINFO_SPEED_DOWNLOAD_T = CURLINFO_OFF_T + 9,
CURLINFO_SPEED_UPLOAD = CURLINFO_DOUBLE + 10, CURLINFO_SPEED_UPLOAD
CURL_DEPRECATED(7.55.0, "Use CURLINFO_SPEED_UPLOAD_T")
= CURLINFO_DOUBLE + 10,
CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10, CURLINFO_SPEED_UPLOAD_T = CURLINFO_OFF_T + 10,
CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11, CURLINFO_HEADER_SIZE = CURLINFO_LONG + 11,
CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12, CURLINFO_REQUEST_SIZE = CURLINFO_LONG + 12,
CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13, CURLINFO_SSL_VERIFYRESULT = CURLINFO_LONG + 13,
CURLINFO_FILETIME = CURLINFO_LONG + 14, CURLINFO_FILETIME = CURLINFO_LONG + 14,
CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14, CURLINFO_FILETIME_T = CURLINFO_OFF_T + 14,
CURLINFO_CONTENT_LENGTH_DOWNLOAD = CURLINFO_DOUBLE + 15, CURLINFO_CONTENT_LENGTH_DOWNLOAD
CURL_DEPRECATED(7.55.0,
"Use CURLINFO_CONTENT_LENGTH_DOWNLOAD_T")
= CURLINFO_DOUBLE + 15,
CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15, CURLINFO_CONTENT_LENGTH_DOWNLOAD_T = CURLINFO_OFF_T + 15,
CURLINFO_CONTENT_LENGTH_UPLOAD = CURLINFO_DOUBLE + 16, CURLINFO_CONTENT_LENGTH_UPLOAD
CURL_DEPRECATED(7.55.0,
"Use CURLINFO_CONTENT_LENGTH_UPLOAD_T")
= CURLINFO_DOUBLE + 16,
CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16, CURLINFO_CONTENT_LENGTH_UPLOAD_T = CURLINFO_OFF_T + 16,
CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17, CURLINFO_STARTTRANSFER_TIME = CURLINFO_DOUBLE + 17,
CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18, CURLINFO_CONTENT_TYPE = CURLINFO_STRING + 18,
@ -2767,7 +2887,8 @@ typedef enum {
CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26, CURLINFO_NUM_CONNECTS = CURLINFO_LONG + 26,
CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27, CURLINFO_SSL_ENGINES = CURLINFO_SLIST + 27,
CURLINFO_COOKIELIST = CURLINFO_SLIST + 28, CURLINFO_COOKIELIST = CURLINFO_SLIST + 28,
CURLINFO_LASTSOCKET = CURLINFO_LONG + 29, CURLINFO_LASTSOCKET CURL_DEPRECATED(7.45.0, "Use CURLINFO_ACTIVESOCKET")
= CURLINFO_LONG + 29,
CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30, CURLINFO_FTP_ENTRY_PATH = CURLINFO_STRING + 30,
CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31, CURLINFO_REDIRECT_URL = CURLINFO_STRING + 31,
CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32, CURLINFO_PRIMARY_IP = CURLINFO_STRING + 32,
@ -2781,12 +2902,14 @@ typedef enum {
CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40, CURLINFO_PRIMARY_PORT = CURLINFO_LONG + 40,
CURLINFO_LOCAL_IP = CURLINFO_STRING + 41, CURLINFO_LOCAL_IP = CURLINFO_STRING + 41,
CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42, CURLINFO_LOCAL_PORT = CURLINFO_LONG + 42,
CURLINFO_TLS_SESSION = CURLINFO_PTR + 43, CURLINFO_TLS_SESSION CURL_DEPRECATED(7.48.0, "Use CURLINFO_TLS_SSL_PTR")
= CURLINFO_PTR + 43,
CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44, CURLINFO_ACTIVESOCKET = CURLINFO_SOCKET + 44,
CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45, CURLINFO_TLS_SSL_PTR = CURLINFO_PTR + 45,
CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46, CURLINFO_HTTP_VERSION = CURLINFO_LONG + 46,
CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47, CURLINFO_PROXY_SSL_VERIFYRESULT = CURLINFO_LONG + 47,
CURLINFO_PROTOCOL = CURLINFO_LONG + 48, CURLINFO_PROTOCOL CURL_DEPRECATED(7.85.0, "Use CURLINFO_SCHEME")
= CURLINFO_LONG + 48,
CURLINFO_SCHEME = CURLINFO_STRING + 49, CURLINFO_SCHEME = CURLINFO_STRING + 49,
CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50, CURLINFO_TOTAL_TIME_T = CURLINFO_OFF_T + 50,
CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51, CURLINFO_NAMELOOKUP_TIME_T = CURLINFO_OFF_T + 51,
@ -2799,8 +2922,11 @@ typedef enum {
CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58, CURLINFO_EFFECTIVE_METHOD = CURLINFO_STRING + 58,
CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59, CURLINFO_PROXY_ERROR = CURLINFO_LONG + 59,
CURLINFO_REFERER = CURLINFO_STRING + 60, CURLINFO_REFERER = CURLINFO_STRING + 60,

CURLINFO_CAINFO = CURLINFO_STRING + 61,
CURLINFO_LASTONE = 60 CURLINFO_CAPATH = CURLINFO_STRING + 62,
CURLINFO_XFER_ID = CURLINFO_OFF_T + 63,
CURLINFO_CONN_ID = CURLINFO_OFF_T + 64,
CURLINFO_LASTONE = 64
} CURLINFO; } CURLINFO;


/* CURLINFO_RESPONSE_CODE is the new name for the option previously known as /* CURLINFO_RESPONSE_CODE is the new name for the option previously known as
@ -2844,6 +2970,7 @@ typedef enum {
CURL_LOCK_DATA_SSL_SESSION, CURL_LOCK_DATA_SSL_SESSION,
CURL_LOCK_DATA_CONNECT, CURL_LOCK_DATA_CONNECT,
CURL_LOCK_DATA_PSL, CURL_LOCK_DATA_PSL,
CURL_LOCK_DATA_HSTS,
CURL_LOCK_DATA_LAST CURL_LOCK_DATA_LAST
} curl_lock_data; } curl_lock_data;


@ -2886,8 +3013,9 @@ typedef enum {
} CURLSHoption; } CURLSHoption;


CURL_EXTERN CURLSH *curl_share_init(void); CURL_EXTERN CURLSH *curl_share_init(void);
CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *, CURLSHoption option, ...); CURL_EXTERN CURLSHcode curl_share_setopt(CURLSH *share, CURLSHoption option,
CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *); ...);
CURL_EXTERN CURLSHcode curl_share_cleanup(CURLSH *share);


/**************************************************************************** /****************************************************************************
* Structures for querying information about the curl library at runtime. * Structures for querying information about the curl library at runtime.
@ -2904,6 +3032,7 @@ typedef enum {
CURLVERSION_EIGHTH, CURLVERSION_EIGHTH,
CURLVERSION_NINTH, CURLVERSION_NINTH,
CURLVERSION_TENTH, CURLVERSION_TENTH,
CURLVERSION_ELEVENTH,
CURLVERSION_LAST /* never actually use this */ CURLVERSION_LAST /* never actually use this */
} CURLversion; } CURLversion;


@ -2912,7 +3041,7 @@ typedef enum {
meant to be a built-in version number for what kind of struct the caller meant to be a built-in version number for what kind of struct the caller
expects. If the struct ever changes, we redefine the NOW to another enum expects. If the struct ever changes, we redefine the NOW to another enum
from above. */ from above. */
#define CURLVERSION_NOW CURLVERSION_TENTH #define CURLVERSION_NOW CURLVERSION_ELEVENTH


struct curl_version_info_data { struct curl_version_info_data {
CURLversion age; /* age of the returned struct */ CURLversion age; /* age of the returned struct */
@ -2968,6 +3097,10 @@ struct curl_version_info_data {


/* These fields were added in CURLVERSION_TENTH */ /* These fields were added in CURLVERSION_TENTH */
const char *gsasl_version; /* human readable string. */ const char *gsasl_version; /* human readable string. */

/* These fields were added in CURLVERSION_ELEVENTH */
/* feature_names is terminated by an entry with a NULL feature name */
const char * const *feature_names;
}; };
typedef struct curl_version_info_data curl_version_info_data; typedef struct curl_version_info_data curl_version_info_data;


@ -3006,6 +3139,7 @@ typedef struct curl_version_info_data curl_version_info_data;
#define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */ #define CURL_VERSION_UNICODE (1<<27) /* Unicode support on Windows */
#define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */ #define CURL_VERSION_HSTS (1<<28) /* HSTS is supported */
#define CURL_VERSION_GSASL (1<<29) /* libgsasl is supported */ #define CURL_VERSION_GSASL (1<<29) /* libgsasl is supported */
#define CURL_VERSION_THREADSAFE (1<<30) /* libcurl API is thread-safe */


/* /*
* NAME curl_version_info() * NAME curl_version_info()
@ -3060,7 +3194,7 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT) #define CURLPAUSE_CONT (CURLPAUSE_RECV_CONT|CURLPAUSE_SEND_CONT)


#ifdef __cplusplus #ifdef __cplusplus
} } /* end of extern "C" */
#endif #endif


/* unfortunately, the easy.h and multi.h include files need options and info /* unfortunately, the easy.h and multi.h include files need options and info
@ -3069,6 +3203,8 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#include "multi.h" #include "multi.h"
#include "urlapi.h" #include "urlapi.h"
#include "options.h" #include "options.h"
#include "header.h"
#include "websockets.h"


/* the typechecker doesn't work in C++ (yet) */ /* the typechecker doesn't work in C++ (yet) */
#if defined(__GNUC__) && defined(__GNUC_MINOR__) && \ #if defined(__GNUC__) && defined(__GNUC_MINOR__) && \
@ -3085,6 +3221,6 @@ CURL_EXTERN CURLcode curl_easy_pause(CURL *handle, int bitmask);
#define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param) #define curl_share_setopt(share,opt,param) curl_share_setopt(share,opt,param)
#define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param) #define curl_multi_setopt(handle,opt,param) curl_multi_setopt(handle,opt,param)
#endif /* __STDC__ >= 1 */ #endif /* __STDC__ >= 1 */
#endif /* gcc >= 4.3 && !__cplusplus */ #endif /* gcc >= 4.3 && !__cplusplus && !CURL_DISABLE_TYPECHECK */


#endif /* CURLINC_CURL_H */ #endif /* CURLINC_CURL_H */

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,23 +20,25 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


/* This header file contains nothing but libcurl version info, generated by /* This header file contains nothing but libcurl version info, generated by
a script at release-time. This was made its own header file in 7.11.2 */ a script at release-time. This was made its own header file in 7.11.2 */


/* This is the global package copyright */ /* This is the global package copyright */
#define LIBCURL_COPYRIGHT "1996 - 2022 Daniel Stenberg, <daniel@haxx.se>." #define LIBCURL_COPYRIGHT "Daniel Stenberg, <daniel@haxx.se>."


/* This is the version number of the libcurl package from which this header /* This is the version number of the libcurl package from which this header
file origins: */ file origins: */
#define LIBCURL_VERSION "7.82.0" #define LIBCURL_VERSION "8.2.1"


/* The numeric version number is also available "in parts" by using these /* The numeric version number is also available "in parts" by using these
defines: */ defines: */
#define LIBCURL_VERSION_MAJOR 7 #define LIBCURL_VERSION_MAJOR 8
#define LIBCURL_VERSION_MINOR 82 #define LIBCURL_VERSION_MINOR 2
#define LIBCURL_VERSION_PATCH 0 #define LIBCURL_VERSION_PATCH 1


/* This is the numeric version of the libcurl version number, meant for easier /* This is the numeric version of the libcurl version number, meant for easier
parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will parsing and comparisons by programs. The LIBCURL_VERSION_NUM define will
@ -57,7 +59,7 @@
CURL_VERSION_BITS() macro since curl's own configure script greps for it CURL_VERSION_BITS() macro since curl's own configure script greps for it
and needs it to contain the full number. and needs it to contain the full number.
*/ */
#define LIBCURL_VERSION_NUM 0x075200 #define LIBCURL_VERSION_NUM 0x080201


/* /*
* This is the date and time when the full source package was created. The * This is the date and time when the full source package was created. The
@ -68,7 +70,7 @@
* *
* "2007-11-23" * "2007-11-23"
*/ */
#define LIBCURL_TIMESTAMP "2022-03-05" #define LIBCURL_TIMESTAMP "2023-07-26"


#define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z)) #define CURL_VERSION_BITS(x,y,z) ((x)<<16|(y)<<8|(z))
#define CURL_AT_LEAST_VERSION(x,y,z) \ #define CURL_AT_LEAST_VERSION(x,y,z) \

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
@ -46,13 +48,13 @@ CURL_EXTERN void curl_easy_cleanup(CURL *curl);
* *
* DESCRIPTION * DESCRIPTION
* *
* Request internal information from the curl session with this function. The * Request internal information from the curl session with this function.
* third argument MUST be a pointer to a long, a pointer to a char * or a * The third argument MUST be pointing to the specific type of the used option
* pointer to a double (as the documentation describes elsewhere). The data * which is documented in each man page of the option. The data pointed to
* pointed to will be filled in accordingly and can be relied upon only if the * will be filled in accordingly and can be relied upon only if the function
* function returns CURLE_OK. This function is intended to get used *AFTER* a * returns CURLE_OK. This function is intended to get used *AFTER* a performed
* performed transfer, all results from this function are undefined until the * transfer, all results from this function are undefined until the transfer
* transfer is completed. * is completed.
*/ */
CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...); CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);


@ -117,7 +119,7 @@ CURL_EXTERN CURLcode curl_easy_send(CURL *curl, const void *buffer,
CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl); CURL_EXTERN CURLcode curl_easy_upkeep(CURL *curl);


#ifdef __cplusplus #ifdef __cplusplus
} } /* end of extern "C" */
#endif #endif


#endif #endif

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


#include <stdarg.h> #include <stdarg.h>
@ -44,7 +46,7 @@ CURL_EXTERN char *curl_maprintf(const char *format, ...);
CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args); CURL_EXTERN char *curl_mvaprintf(const char *format, va_list args);


#ifdef __cplusplus #ifdef __cplusplus
} } /* end of extern "C" */
#endif #endif


#endif /* CURLINC_MPRINTF_H */ #endif /* CURLINC_MPRINTF_H */

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/
/* /*
This is an "external" header file. Don't give away any internals here! This is an "external" header file. Don't give away any internals here!
@ -75,6 +77,7 @@ typedef enum {
CURLM_WAKEUP_FAILURE, /* wakeup is unavailable or failed */ CURLM_WAKEUP_FAILURE, /* wakeup is unavailable or failed */
CURLM_BAD_FUNCTION_ARGUMENT, /* function called with a bad parameter */ CURLM_BAD_FUNCTION_ARGUMENT, /* function called with a bad parameter */
CURLM_ABORTED_BY_CALLBACK, CURLM_ABORTED_BY_CALLBACK,
CURLM_UNRECOVERABLE_POLL,
CURLM_LAST CURLM_LAST
} CURLMcode; } CURLMcode;


@ -121,7 +124,7 @@ struct curl_waitfd {
/* /*
* Name: curl_multi_init() * Name: curl_multi_init()
* *
* Desc: inititalize multi-style curl usage * Desc: initialize multi-style curl usage
* *
* Returns: a new CURLM handle to use in all 'curl_multi' functions. * Returns: a new CURLM handle to use in all 'curl_multi' functions.
*/ */
@ -315,16 +318,16 @@ typedef int (*curl_multi_timer_callback)(CURLM *multi, /* multi handle */
void *userp); /* private callback void *userp); /* private callback
pointer */ pointer */


CURL_EXTERN CURLMcode curl_multi_socket(CURLM *multi_handle, curl_socket_t s, CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
int *running_handles); curl_multi_socket(CURLM *multi_handle, curl_socket_t s, int *running_handles);


CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle, CURL_EXTERN CURLMcode curl_multi_socket_action(CURLM *multi_handle,
curl_socket_t s, curl_socket_t s,
int ev_bitmask, int ev_bitmask,
int *running_handles); int *running_handles);


CURL_EXTERN CURLMcode curl_multi_socket_all(CURLM *multi_handle, CURL_EXTERN CURLMcode CURL_DEPRECATED(7.19.5, "Use curl_multi_socket_action()")
int *running_handles); curl_multi_socket_all(CURLM *multi_handle, int *running_handles);


#ifndef CURL_ALLOW_OLD_MULTI_SOCKET #ifndef CURL_ALLOW_OLD_MULTI_SOCKET
/* This macro below was added in 7.16.3 to push users who recompile to use /* This macro below was added in 7.16.3 to push users who recompile to use

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 2018 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


#ifdef __cplusplus #ifdef __cplusplus
@ -31,7 +33,7 @@ typedef enum {
CURLOT_VALUES, /* (a defined set or bitmask) */ CURLOT_VALUES, /* (a defined set or bitmask) */
CURLOT_OFF_T, /* curl_off_t (a range of values) */ CURLOT_OFF_T, /* curl_off_t (a range of values) */
CURLOT_OBJECT, /* pointer (void *) */ CURLOT_OBJECT, /* pointer (void *) */
CURLOT_STRING, /* (char * to zero terminated buffer) */ CURLOT_STRING, /* (char * to null-terminated buffer) */
CURLOT_SLIST, /* (struct curl_slist *) */ CURLOT_SLIST, /* (struct curl_slist *) */
CURLOT_CBPTR, /* (void * passed as-is to a callback) */ CURLOT_CBPTR, /* (void * passed as-is to a callback) */
CURLOT_BLOB, /* blob (struct curl_blob *) */ CURLOT_BLOB, /* blob (struct curl_blob *) */
@ -57,7 +59,7 @@ CURL_EXTERN const struct curl_easyoption *
curl_easy_option_by_name(const char *name); curl_easy_option_by_name(const char *name);


CURL_EXTERN const struct curl_easyoption * CURL_EXTERN const struct curl_easyoption *
curl_easy_option_by_id (CURLoption id); curl_easy_option_by_id(CURLoption id);


CURL_EXTERN const struct curl_easyoption * CURL_EXTERN const struct curl_easyoption *
curl_easy_option_next(const struct curl_easyoption *prev); curl_easy_option_next(const struct curl_easyoption *prev);

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


#include <sys/types.h> #include <sys/types.h>

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


/* /*
@ -121,7 +123,7 @@
# define CURL_TYPEOF_CURL_SOCKLEN_T int # define CURL_TYPEOF_CURL_SOCKLEN_T int


#elif defined(__LCC__) #elif defined(__LCC__)
# if defined(__e2k__) /* MCST eLbrus C Compiler */ # if defined(__MCST__) /* MCST eLbrus Compiler Collection */
# define CURL_TYPEOF_CURL_OFF_T long # define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld" # define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu" # define CURL_FORMAT_CURL_OFF_TU "lu"
@ -162,13 +164,33 @@
# endif # endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int


#elif defined(__MWERKS__) #elif defined(macintosh)
# include <ConditionalMacros.h>
# if TYPE_LONGLONG
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# else
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int

#elif defined(__TANDEM)
# if ! defined(__LP64)
/* Required for 32-bit NonStop builds only. */
# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL # define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T int # define CURL_TYPEOF_CURL_SOCKLEN_T int
# endif


#elif defined(_WIN32_WCE) #elif defined(_WIN32_WCE)
# define CURL_TYPEOF_CURL_OFF_T __int64 # define CURL_TYPEOF_CURL_OFF_T __int64
@ -205,45 +227,38 @@
# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int # define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int


#elif defined(__OS400__) #elif defined(__OS400__)
# if defined(__ILEC400__) # define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1

#elif defined(__MVS__)
# if defined(_LONG_LONG)
# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu" # define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL # define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL # define CURL_SUFFIX_CURL_OFF_TU ULL
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t # elif defined(_LP64)
# define CURL_PULL_SYS_TYPES_H 1 # define CURL_TYPEOF_CURL_OFF_T long
# define CURL_PULL_SYS_SOCKET_H 1 # define CURL_FORMAT_CURL_OFF_T "ld"
# endif # define CURL_FORMAT_CURL_OFF_TU "lu"

# define CURL_SUFFIX_CURL_OFF_T L
#elif defined(__MVS__) # define CURL_SUFFIX_CURL_OFF_TU UL
# if defined(__IBMC__) || defined(__IBMCPP__) # else
# if defined(_ILP32) # define CURL_TYPEOF_CURL_OFF_T long
# elif defined(_LP64) # define CURL_FORMAT_CURL_OFF_T "ld"
# endif # define CURL_FORMAT_CURL_OFF_TU "lu"
# if defined(_LONG_LONG) # define CURL_SUFFIX_CURL_OFF_T L
# define CURL_TYPEOF_CURL_OFF_T long long # define CURL_SUFFIX_CURL_OFF_TU UL
# define CURL_FORMAT_CURL_OFF_T "lld"
# define CURL_FORMAT_CURL_OFF_TU "llu"
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
# elif defined(_LP64)
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# else
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"
# define CURL_FORMAT_CURL_OFF_TU "lu"
# define CURL_SUFFIX_CURL_OFF_T L
# define CURL_SUFFIX_CURL_OFF_TU UL
# endif
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1
# endif # endif
# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
# define CURL_PULL_SYS_TYPES_H 1
# define CURL_PULL_SYS_SOCKET_H 1


#elif defined(__370__) #elif defined(__370__)
# if defined(__IBMC__) || defined(__IBMCPP__) # if defined(__IBMC__) || defined(__IBMCPP__)

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


/* wraps curl_easy_setopt() with typechecking */ /* wraps curl_easy_setopt() with typechecking */
@ -40,107 +42,111 @@
*/ */
#define curl_easy_setopt(handle, option, value) \ #define curl_easy_setopt(handle, option, value) \
__extension__({ \ __extension__({ \
__typeof__(option) _curl_opt = option; \ CURLoption _curl_opt = (option); \
if(__builtin_constant_p(_curl_opt)) { \ if(__builtin_constant_p(_curl_opt)) { \
if(curlcheck_long_option(_curl_opt)) \ CURL_IGNORE_DEPRECATION( \
if(!curlcheck_long(value)) \ if(curlcheck_long_option(_curl_opt)) \
_curl_easy_setopt_err_long(); \ if(!curlcheck_long(value)) \
if(curlcheck_off_t_option(_curl_opt)) \ _curl_easy_setopt_err_long(); \
if(!curlcheck_off_t(value)) \ if(curlcheck_off_t_option(_curl_opt)) \
_curl_easy_setopt_err_curl_off_t(); \ if(!curlcheck_off_t(value)) \
if(curlcheck_string_option(_curl_opt)) \ _curl_easy_setopt_err_curl_off_t(); \
if(!curlcheck_string(value)) \ if(curlcheck_string_option(_curl_opt)) \
_curl_easy_setopt_err_string(); \ if(!curlcheck_string(value)) \
if(curlcheck_write_cb_option(_curl_opt)) \ _curl_easy_setopt_err_string(); \
if(!curlcheck_write_cb(value)) \ if(curlcheck_write_cb_option(_curl_opt)) \
_curl_easy_setopt_err_write_callback(); \ if(!curlcheck_write_cb(value)) \
if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \ _curl_easy_setopt_err_write_callback(); \
if(!curlcheck_resolver_start_callback(value)) \ if((_curl_opt) == CURLOPT_RESOLVER_START_FUNCTION) \
_curl_easy_setopt_err_resolver_start_callback(); \ if(!curlcheck_resolver_start_callback(value)) \
if((_curl_opt) == CURLOPT_READFUNCTION) \ _curl_easy_setopt_err_resolver_start_callback(); \
if(!curlcheck_read_cb(value)) \ if((_curl_opt) == CURLOPT_READFUNCTION) \
_curl_easy_setopt_err_read_cb(); \ if(!curlcheck_read_cb(value)) \
if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \ _curl_easy_setopt_err_read_cb(); \
if(!curlcheck_ioctl_cb(value)) \ if((_curl_opt) == CURLOPT_IOCTLFUNCTION) \
_curl_easy_setopt_err_ioctl_cb(); \ if(!curlcheck_ioctl_cb(value)) \
if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \ _curl_easy_setopt_err_ioctl_cb(); \
if(!curlcheck_sockopt_cb(value)) \ if((_curl_opt) == CURLOPT_SOCKOPTFUNCTION) \
_curl_easy_setopt_err_sockopt_cb(); \ if(!curlcheck_sockopt_cb(value)) \
if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \ _curl_easy_setopt_err_sockopt_cb(); \
if(!curlcheck_opensocket_cb(value)) \ if((_curl_opt) == CURLOPT_OPENSOCKETFUNCTION) \
_curl_easy_setopt_err_opensocket_cb(); \ if(!curlcheck_opensocket_cb(value)) \
if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \ _curl_easy_setopt_err_opensocket_cb(); \
if(!curlcheck_progress_cb(value)) \ if((_curl_opt) == CURLOPT_PROGRESSFUNCTION) \
_curl_easy_setopt_err_progress_cb(); \ if(!curlcheck_progress_cb(value)) \
if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \ _curl_easy_setopt_err_progress_cb(); \
if(!curlcheck_debug_cb(value)) \ if((_curl_opt) == CURLOPT_DEBUGFUNCTION) \
_curl_easy_setopt_err_debug_cb(); \ if(!curlcheck_debug_cb(value)) \
if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \ _curl_easy_setopt_err_debug_cb(); \
if(!curlcheck_ssl_ctx_cb(value)) \ if((_curl_opt) == CURLOPT_SSL_CTX_FUNCTION) \
_curl_easy_setopt_err_ssl_ctx_cb(); \ if(!curlcheck_ssl_ctx_cb(value)) \
if(curlcheck_conv_cb_option(_curl_opt)) \ _curl_easy_setopt_err_ssl_ctx_cb(); \
if(!curlcheck_conv_cb(value)) \ if(curlcheck_conv_cb_option(_curl_opt)) \
_curl_easy_setopt_err_conv_cb(); \ if(!curlcheck_conv_cb(value)) \
if((_curl_opt) == CURLOPT_SEEKFUNCTION) \ _curl_easy_setopt_err_conv_cb(); \
if(!curlcheck_seek_cb(value)) \ if((_curl_opt) == CURLOPT_SEEKFUNCTION) \
_curl_easy_setopt_err_seek_cb(); \ if(!curlcheck_seek_cb(value)) \
if(curlcheck_cb_data_option(_curl_opt)) \ _curl_easy_setopt_err_seek_cb(); \
if(!curlcheck_cb_data(value)) \ if(curlcheck_cb_data_option(_curl_opt)) \
_curl_easy_setopt_err_cb_data(); \ if(!curlcheck_cb_data(value)) \
if((_curl_opt) == CURLOPT_ERRORBUFFER) \ _curl_easy_setopt_err_cb_data(); \
if(!curlcheck_error_buffer(value)) \ if((_curl_opt) == CURLOPT_ERRORBUFFER) \
_curl_easy_setopt_err_error_buffer(); \ if(!curlcheck_error_buffer(value)) \
if((_curl_opt) == CURLOPT_STDERR) \ _curl_easy_setopt_err_error_buffer(); \
if(!curlcheck_FILE(value)) \ if((_curl_opt) == CURLOPT_STDERR) \
_curl_easy_setopt_err_FILE(); \ if(!curlcheck_FILE(value)) \
if(curlcheck_postfields_option(_curl_opt)) \ _curl_easy_setopt_err_FILE(); \
if(!curlcheck_postfields(value)) \ if(curlcheck_postfields_option(_curl_opt)) \
_curl_easy_setopt_err_postfields(); \ if(!curlcheck_postfields(value)) \
if((_curl_opt) == CURLOPT_HTTPPOST) \ _curl_easy_setopt_err_postfields(); \
if(!curlcheck_arr((value), struct curl_httppost)) \ if((_curl_opt) == CURLOPT_HTTPPOST) \
_curl_easy_setopt_err_curl_httpost(); \ if(!curlcheck_arr((value), struct curl_httppost)) \
if((_curl_opt) == CURLOPT_MIMEPOST) \ _curl_easy_setopt_err_curl_httpost(); \
if(!curlcheck_ptr((value), curl_mime)) \ if((_curl_opt) == CURLOPT_MIMEPOST) \
_curl_easy_setopt_err_curl_mimepost(); \ if(!curlcheck_ptr((value), curl_mime)) \
if(curlcheck_slist_option(_curl_opt)) \ _curl_easy_setopt_err_curl_mimepost(); \
if(!curlcheck_arr((value), struct curl_slist)) \ if(curlcheck_slist_option(_curl_opt)) \
_curl_easy_setopt_err_curl_slist(); \ if(!curlcheck_arr((value), struct curl_slist)) \
if((_curl_opt) == CURLOPT_SHARE) \ _curl_easy_setopt_err_curl_slist(); \
if(!curlcheck_ptr((value), CURLSH)) \ if((_curl_opt) == CURLOPT_SHARE) \
_curl_easy_setopt_err_CURLSH(); \ if(!curlcheck_ptr((value), CURLSH)) \
_curl_easy_setopt_err_CURLSH(); \
) \
} \ } \
curl_easy_setopt(handle, _curl_opt, value); \ curl_easy_setopt(handle, _curl_opt, value); \
}) })


/* wraps curl_easy_getinfo() with typechecking */ /* wraps curl_easy_getinfo() with typechecking */
#define curl_easy_getinfo(handle, info, arg) \ #define curl_easy_getinfo(handle, info, arg) \
__extension__({ \ __extension__({ \
__typeof__(info) _curl_info = info; \ CURLINFO _curl_info = (info); \
if(__builtin_constant_p(_curl_info)) { \ if(__builtin_constant_p(_curl_info)) { \
if(curlcheck_string_info(_curl_info)) \ CURL_IGNORE_DEPRECATION( \
if(!curlcheck_arr((arg), char *)) \ if(curlcheck_string_info(_curl_info)) \
_curl_easy_getinfo_err_string(); \ if(!curlcheck_arr((arg), char *)) \
if(curlcheck_long_info(_curl_info)) \ _curl_easy_getinfo_err_string(); \
if(!curlcheck_arr((arg), long)) \ if(curlcheck_long_info(_curl_info)) \
_curl_easy_getinfo_err_long(); \ if(!curlcheck_arr((arg), long)) \
if(curlcheck_double_info(_curl_info)) \ _curl_easy_getinfo_err_long(); \
if(!curlcheck_arr((arg), double)) \ if(curlcheck_double_info(_curl_info)) \
_curl_easy_getinfo_err_double(); \ if(!curlcheck_arr((arg), double)) \
if(curlcheck_slist_info(_curl_info)) \ _curl_easy_getinfo_err_double(); \
if(!curlcheck_arr((arg), struct curl_slist *)) \ if(curlcheck_slist_info(_curl_info)) \
_curl_easy_getinfo_err_curl_slist(); \ if(!curlcheck_arr((arg), struct curl_slist *)) \
if(curlcheck_tlssessioninfo_info(_curl_info)) \ _curl_easy_getinfo_err_curl_slist(); \
if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \ if(curlcheck_tlssessioninfo_info(_curl_info)) \
_curl_easy_getinfo_err_curl_tlssesssioninfo(); \ if(!curlcheck_arr((arg), struct curl_tlssessioninfo *)) \
if(curlcheck_certinfo_info(_curl_info)) \ _curl_easy_getinfo_err_curl_tlssesssioninfo(); \
if(!curlcheck_arr((arg), struct curl_certinfo *)) \ if(curlcheck_certinfo_info(_curl_info)) \
_curl_easy_getinfo_err_curl_certinfo(); \ if(!curlcheck_arr((arg), struct curl_certinfo *)) \
if(curlcheck_socket_info(_curl_info)) \ _curl_easy_getinfo_err_curl_certinfo(); \
if(!curlcheck_arr((arg), curl_socket_t)) \ if(curlcheck_socket_info(_curl_info)) \
_curl_easy_getinfo_err_curl_socket(); \ if(!curlcheck_arr((arg), curl_socket_t)) \
if(curlcheck_off_t_info(_curl_info)) \ _curl_easy_getinfo_err_curl_socket(); \
if(!curlcheck_arr((arg), curl_off_t)) \ if(curlcheck_off_t_info(_curl_info)) \
_curl_easy_getinfo_err_curl_off_t(); \ if(!curlcheck_arr((arg), curl_off_t)) \
_curl_easy_getinfo_err_curl_off_t(); \
) \
} \ } \
curl_easy_getinfo(handle, _curl_info, arg); \ curl_easy_getinfo(handle, _curl_info, arg); \
}) })
@ -270,10 +276,11 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
(option) == CURLOPT_DNS_SERVERS || \ (option) == CURLOPT_DNS_SERVERS || \
(option) == CURLOPT_DOH_URL || \ (option) == CURLOPT_DOH_URL || \
(option) == CURLOPT_EGDSOCKET || \ (option) == CURLOPT_EGDSOCKET || \
(option) == CURLOPT_FTPPORT || \
(option) == CURLOPT_FTP_ACCOUNT || \ (option) == CURLOPT_FTP_ACCOUNT || \
(option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \ (option) == CURLOPT_FTP_ALTERNATIVE_TO_USER || \
(option) == CURLOPT_FTPPORT || \
(option) == CURLOPT_HSTS || \ (option) == CURLOPT_HSTS || \
(option) == CURLOPT_HAPROXY_CLIENT_IP || \
(option) == CURLOPT_INTERFACE || \ (option) == CURLOPT_INTERFACE || \
(option) == CURLOPT_ISSUERCERT || \ (option) == CURLOPT_ISSUERCERT || \
(option) == CURLOPT_KEYPASSWD || \ (option) == CURLOPT_KEYPASSWD || \
@ -286,10 +293,8 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
(option) == CURLOPT_PASSWORD || \ (option) == CURLOPT_PASSWORD || \
(option) == CURLOPT_PINNEDPUBLICKEY || \ (option) == CURLOPT_PINNEDPUBLICKEY || \
(option) == CURLOPT_PRE_PROXY || \ (option) == CURLOPT_PRE_PROXY || \
(option) == CURLOPT_PROTOCOLS_STR || \
(option) == CURLOPT_PROXY || \ (option) == CURLOPT_PROXY || \
(option) == CURLOPT_PROXYPASSWORD || \
(option) == CURLOPT_PROXYUSERNAME || \
(option) == CURLOPT_PROXYUSERPWD || \
(option) == CURLOPT_PROXY_CAINFO || \ (option) == CURLOPT_PROXY_CAINFO || \
(option) == CURLOPT_PROXY_CAPATH || \ (option) == CURLOPT_PROXY_CAPATH || \
(option) == CURLOPT_PROXY_CRLFILE || \ (option) == CURLOPT_PROXY_CRLFILE || \
@ -297,17 +302,21 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
(option) == CURLOPT_PROXY_KEYPASSWD || \ (option) == CURLOPT_PROXY_KEYPASSWD || \
(option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \ (option) == CURLOPT_PROXY_PINNEDPUBLICKEY || \
(option) == CURLOPT_PROXY_SERVICE_NAME || \ (option) == CURLOPT_PROXY_SERVICE_NAME || \
(option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
(option) == CURLOPT_PROXY_SSLCERT || \ (option) == CURLOPT_PROXY_SSLCERT || \
(option) == CURLOPT_PROXY_SSLCERTTYPE || \ (option) == CURLOPT_PROXY_SSLCERTTYPE || \
(option) == CURLOPT_PROXY_SSLKEY || \ (option) == CURLOPT_PROXY_SSLKEY || \
(option) == CURLOPT_PROXY_SSLKEYTYPE || \ (option) == CURLOPT_PROXY_SSLKEYTYPE || \
(option) == CURLOPT_PROXY_SSL_CIPHER_LIST || \
(option) == CURLOPT_PROXY_TLS13_CIPHERS || \ (option) == CURLOPT_PROXY_TLS13_CIPHERS || \
(option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \ (option) == CURLOPT_PROXY_TLSAUTH_PASSWORD || \
(option) == CURLOPT_PROXY_TLSAUTH_TYPE || \ (option) == CURLOPT_PROXY_TLSAUTH_TYPE || \
(option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \ (option) == CURLOPT_PROXY_TLSAUTH_USERNAME || \
(option) == CURLOPT_PROXYPASSWORD || \
(option) == CURLOPT_PROXYUSERNAME || \
(option) == CURLOPT_PROXYUSERPWD || \
(option) == CURLOPT_RANDOM_FILE || \ (option) == CURLOPT_RANDOM_FILE || \
(option) == CURLOPT_RANGE || \ (option) == CURLOPT_RANGE || \
(option) == CURLOPT_REDIR_PROTOCOLS_STR || \
(option) == CURLOPT_REFERER || \ (option) == CURLOPT_REFERER || \
(option) == CURLOPT_REQUEST_TARGET || \ (option) == CURLOPT_REQUEST_TARGET || \
(option) == CURLOPT_RTSP_SESSION_ID || \ (option) == CURLOPT_RTSP_SESSION_ID || \
@ -374,6 +383,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
(option) == CURLOPT_WRITEDATA || \ (option) == CURLOPT_WRITEDATA || \
(option) == CURLOPT_RESOLVER_START_DATA || \ (option) == CURLOPT_RESOLVER_START_DATA || \
(option) == CURLOPT_TRAILERDATA || \ (option) == CURLOPT_TRAILERDATA || \
(option) == CURLOPT_SSH_HOSTKEYDATA || \
0) 0)


/* evaluates to true if option takes a POST data argument (void* or char*) */ /* evaluates to true if option takes a POST data argument (void* or char*) */
@ -431,7 +441,7 @@ CURLWARNING(_curl_easy_getinfo_err_curl_off_t,
(CURLINFO_OFF_T < (info)) (CURLINFO_OFF_T < (info))




/* typecheck helpers -- check whether given expression has requested type*/ /* typecheck helpers -- check whether given expression has requested type */


/* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros, /* For pointers, you can use the curlcheck_ptr/curlcheck_arr macros,
* otherwise define a new macro. Search for __builtin_types_compatible_p * otherwise define a new macro. Search for __builtin_types_compatible_p

View File

@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 2018 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -20,6 +20,8 @@
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied. * KIND, either express or implied.
* *
* SPDX-License-Identifier: curl
*
***************************************************************************/ ***************************************************************************/


#include "curl.h" #include "curl.h"
@ -60,6 +62,7 @@ typedef enum {
CURLUE_BAD_SCHEME, /* 27 */ CURLUE_BAD_SCHEME, /* 27 */
CURLUE_BAD_SLASHES, /* 28 */ CURLUE_BAD_SLASHES, /* 28 */
CURLUE_BAD_USER, /* 29 */ CURLUE_BAD_USER, /* 29 */
CURLUE_LACKS_IDN, /* 30 */
CURLUE_LAST CURLUE_LAST
} CURLUcode; } CURLUcode;


@ -93,6 +96,7 @@ typedef enum {
#define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the #define CURLU_NO_AUTHORITY (1<<10) /* Allow empty authority when the
scheme is unknown. */ scheme is unknown. */
#define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */ #define CURLU_ALLOW_SPACE (1<<11) /* Allow spaces in the URL */
#define CURLU_PUNYCODE (1<<12) /* get the host name in pynycode */


typedef struct Curl_URL CURLU; typedef struct Curl_URL CURLU;


@ -113,14 +117,14 @@ CURL_EXTERN void curl_url_cleanup(CURLU *handle);
* curl_url_dup() duplicates a CURLU handle and returns a new copy. The new * curl_url_dup() duplicates a CURLU handle and returns a new copy. The new
* handle must also be freed with curl_url_cleanup(). * handle must also be freed with curl_url_cleanup().
*/ */
CURL_EXTERN CURLU *curl_url_dup(CURLU *in); CURL_EXTERN CURLU *curl_url_dup(const CURLU *in);


/* /*
* curl_url_get() extracts a specific part of the URL from a CURLU * curl_url_get() extracts a specific part of the URL from a CURLU
* handle. Returns error code. The returned pointer MUST be freed with * handle. Returns error code. The returned pointer MUST be freed with
* curl_free() afterwards. * curl_free() afterwards.
*/ */
CURL_EXTERN CURLUcode curl_url_get(CURLU *handle, CURLUPart what, CURL_EXTERN CURLUcode curl_url_get(const CURLU *handle, CURLUPart what,
char **part, unsigned int flags); char **part, unsigned int flags);


/* /*

Binary file not shown.

Binary file not shown.

View File

@ -1,6 +1,12 @@
QT -= gui QT -= gui core
#CONFIG += -static -libstdc++ -static-libgcc #-static #CONFIG += -static -libstdc++ -static-libgcc #-static



#QT += core gui
#greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

#QT += webenginewidgets

#Linux: #Linux:
unix: LIBS += -lcurl unix: LIBS += -lcurl



View File

@ -1,8 +1,13 @@
#include "programManager.h" #include "programManager.h"




//#include <QApplication>

int main(int argc, char *argv[]) int main(int argc, char *argv[])
{ {
// QApplication a(argc, argv);


ProgramManager mainProgram; ProgramManager mainProgram;
Settings settings; Settings settings;
int res = manageParameter(settings, argc, argv); int res = manageParameter(settings, argc, argv);

View File

@ -1,10 +1,18 @@

#include "pageManager.h" #include "pageManager.h"



std::string PageManager::torAnmeldeNamen = "no-name";
bool PageManager::cloudflare_protec = false;
std::mutex PageManager::torAnmeldeNamenMutex;



PageManager::PageManager(std::string sock5ProxyOnlyAddress) PageManager::PageManager(std::string sock5ProxyOnlyAddress)
: sock5Proxy("socks5://" + sock5ProxyOnlyAddress) : sock5Proxy("socks5://" + sock5ProxyOnlyAddress)
{ {
std::srand(std::time(0)); // Seed the random number generator
curl_global_init(CURL_GLOBAL_ALL); curl_global_init(CURL_GLOBAL_ALL);

if(false) if(false)
std::cout << "PageManager()" << std::endl; std::cout << "PageManager()" << std::endl;
} }
@ -25,7 +33,7 @@ void PageManager::setProxy(std::string ip, int port)
} else { } else {
this->sock5Proxy = "socks5://" + ip + ":" + std::to_string(port); this->sock5Proxy = "socks5://" + ip + ":" + std::to_string(port);
if(debugMode) if(debugMode)
std::cout << "Proxy: " << ip << ":" << port << std::endl; std::cout << "Proxy: " << ip << ":" << port << " -> ADDR of PM:" << this << std::endl;
} }
} }


@ -57,6 +65,7 @@ static size_t write_data(void *ptr, size_t size, size_t nmemb, void *stream)
#if defined(_WIN32) #if defined(_WIN32)
//#define WIN32_LEAN_AND_MEAN //#define WIN32_LEAN_AND_MEAN
//#define VC_EXTRALEAN //#define VC_EXTRALEAN
//#include <QUrl>
#include <Windows.h> #include <Windows.h>
#elif defined(__linux__) #elif defined(__linux__)
#include <sys/ioctl.h> #include <sys/ioctl.h>
@ -79,10 +88,16 @@ void PageManager::get_terminal_size(int& width) {
#endif // Windows/Linux #endif // Windows/Linux
} }


Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool useCookies, std::string data, bool generateCookieFile, bool UrlAfterRedirectOnlyNeeded, std::string cookieFilePath) Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool useCookies, std::string data, bool generateCookieFile, bool UrlAfterRedirectOnlyNeeded, std::string cookieFilePath, int rek_num)
{ {
Url = protocol + Url; // add https:// Url = protocol + Url; // add https://


if(rek_num > 15) {
if(debugMode)
std::cout << " -> EXIT(): Out of trys..." << std::endl;
exit(0);
}

CURL *curl; CURL *curl;
CURLcode res; CURLcode res;
std::string readBuffer; std::string readBuffer;
@ -105,10 +120,22 @@ Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool
} }


//Settings //Settings
if(sock5Proxy != "") if(sock5Proxy != "") {

curl_easy_setopt(curl, CURLOPT_PROXY, sock5Proxy.c_str() ); //Sock5Proxy für Curl curl_easy_setopt(curl, CURLOPT_PROXY, sock5Proxy.c_str() ); //Sock5Proxy für Curl
else if(debugMode)
std::cout << "\33[2K\r => INFO: Es wird kein Proxy verwendet." << std::endl; if(cloudflare_protec) {

CURLcode setoptResult = curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, (torAnmeldeNamen + ":passwd").c_str());
if (setoptResult != CURLE_OK) {
std::cerr << "Setting CURLOPT_URL failed: " << curl_easy_strerror(setoptResult) << std::endl;
}
}

} else {
if(debugMode)
std::cout << "\33[2K\r => INFO: Es wird kein Proxy verwendet: ADDR of PM:" << this << " -> prox: " << sock5Proxy << std::endl;
}


//curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); // html errors to errorcode res //curl_easy_setopt(curl, CURLOPT_FAILONERROR, true); // html errors to errorcode res
//curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); // Progressausgabe aktivieren //curl_easy_setopt(curl, CURLOPT_NOPROGRESS, false); // Progressausgabe aktivieren
@ -119,12 +146,12 @@ Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
#endif #endif



curl_easy_setopt(curl, CURLOPT_URL, Url.c_str()); //Url für Curl curl_easy_setopt(curl, CURLOPT_URL, Url.c_str()); //Url für Curl
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); //follows redirection curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); //follows redirection
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); // Funktion zum Speichern des outputs in einem string curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, WriteCallback); // Funktion zum Speichern des outputs in einem string
curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer); //Legt die Variable readbuffer fest curl_easy_setopt(curl, CURLOPT_WRITEDATA, &readBuffer); //Legt die Variable readbuffer fest
curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"); curl_easy_setopt(curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36");
/*"Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0" */
if(useCookies) if(useCookies)
curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookieFilePath.c_str()); curl_easy_setopt(curl, CURLOPT_COOKIEFILE, cookieFilePath.c_str());
if(data != "") if(data != "")
@ -136,7 +163,8 @@ Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool
for (int timeout = 1; timeout <= maxTimeout; ++timeout) { for (int timeout = 1; timeout <= maxTimeout; ++timeout) {
/* Perform the request, res will get the return code */ /* Perform the request, res will get the return code */
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
std::cout << "\33[2K\r" << std::flush;
std::cout << "\33[2K\r " << std::flush;


if(res != CURLE_OK) { if(res != CURLE_OK) {
if(timeout == maxTimeout) { if(timeout == maxTimeout) {
@ -164,7 +192,7 @@ Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool
} }
} }


std::cout << std::string( "\33[2K\r => Warning: Versuch " + std::to_string(timeout) + " von " + std::to_string(maxTimeout) + ": curl_easy_perform() failed: " + curl_easy_strerror(res) )<< std::flush; std::cout << "\33[2K\r " << std::string( " => Warning: Versuch " + std::to_string(timeout) + " von " + std::to_string(maxTimeout) + ": curl_easy_perform() failed: " + curl_easy_strerror(res) )<< std::endl;
sleep(1); sleep(1);
} }
} else { } else {
@ -185,6 +213,37 @@ Reply PageManager::getServerRequest(std::string protocol, std::string Url, bool
/* always cleanup */ /* Mach den Griff zu, schreib die Kekse! */ /* always cleanup */ /* Mach den Griff zu, schreib die Kekse! */
curl_easy_cleanup(curl); curl_easy_cleanup(curl);



if(returnUrl.find("/_ray/pow") != std::string::npos) {
std::cout << " \33[2K\r => CLOUD FLARE PROTECTION (Try " << rek_num << "/15)..." << std::flush;
usleep(400000);

if(this->debugMode && Url != "ifconfig.me/ip") {
std::string out_ip = this->getServerRequest("https://", "ifconfig.me/ip").html;

if(out_ip.find("<html>") == std::string::npos && [](const std::string& str) { return std::count(str.begin(), str.end(), '.'); }(out_ip) == 3)
std::cout << "\33[2K\r -> Current IP: " << out_ip << std::endl;
else
std::cout << "\33[2K\r -> Current IP: " << "Unknown: " << std::endl;

}
cloudflare_protec = true;
generateNewTorAnmeldeNamen(torAnmeldeNamen);

return this->getServerRequest("", Url, useCookies, data, generateCookieFile, UrlAfterRedirectOnlyNeeded,cookieFilePath, rek_num + 1);

// std::cout << "/_ray/pow:\n" << readBuffer << std::endl;
// this->writeToFile( std::vector<std::string>{"./output.text"}, readBuffer );

// QWebEngineView view;
// view.load(QUrl("https://qt-project.org/"));
// view.resize(1024, 750);
// view.show();

// qApp->exec();
}


return Reply(readBuffer, returnUrl); return Reply(readBuffer, returnUrl);
} }


@ -238,7 +297,7 @@ int PageManager::downLoadToFile(std::string filePath, std::string url)
std::cout << "\33[2K\r => INFO: Proxy:'" << sock5Proxy << "'" << std::endl; std::cout << "\33[2K\r => INFO: Proxy:'" << sock5Proxy << "'" << std::endl;


//User Agent //User Agent
curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:80.0) Gecko/20100101 Firefox/80.0"); curl_easy_setopt(curl_handle, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:100.0) Gecko/20100101 Firefox/100.0");


/* write the page body to this file handle */ /* write the page body to this file handle */
curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile); curl_easy_setopt(curl_handle, CURLOPT_WRITEDATA, pagefile);
@ -346,6 +405,8 @@ checkNameRply PageManager::checkName(std::vector<PAGE> &pages, std::string Name,


} else if( html.find("<!DOCTYPE html><html><head><title>DDOS-GUARD</title>") != std::string::npos ) { } else if( html.find("<!DOCTYPE html><html><head><title>DDOS-GUARD</title>") != std::string::npos ) {
std::cout << "\33[2K\r" <<" => WARNUNG: Die Seite : '" << pages.at(i).url << "' benötigt ein DDOS-GUARD hCaptcha!" << std::endl; std::cout << "\33[2K\r" <<" => WARNUNG: Die Seite : '" << pages.at(i).url << "' benötigt ein DDOS-GUARD hCaptcha!" << std::endl;
writeToFile( outPutFilePaths, html );

pages.erase(pages.begin() + i); pages.erase(pages.begin() + i);
i--; i--;
continue; continue;

View File

@ -1,6 +1,7 @@
#ifndef MANAGEPAGE_H #ifndef MANAGEPAGE_H
#define MANAGEPAGE_H #define MANAGEPAGE_H


#pragma once


#include "accountManager.h" #include "accountManager.h"
#include "parameterManager.h" // for isNumber #include "parameterManager.h" // for isNumber
@ -20,6 +21,7 @@
#include <unistd.h> // sleep #include <unistd.h> // sleep
#include <algorithm> #include <algorithm>
#include <ctime> // std::time, localtime ... #include <ctime> // std::time, localtime ...
#include <mutex>




struct Reply { struct Reply {
@ -53,7 +55,7 @@ public:


void get_terminal_size(int& width); void get_terminal_size(int& width);


Reply getServerRequest(std::string protocol, std::string Url, bool useCookies = false, std::string data = "", bool generateCookieFile = false, bool UrlAfterRedirectOnlyNeeded = false, std::string cookieFilePath = ""); Reply getServerRequest(std::string protocol, std::string Url, bool useCookies = false, std::string data = "", bool generateCookieFile = false, bool UrlAfterRedirectOnlyNeeded = false, std::string cookieFilePath = "", int rek_num = 0);
int downLoadToFile(std::string filePath, std::string url); int downLoadToFile(std::string filePath, std::string url);


int login(PAGE page, Account account, std::string cookieFilePath); int login(PAGE page, Account account, std::string cookieFilePath);
@ -75,9 +77,41 @@ public:


static std::string getCurlVersion(); static std::string getCurlVersion();



static std::mutex torAnmeldeNamenMutex;
static std::string torAnmeldeNamen;
static bool cloudflare_protec;

static std::string generateRandomString(int length) {
static const char alphanum[] =
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";

std::string randomString;
for (int i = 0; i < length; ++i) {
randomString.push_back(alphanum[std::rand() % (sizeof(alphanum) - 1)]);
}

return randomString;
}

static void generateNewTorAnmeldeNamen(std::string alterName) {
torAnmeldeNamenMutex.lock();

if(torAnmeldeNamen == alterName) {
torAnmeldeNamen = generateRandomString(10);
std::cout << " -> New Proxy Login Name: " << torAnmeldeNamen << std::flush;
usleep(700000);
}
torAnmeldeNamenMutex.unlock();
}

std::string sock5Proxy; std::string sock5Proxy;
private: private:
bool debugMode = false; bool debugMode = false;
}; };




#endif // MANAGEPAGE_H #endif // MANAGEPAGE_H

View File

@ -1,5 +1,6 @@
#include "parameterManager.h" #include "parameterManager.h"



int setPaths(Settings &settings) int setPaths(Settings &settings)
{ {
//Path settings //Path settings
@ -167,7 +168,7 @@ void unterOption_printVersion(Settings &settings)
<< " > Defaults Datei Version: \t" << settings.defaultFileVersion << std::endl << " > Defaults Datei Version: \t" << settings.defaultFileVersion << std::endl


#ifdef __MINGW_GCC_VERSION #ifdef __MINGW_GCC_VERSION
<< " > MINGW GCC Version: \t" <<__GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << std::endl << " > MINGW GCC Version: \t\t" <<__GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__ << std::endl
#endif #endif


<< " > Curl Version: \t\t" << PageManager::getCurlVersion() << std::endl << " > Curl Version: \t\t" << PageManager::getCurlVersion() << std::endl
@ -221,7 +222,7 @@ int loadDefaulOptions(Settings &settings)
ofs << "# Der Priorität nach angeben! Tipp: Erst Anime, dann Alle-Serien" << std::endl; ofs << "# Der Priorität nach angeben! Tipp: Erst Anime, dann Alle-Serien" << std::endl;
ofs << "# Kombinierbar mit -f - Verwende erste Seite" << std::endl; ofs << "# Kombinierbar mit -f - Verwende erste Seite" << std::endl;
ofs << "# Unterstützte Seiten:" << std::endl; ofs << "# Unterstützte Seiten:" << std::endl;
ofs << "# anicloud.io, s.to, 190.115.18.20, serienstream.to, serien.cam, all" << std::endl; ofs << "# aniworld.to, s.to, 186.2.175.5, serienstream.to, all" << std::endl;
ofs << "Internetseiten=AniWorld.to,serienstream.to" << std::endl << std::endl; ofs << "Internetseiten=AniWorld.to,serienstream.to" << std::endl << std::endl;


ofs << "# -> Standart Wert für Parameter: -f, --use-first:" << std::endl; ofs << "# -> Standart Wert für Parameter: -f, --use-first:" << std::endl;
@ -240,7 +241,7 @@ int loadDefaulOptions(Settings &settings)
ofs << "#" << std::endl << "# -> Einstellungen für default Modus:" << std::endl << "#" << std::endl << std::endl; ofs << "#" << std::endl << "# -> Einstellungen für default Modus:" << std::endl << "#" << std::endl << std::endl;


ofs << "# -> Standart Wert für Parameter: -g, --genaue-hoster:" << std::endl; ofs << "# -> Standart Wert für Parameter: -g, --genaue-hoster:" << std::endl;
ofs << "default_GenaueHoster=VOE,Vidoza" << std::endl << std::endl; ofs << "default_GenaueHoster=VOE" << std::endl << std::endl;


ofs << "# -> Standart Wert für Parameter: -l, --languages:" << std::endl; ofs << "# -> Standart Wert für Parameter: -l, --languages:" << std::endl;
ofs << "default_Sprachen=GerDub,GerSub,Eng" << std::endl << std::endl; ofs << "default_Sprachen=GerDub,GerSub,Eng" << std::endl << std::endl;
@ -257,7 +258,7 @@ int loadDefaulOptions(Settings &settings)
ofs << "#" << std::endl << "# -> Einstellungen für search Modus:" << std::endl << "#" << std::endl << std::endl; ofs << "#" << std::endl << "# -> Einstellungen für search Modus:" << std::endl << "#" << std::endl << std::endl;


ofs << "# -> Standart Wert für Parameter: -e, --exactly-writing:" << std::endl; ofs << "# -> Standart Wert für Parameter: -e, --exactly-writing:" << std::endl;
ofs << "#search-AchteAufGroßUndKleinschreibung=false" << std::endl << std::endl; ofs << "search-AchteAufGroßUndKleinschreibung=false" << std::endl << std::endl;


ofs << "# -> Aktiviert werden bei der Suche sämtliche Namen der Serie angezeigt." << std::endl; ofs << "# -> Aktiviert werden bei der Suche sämtliche Namen der Serie angezeigt." << std::endl;
ofs << "# Bei Animes kann das zu Mehrzeiligen ausgaben pro Serie führen!" << std::endl; ofs << "# Bei Animes kann das zu Mehrzeiligen ausgaben pro Serie führen!" << std::endl;
@ -441,7 +442,7 @@ int unterOption_help(Settings &settings)
<< " -> Mit diesem Programm kann man die Download-Urls" << std::endl << " -> Mit diesem Programm kann man die Download-Urls" << std::endl
<< " oder Informationen von Serien bekommen." << std::endl << " oder Informationen von Serien bekommen." << std::endl
<< " -> Mit diesem Programm kann man Redirect-Links von" << std::endl << " -> Mit diesem Programm kann man Redirect-Links von" << std::endl
<< " serienstream.sx und anicloud.io umwandeln." << std::endl << " serienstream.to und aniworld.to umwandeln." << std::endl
<< std::endl; << std::endl;


std::cout << "Unteroptionen:" << std::endl std::cout << "Unteroptionen:" << std::endl
@ -894,8 +895,8 @@ void unterOption_url_help(std::string programName)
std::cout << "Beschreibung:" << std::endl std::cout << "Beschreibung:" << std::endl
<< " Mit dieser Unterfunktion von " << programName << " können eigene" << std::endl << " Mit dieser Unterfunktion von " << programName << " können eigene" << std::endl
<< " Redirect-Links umgewandelt werden. Beispiel:" << std::endl << " Redirect-Links umgewandelt werden. Beispiel:" << std::endl
<< " https://serienstream.sx/redirect/44498xy -> https://vivolvox.xy/123xy" << std::endl << " https://serienstream.tx/redirect/44498xy -> https://vivolvox.xy/123xy" << std::endl
<< " Der Link kann folgen Aussehen: {[*]serienstream.sx}/redirect/[*]." << std::endl << " Der Link kann folgen Aussehen: {[*]serienstream.to}/redirect/[*]." << std::endl
<< " Standartwerte können im Defaultfile geändert werden." << std::endl << std::endl; << " Standartwerte können im Defaultfile geändert werden." << std::endl << std::endl;


std::cout << "INTERNETSEITEN OPTIONEN:" << std::endl std::cout << "INTERNETSEITEN OPTIONEN:" << std::endl
@ -1028,10 +1029,10 @@ void unterOption_search_help(std::string programName)




std::cout << "Beschreibung:" << std::endl std::cout << "Beschreibung:" << std::endl
<< " Mit dieser Unterfunktion des Programms kann man Serien auf serienstream.sx suchen." << std::endl << " Mit dieser Unterfunktion des Programms kann man Serien auf serienstream.to suchen." << std::endl
<< " Tipp: Falls deine Serie nicht gefunden wird, entferne einen Teil" << std::endl << " Tipp: Falls deine Serie nicht gefunden wird, entferne einen Teil" << std::endl
<< " am Ende deines SuchNamens und wiederhole die Suche." << std::endl << " am Ende deines SuchNamens und wiederhole die Suche." << std::endl
<< " Tipp: Wenn deine Serie sehr neu auf serienstream.sx ist, und deshalb nicht gefunden" << std::endl << " Tipp: Wenn deine Serie sehr neu auf serienstream.to ist, und deshalb nicht gefunden" << std::endl
<< " wird, verwende die Option -u, um die Liste zu aktualisieren." << std::endl << std::endl; << " wird, verwende die Option -u, um die Liste zu aktualisieren." << std::endl << std::endl;


std::cout << "AKTUALISIERUNG:" << std::endl std::cout << "AKTUALISIERUNG:" << std::endl

View File

@ -3,14 +3,12 @@







#ifndef __linux__ #ifndef __linux__
#ifndef _WIN32 #ifndef _WIN32
#error "Error Invalid System: Only for Linux and Windows systems!" #error "Error Invalid System: Only for Linux and Windows systems!"
#endif #endif
#endif #endif



#include <iostream> #include <iostream>
#include <getopt.h> #include <getopt.h>
#include <string.h> // strlen #include <string.h> // strlen
@ -27,8 +25,8 @@


#define UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files=" #define UpdaterCloudUrlWithPath "https://cloud.obermui.de/s/tXz7SWdaPJ7TacZ/download?path=%2F&files="
#define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/download?path=%2F&files=" #define SecondUpdaterCloudUrlWithPath "https://snew4.obermui.de/download?path=%2F&files="
#define VERSION "5.4.0" #define VERSION "6.0.0"
#define DEFAULT_FILE_VERSION "2.4" #define DEFAULT_FILE_VERSION "2.5"


//default, anime, normal, //default, anime, normal,
//suche: für jede katego. eine //suche: für jede katego. eine
@ -64,7 +62,7 @@ struct PAGE {


#include "logger.h" #include "logger.h"


//Wichtig nach MODUS UND PAGE DECLARATION //////Wichtig nach MODUS UND PAGE DECLARATION
#include "pageManager.h" #include "pageManager.h"




@ -74,16 +72,13 @@ struct Settings {
//erst animes, dann alle seiten-seiten:: //erst animes, dann alle seiten-seiten::
const PAGE const PAGE
_anicio = PAGE( "https://" , "aniworld.to", "Animes", "/animes-alphabet", "/anime/stream/", "/beliebte-animes"), _anicio = PAGE( "https://" , "aniworld.to", "Animes", "/animes-alphabet", "/anime/stream/", "/beliebte-animes"),

//alle serien - seiten: //alle serien - seiten:

_sto = PAGE( "https://", "s.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien"), _sto = PAGE( "https://", "s.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien"),
_stoIP = PAGE( "http://", "190.115.18.20", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien"), _stoIP = PAGE( "http://", "186.2.175.5", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien"),
serienstreamto = PAGE("https://", "serienstream.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien"), serienstreamto = PAGE("https://", "serienstream.to", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien");
seriencam = PAGE("https://", "serien.cam", "Normale_Serien", "/serien-alphabet", "/serie/stream/", "/beliebte-serien");


//alle compakt //alle compakt
const PAGE pagesALL[5] = { _anicio, _sto, _stoIP, /*_serienstreamsx,*/ seriencam, serienstreamto }; const PAGE pagesALL[4] = { _anicio, _sto, _stoIP, /*_serienstreamsx, seriencam, */serienstreamto };


std::vector<PAGE> pagesInUse; // Priority sorted std::vector<PAGE> pagesInUse; // Priority sorted
bool useFirstPage = false; bool useFirstPage = false;

View File

@ -1833,20 +1833,24 @@ int ProgramManager::searchModus_update(Settings *settings)
} }
else if(reply.html.find("</html>") == std::string::npos ) { else if(reply.html.find("</html>") == std::string::npos ) {
std::cout << " => Error: Konnte </html> in searchModus_update() nicht finden." << std::endl; std::cout << " => Error: Konnte </html> in searchModus_update() nicht finden." << std::endl;
return 22; continue;
} }


//auf anime seite noic halt auf s.to jetzt anders, näml: data-alternative-title != data-alternative-titles <--s, => data-alternative-title umfasst beides! //auf anime seite noic halt auf s.to jetzt anders, näml: data-alternative-title != data-alternative-titles <--s, => data-alternative-title umfasst beides!
std::string serienListe = replace( pageManager.grep( reply.html, "data-alternative-title" ), "</li>", "\n" ); std::string serienListe = replace( pageManager.grep( reply.html, "data-alternative-title" ), "</li>", "\n" );


std::string tests[] = {"\" href=\"", "<li><a data-alternative-title", page.UrlDir, "</a>", }; std::string tests[] = {"\" href=\"", "<li><a data-alternative-title", page.UrlDir, "</a>", };
bool cont = false;
for ( auto t : tests ) { for ( auto t : tests ) {
if(reply.html.find( t ) == std::string::npos) { if(reply.html.find( t ) == std::string::npos) {
if(settings->debugMode) if(settings->debugMode)
std::cerr << ">>> Debug In " << __FUNCTION__ << ": html doesnt contain:'" << t << "' after preparing." << std::endl; std::cerr << ">>> Debug In " << __FUNCTION__ << ": html doesnt contain:'" << t << "' after preparing." << std::endl;
return 51; std::cout << " -> Warnung: Überspringe: " << page.name_id << std::endl;
cont = true;;
} }
} }
if(cont)
continue;


//...\n<li><a data-alternative-title href="/serie /stream/2012-das-jahr-null" title="2012 - Das Jahr Null Stream anschauen">2012 - Das Jahr Null</a>\n... //...\n<li><a data-alternative-title href="/serie /stream/2012-das-jahr-null" title="2012 - Das Jahr Null Stream anschauen">2012 - Das Jahr Null</a>\n...
serienListe = replace(serienListe, "<li><a data-alternative-title", ""); serienListe = replace(serienListe, "<li><a data-alternative-title", "");

View File

@ -2,8 +2,6 @@
#define MANAGEPROGRAM_H #define MANAGEPROGRAM_H






//#include "pageManager.h" //#include "pageManager.h"
#include "parameterManager.h" #include "parameterManager.h"
//#include "accountManager.h" //#include "accountManager.h"

View File

@ -3,85 +3,90 @@ EXPORTS
curl_easy_duphandle @2 curl_easy_duphandle @2
curl_easy_escape @3 curl_easy_escape @3
curl_easy_getinfo @4 curl_easy_getinfo @4
curl_easy_init @5 curl_easy_header @5
curl_easy_option_by_id @6 curl_easy_init @6
curl_easy_option_by_name @7 curl_easy_nextheader @7
curl_easy_option_next @8 curl_easy_option_by_id @8
curl_easy_pause @9 curl_easy_option_by_name @9
curl_easy_perform @10 curl_easy_option_next @10
curl_easy_recv @11 curl_easy_pause @11
curl_easy_reset @12 curl_easy_perform @12
curl_easy_send @13 curl_easy_recv @13
curl_easy_setopt @14 curl_easy_reset @14
curl_easy_strerror @15 curl_easy_send @15
curl_easy_unescape @16 curl_easy_setopt @16
curl_easy_upkeep @17 curl_easy_strerror @17
curl_escape @18 curl_easy_unescape @18
curl_formadd @19 curl_easy_upkeep @19
curl_formfree @20 curl_escape @20
curl_formget @21 curl_formadd @21
curl_free @22 curl_formfree @22
curl_getdate @23 curl_formget @23
curl_getenv @24 curl_free @24
curl_global_cleanup @25 curl_getdate @25
curl_global_init @26 curl_getenv @26
curl_global_init_mem @27 curl_global_cleanup @27
curl_global_sslset @28 curl_global_init @28
curl_maprintf @29 curl_global_init_mem @29
curl_mfprintf @30 curl_global_sslset @30
curl_mime_addpart @31 curl_maprintf @31
curl_mime_data @32 curl_mfprintf @32
curl_mime_data_cb @33 curl_mime_addpart @33
curl_mime_encoder @34 curl_mime_data @34
curl_mime_filedata @35 curl_mime_data_cb @35
curl_mime_filename @36 curl_mime_encoder @36
curl_mime_free @37 curl_mime_filedata @37
curl_mime_headers @38 curl_mime_filename @38
curl_mime_init @39 curl_mime_free @39
curl_mime_name @40 curl_mime_headers @40
curl_mime_subparts @41 curl_mime_init @41
curl_mime_type @42 curl_mime_name @42
curl_mprintf @43 curl_mime_subparts @43
curl_msnprintf @44 curl_mime_type @44
curl_msprintf @45 curl_mprintf @45
curl_multi_add_handle @46 curl_msnprintf @46
curl_multi_assign @47 curl_msprintf @47
curl_multi_cleanup @48 curl_multi_add_handle @48
curl_multi_fdset @49 curl_multi_assign @49
curl_multi_info_read @50 curl_multi_cleanup @50
curl_multi_init @51 curl_multi_fdset @51
curl_multi_perform @52 curl_multi_info_read @52
curl_multi_poll @53 curl_multi_init @53
curl_multi_remove_handle @54 curl_multi_perform @54
curl_multi_setopt @55 curl_multi_poll @55
curl_multi_socket @56 curl_multi_remove_handle @56
curl_multi_socket_action @57 curl_multi_setopt @57
curl_multi_socket_all @58 curl_multi_socket @58
curl_multi_strerror @59 curl_multi_socket_action @59
curl_multi_timeout @60 curl_multi_socket_all @60
curl_multi_wait @61 curl_multi_strerror @61
curl_multi_wakeup @62 curl_multi_timeout @62
curl_mvaprintf @63 curl_multi_wait @63
curl_mvfprintf @64 curl_multi_wakeup @64
curl_mvprintf @65 curl_mvaprintf @65
curl_mvsnprintf @66 curl_mvfprintf @66
curl_mvsprintf @67 curl_mvprintf @67
curl_pushheader_byname @68 curl_mvsnprintf @68
curl_pushheader_bynum @69 curl_mvsprintf @69
curl_share_cleanup @70 curl_pushheader_byname @70
curl_share_init @71 curl_pushheader_bynum @71
curl_share_setopt @72 curl_share_cleanup @72
curl_share_strerror @73 curl_share_init @73
curl_slist_append @74 curl_share_setopt @74
curl_slist_free_all @75 curl_share_strerror @75
curl_strequal @76 curl_slist_append @76
curl_strnequal @77 curl_slist_free_all @77
curl_unescape @78 curl_strequal @78
curl_url @79 curl_strnequal @79
curl_url_cleanup @80 curl_unescape @80
curl_url_dup @81 curl_url @81
curl_url_get @82 curl_url_cleanup @82
curl_url_set @83 curl_url_dup @83
curl_url_strerror @84 curl_url_get @84
curl_version @85 curl_url_set @85
curl_version_info @86 curl_url_strerror @86
curl_version @87
curl_version_info @88
curl_ws_meta @89
curl_ws_recv @90
curl_ws_send @91

Binary file not shown.