--- Merging r4718 through r4752 from branches/v0.5-dhtmods

Added ZeroConf for OSX.
Changes for Relay Support.

Summary of Changes:
libbitdht
----------
 * added Relay Flags to bdNode::setNodeDhtMode()
 * added dropRelayServers() / pingRelayServers() functions for mode switches
 * added utility function:  bdFriendList::findPeersWithFlags()
 * added utility function:  bdSpace::clean_node_flags(uint32_t flags)
 * added RelayMode to ConnectManager.
 * added failedConnection callback when in Server Mode.
 * added incomplete udpproxylayer code. (not compiled)

libretroshare
-------------
 * added Configuration to p3BitDht for storing Relay Settings. (bit Hackish!)
 * added RelayHandler & getRelayReceiver() - to outsource some Relay functions.
 * + RelayHandler_InstallRelayConnection() & RelayHandler_LogFailedProxyAttempt()
 * added RelayServer, Mode and RelayAllowance to external DHT interface.
 * added p3PeerMgr::getGpgId() for ZeroConf usage.
 * updated parts of pqiassist virtual interfaces.
 * added Bandwidth storage to udprelay.
 * modified the way Relay Slots are allocated to match GUI interface.
 * ZeroConf now working on OSX.
 * added ZeroConf to OSX compilation.
 * extended rsDht interface to expose Relay configuration.

retroshare-gui
--------------
 * added Relay configuration panel.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4753 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
drbob 2012-01-06 15:33:51 +00:00
commit ac6f0fcfe4
35 changed files with 3620 additions and 113 deletions

View file

@ -1714,9 +1714,13 @@ RsTurtle *rsTurtle = NULL ;
#include "util/rsdebug.h"
#include "util/rsdir.h"
#include "util/rsrandom.h"
#include "upnp/upnphandler.h"
//#include "dht/opendhtmgr.h"
#ifdef RS_ENABLE_ZEROCONF
#include "zeroconf/p3zeroconf.h"
//#include "zeroconf/p3zcnatassist.h"
#else
#include "upnp/upnphandler.h"
#endif
#include "services/p3disc.h"
#include "services/p3msgservice.h"
@ -1879,7 +1883,6 @@ int RsServer::StartupRetroShare()
// for (std::list<std::string>::iterator sslIdsIt = sslIds.begin(); sslIdsIt != sslIds.end(); sslIdsIt++) {
// mConnMgr->addFriend(*sslIdsIt);
// }
pqiNetAssistFirewall *mUpnpMgr = new upnphandler();
//p3DhtMgr *mDhtMgr = new OpenDHTMgr(ownId, mConnMgr, RsInitConfig::configDir);
/**************************** BITDHT ***********************************/
@ -2168,7 +2171,23 @@ int RsServer::StartupRetroShare()
mNetMgr->addNetListener(mProxyStack);
#endif
#ifdef RS_ENABLE_ZEROCONF
p3ZeroConf *mZeroConf = new p3ZeroConf(
AuthGPG::getAuthGPG()->getGPGOwnId(), ownId,
mLinkMgr, mNetMgr, mPeerMgr);
mNetMgr->addNetAssistConnect(2, mZeroConf);
mNetMgr->addNetListener(mZeroConf);
// Apple's UPnP & NAT-PMP assistance.
//p3zcNatAssist *mZcNatAssist = new p3zcNatAssist();
//mNetMgr->addNetAssistFirewall(2, mZcNatAssist);
#else
// Original UPnP Interface.
pqiNetAssistFirewall *mUpnpMgr = new upnphandler();
mNetMgr->addNetAssistFirewall(1, mUpnpMgr);
#endif
/**************************************************************************/
/* need to Monitor too! */
@ -2211,6 +2230,10 @@ int RsServer::StartupRetroShare()
mConfigMgr->addConfiguration("turtle.cfg", tr);
mConfigMgr->addConfiguration("p3disc.cfg", ad);
#ifdef RS_USE_BITDHT
mConfigMgr->addConfiguration("bitdht.cfg", mBitDht);
#endif
mPluginsManager->addConfigurations(mConfigMgr) ;
ftserver->addConfiguration(mConfigMgr);