From 3a2bbdb05ca6a6996e424c9fb225cb0d53804125 Mon Sep 17 00:00:00 2001 From: Alberto Gonzalez Iniesta Date: Tue, 27 Dec 2016 18:25:47 +0100 Subject: New upstream version 2.4.0 --- src/openvpn/proxy.h | 79 +++++++++++++++++++++++++++-------------------------- 1 file changed, 40 insertions(+), 39 deletions(-) (limited to 'src/openvpn/proxy.h') diff --git a/src/openvpn/proxy.h b/src/openvpn/proxy.h index 7d2581c..c20a676 100644 --- a/src/openvpn/proxy.h +++ b/src/openvpn/proxy.h @@ -5,7 +5,7 @@ * packet encryption, packet authentication, and * packet compression. * - * Copyright (C) 2002-2010 OpenVPN Technologies, Inc. + * Copyright (C) 2002-2017 OpenVPN Technologies, Inc. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 @@ -37,59 +37,60 @@ #define HTTP_AUTH_N 5 /* number of HTTP_AUTH methods */ struct http_custom_header { - const char *name; - const char *content; + const char *name; + const char *content; }; #define MAX_CUSTOM_HTTP_HEADER 10 struct http_proxy_options { - const char *server; - const char *port; - -# 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 */ - int auth_retry; - - const char *auth_method_string; - const char *auth_file; - const char *http_version; - const char *user_agent; - struct http_custom_header custom_headers[MAX_CUSTOM_HTTP_HEADER]; - bool inline_creds; + const char *server; + const char *port; + +#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 */ + int auth_retry; + + const char *auth_method_string; + const char *auth_file; + const char *http_version; + const char *user_agent; + struct http_custom_header custom_headers[MAX_CUSTOM_HTTP_HEADER]; + bool inline_creds; }; struct http_proxy_options_simple { - const char *server; - const char *port; - int auth_retry; + const char *server; + const char *port; + int auth_retry; }; struct http_proxy_info { - bool defined; - int auth_method; - struct http_proxy_options options; - struct user_pass up; - char *proxy_authenticate; - bool queried_creds; + bool defined; + int auth_method; + struct http_proxy_options options; + struct user_pass up; + char *proxy_authenticate; + bool queried_creds; }; -struct http_proxy_options *init_http_proxy_options_once (struct http_proxy_options **hpo, - struct gc_arena *gc); +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); -struct http_proxy_info *http_proxy_new (const struct http_proxy_options *o); +void http_proxy_close(struct http_proxy_info *hp); -void http_proxy_close (struct http_proxy_info *hp); +bool establish_http_proxy_passthru(struct http_proxy_info *p, + socket_descriptor_t sd, /* already open to proxy */ + const char *host, /* openvpn server remote */ + const char *port, /* openvpn server port */ + struct event_timeout *server_poll_timeout, + struct buffer *lookahead, + volatile int *signal_received); -bool establish_http_proxy_passthru (struct http_proxy_info *p, - socket_descriptor_t sd, /* already open to proxy */ - const char *host, /* openvpn server remote */ - const char *port, /* openvpn server port */ - struct event_timeout* server_poll_timeout, - struct buffer *lookahead, - volatile int *signal_received); +uint8_t *make_base64_string2(const uint8_t *str, int str_len, struct gc_arena *gc); -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); +uint8_t *make_base64_string(const uint8_t *str, struct gc_arena *gc); #endif /* PROXY_H */ -- cgit v1.2.3