Commit Graph

4095 Commits

Author SHA1 Message Date
drbob
69c14461cb Merged v0.5-netupgrade branch back into the trunk ( --- Merging r4410 through r4465 into '.' )
This brings lots of improvements:
 * UDP Connection Code - this it the majority of the new code.
 * Simplification of p3ConnectMgr => p3LinkMgr, p3PeerMgr & p3NetMgr.
 * Notifications of Failed Connection Attempts
 * Addition of a "Getting Started Guide".
 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4466 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-18 09:25:15 +00:00
drbob
fe491dec54 Added display of Exclusive mode (E)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4465 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-18 08:44:40 +00:00
drbob
619b2416ac disabled Relay connections, and enabled UDP connections.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4464 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-18 08:37:11 +00:00
drbob
96ec46478a Changes to support the delay / bandwidth changes in libbitdht
* switched off the TESTING PERIODS.
 * added BASE PROXY wait time.
 * Increased PEERNET_CONNECT_TIMEOUT to 120
 * Prevented connection startup with Request underway (dpd->mPeerReqState == RSDHT_PEERREQ_RUNNING)
 * corrected calculation of Exclusive Delay (Target of MIN_DETERMINISTIC_SWITCH_PERIOD = 60 secs).
 * don't do UDP Failed ConnectLogic update when connection was initiated remotely.
 * Extended UdpRelay to allow flexible Bandwidth limits in the future.
 * Added Timeout for Relays (30min for unknowns - 2hrs for friends).
 * Extract bandwidth from UdpRelay, at installation.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4463 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 23:41:30 +00:00
drbob
551e2594bb Added Bandwidth and Delay parameters to BitDHT Connect Messages.
* Bandwidth are for RELAY connections.
 * Delays are for Exclusive NAT Proxy connections.
 * Lots of changes to achieve this. (Mainly added "param" to msgs).
 * Various Bugfixes too.
 * Updated BITDHT Version to 01 as we've changed Message Format.
 * Increased Connection Timeout to 180 
 * Added extra checks to kill duplicate connections early.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4462 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 23:29:53 +00:00
thunder2
c50404a453 Added a project file (subdirs template) for libbitdht, libretroshare and retroshare-gui.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4461 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 23:28:44 +00:00
thunder2
8d4a4db027 Changed the generation of the gpg key and location to utf8.
The existing gpg keys and locations with umlauts are now shown wrong. The changes are not backward compatible.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4460 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 23:07:29 +00:00
drbob
c33b415ef4 Bugfixes for ExclusiveProxy Mode.
* changed PeerConnectStateBox::getNetState() to calcNetState() to provide up-to-date info (internal mNetState can be stale!)
 * Added "bool addrChangeLikely" parameter to ReleaseProxyExclusiveLock() - this parameter is determined by whether we actually started a UDP connection.
 * disabled ForceRestun in UdpStunner if addrChange is unlikely.
 * Reduced Stunner Period Slow from 3 minutes to 2 minutes - exact value will only be known after real-world testing.
 * More debugging.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4458 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-17 16:24:45 +00:00
drbob
181ad06e33 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
2011-07-17 13:48:37 +00:00
csoler
7d4b8288ca fixed compilation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4456 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-16 13:11:26 +00:00
drbob
a5c77d02e7 Added Random Timeouts / Retries to p3bitdht level.
* Fixed UdpRelay Interface Output.
 * added more variables to ConnectStateBox.
 * Changed Wait logic from sec since last attempt, to explicit attemptTS.
 * Improved PeerConnectStateBox::connectState().
 * Added RETRY_ATTEMPT updateCB.
 * removed stupid clearing of addresses (killed Relay connections).
 * added more debugging



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4455 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-16 13:01:08 +00:00
drbob
a63173b19e Modified the Connections so that occur as quickly as possible.
Each attempt should be completeable in < 10 Secs. 
This could increase up to 20 secs, if pings are required.
So with 3 Proxy attempts, should take 20-30 secs.

 * Removed as many of the pauses as possible.
 * connection attempt DONE if OUTOFPROXY, DUPLICATE, TEMPUNAVAIL or EXTCONNECT timeout
 * Fixed AutoAuth for Proxy (was triggering for Relay as well)
 * Increased QUERY_UPDATES to every 10 secs.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4454 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-16 12:57:11 +00:00
csoler
a2cefdf8f4 added www.myip.dk, and removed debug info
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4453 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 19:06:38 +00:00
csoler
cfd43e63cf removed showmyip.org address from extaddrfinder
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4452 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 19:00:00 +00:00
csoler
d071cee94b fixed bug in dnsresolver reset function
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4451 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 18:55:33 +00:00
drbob
44b494e1fd connection bugfixes.
* Print DHT translations (for debugging)
 * enable all connection modes.
 * reduced timeout periods for testing.
 * kill connectionRequest after UDP Fail. (used to restart it).
 * fixed up UDP Fail / Connection Close code.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4450 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 16:05:37 +00:00
drbob
6609cec94d Bugfixes for connection logic:
* added bool return value to ConnectionRequest. only returns false if MODE not allowed.
 * added checks for an existingConnectionRequest - results in a NOOP.
 * made each ConnectionRequest result in only one UDP start.
 * a START message will not kill a local ConnectionRequest (even in remotely started).
 * increased CONNECTION_TIMEOUT as this should never happen at this level.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4449 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 16:02:56 +00:00
drbob
bffaf6e5ef More Udp Connection Bugfixes:
* connected Dht ConnectCallback()
 * added missing break statement in peernet logic (directattempt).
 * added state update if ConnectionRequest is rejected by DHT (normally because MODE UNAVAILABLE).
 * switched off UdpStunner.
 * added Debug Modes to rsUdpStack & rsFixedUdpStack.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4448 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-15 11:13:20 +00:00
drbob
0229ef1fe8 Disabled UDP connections (in p3LinkMgr) for now.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4447 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-14 15:01:41 +00:00
drbob
86bdc5dfd0 More Plumbing changes.
* Forgot that RELAY connections need extra parameters.
 * Added proxyAddr, srcAddr and Bandwidth parameters to connection attempts.
 * Completed UDP connection callouts from p3bitdht.
 * Added TCP connection attempt initiation from p3bitdht.
 * Added PASSIVE / ACTIVE determination in p3bitdht.
 * completed UDP connection logic in pqissludp.
 * enabled UDPSTUN_ALLOW_LOCALNET for testing.
 * added CONSTs for TOU Receiver Indices.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4446 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-14 14:56:33 +00:00
drbob
22debbce34 Turns out that the current implementation of p3NetMgr has NO dependancies on p3PeerMgrIMPL or p3LinkMgrIMPL.
Infact, it doesn't use these two classes at all (so you could pass void in the init function)...
  - It should actually update p3PeerMgr when it detects a Net Address change (TODO).

This means that there is potentially no need for a dummy object - p3NetMgrIMPL can be used almost as is!

 * changed p3PeerMgrIMPL & p3LinkMgrIMPL pointers back to p3PeerMgr and p3LinkMgr pointers.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4445 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 23:23:47 +00:00
drbob
216be04d83 * added DETERM_SYM NAT type to DHT Window.
* cleared DhtWindow global pointer at delete, so RS doesn't crash (and can relaunch window).




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4444 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 22:25:11 +00:00
drbob
387db6e7b6 Done most of the piping/callback between the DHT and LinkMgr/NetMgr.
* Added ConnectionFeedback fn to NetAssistConnect & p3BitDht.
 * Added TYPE definitions to pqiassist.h
 * added extra parameters to p3LinkMgr::connectAttempt() (flags which will be used to pass DIRECT/PROXY/DIRECT + PASSIVE/ACTIVE)
 * Added callback from p3LinkMgr to NetMgr::netAssistStatusUpdate() => Dht::ConnectionFeedback.
 * updated peerConnectRequest to trigger either TCP attempt (first) or UDP connection.
 * updated parameters for p3LinkMgrIMPL::tryConnectUDP()
 * added p3LinkMgrIMPL::locked_ConnectAttempt_SpecificAddress() for DHT => TCP attempt.
 * added extra parameter to addAddressIfUnique... bool addFront =>  DHT attempts get pushed to front of Queue due to timing requirements.
 * added extra parameter (flags) to pqiperson::connect() - matches extra parameters to p3LinkMgr::connectAttempt().
 * added p3NetMgr::netAssistStatusUpdate()
 * added mConnectFlags to pqissludp



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4443 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 22:23:40 +00:00
thunder2
9992d6ae12 Removed the single notify systray icon (combined icon) and combined it with the normal RetroShare systray icon.
The user can choose, which notify icon is shown as single icon in systray or with the normal RetroShare icon.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4442 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 19:24:33 +00:00
drbob
8d5bde1b50 Added Virtual Interfaces for p3LinkMgr, p3NetMgr & p3PeerMgr.
Shifted real functionality to p3LinkMgrIMPL, p3NetMgrIMPL p3PeerMgrIMPL
This allows us to test most objects with dummy objects (i.e. no need for full AuthSSL/AuthGPG objects)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4441 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 14:22:25 +00:00
drbob
85d232ff4f * added DETERMINISTIC_SYMMETRIC NAT type to Connect Logic. (CBS_NETSTATE_EXCLUSIVENAT)
* added DETERMINISTIC_SYMMETRIC NAT to retroshare/rsconfig and NetStateBox.
 * added ExclusiveMode to udpStunner.
 * Tweaked UdpStunner ping logic.
 * added TCP_WAIT to Connect Logic.

NB: This stuff is still to be tested!



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4440 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 11:41:25 +00:00
drbob
d6938721b0 Reduced timeout for connections to 20 secs. because they should be quick.
Made the query more robust, by only saying a query is SUCCESSFUL if we have recvd a reply from peer.
NB: These changes are yet to be tested!



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4439 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 11:37:47 +00:00
drbob
9ec411345d * added OwnId at p3bitdht level.
* Filter out own id from stun peers.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4438 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-13 09:12:31 +00:00
csoler
fc05314af0 corrected a bug due to reading uint64_t with wrong format on some systems, which caused the hash cache to sometime fail
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4437 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-12 20:07:28 +00:00
drbob
42dd1826b0 added Network Status to DhtWindow.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4436 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-12 14:17:06 +00:00
drbob
6c5d5f6cc2 Integrated NetStateBox and Activated Stunners.
* Added tick() and setRefreshPeriod() to pqiAddrAssist
 * Fixed up NETSTATE #defines, all refer to retroshare/rsconfig.h
 * added #define => string translations for NETSTATEs
 * Added NetStateBox as an independent Network State determination (has no effect on existing code).
 * added slowTick() to p3NetMgr.
 * connected p3NetMgr::getNet... to NetStateBox.
 * piped network state into NetStateBox.
 * added p3NetMgr check for changes in NatType. (to update Stun Rate / Attach Mode (TODO))
 * added NetStateBox.reset()
 * tweaked lots of debugging.
 * added Default Stun Period (pass -1 to setRefreshPeriod()) 



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4435 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-12 14:16:46 +00:00
csoler
e4f89892a3 added missing mutex protection that caused random SIGSEGV
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4433 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 19:04:56 +00:00
drbob
52cbe0f2fb Added Getting Started Dialog Box.
* Connected it up with rsConfig... to tick (and close text) for bits that have been done.
 * Tests cases at first open.
 * Added FAQ from wiki - it needs help.
 * This whole concept needs some further tweaking.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4432 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 18:53:14 +00:00
drbob
c2a0309f05 Added RsConfig class which will in the future support most of the interface from rsinit.h & rsiface.h
* Moved rsnetwork.h => rsconfig.h
 * Implemented Network functions (call p3NetMgr) in RsConfig.
 * Implemented UserLevel (New/Basic/Casual/Power) Levels
 * added p3PeerMgr::haveOnceConnected() function, for UserLevel support.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4431 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 18:48:56 +00:00
thunder2
4792d7c878 Fixed compile on Windows.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4430 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 17:00:13 +00:00
drbob
70d8fd14d3 Added additional NewFeed Type SecurityItem
* added AddNewItemIfUnique() to NewsFeed



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4429 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 15:53:41 +00:00
drbob
96b4651b7c Updated flags to add additional NewsFeed Type: Security!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4428 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 15:52:29 +00:00
drbob
d643f168a0 Fixed up Adding / Removing Peers.
* added OthersList to p3linkmgr. this is important so we can send ACTIONS for removed Peers.
 * added missing mStatusChanged when adding Friend.
 * added printPeerLists to PeerMgr and LinkMgr.
 * tweaked debugging.
 


git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4427 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 12:11:58 +00:00
drbob
1cf790990f Added basic PeerItems to NewsFeed for AUTH_DENIED and FAILED_CONNECTION case.
* This will need to be fixed up - but the basic logic is there!
 * Improved DhtWindow display of peers.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4426 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 01:08:01 +00:00
drbob
53c71daca0 Major improvement to libretroshare!
* Catch Failed Connections, and add to NewsFeed for GUI notifications.
 * outgoing connections are captured via pqissl::FailedCertificate() functions.
 * incoming connections are captured at certificate verification.
 * Certs are passed to AuthSSL, which calls the notification system.
 * Additional types have been added to rsnotify to handle these cases.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4425 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 00:55:06 +00:00
drbob
81dc1d77b7 Cleaned up More debugging and started work on connections.
* switched off lots of debugging, and removed "common" messages, so we can focus on the actions.
 * Added extra debugging focused on the connections.
 * Removed "lastconnect" from p3LinkMgr.
 * added p3PeerMgr::updateLastConnect() fn, so this parameter will be stored.
 * added calls from p3LinkMgr at connect and disconnect.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4424 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-11 00:52:12 +00:00
drbob
f7ff55237e Bugfixes galore!
* Split p3bitdht_peers.cc debugging in two. Hid Id Translation debug (that code is fine)
 * Added initialisation of p3bitdht peer data structure (using values from peernet).
 * Added BITDHT_QFLAGS_UPDATES flag.
 * Added Tick() interface to NetAssistConnect  interface, tick it from p3NetMgr.
 * FIXED OLD BUG: netAssistFriend was not being called from p3LinkMgr::connectResult() this meant all peers where being searched for.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4423 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 19:50:12 +00:00
drbob
d6e2d959be Added display of Dht Peer Connection status.
Switched on DhtWindow.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4422 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 18:20:30 +00:00
drbob
b2e25680ac General debugging:
* Improved debugging messages for p3linkmgr & p3netmgr, switched on debugging.
 * added ids to p3bitdht peers.
 * added datatypes to RsDht peers data structure, and translate the data.
 * add const to PeerConnectStateBox::connectState().
 * cleaned up p3LinkMgr::locked_ConnectAttempt_AddDynDNS() a bit.
 * filled in friend data types in p3LinkMgr (allows connections now!)
 * added printConnectState() in p3LinkMgr



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4421 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 18:19:46 +00:00
drbob
59abce2d48 Added missing functions to get retroshare running again.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4420 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 01:49:39 +00:00
drbob
bbd11e69c1 Changes to libretroshare to get it to compile (still missing fns - so won't link yet!)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4419 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 00:41:39 +00:00
drbob
6eb27c9a1a Completed basics of the new p3bitdht system.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4418 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 00:39:15 +00:00
drbob
21145a29bb * added function to extract Local Address from udpstack.
* update local address when a reset is called.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4417 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-10 00:37:09 +00:00
drbob
f6f721a492 Removed p3ConnectMgr. Replaced it with p3LinkMgr, p3NetMgr and p3PeerMgr.
Updated references in other classes.
 * Most classes need p3LinkMgr, and only use two functions: OwnId() and getOnlineList()




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-netupgrade@4416 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-09 18:39:34 +00:00
csoler
20c44c4bca fixed compilation
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4412 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2011-07-09 15:47:49 +00:00