summaryrefslogtreecommitdiffstats
path: root/src/openvpn/manage.h
diff options
context:
space:
mode:
authorHeiko Hund <heiko.hund@sophos.com>2012-07-11 14:16:50 +0200
committerDavid Sommerseth <dazo@users.sourceforge.net>2012-07-19 21:37:54 +0200
commitaf1bf85aee836f2b729c38990028c035b6c69152 (patch)
tree88d0bce58fedade815ef121d2cc597e2df00f6e3 /src/openvpn/manage.h
parentaf417baa93f4ebcc545486cbd9635fbc602ba148 (diff)
downloadopenvpn-af1bf85aee836f2b729c38990028c035b6c69152.tar.gz
openvpn-af1bf85aee836f2b729c38990028c035b6c69152.tar.xz
openvpn-af1bf85aee836f2b729c38990028c035b6c69152.zip
add option --management-query-proxy
Make openvpn query for proxy information through the management interface. This allows GUIs to provide (automatically detected) proxy information on a per connection basis. This new option supersedes the undocumented --http-proxy-fallback option and puts the responsibilty for HTTP proxy fallback handling to the GUI caring for such. Signed-off-by: Heiko Hund <heiko.hund@sophos.com> Reviewed-by: James Yonan <james@openvpn.net> Message-Id: 1342009010-9735-1-git-send-email-heiko.hund@sophos.com URL: http://article.gmane.org/gmane.network.openvpn.devel/6841 Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
Diffstat (limited to 'src/openvpn/manage.h')
-rw-r--r--src/openvpn/manage.h17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/openvpn/manage.h b/src/openvpn/manage.h
index f387c74..28da69f 100644
--- a/src/openvpn/manage.h
+++ b/src/openvpn/manage.h
@@ -171,9 +171,7 @@ struct management_callback
const unsigned long cid,
struct buffer_list *pf_config); /* ownership transferred */
#endif
-#if HTTP_PROXY_FALLBACK
- bool (*http_proxy_fallback_cmd) (void *arg, const char *server, const char *port, const char *flags);
-#endif
+ bool (*proxy_cmd) (void *arg, const char **p);
bool (*remote_cmd) (void *arg, const char **p);
};
@@ -335,6 +333,7 @@ struct management *management_init (void);
#endif
#define MF_UP_DOWN (1<<10)
#define MF_QUERY_REMOTE (1<<11)
+#define MF_QUERY_PROXY (1<<12)
bool management_open (struct management *man,
const char *addr,
@@ -429,6 +428,12 @@ management_query_remote_enabled (const struct management *man)
return BOOL_CAST(man->settings.flags & MF_QUERY_REMOTE);
}
+static inline bool
+management_query_proxy_enabled (const struct management *man)
+{
+ return BOOL_CAST(man->settings.flags & MF_QUERY_PROXY);
+}
+
#ifdef MANAGEMENT_PF
static inline bool
management_enable_pf (const struct management *man)
@@ -554,11 +559,5 @@ management_bytes_server (struct management *man,
#endif /* MANAGEMENT_DEF_AUTH */
-#if HTTP_PROXY_FALLBACK
-
-void management_http_proxy_fallback_notify (struct management *man, const char *type, const char *remote_ip_hint);
-
-#endif /* HTTP_PROXY_FALLBACK */
-
#endif
#endif