of the overhead associated with TCP and Relay connections:
* The Internal rate is calculated based on transmitted data (a reliable stream).
* The Relay rate is calculated at UDP packet level and is x1.1 - x1.2 higher than internal rate.
The Relay will drop the connection if peers exceed specified level - so best to leave some head room.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4773 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Added LinkType to p3LinkMgr => exposed via rspeers.h
* Added ConnectionType to p3PeerMgr. This is dummy default to FRIEND at the moment.
* Flag bandwidth limited Relay links as such.
* Switched DNS Address connect to in front of historical addresses.
* Reverted Flags in p3LinkMgr to what they were.
* Added LinkType Flags to rspeers.h
* removed getConnectFlags() as it was a bad way to do things.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4769 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Adding more detailed flags to each connection.
* Cleaned up unneeded stuff from p3LinkMgr.
* Added rswin.h includes before openssl - allows compilation using std Win OpenSSL.
* Added getConnectFlags() to Net Base.
* removed net_attempt and associated obsolete variables from pqissl
* Made NetBinInterface protected in pqiperson (is this okay?)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4767 b45a01b8-16f6-495d-af2f-9b41ad6348cc
NB: Reverse Most of these changes - before adding to Trunk!!!!
* Added missing BitDht callback functions for test/example code.
* Switch tests/example to OSX compile.
* DISABLE_BAD_PEER_FILTER (as it doesn't like local net)
* Reduced Minimum Peer Counts for DHT to be considered active.
* Added LOCALNET_TESTING to rsinit.cc
- new Commandline Option -R <lport-uport> to restrict UDP ports.
- Enables LocalNet in UdpStunner.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4756 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- added generic methods and items for bouncing generic objects through lobbies
- added handling of peer typing status
- proper handling of peer join/leave lobby
- added sub item ids to lobby messages to allow proper message splitting
- made 2 different message splitting methods for normal chat vs. lobbies. In v0.6, we'll have to handle all messages the same way.
- added parent id to RsChatLobbyMsgItem, to allow threaded chat.
- added possibility to make a lobby public/private (not yet fully working)
- added items for requesting/exchanging list of public lobbies at friends' (not yet fully working)
- major cleaning of p3chatservice.cc
Next move:
- gui for listing friend public lobbies, joining them, etc.
- load/save of persistent lobbies.
- autoremove of inactive lobbies
Warning: lobby message items of this version are incompatible with previous versions. It won't crash, but
messages will not pass through.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4755 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- Added Timeouts for Resolve and QueryIP, as these can continue indefinitely.
- Added more debugging.
- rotated port number using ntohs().
- Filtered Self.
- Allowed Other SSL IDs of Self to connect.
- Fixed QueryIP to use hosttarget instead of servicename.
- fixed Id order in mPeerMgr->addFriend().
- fixed p3ZeroConf initialisation call.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4752 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Modified UdpRelay handles the counting...
now each Relay Class has a bandwidth limit,
and you can drop down to a lower class - if your one is full.
This ensures that the desired bandwidth is kept, and allows more friends to use the relays.
* Added Interface in p3bitdht.
TODO: Test this stuff!
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4728 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- registers oneself, browses and resolves services.
- Lots still TODO:
- parse TxtRecords.
- Track peers.
- feedback to libretroshare
- etc, etc.
Enabled ZeroConf in libretroshare.pro & rsinit.cc. Compiles and runs on OSX.
Added RelayHandler to Dht, to enable external control of Relays.
Marked pqiAssist Interface for changes... will be revamped with ZeroConf.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4727 b45a01b8-16f6-495d-af2f-9b41ad6348cc
Fixed small hangs of RetroShare by removing the core lock in RsServer::ConfigGetDataRates. Is that needed?
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4725 b45a01b8-16f6-495d-af2f-9b41ad6348cc
Summary of changes:
* Switched on Local BadPeer DHT Filter.
- This will remove any peer detected to be spoofing yourself or your friends.
- This list is also shared with you friends. (in Test Mode).
* Added Cleanup of BadPeer Filter.
- Instead of permanent ban, peers are be banned for 6 hours.
- bdManager periodically calls this - which prints out ban list too.
* Added Checks against spoofing to UdpStunner.
- Throw away Stun Results where remote_addr = reported ext_addr.
- Added extra checks to ensure that the same Ext IP is returned, before reporting.
- accept BadPeer List from DHT BadPeer Detection.
* Changed BanList Service Id from Test ID to Real ID.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4718 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Added UdpStunner::dropStunPeer() code to remove bad peer from stun list.
* added calls to UdpStunner::dropStunPeer for BanLists going to/from DHT.
* added DEBUG_BANLIST_CONDENSE to remove unnecessary debug.
* Improved UdpStunner::status() print out of stunlist.
* Added extra check to throw away stun reports where remote_addr == reported ext_addr.
- This was causing peers to get the wrong IP addresses.
* Modified UdpStunner ExtAddr checks to make sure the IP addresses match.
* Changed BANLIST service Id to from Test ID to real ID.
NOTE: These are stop-gap methods to avoid the wrong Stun reports.
A more robust scheme must be implemented. I'd expect that it would
involve a strict initial check to establish your IP address...
(e.g. require 4 peers to confirm it, allowing for some fake entries)
After this we can have a weaker check ensuring IP address matches.
If we detect a likely REAL change of IP address - drop back to requiring
a strick check again.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4717 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- FT_TM_DOWNLOAD_TIMEOUT: 10 -> 20 secs (RTT limit of 10 secs is too low -> transfers in long tunnels kept switching between active and inactive)
- INACTIVE_CHUNKS_CHECK_DELAY: 60 -> 240 secs (Chunks are kept longer before beign cancelled, which is now affordable)
- MAX_TIME_INACTIVE_REQUEUED: 60 -> 120 secs.(Transfers a kept longer before being re-prioritized in queue)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4707 b45a01b8-16f6-495d-af2f-9b41ad6348cc
Summary Of Changes:
* Reduced Default DHT Message rate from (50msg/sec) => (5msg/sec)
- Searches now take longer, but it should make crappy firewalls happy.
* Added Interface to allow this rate to be dynamically changed.
* Bugfixes for p3BanList: removed internal IPs from Lists, fixed AddBanPeer() logic bug.
* Disabled p3Dsdv, after brief test.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4705 b45a01b8-16f6-495d-af2f-9b41ad6348cc
Full Changes can be extracted from logs associated with the following checkins:
r4674 r4678 r4679 r4680 r4681 r4684 r4686 r4687 r4697 r4698 r4699
Summary of changes:
DHT Improvements:
Added knowledge of Friends / FoFs and Relays to DHT.
Added bdFriendList class to store this information.
Added Checks against known Peer:IP information to detect bad peers.
Bad Peer Checking is in Test Mode Only for the moment,
New Interfaces to exchange above information with libretroshare
Cleaned up various compiler warnings.
libretroshare Improvements:
Added p3BanList Service and DataTypes to exchange Bad Peer information.
Added Plumbing to get info from network to DHT and back.
Supply Friend List from p3LinkMgr
Supply Friend of Friend List from p3Disc.
Added p3Dsdv Service and DataTypes for NetworkWide Routing (Testing Mode).
Various BugFixes.
Patch Manual Forward mode to preserve user selected Port.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4700 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Store all possible routes (will be useful later!)
* Periodically cycle through and choose the most stable one.
* added ValidSince field... for tracking age.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4697 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Added p3BanList as a service.
* Added interfaces to communicate addresses.
* Added debug to p3BanList.
* Fixed several bugs in the AddEntry/Condense
* Fixed Mutex deadlocks.
Improvements to Dsdv code too.
* Added p3Dsdv as a service.
* Added Function to create a TEST service for routing.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4687 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- Added missing Mutex protection in p3BitDht.
- Added p3BitDht::addKnownPeer() to communicate with libbitdht.
- Disabled placeholder versions (addFriend/AddFriendOfFriend)
- Added netAssistKnownPeer() libretroshare interface.
- Added calls to netAssistKnownPeer() from p3disc and p3NetMgr.
- Check for NULL ptr in p3NetMgr before calling p3PeerMgr.
- Added FIX to maintain MANUAL FORWARD port (untested!)
- Removed some compiler warnings.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-dhtmods@4681 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- removed dependency of mRateIncrease into measured rtt -> would cause very slow transfers through long tunnels
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4671 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- servers now compute the map in a separate thread
- CRC32Maps are kept in cache for 30 mins
- CRC32Maps requests cannot be used to overflood a server anymore since their number is limited.
- Transfer modules now send keep alive packets to maintain tunnels when asking for a CRC32Map
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4661 b45a01b8-16f6-495d-af2f-9b41ad6348cc
re-organises (e.g. defragments) data such that
- when the DL is finished, the file is in the correct order (no need to re-order it)
- during the DL, only the n*_chunk_size first bytes of the partial file are written, where n is the total number of downloaded chunks.
- the total amount of copy operations does not exceed the total size of the file. In practice, it's much lower.
That suppresses the lag when downloading large files due to writing isolated chunks in the middle of the file.
Next:
- integration into ftFileCreator
- load/save in ft_transfers
- retrocompatibility with existing transfers.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4658 b45a01b8-16f6-495d-af2f-9b41ad6348cc
Now the history is saved encrypted. Please delete all files with "chat*.xml" in your profile folder.
Added new config p3HistoryMgr and interface p3History.
Added new option to limit the count of the saved history items.
Added new simple html optimizer "RsHtml::optimizeHtml" to reduce the size of the html strings.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4623 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Compilation for FreeBSD.
* Notes that MT is not cryptographically secure.
* modified sorting of DHT Window.
Only one change that I didn't commit:
bitdht {
- LIBS += ../../libbitdht/src/lib/libbitdht.a
- PRE_TARGETDEPS *= ../../libbitdht/src/lib/libbitdht.a
+ LIBS += ../../libbitdht/src/libbitdht.a
+ PRE_TARGETDEPS *= ../../libbitdht/src/libbitdht.a
}
As this would have broken compilation on the other platforms.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4619 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- added a lock into ftTransferModule::recvFileData() (Crash reported by Costa due to storing data in a deleted transfer module)
- changed names of functions in ftTransferModules to locked_* when appropriate (helps debugging)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4612 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- set default of the signature checkbox in ConnectFriendWizard to disabled
- set the initial option for the download directory to network wide only
- set the default of a new shared directory to network wide
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4578 b45a01b8-16f6-495d-af2f-9b41ad6348cc
Added new buttons to SecurityItem to add/remove the peer and view peer details.
Added new call to notifyListChange with NOTIFY_LIST_FRIENDS in AuthGPGimpl::AllowConnection.
Fixed german language.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4572 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- Moved ProfileView and ProfileEdit to the folder unfinished.
- Removed "location:" before the ssl name in FriendsDialog and MessengerWindow.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4567 b45a01b8-16f6-495d-af2f-9b41ad6348cc
I've reduced the frequency, and increased the age for removal.
* Cleared every 31 minutes, first cleaning after 1 hour.
* old peer is no contact for 90 days.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4547 b45a01b8-16f6-495d-af2f-9b41ad6348cc
=> Giving new peers a chance to connect.
* Fixed missing return in p3PeerMgr::removeUnusedLocations()
* moved RTT defines to top of file, and increased to 150 results.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4546 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* WARNING is printed out & LOGGED if it takes more than 0.2 Seconds to complete.
-> This happens occasionally, need to watch it.
-> This is one of the things that kills connections.
-> Ideally want to get the cycle down to 0.05 seconds.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4544 b45a01b8-16f6-495d-af2f-9b41ad6348cc
the periodical call of cleanupUsedLocation, which was reloading all the GPG Keys - for each cleanup Key.
This required cleaning up various bits (AuthGPG, rsPeers, p3Disc).
* moved rsPeer::cleanUnusedLocations => p3PeerMgr::removeUnusedLocations();
- made the function light-weight, no loading of GPG Keys.
* moved getSSLCertsFromGPG() fn from rsPeers => p3PeerMgr
* added p3PeerMgr::removeAllFriendLocations() to cleanup when removing a GPG Friend.
* cleaned up rsPeers, made addFriend() / removeFriend() universal functions.
* remove bool p3Peers::setAcceptToConnectGPGCertificate(const std::string &gpg_id, bool acceptance)
* removed all Dummy SSL Ids. - There is no need for this!
* Major changes to p3disc to correct FLAWED logic. (needs more testing).
* removed as many dependancies on retroshare/rspeer.h as possible.
* changed p3turtle dependancy on rsPeers ==> mLinkMgr.
* added p3LinkMgr::getPeerName() and p3PeerMgr::getPeerName()
* added return 1 to pqissllistener::closeConnection().
* removed unused code from AuthGPG().
* removed storeAllKeys() calls in AuthGPG::AllowConnection().
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4542 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* log p3disc::sendHeartbeat(), successful p3linkmgr::connectAttempt()
* log reason for each pqissl::reset().
* log linkmgr & peermgr addFriend() and removeFriend().
* log pqiperson::connect(), p3PeerMgr::cleanUnusedLocations().
* Modify timing of cleanUnusedLocations (=>8min) & NETSTATE_PARAM_TIMEOUT (=>15min) (see if it has an effect).
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4539 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* SSL_Peek is called on new connections, and we only accept it when there is data.
* This should stop some of the unstable connections caused by wrong IP:Ports
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4533 b45a01b8-16f6-495d-af2f-9b41ad6348cc
It was using the same port as the DHT, and switching to a Random one, on its own.
* Added debugging for net reset.
* Added further debugging for ssl (reset + killing existing connections)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4530 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Measures Lag and Clock offset, by pinging peers periodically.
* added interface so the results can be plotted.
* added serialisers for ping/pong data types.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4519 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* extract external address from DhtStunner if possible.
* added p3PeerMgr::UpdateOwnAddress(), which should only be called by p3netmgr.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4512 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* set PortForward in NetStateBox when the Network has been setup.
* add GeneralConfig to rsConfig external interface.
* enabled ADVANCED configuration option.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4500 b45a01b8-16f6-495d-af2f-9b41ad6348cc
- p3peermgr now uses RS_NET_MODE_XXXX instead of RS_NET_MODE_TRY_XXXX
- p3netmgr maintains both TRY and ACTUAL mode.
- actual mode is not visible through old interface (TO FIX).
- added default to UPNP mode.
* Added debug to show changes to peer->VisState.
- It seems that this is never updated by p3disc. BUG, (TO FIX).
* disabled extra debug in rsdiscitems.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4498 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* print out messages when serialisation fails.
* removed BUG in TlvGetString() which allows a zero length TLV
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4496 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Added peerId to udpstunner->exclusiveMode for debugging purposes.
* added timeout for exclusive mode, this can happen if connection is lost at lower levels.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4489 b45a01b8-16f6-495d-af2f-9b41ad6348cc
* Reduce Maximum Transmission size from 1500 -> 1000.
This is the cause of Failed Connections. It looks like UDP packets are being truncated from 1520 -> 1492 bytes.
and this is killing the TCP protocol. Windows is the main suspect. UDP packets this large are liable to get fragmented anyway.
We will start at 1000, verify that connections are okay, then start increasing this parameter.
There is up to 64 bytes of Headers (IP + UDP + Relay + TOU), so 1400 + 64 = 1464 is below the 1492 cutoff. This is the target!
* Switch to RSRandom for Sequence numbers. rand() is rubbish on Windows.
* Added code to handle Larger Packets coming in (e.g. 1500 Bytes input, now that Max Size is 1000).
NB: The code is here needs to be optimised, there are excessive numbers of malloc(), new() & memcpy(), which should be removed.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4482 b45a01b8-16f6-495d-af2f-9b41ad6348cc