summaryrefslogtreecommitdiff
path: root/indra/newview/llxmlrpctransaction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llxmlrpctransaction.cpp')
-rw-r--r--indra/newview/llxmlrpctransaction.cpp27
1 files changed, 19 insertions, 8 deletions
diff --git a/indra/newview/llxmlrpctransaction.cpp b/indra/newview/llxmlrpctransaction.cpp
index 257884d921..ef6763a5d1 100644
--- a/indra/newview/llxmlrpctransaction.cpp
+++ b/indra/newview/llxmlrpctransaction.cpp
@@ -41,6 +41,8 @@
#include "llappviewer.h"
#include "lltrans.h"
+#include "llproxy.h"
+
// Static instance of LLXMLRPCListener declared here so that every time we
// bring in this code, we instantiate a listener. If we put the static
// instance of LLXMLRPCListener into llxmlrpclistener.cpp, the linker would
@@ -307,18 +309,27 @@ void LLXMLRPCTransaction::Impl::init(XMLRPC_REQUEST request, bool useGzip)
}
mErrorCert = NULL;
- if (gSavedSettings.getBOOL("BrowserProxyEnabled"))
+ if (LLProxy::getInstance()->isHTTPProxyEnabled())
{
- mProxyAddress = gSavedSettings.getString("BrowserProxyAddress");
- S32 port = gSavedSettings.getS32 ( "BrowserProxyPort" );
-
- // tell curl about the settings
- mCurlRequest->setoptString(CURLOPT_PROXY, mProxyAddress);
+ std::string address = LLProxy::getInstance()->getHTTPProxy().getIPString();
+ U16 port = LLProxy::getInstance()->getHTTPProxy().getPort();
+ mCurlRequest->setoptString(CURLOPT_PROXY, address.c_str());
mCurlRequest->setopt(CURLOPT_PROXYPORT, port);
- mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ if (LLProxy::getInstance()->getHTTPProxyType() == LLPROXY_SOCKS)
+ {
+ mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_SOCKS5);
+ if(LLProxy::getInstance()->getSelectedAuthMethod()==METHOD_PASSWORD)
+ {
+ mCurlRequest->setoptString(CURLOPT_PROXYUSERPWD,LLProxy::getInstance()->getProxyUserPwdCURL());
+ }
+ }
+ else
+ {
+ mCurlRequest->setopt(CURLOPT_PROXYTYPE, CURLPROXY_HTTP);
+ }
}
-// mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // usefull for debugging
+// mCurlRequest->setopt(CURLOPT_VERBOSE, 1); // useful for debugging
mCurlRequest->setopt(CURLOPT_NOSIGNAL, 1);
mCurlRequest->setWriteCallback(&curlDownloadCallback, (void*)this);
BOOL vefifySSLCert = !gSavedSettings.getBOOL("NoVerifySSLCert");