summaryrefslogtreecommitdiffstats
path: root/options.h
diff options
context:
space:
mode:
authorJames Yonan <james@openvpn.net>2010-05-24 22:51:16 +0000
committerJames Yonan <james@openvpn.net>2010-05-24 22:51:16 +0000
commit3cf6c9328250061600b78c8a7deb0edc850e739b (patch)
treebc6032117107a8e801e8203c40b1d9533b657597 /options.h
parent484e9d36d09e3494a6d964c588c353f650a61b5f (diff)
downloadopenvpn-3cf6c9328250061600b78c8a7deb0edc850e739b.tar.gz
openvpn-3cf6c9328250061600b78c8a7deb0edc850e739b.tar.xz
openvpn-3cf6c9328250061600b78c8a7deb0edc850e739b.zip
Implemented http-proxy-override and http-proxy-fallback directives to make it
easier for OpenVPN client UIs to start a pre-existing client config file with proxy options, or to adaptively fall back to a proxy connection if a direct connection fails. git-svn-id: http://svn.openvpn.net/projects/openvpn/branches/BETA21/openvpn@5652 e7ae566f-a301-0410-adde-c780ea21d3b5
Diffstat (limited to 'options.h')
-rw-r--r--options.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/options.h b/options.h
index ebff532..a000ccb 100644
--- a/options.h
+++ b/options.h
@@ -97,6 +97,14 @@ struct connection_entry
int socks_proxy_port;
bool socks_proxy_retry;
#endif
+
+# define CE_DISABLED (1<<0)
+#if HTTP_PROXY_FALLBACK
+# define CE_HTTP_PROXY_FALLBACK (1<<1)
+ time_t ce_http_proxy_fallback_timestamp; /* time when fallback http_proxy_options was last updated */
+#endif
+
+ unsigned int flags;
};
struct remote_entry
@@ -114,6 +122,7 @@ struct connection_list
{
int len;
int current;
+ int n_cycles;
bool no_advance;
struct connection_entry *array[CONNECTION_LIST_SIZE];
};
@@ -126,6 +135,14 @@ struct remote_list
#endif
+#if HTTP_PROXY_FALLBACK
+struct hpo_store
+{
+ struct http_proxy_options hpo;
+ char server[80];
+};
+#endif
+
/* Command line options */
struct options
{
@@ -162,14 +179,22 @@ struct options
struct connection_entry ce;
#ifdef ENABLE_CONNECTION
+ char *remote_ip_hint;
struct connection_list *connection_list;
struct remote_list *remote_list;
+ bool force_connection_list;
#endif
#ifdef GENERAL_PROXY_SUPPORT
struct auto_proxy_info *auto_proxy_info;
#endif
+#if HTTP_PROXY_FALLBACK
+ bool http_proxy_fallback;
+ struct http_proxy_options *http_proxy_override;
+ struct hpo_store *hpo_store; /* used to store dynamic proxy info given by management interface */
+#endif
+
bool remote_random;
const char *ipchange;
const char *dev;
@@ -710,4 +735,15 @@ connection_list_set_no_advance (struct options *o)
#endif
}
+#if HTTP_PROXY_FALLBACK
+
+struct http_proxy_options *
+parse_http_proxy_fallback (struct context *c,
+ const char *server,
+ const char *port,
+ const char *flags,
+ const int msglevel);
+
+#endif /* HTTP_PROXY_FALLBACK */
+
#endif