2011-05-24 21:42:02 +08:00
|
|
|
#ifndef HEADER_CURL_HTTP_PROXY_H
|
|
|
|
#define HEADER_CURL_HTTP_PROXY_H
|
2011-04-04 22:24:37 +08:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2023-01-02 20:51:48 +08:00
|
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2011-04-04 22:24:37 +08:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2011-04-04 22:24:37 +08:00
|
|
|
*
|
|
|
|
* 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.
|
|
|
|
*
|
2022-05-17 17:16:50 +08:00
|
|
|
* SPDX-License-Identifier: curl
|
|
|
|
*
|
2011-04-04 22:24:37 +08:00
|
|
|
***************************************************************************/
|
2012-03-22 06:22:39 +08:00
|
|
|
|
2017-06-18 21:18:15 +08:00
|
|
|
#include "curl_setup.h"
|
|
|
|
|
2023-04-06 15:54:57 +08:00
|
|
|
#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
|
|
|
|
|
|
|
|
#include "urldata.h"
|
2011-04-04 22:24:37 +08:00
|
|
|
|
2023-09-06 20:43:22 +08:00
|
|
|
CURLcode Curl_http_proxy_get_destination(struct Curl_cfilter *cf,
|
|
|
|
const char **phostname,
|
|
|
|
int *pport, bool *pipv6_ip);
|
|
|
|
|
|
|
|
CURLcode Curl_http_proxy_create_CONNECT(struct httpreq **preq,
|
|
|
|
struct Curl_cfilter *cf,
|
|
|
|
struct Curl_easy *data,
|
|
|
|
int http_version_major);
|
|
|
|
|
2011-04-04 22:24:37 +08:00
|
|
|
/* Default proxy timeout in milliseconds */
|
|
|
|
#define PROXY_TIMEOUT (3600*1000)
|
|
|
|
|
2023-04-06 15:54:57 +08:00
|
|
|
void Curl_cf_http_proxy_get_host(struct Curl_cfilter *cf,
|
|
|
|
struct Curl_easy *data,
|
|
|
|
const char **phost,
|
|
|
|
const char **pdisplay_host,
|
|
|
|
int *pport);
|
2022-12-30 16:14:55 +08:00
|
|
|
|
|
|
|
CURLcode Curl_cf_http_proxy_insert_after(struct Curl_cfilter *cf_at,
|
|
|
|
struct Curl_easy *data);
|
|
|
|
|
2023-01-11 17:30:42 +08:00
|
|
|
extern struct Curl_cftype Curl_cft_http_proxy;
|
|
|
|
|
2023-04-06 15:54:57 +08:00
|
|
|
#endif /* !CURL_DISABLE_PROXY && !CURL_DISABLE_HTTP */
|
2022-11-14 23:44:12 +08:00
|
|
|
|
2023-04-06 20:33:05 +08:00
|
|
|
#define IS_HTTPS_PROXY(t) (((t) == CURLPROXY_HTTPS) || \
|
|
|
|
((t) == CURLPROXY_HTTPS2))
|
|
|
|
|
2011-05-24 21:42:02 +08:00
|
|
|
#endif /* HEADER_CURL_HTTP_PROXY_H */
|