mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
disabled outgoing normal connections - if hidden node.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6730 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1d6f99de0d
commit
5322040d29
@ -1478,6 +1478,13 @@ bool p3LinkMgrIMPL::tryConnectUDP(const std::string &id, struct sockaddr_in &r
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if (mPeerMgr->isHidden())
|
||||
{
|
||||
std::cerr << "p3LinkMgrIMPL::tryConnectUDP() isHidden(): no connection attempts for : " << id;
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
RsStackMutex stack(mLinkMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
||||
@ -1617,6 +1624,12 @@ bool p3LinkMgrIMPL::retryConnectTCP(const std::string &id)
|
||||
return false;
|
||||
}
|
||||
|
||||
if (mPeerMgr->isHidden())
|
||||
{
|
||||
std::cerr << "p3LinkMgrIMPL::retryConnectTCP() isHidden(): no connection attempts for : " << id;
|
||||
std::cerr << std::endl;
|
||||
return false;
|
||||
}
|
||||
|
||||
struct sockaddr_in lAddr;
|
||||
struct sockaddr_in eAddr;
|
||||
|
@ -308,6 +308,13 @@ bool p3PeerMgrIMPL::getGpgId(const std::string &ssl_id, std::string &gpgId)
|
||||
|
||||
/**** HIDDEN STUFF ****/
|
||||
|
||||
bool p3PeerMgrIMPL::isHidden()
|
||||
{
|
||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||
return mOwnState.hiddenNode;
|
||||
}
|
||||
|
||||
|
||||
bool p3PeerMgrIMPL::isHiddenPeer(const std::string &ssl_id)
|
||||
{
|
||||
RsStackMutex stack(mPeerMtx); /****** STACK LOCK MUTEX *******/
|
||||
|
@ -197,6 +197,7 @@ virtual bool getGpgId(const std::string &sslId, std::string &gpgId) = 0;
|
||||
virtual uint32_t getConnectionType(const std::string &sslId) = 0;
|
||||
|
||||
virtual bool setProxyServerAddress(const struct sockaddr_in &proxy_addr) = 0;
|
||||
virtual bool isHidden() = 0;
|
||||
virtual bool isHiddenPeer(const std::string &ssl_id) = 0;
|
||||
virtual bool getProxyAddress(const std::string &ssl_id, struct sockaddr_in &proxy_addr, std::string &domain_addr, uint16_t &domain_port) = 0;
|
||||
|
||||
@ -293,6 +294,7 @@ virtual bool getGpgId(const std::string &sslId, std::string &gpgId);
|
||||
virtual uint32_t getConnectionType(const std::string &sslId);
|
||||
|
||||
virtual bool setProxyServerAddress(const struct sockaddr_in &proxy_addr);
|
||||
virtual bool isHidden();
|
||||
virtual bool isHiddenPeer(const std::string &ssl_id);
|
||||
virtual bool getProxyAddress(const std::string &ssl_id, struct sockaddr_in &proxy_addr, std::string &domain_addr, uint16_t &domain_port);
|
||||
|
||||
|
@ -40,6 +40,8 @@
|
||||
|
||||
const int pqisslproxyzone = 3517;
|
||||
|
||||
#define PROXY_DEBUG 1
|
||||
|
||||
#define PROXY_STATE_FAILED 0
|
||||
#define PROXY_STATE_INIT 1
|
||||
#define PROXY_STATE_WAITING_METHOD_RESPONSE 2
|
||||
|
Loading…
Reference in New Issue
Block a user