Commit Graph

40 Commits

Author SHA1 Message Date
csoler
b3277824eb
license fix in pqi 2018-05-28 22:03:39 +02:00
Gioacchino Mazzurco
4a138e07b9
Implement IPv6 listening
With this commit IPv6-v3 surpass v0.6-IPv6-2 in term of features
  obsoleting it.
p3BitDht handle gracefully unwanted non IPv4 addresses
rsUdpStack handle gracefully unwanted non IPv4 addresses
pqissludp handle gracefully unwanted non IPv4 addresses
Move single address limitation workaround from
  p3discovery2::sendOwnContactInfo to better
  place p3PeerMgrIMPL::UpdateOwnAddress this way local address list is
  queried less often and only id there is some suggestion that it may
  have changed (probably ir will not be called all the times there is a
  changes in local network interfaces but is good enough)
Implement crossplatform rs_setsockopt to avoid too much ifdef around
Implement sockaddr_storage_copy to safely copy sockaddr_storage objects
2018-02-24 17:14:49 +01:00
Gioacchino Mazzurco
b3c7d195c8
Port pqissl to dual stack IPv6+IPv4
Changed unix_connect signature to be more comfortable for dual stack
  usage
Remove dead code in pqissl::pqissl(...)
Adapt p3I2pBob::connectI2P() to new unix_connect
Adapt extaddrfinder to new unix_connect
Add sockaddr_storage_ipv4_to_ipv6 to convert from flat IPv4 to IPv4
  mapped as IPv6
2018-02-24 14:29:56 +01:00
Gio
30e40470e2 Removed some cruft like mymethod(){return;} from pqi 2015-10-30 09:23:59 +01:00
Gio
16a5eed453 Removed flawed logic samenet/samesubnet you cannot determine if two ip are in the same subnet just from ips the internet is not just a bunch of /24 2015-10-17 10:27:49 +02:00
Gio
b16ecc89c8 Remove some garbage from pqissl 2015-09-27 15:38:31 +02:00
electron128
66242ce068 show if TCP connection is incoming or outgoing (modified patch from sehraf)
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@8265 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2015-05-16 11:19:53 +00:00
chrisparker126
0f29d28b1b merge of branch v0.6-idclean 7180
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7187 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-03-17 20:56:06 +00:00
csoler
a5efb4a59a increased TCP buffer size on windows. Makes transfers faster.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@7104 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-02-10 21:50:59 +00:00
drbob
06a582564d Fixes for failed Proxy Connection Attempts:
- create Timeout Fn so it can be called by classes derived from pqissl.
 - set HIDDEN timeout to 30 seconds.
 - add reset_locked() calls on errors in pqisslproxy.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@7039 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2014-01-19 11:35:31 +00:00
drbob
a7dd9ad9e3 Work-in-progress to reduce latency time:
* service->SendItem() now goes direct to pqistreamer buffer.
 * split p3FastService out of p3Service.
	p3FastService removes the recv buffer for faster processing.
	p3Service maintains its original interface, so derivate classes can remain unchanged.
 * Added uint32_t usec (wait period) to BinInterface.moretoread() & cansend() for future threading.
 * Added Mutex protection to pqistreamer, pqissl and derivatives of both.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6783 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-10-01 10:11:34 +00:00
thunder2
72c7569619 Fixed compile of libretroshare on Windows.
Cleaned some includes of openssl.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6769 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-09-26 23:53:06 +00:00
drbob
6290d8fed9 Massive commit - changing from sockaddr_in => sockaddr_storage.
In preparation for making RS support IPv6.

NB: This breaks the build of retroshare-gui, as the
sockaddr_storage_xxx fns are only defined as prototypes for now.

All the aux libraries like udp / stun / tcponudp / dht have still to be converted.

These changes will probably break various things and need to be tested thoroughly.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6735 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-09-13 14:35:19 +00:00
drbob
212b4c44c9 First of the V0.6 changes.
- Adding basics for proxy connection.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.6-initdev@6682 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-09-03 13:35:39 +00:00
csoler
9f88917ac1 added display of SSL encryption parameters in PeerDetails dialog
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6465 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2013-06-28 21:47:25 +00:00
thunder2
78edc7687e Fixed compile of libretroshare on Windows. The corrected pro files are not included.
Moved the includes of rswin.h from the header files to the c files.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5655 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2012-10-09 23:07:51 +00:00
drbob
8267739b02 Final core changes required to get relay links working.
* 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
2012-01-08 22:15:19 +00:00
drbob
abbebf48ff Partially completed changes to implement final relay bits.
* 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
2012-01-08 16:28:44 +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
thunder2
f769c66991 Fixed upload speed problem of Windows systems.
Set TCP buffer size to 128 KB.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3782 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-11-12 21:05:59 +00:00
drbob
31c9832978 Fixed Bad SSL Timeout code.
* Added TS check to SSL_RETURN_ZERO code. 
	- Existing code was dependent on tick rate. (could kill connection in 2-3 seconds)
	- If nothing is received within 15 seconds - the connection will be killed.
  * Removed "No send if RETURN_ZERO" check. 
	- This causes deadlocks and kills connections.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3287 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-07-13 12:13:56 +00:00
drbob
69ba03dbd2 First of the Networking REWORK checkings. I'm doing these is stages,
so I can properly document what is being changed!

Revert / Merge : pqissl / pqissludp code.
   * restored original timeout system.
   * removed weird testing code - should never have been here!
   * switched extra checks to generate ALERT msgs - we want to know if they happen.
   * removed quietShutdown (breaks TLS protocol - why was this added?)
   * switched listening on all the time. (helps restore disconnects).
   * restored common connect parameters (removed duplicates in ssludp).
   * restored AuthSSL->Failed/CheckCertificate() calls ... useful.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3212 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-06-25 21:44:24 +00:00
joss17
94aa902a95 clean the qmake files
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2318 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-02-14 14:18:53 +00:00
joss17
9d53481946 make it run
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2003 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-13 21:01:06 +00:00
joss17
c23407cae3 get rid of p3authmgr
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2001 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2010-01-13 20:56:55 +00:00
joss17
2ed7a96245 Revert "Revert "add a quiet shutdown when SSL_ERROR_SYSCALL is raised""
This reverts commit 5f9020b2b69a1920f5886a3ec25a2591902d17ae.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1900 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-18 17:50:11 +00:00
joss17
89ab9b1553 Revert "add a quiet shutdown when SSL_ERROR_SYSCALL is raised"
This reverts commit 7b8310ff019a9d81ada9d11a7aeceec8c50c9ee0.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1898 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-17 22:22:46 +00:00
joss17
a12084d620 add a quiet shutdown when SSL_ERROR_SYSCALL is raised
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1896 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-17 22:22:09 +00:00
joss17
8e4ce11532 work on the timeout for tcp and udp connection
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1884 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-14 21:20:17 +00:00
joss17
76d5072624 add ext address detector when connectiong to peers
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1882 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-12-14 18:11:19 +00:00
csoler
26db7ada52 restored accounting for LAN transfer rates. See also trac ticket #60
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1592 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-09-04 20:31:25 +00:00
csoler
4685fadbeb Hope I finally corrected the connexion + one-way bug
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1396 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-07-21 20:14:31 +00:00
drbob
5f28f76b07 * Addition of openpgp support!
This is not enabled by default. Instructions to enable are at the end of msg.

This is 60% complete. Supports creation of certificates, adding friends and connections.
Parts still to do: pgpids, p3discovery, signing and trusting peers.

The main reason it is being commited is so that connections between peers can be 
properly tested, and development on OSX and win can start.

This requires gpg and the gpgme.h development libraries, and no longer 
requires the custom ssl libraries.

To compile it switch the configuration flags in scripts/config-linux.mk

To compile XPGP (v0.4.x) enable PQI_USE_XPGP:
#PQI_USE_SSLONLY = 1
PQI_USE_XPGP = 1

To compile SSL only, enable PQI_USE_SSLONLY:
PQI_USE_SSLONLY = 1
#PQI_USE_XPGP = 1
 
To compile OpenPGP, disable both:
#PQI_USE_SSLONLY = 1
#PQI_USE_XPGP = 1

and enable RS_USEPGPSSL in rsiface/rsinit.h




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1265 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2009-05-23 15:07:35 +00:00
drbob
1e33267951 Modifications to libretroshare to enable a
build against a standard OpenSSL library... 
Still lots to do (implement AuthSSL), compiles all but final gui.
use USE_XPGP flag in build script to control it.




git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@796 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-11-09 16:52:14 +00:00
drbob
5e41b21cef Lots of bugfixes and tweaks:
* Switched p3Ranking to share Friends Links as well as own.
 * Modified rankmsgs to contain source id.
 * Fixed up rsNotify, added pqiNotify and global function call to get it.
 * Added notify for Bad Incoming Directory
 * Added Emergency Incoming directory so RS can keep running.
 * Added notify for Bad Packet (connecting to V0.3.X)
 * Added notify for Incomplete Packet Read (not been triggered yet!)
 * added close() to BinInterface, close on pqissl calls reset() 
 * removed exit(1) calls from pqistreamer, replaced with bio->close().
 * Increased Maximum Packet Size for HTML messages.
 * Fixed Online/Offline Message Forwarding. (TEST).
 * Increased DHT bootstrap buckets to 4.
 * Cleaned up much of serialiser debug (was slowing down Mac)
 * Added directory path to File Listings.
 * added ConvertSharedFilePath() so correct local dir can be found.
 * Added ForceDirectoryCheck() and InDirectoryCheck() for file hashing.
 * removed old TMP cache loading.
 * switched off Cache debug.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@448 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-03-31 14:06:59 +00:00
drbob
8d3f9a3ec6 Important changes to tighten up the connection methods:
* Switched to miniupnpc-1.0
 * modified miniupnpc to add lease duration.
 * set lease duration to 1 Hr.
 * Modified configure scripts to use miniupnpc-1.0

 * added TIMEOUT to all connections (5 sec for TCP - Important!)
 * reduced TCP offset delay to 2 seconds.
 * BUGFIX: Added missing connect_parameter wrapper function.
 * added reset to other connection methods when connection is made.
 * Added Connection Type (TCP/UDP) information to feedback/GUI

 * Increased default Data Rates: from 50/50 to 100/500 kB/s
 * Removed Default Bootstrap Ids. (only automatic now!)



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@423 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-03-26 15:35:09 +00:00
drbob
8b230a55cf Significant changes to aid UDP connections.
* Added Period and Delay parameters to connections.
   - Delay is used to avoid simultaneous TCP connections.
   - Period is used to regulate UDP connections.
 * added Delay code to pqissl.
 * added Period code to tcponudp / pqissludp.
 * modified TTL modification code.
 * increased SynPktRetransmit value.
 * fixed retrans() timeout (one reason code wasn't working before!)
 * fixed tou_close() SEGV bug.
 * modified pqissludp tou_socket creation. (non permanent now).
 * Modified format of peerConnectRequest() CB to make it more useful and rewrote function.
 * Enabled pqissludp NetInterface.
 * using Id comparision to determine Active/Passive UDP connection state.
 * added #def to disable TCP connections. (for testing)
 * enabled UDP connections from retryConnect() function.
 * corrected EXT check in retryConnect() function.
 * + lots of debug output and other stuff.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@358 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-02-27 02:32:20 +00:00
drbob
798e19d58c Conversion of the SSL connection methods.
* Added new XPGP functions to checking certificates.
* Converted SSL classes from cert * -> p3AuthMgr.
* Added check of addresses before connect attempt.
* started up listener correctly.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@319 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-01-28 05:40:32 +00:00
drbob
6435357c07 Commit of the new UDP Connection methods and
the rewrite of the retroshare core networking stack.

This check-in commits the changes to the pqi code, 
and provides the majority of the improvements.

(1) Introduced new interfaces for DHT and UPnP abstraction: p3dhtmgr.h, p3upnpmgr.h
(2) Introduces abstraction for Authentication: p3authmgr.h
(3) New Connection Manager to coordinate networking code: p3connmgr.h
(4) New Configuration Manager: p3cfgmgr.h

This library has been significantly modified to support DHT synced connections
to enable connections between Firewalled Friends. The connection code has
been rewritten within a new framework, which should make extensions easier to code.

Also removed significant amount of old code relating to Tunnels, Channels etc.
This will be recycled later as higher level services that should not be
part of the core networking library.



git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@306 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2008-01-25 06:36:40 +00:00
drbob
935745a08e Created V0.3.x branch and moved the head into the trunk directory.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@246 b45a01b8-16f6-495d-af2f-9b41ad6348cc
2007-11-15 03:18:48 +00:00