summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 92c47ef7d20..f5a61cb9995 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1059,9 +1059,13 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
int defaultIPv6 = 1; // IPv6 enabled by default.
if(!proxyHost.empty())
{
+#ifdef ICE_OS_WINRT
+ throw InitializationException(__FILE__, __LINE__, "SOCKS proxy not supported in WinRT");
+#else
int proxyPort = _initData.properties->getPropertyAsIntWithDefault("Ice.SOCKSProxyPort", 1080);
_networkProxy = new SOCKSNetworkProxy(proxyHost, proxyPort);
defaultIPv6 = 0; // IPv6 is not supported with SOCKS
+#endif
}
bool ipv4 = _initData.properties->getPropertyAsIntWithDefault("Ice.IPv4", 1) > 0;
@@ -1084,10 +1088,12 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi
}
_preferIPv6 = _initData.properties->getPropertyAsInt("Ice.PreferIPv6Address") > 0;
+#ifndef ICE_OS_WINRT
if(ipv6 && SOCKSNetworkProxyPtr::dynamicCast(_networkProxy))
{
throw InitializationException(__FILE__, __LINE__, "IPv6 is not supported with SOCKS4 proxies");
}
+#endif
_endpointFactoryManager = new EndpointFactoryManager(this);
#ifndef ICE_OS_WINRT