diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-01-17 07:54:39 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-01-17 20:30:57 (GMT) |
commit | 093d499945d779cfed92b45e413644834004b0d9 (patch) | |
tree | 537347674b8285295be9f38b1b27f9fe62a40895 /Swiften/Client | |
parent | e3e6e344dbb7df85e5f13eef944285ea2262e980 (diff) | |
download | swift-contrib-093d499945d779cfed92b45e413644834004b0d9.zip swift-contrib-093d499945d779cfed92b45e413644834004b0d9.tar.bz2 |
Allow specifying BOSH and BOSH proxy URLs with names (rather than IPs)
Diffstat (limited to 'Swiften/Client')
-rw-r--r-- | Swiften/Client/ClientOptions.h | 2 | ||||
-rw-r--r-- | Swiften/Client/CoreClient.cpp | 15 |
2 files changed, 8 insertions, 9 deletions
diff --git a/Swiften/Client/ClientOptions.h b/Swiften/Client/ClientOptions.h index 06bf947..fbec272 100644 --- a/Swiften/Client/ClientOptions.h +++ b/Swiften/Client/ClientOptions.h @@ -67,7 +67,6 @@ namespace Swift { /** * If non-empty, use BOSH instead of direct TCP, with the given URL. - * The host currently needs to be specified by IP, rather than hostname. * Default: empty (no BOSH) */ URL boshURL; @@ -75,7 +74,6 @@ namespace Swift { /** * If non-empty, BOSH connections will try to connect over this HTTP CONNECT * proxy instead of directly. - * Must be specified by IP, rather than hostname. * Default: empty (no proxy) */ URL boshHTTPConnectProxyURL; diff --git a/Swiften/Client/CoreClient.cpp b/Swiften/Client/CoreClient.cpp index 49fb9fa..de12fb7 100644 --- a/Swiften/Client/CoreClient.cpp +++ b/Swiften/Client/CoreClient.cpp @@ -67,7 +67,7 @@ void CoreClient::connect(const std::string& host) { proxyConnectionFactories.push_back(new SOCKS5ProxiedConnectionFactory(networkFactories->getConnectionFactory(), networkFactories->getProxyProvider()->getSOCKS5Proxy())); } if(networkFactories->getProxyProvider()->getHTTPConnectProxy().isValid()) { - proxyConnectionFactories.push_back(new HTTPConnectProxiedConnectionFactory(networkFactories->getConnectionFactory(), networkFactories->getProxyProvider()->getHTTPConnectProxy())); + proxyConnectionFactories.push_back(new HTTPConnectProxiedConnectionFactory(networkFactories->getDomainNameResolver(), networkFactories->getConnectionFactory(), networkFactories->getTimerFactory(), networkFactories->getEventLoop(), networkFactories->getProxyProvider()->getHTTPConnectProxy().getAddress().toString(), networkFactories->getProxyProvider()->getHTTPConnectProxy().getPort())); } std::vector<ConnectionFactory*> connectionFactories(proxyConnectionFactories); if (options.boshURL.empty()) { @@ -87,13 +87,14 @@ void CoreClient::connect(const std::string& host) { getPayloadParserFactories(), getPayloadSerializers(), networkFactories->getConnectionFactory(), - networkFactories->getTLSContextFactory(), - networkFactories->getTimerFactory(), + networkFactories->getTLSContextFactory(), + networkFactories->getTimerFactory(), networkFactories->getXMLParserFactory(), - networkFactories->getEventLoop(), - host, - options.boshHTTPConnectProxyURL, - options.boshHTTPConnectProxyAuthID, + networkFactories->getEventLoop(), + networkFactories->getDomainNameResolver(), + host, + options.boshHTTPConnectProxyURL, + options.boshHTTPConnectProxyAuthID, options.boshHTTPConnectProxyAuthPassword)); sessionStream_->onDataRead.connect(boost::bind(&CoreClient::handleDataRead, this, _1)); sessionStream_->onDataWritten.connect(boost::bind(&CoreClient::handleDataWritten, this, _1)); |