OpenVPN
Data Structures | Macros | Functions
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_options_simple
 
struct  http_proxy_info
 

Macros

#define HTTP_AUTH_NONE   0
 
#define HTTP_AUTH_BASIC   1
 
#define HTTP_AUTH_DIGEST   2
 
#define HTTP_AUTH_NTLM   3
 
#define HTTP_AUTH_NTLM2   4
 
#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_optionsinit_http_proxy_options_once (struct http_proxy_options **hpo, struct gc_arena *gc)
 
struct http_proxy_infohttp_proxy_new (const struct http_proxy_options *o)
 
void http_proxy_close (struct http_proxy_info *hp)
 
bool establish_http_proxy_passthru (struct http_proxy_info *p, socket_descriptor_t sd, const char *host, const char *port, struct event_timeout *server_poll_timeout, struct buffer *lookahead, volatile int *signal_received)
 
uint8_tmake_base64_string2 (const uint8_t *str, int str_len, struct gc_arena *gc)
 
uint8_tmake_base64_string (const uint8_t *str, struct gc_arena *gc)
 

Macro Definition Documentation

◆ HTTP_AUTH_BASIC

#define HTTP_AUTH_BASIC   1

Definition at line 32 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 33 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 36 of file proxy.h.

◆ HTTP_AUTH_NONE

#define HTTP_AUTH_NONE   0

Definition at line 31 of file proxy.h.

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

◆ HTTP_AUTH_NTLM

#define HTTP_AUTH_NTLM   3

Definition at line 34 of file proxy.h.

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

◆ HTTP_AUTH_NTLM2

#define HTTP_AUTH_NTLM2   4

Definition at line 35 of file proxy.h.

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

◆ 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 49 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 48 of file proxy.h.

Function Documentation

◆ establish_http_proxy_passthru()

bool establish_http_proxy_passthru ( struct http_proxy_info p,
socket_descriptor_t  sd,
const char *  host,
const char *  port,
struct event_timeout server_poll_timeout,
struct buffer lookahead,
volatile int *  signal_received 
)

◆ http_proxy_close()

void http_proxy_close ( struct http_proxy_info hp)

Definition at line 557 of file proxy.c.

References free.

Referenced by uninit_proxy_dowork().

◆ http_proxy_new()

struct http_proxy_info* http_proxy_new ( const struct http_proxy_options o)

◆ 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 48 of file proxy.c.

References ALLOC_OBJ_CLEAR_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 240 of file proxy.c.

References 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 
)