OpenVPN
proxy.h File Reference
#include "buffer.h"
#include "misc.h"
Include dependency graph for proxy.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  http_custom_header
struct  http_proxy_options
struct  http_proxy_info

Macros

#define HTTP_AUTH_NONE   0
#define HTTP_AUTH_BASIC   1
#define HTTP_AUTH_DIGEST   2
#define HTTP_AUTH_N   5 /* number of HTTP_AUTH methods */
#define MAX_CUSTOM_HTTP_HEADER   10
#define PAR_NO   0 /* don't support any auth retries */
#define PAR_ALL   1 /* allow all proxy auth protocols */
#define PAR_NCT   2 /* disable cleartext proxy auth protocols */

Functions

struct http_proxy_options * init_http_proxy_options_once (struct http_proxy_options **hpo, struct gc_arena *gc)
struct http_proxy_info * http_proxy_new (const struct http_proxy_options *o)
void http_proxy_close (struct http_proxy_info *hp)
bool proxy_recv_char (uint8_t *c, const char *name, socket_descriptor_t sd, struct timeval *timeout, volatile int *signal_received)
bool proxy_send (socket_descriptor_t sd, const void *buf, size_t buf_len)
bool establish_http_proxy_passthru (struct http_proxy_info *p, socket_descriptor_t sd, const char *host, const char *port, const struct event_timeout *server_poll_timeout, struct buffer *lookahead, struct signal_info *sig_info)
uint8_t * make_base64_string2 (const uint8_t *str, int str_len, struct gc_arena *gc)
uint8_t * make_base64_string (const uint8_t *str, struct gc_arena *gc)

Macro Definition Documentation

◆ HTTP_AUTH_BASIC

#define HTTP_AUTH_BASIC   1

Definition at line 31 of file proxy.h.

Referenced by establish_http_proxy_passthru(), get_proxy_authenticate(), and http_proxy_new().

◆ HTTP_AUTH_DIGEST

#define HTTP_AUTH_DIGEST   2

Definition at line 32 of file proxy.h.

Referenced by establish_http_proxy_passthru(), and get_proxy_authenticate().

◆ HTTP_AUTH_N

#define HTTP_AUTH_N   5 /* number of HTTP_AUTH methods */

Definition at line 35 of file proxy.h.

◆ HTTP_AUTH_NONE

#define HTTP_AUTH_NONE   0

Definition at line 30 of file proxy.h.

Referenced by establish_http_proxy_passthru(), get_proxy_authenticate(), and http_proxy_new().

◆ MAX_CUSTOM_HTTP_HEADER

#define MAX_CUSTOM_HTTP_HEADER   10

Definition at line 43 of file proxy.h.

Referenced by add_option(), add_proxy_headers(), and show_http_proxy_options().

◆ PAR_ALL

#define PAR_ALL   1 /* allow all proxy auth protocols */

Definition at line 50 of file proxy.h.

Referenced by add_option(), management_callback_proxy_cmd(), and parse_http_proxy_override().

◆ PAR_NCT

#define PAR_NCT   2 /* disable cleartext proxy auth protocols */

◆ PAR_NO

#define PAR_NO   0 /* don't support any auth retries */

Definition at line 49 of file proxy.h.

Function Documentation

◆ establish_http_proxy_passthru()

◆ http_proxy_close()

void http_proxy_close ( struct http_proxy_info * hp)

Definition at line 524 of file proxy.c.

Referenced by uninit_proxy_dowork().

◆ http_proxy_new()

◆ init_http_proxy_options_once()

struct http_proxy_options * init_http_proxy_options_once ( struct http_proxy_options ** hpo,
struct gc_arena * gc )

Definition at line 44 of file proxy.c.

References ALLOC_OBJ_CLEAR_GC, and gc.

Referenced by add_option(), and management_callback_proxy_cmd().

◆ make_base64_string()

uint8_t * make_base64_string ( const uint8_t * str,
struct gc_arena * gc )

Definition at line 229 of file proxy.c.

References gc, and make_base64_string2().

Referenced by username_password_as_base64().

◆ make_base64_string2()

uint8_t * make_base64_string2 ( const uint8_t * str,
int str_len,
struct gc_arena * gc )

Definition at line 218 of file proxy.c.

References ASSERT, gc, openvpn_base64_encode(), and string_alloc().

Referenced by establish_http_proxy_passthru(), and make_base64_string().

◆ proxy_recv_char()

bool proxy_recv_char ( uint8_t * c,
const char * name,
socket_descriptor_t sd,
struct timeval * timeout,
volatile int * signal_received )

◆ proxy_send()

bool proxy_send ( socket_descriptor_t sd,
const void * buf,
size_t buf_len )