- almost all backend calls pass the Curl_cfilter intance instead of connectdata+sockindex - ssl_connect_data is remove from struct connectdata and made internal to vtls - ssl_connect_data is allocated in the added filter, kept at cf->ctx - added function to let a ssl filter access its ssl_primary_config and ssl_config_data this selects the propert subfields in conn and data, for filters added as plain or proxy - adjusted all backends to use the changed api - adjusted all backends to access config data via the exposed functions, no longer using conn or data directly cfilter renames for clear purpose: - methods `Curl_conn_*(data, conn, sockindex)` work on the complete filter chain at `sockindex` and connection `conn`. - methods `Curl_cf_*(cf, ...)` work on a specific Curl_cfilter instance. - methods `Curl_conn_cf()` work on/with filter instances at a connection. - rebased and resolved some naming conflicts - hostname validation (und session lookup) on SECONDARY use the same name as on FIRST (again). new debug macros and removing connectdata from function signatures where not needed. adapting schannel for new Curl_read_plain paramter. Closes #9919
60 lines
2.1 KiB
C
60 lines
2.1 KiB
C
#ifndef HEADER_CURL_SOCKS_H
|
|
#define HEADER_CURL_SOCKS_H
|
|
/***************************************************************************
|
|
* _ _ ____ _
|
|
* Project ___| | | | _ \| |
|
|
* / __| | | | |_) | |
|
|
* | (__| |_| | _ <| |___
|
|
* \___|\___/|_| \_\_____|
|
|
*
|
|
* Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
|
|
*
|
|
* This software is licensed as described in the file COPYING, which
|
|
* you should have received as part of this distribution. The terms
|
|
* are also available at https://curl.se/docs/copyright.html.
|
|
*
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
*
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
* KIND, either express or implied.
|
|
*
|
|
* SPDX-License-Identifier: curl
|
|
*
|
|
***************************************************************************/
|
|
|
|
#include "curl_setup.h"
|
|
|
|
#ifdef CURL_DISABLE_PROXY
|
|
#define Curl_SOCKS4(a,b,c,d,e) CURLE_NOT_BUILT_IN
|
|
#define Curl_SOCKS5(a,b,c,d,e,f) CURLE_NOT_BUILT_IN
|
|
#define Curl_SOCKS_getsock(x,y,z) 0
|
|
#else
|
|
/*
|
|
* Helper read-from-socket functions. Does the same as Curl_read() but it
|
|
* blocks until all bytes amount of buffersize will be read. No more, no less.
|
|
*
|
|
* This is STUPID BLOCKING behavior
|
|
*/
|
|
int Curl_blockread_all(struct Curl_easy *data,
|
|
curl_socket_t sockfd,
|
|
char *buf,
|
|
ssize_t buffersize,
|
|
ssize_t *n);
|
|
|
|
#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
|
|
/*
|
|
* This function handles the SOCKS5 GSS-API negotiation and initialization
|
|
*/
|
|
CURLcode Curl_SOCKS5_gssapi_negotiate(int sockindex,
|
|
struct Curl_easy *data);
|
|
#endif
|
|
|
|
CURLcode Curl_conn_socks_proxy_add(struct Curl_easy *data,
|
|
int sockindex);
|
|
|
|
#endif /* CURL_DISABLE_PROXY */
|
|
|
|
#endif /* HEADER_CURL_SOCKS_H */
|