diff --git a/proxy/config.php b/proxy/config.php
index 5c3219a..eeda1fc 100644
--- a/proxy/config.php
+++ b/proxy/config.php
@@ -38,6 +38,9 @@ $mail_subscription_user_key = NULL;
// CAREFUL: only enable temporarily on debug systems. Will log all queries to given PUBLIC file
$debug = NULL; //'debug.log';
+// Local network interface or IP to be used for the relayed query
+// This is usefull in some VPN configurations (see CURLOPT_INTERFACE)
+$target_interface = NULL;
/****************************************************************
** File Caching Options **
diff --git a/proxy/file.php b/proxy/file.php
index ae3775e..36684dd 100644
--- a/proxy/file.php
+++ b/proxy/file.php
@@ -77,6 +77,9 @@ curl_setopt($curlSession, CURLOPT_HEADER, 1);
curl_setopt($curlSession, CURLOPT_RETURNTRANSFER,1);
curl_setopt($curlSession, CURLOPT_TIMEOUT, 30);
curl_setopt($curlSession, CURLOPT_SSL_VERIFYHOST, 1);
+if (!empty($target_interface)) {
+ curl_setopt($curlSession, CURLOPT_INTERFACE, $target_interface);
+}
if (file_exists(dirname(__FILE__).'/target.pem')) {
curl_setopt($curlSession, CURLOPT_CAINFO, dirname(__FILE__).'/target.pem');
}
diff --git a/proxy/proxy.php b/proxy/proxy.php
index 819a3bf..1b2f87f 100644
--- a/proxy/proxy.php
+++ b/proxy/proxy.php
@@ -8,7 +8,7 @@
+---------------------------------------------------------*/
require_once "config.php";
-$civiproxy_version = '0.3.1';
+$civiproxy_version = '0.3.2';
$civiproxy_logo = "
";
/**
@@ -21,6 +21,7 @@ $civiproxy_logo = "