mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-14 12:02:29 -04:00
Added Exclusive Proxy Lock for DETERMINISTIC SYM Nats.
* tweaked time periods as these type of connections take longer. * added NatHoleType() to ConnectStateBox logic - as its required for ProxyPort Determination. * added ConnectStateBox::getNetState() so we can work out if in ExclusiveNat mode. * added ExclusiveLock checks at Connection Initiation / Proxy Connection Auth & Connection Ends. * added Simulation of Symmetric / Exclusive Nat to UdpStunner. * exported ExclusiveProxyLock for GUI display. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4457 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
a5c77d02e7
commit
181ad06e33
9 changed files with 338 additions and 78 deletions
|
@ -84,10 +84,12 @@ virtual ~UdpStunner() { return; }
|
|||
#ifdef UDPSTUN_ALLOW_LOCALNET
|
||||
// For Local Testing Mode.
|
||||
void SetAcceptLocalNet();
|
||||
void SimExclusiveNat();
|
||||
void SimSymmetricNat();
|
||||
#endif
|
||||
|
||||
int setExclusiveMode(); /* returns seconds since last send/recv */
|
||||
int cancelExclusiveMode();
|
||||
int grabExclusiveMode(); /* returns seconds since last send/recv */
|
||||
int releaseExclusiveMode();
|
||||
|
||||
|
||||
void setTargetStunPeriod(int32_t sec_per_stun);
|
||||
|
@ -142,6 +144,10 @@ bool locked_checkExternalAddress();
|
|||
#ifdef UDPSTUN_ALLOW_LOCALNET
|
||||
// For Local Testing Mode.
|
||||
bool mAcceptLocalNet;
|
||||
bool mSimUnstableExt;
|
||||
bool mSimExclusiveNat;
|
||||
bool mSimSymmetricNat;
|
||||
|
||||
#endif
|
||||
|
||||
bool mPassiveStunMode;
|
||||
|
@ -150,6 +156,7 @@ bool locked_checkExternalAddress();
|
|||
|
||||
bool mExclusiveMode; /* when this is switched on, the stunner stays silent (and extAddr is maintained) */
|
||||
time_t mExclusiveModeTS;
|
||||
|
||||
};
|
||||
|
||||
/* generic stun functions */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue