SharkSSL C/C++ Reference
TLS, cryptography, certificates, and PSA integration
proxy.h
Go to the documentation of this file.
1/*
2 * ____ _________ __ _
3 * / __ \___ ____ _/ /_ __(_)___ ___ ___ / / ____ ____ _(_)____
4 * / /_/ / _ \/ __ `/ / / / / / __ `__ \/ _ \/ / / __ \/ __ `/ / ___/
5 * / _, _/ __/ /_/ / / / / / / / / / / / __/ /___/ /_/ / /_/ / / /__
6 * /_/ |_|\___/\__,_/_/ /_/ /_/_/ /_/ /_/\___/_____/\____/\__, /_/\___/
7 * /____/
8 *
9 * SharkSSL Embedded SSL/TLS Stack
10 ****************************************************************************
11 * PROGRAM MODULE
12 *
13 * $Id: proxy.h 6825 2026-11-10 21:17:44Z wini $
14 *
15 * COPYRIGHT: Real Time Logic LLC, 2016 - 2026
16 *
17 * This software is copyrighted by and is the sole property of Real
18 * Time Logic LLC. All rights, title, ownership, or other interests in
19 * the software remain the property of Real Time Logic LLC. This
20 * software may only be used in accordance with the terms and
21 * conditions stipulated in the corresponding license agreement under
22 * which the software has been supplied. Any unauthorized use,
23 * duplication, transmission, distribution, or disclosure of this
24 * software is expressly forbidden.
25 *
26 * This Copyright notice may not be removed or modified without prior
27 * written consent of Real Time Logic LLC.
28 *
29 * Real Time Logic LLC. reserves the right to modify this software
30 * without notice.
31 *
32 * http://realtimelogic.com
33 * http://sharkssl.com
34 ****************************************************************************
35 *
36 */
37
38#ifndef _proxy_h
39#define _proxy_h
40
41#include "SharkSSL.h"
42
72#define E_PROXY_AUTH -1000
73#define E_PROXY_GENERAL -1001
74#define E_PROXY_NOT_ALLOWED -1002
75#define E_PROXY_NETWORK -1003
76#define E_PROXY_HOST -1004
77#define E_PROXY_REFUSED -1005
78#define E_PROXY_TTL -1006
79#define E_PROXY_COMMAND_NOT_SUP -1007
80#define E_PROXY_ADDRESS_NOT_SUP -1008
81#define E_PROXY_NOT_COMPATIBLE -1009
82#define E_PROXY_UNKNOWN -1010
83#define E_PROXY_CLOSED -1011
84#define E_PROXY_CANNOTCONNECT -1012
86#ifdef __cplusplus
87extern "C" {
88#endif
89
90struct Proxy;
92struct ProxyArgs;
93
99typedef int (*ProxyConnect)(struct Proxy* o, struct ProxyArgs* args);
100
102typedef struct Proxy
103{
105 const char* proxyUserPass;
106 const char* proxyName;
109
121void Proxy_constructor(Proxy* o, const char* proxyName,
122 U16 proxyPortNo, const char* proxyUserPass,
123 int socks);
124
125#ifdef __cplusplus
126}
127#endif
128
130#endif
TLS objects, certificate/session operations, and public-key interfaces.
void Proxy_constructor(Proxy *o, const char *proxyName, U16 proxyPortNo, const char *proxyUserPass, int socks)
Initialize settings without allocating memory or opening a connection.
struct Proxy Proxy
Caller-owned proxy settings with borrowed string pointers.
int(* ProxyConnect)(struct Proxy *o, struct ProxyArgs *args)
Internal connector selected by Proxy_constructor; applications do not call it.
Definition: proxy.h:99
Caller-owned proxy settings with borrowed string pointers.
Definition: proxy.h:103
U16 proxyPortNo
Proxy TCP port, 1 through 65535.
Definition: proxy.h:107
const char * proxyName
Required borrowed NUL-terminated proxy hostname/address.
Definition: proxy.h:106
const char * proxyUserPass
Borrowed NUL-terminated user:password, or NULL.
Definition: proxy.h:105
ProxyConnect connect
Connector set by the constructor; do not replace it.
Definition: proxy.h:104