mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-25 09:11:06 -04:00
Add the tunneling connection. Warning, encryption is not implemented yet for tunnel connection, use only for testing.
Redesign the udp connection Remove the rsiface duplicates from retroshare-gui. Add some randomness in timings for connect manager Merge branch 'connectionTunneling' Conflicts: libretroshare/src/libretroshare.pro libretroshare/src/pqi/p3connmgr.cc retroshare-gui/src/RetroShare.pro retroshare-gui/src/rsiface/rsfiles.h retroshare-gui/src/rsiface/rstypes.h git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1867 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1d567a7faa
commit
fdb3673ce2
56 changed files with 2420 additions and 3394 deletions
|
@ -437,7 +437,13 @@ bool p3Peers::getPeerDetails(std::string id, RsPeerDetails &d)
|
|||
std::ostringstream autostr;
|
||||
if (pcs.inConnAttempt)
|
||||
{
|
||||
autostr << "Trying " << inet_ntoa(pcs.currentConnAddrAttempt.addr.sin_addr) << ":" << ntohs(pcs.currentConnAddrAttempt.addr.sin_port);
|
||||
if (pcs.currentConnAddrAttempt.type & RS_NET_CONN_TUNNEL) {
|
||||
autostr << "Trying tunnel connection";
|
||||
} else if (pcs.currentConnAddrAttempt.type & RS_NET_CONN_TCP_ALL) {
|
||||
autostr << "Trying TCP : " << inet_ntoa(pcs.currentConnAddrAttempt.addr.sin_addr) << ":" << ntohs(pcs.currentConnAddrAttempt.addr.sin_port);
|
||||
} else if (pcs.currentConnAddrAttempt.type & RS_NET_CONN_UDP_ALL) {
|
||||
autostr << "Trying UDP : " << inet_ntoa(pcs.currentConnAddrAttempt.addr.sin_addr) << ":" << ntohs(pcs.currentConnAddrAttempt.addr.sin_port);
|
||||
}
|
||||
}
|
||||
else if (pcs.state & RS_PEER_S_CONNECTED)
|
||||
{
|
||||
|
@ -449,7 +455,11 @@ bool p3Peers::getPeerDetails(std::string id, RsPeerDetails &d)
|
|||
{
|
||||
autostr << "Connected: UDP";
|
||||
}
|
||||
else
|
||||
else if (pcs.connecttype == RS_NET_CONN_TUNNEL)
|
||||
{
|
||||
autostr << "Connected: Tunnel";
|
||||
}
|
||||
else
|
||||
{
|
||||
autostr << "Connected: Unknown";
|
||||
}
|
||||
|
@ -600,11 +610,24 @@ void p3Peers::allowServerIPDetermination(bool b)
|
|||
{
|
||||
mConnMgr->setIPServersEnabled(b) ;
|
||||
}
|
||||
bool p3Peers::getAllowServerIPDetermination()
|
||||
|
||||
void p3Peers::allowTunnelConnection(bool b)
|
||||
{
|
||||
std::cerr << "p3Peers::allowTunnelConnection() set tunnel to : " << b << std::endl;
|
||||
mConnMgr->setTunnelConnection(b) ;
|
||||
}
|
||||
|
||||
bool p3Peers::getAllowServerIPDetermination()
|
||||
{
|
||||
return mConnMgr->getIPServersEnabled() ;
|
||||
}
|
||||
|
||||
bool p3Peers::getAllowTunnelConnection()
|
||||
{
|
||||
std::cerr << "p3Peers::getAllowTunnelConnection() tunnel is : " << mConnMgr->getTunnelConnection() << std::endl;
|
||||
return mConnMgr->getTunnelConnection() ;
|
||||
}
|
||||
|
||||
bool p3Peers::setLocalAddress(std::string id, std::string addr_str, uint16_t port)
|
||||
{
|
||||
#ifdef P3PEERS_DEBUG
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue