Commit Graph

2919 Commits

Author SHA1 Message Date
notsecure
ede8455a5a function comments in header 2014-05-19 11:56:45 -04:00
notsecure
cecefd290a mistakes
forgot to build before pushing
2014-05-19 11:34:40 -04:00
irungentoo
8cec3cdd66
Merge branch 'bootstrap-daemon-improvements' of https://github.com/nurupo/InsertProjectNameHere into nurupo-bootstrap-daemon-improvements
s
2014-05-19 10:59:35 -04:00
irungentoo
116f3d46e8
Removed now useless code. 2014-05-19 10:57:56 -04:00
notsecure
0d711afbec IP_Port packing unpacking in onion.c 2014-05-19 09:18:04 -04:00
Maxim Biro
286d8d9661 Made config file more consistent with default values 2014-05-18 21:04:42 -04:00
Maxim Biro
fe1694fa69 Added default ports to the .c file, included 33445 port 2014-05-18 19:59:01 -04:00
Maxim Biro
261a70353f Fixed a bug 2014-05-18 19:59:01 -04:00
Maxim Biro
8b5e3d5208 Allow multiple instances of the daemon 2014-05-18 19:58:57 -04:00
irungentoo
207e87187d
libsodium header should only be included when libsodium is used. 2014-05-18 18:17:42 -04:00
stal
28c5665a08
Fix current_time_monotonic on OS X.
clock_gettime doesn't exist there, so
throw in some equivalent mach stuff.
2014-05-18 14:56:35 -07:00
irungentoo
77d2ad373a
Fixed IP_Port packed struct being 1 byte too big on windows. 2014-05-18 16:07:26 -04:00
irungentoo
906969d376
Fixed out of bounds write. 2014-05-18 14:43:32 -04:00
irungentoo
0035cfac37
Merge branch 'tcp-bootstrap-daemon' of https://github.com/nurupo/InsertProjectNameHere into nurupo-tcp-bootstrap-daemon 2014-05-18 14:22:58 -04:00
irungentoo
376eecafd3
Fixed possible connection issue. 2014-05-18 13:58:41 -04:00
irungentoo
d68197b895
Save a couple TCP relays on save and reconnect to them on load.
Removed some old code.
2014-05-18 13:45:33 -04:00
irungentoo
8cb3ddda8b
Fixed TCP client connection isse. 2014-05-18 12:59:21 -04:00
irungentoo
d573271f03
Fixed connection issue. 2014-05-18 12:15:57 -04:00
irungentoo
e87929e869
TCP branch now ready for start of real testing.
Friends can now exchange TCP relay addresses so that they can
connect together.

Currently all bootstrap nodes are treated as TCP relays.
2014-05-18 10:55:38 -04:00
Maxim Biro
7dd811214a Added MOTD functionality 2014-05-18 00:38:20 -04:00
Maxim Biro
e75930e72e Some small fixes 2014-05-17 21:49:57 -04:00
Maxim Biro
8be6b0986d Extracted min and max allowed port values into named constants 2014-05-17 21:49:51 -04:00
irungentoo
9d4947ffa5
add_tcp_relay_peer() can be used to add relays that we know that
peer is connected to.

Some cleanups/fixes.
2014-05-17 21:30:52 -04:00
Maxim Biro
ceaeae8cff Added TCP server functionality 2014-05-17 20:36:16 -04:00
mannol
ea96c1758a Fixed this 2014-05-17 23:15:54 +02:00
irungentoo
b5f84b33f7
net_crypto now works again on pure UDP. 2014-05-17 15:23:16 -04:00
irungentoo
60ed415a5a
Added a function to get the DHT public key stored in net_crypto.
The DHT public keys in onion_client/net_crypto are synced and set
to whichever is more recent.

Tox peers now try to connect directly even when already connected
with a TCP relay.
2014-05-17 14:56:20 -04:00
irungentoo
80e4e5663f
Fixed bug in TCP server where memory was expected to be zero but
sometimes wasn't.
2014-05-17 14:29:28 -04:00
irungentoo
3aef4711ce
Added function to set the DHT public key in onion_client. 2014-05-17 13:16:58 -04:00
irungentoo
a5da6df144
Net_crypto can now handle packets sent as TCP OOB packets.
Added timestamp to know which DHT public key is good in case
onion_client and net_crypto report different ones.
2014-05-17 12:33:22 -04:00
irungentoo
454cadb91c
Changed cookie/cookie request packet.
Cookie now contains the dht public key of the peer which makes
more sense than including the real public key of the reciever.

It means we no longer have to rely entirely on onion_client to
find the dht public key of the other peer.
2014-05-17 09:21:07 -04:00
irungentoo
86c191c2d4
Fixed typo. 2014-05-16 17:50:26 -04:00
irungentoo
3ab05b6e2e
Some TCP code added to net_crypto.
add_tcp_relay() can be used to connect to some TCP relays.

If both Toxes are connected to the same TCP relay(s) and create a
connection on which they set the others dht_public_key, they will
connect.
2014-05-16 17:29:50 -04:00
irungentoo
933428b899
Removed non spec behaviour. 2014-05-16 14:09:46 -04:00
mannol
843171fbc8 This works. 2014-05-16 19:56:40 +02:00
irungentoo
1f7d8b71f0
Fixed TCP_client connections not timing out correctly. 2014-05-16 13:42:19 -04:00
irungentoo
cda3cedd37
TCP_server fix.
Clear the connections array when connection is killed.

Don't allow duplicate entries in connections array.
2014-05-16 12:43:53 -04:00
irungentoo
297281dea5
Fixed some issues in TCP_server.
Timed out connections now remove themselves correctly.

If a peer with the same public key as another tries to connect,
the old connection is killed.
2014-05-16 11:26:41 -04:00
irungentoo
a514167952
Exposed and tested disconnect notification TCP packets. 2014-05-15 20:57:55 -04:00
irungentoo
1e7164fcee
Fixed possibility that packet_send_rate would get stuck. 2014-05-15 16:49:39 -04:00
irungentoo
c5559e192d
Added OOB packets to the TCP client and server. 2014-05-14 17:15:43 -04:00
irungentoo
0b2c44a708
It's bad to have more than one path with the same first node in the
same path array.
2014-05-14 12:08:30 -04:00
irungentoo
8afe4a4fd7
Really fixed TCP_test. 2014-05-14 06:30:05 -04:00
irungentoo
c2523a3c67
Fixed TCP_test.
TCP_test now tests set_tcp_connection_number.
2014-05-13 20:52:34 -04:00
irungentoo
6b1578af3d
TCP_client callbacks now have a per connection number that can be set. 2014-05-13 18:09:38 -04:00
irungentoo
a05ab89dbf
pack/unpack nodes can now pack and unpack TCP nodes. 2014-05-13 14:53:59 -04:00
irungentoo
a5ff3f8aff
Nodes already in the DHT closelist should not be added to the toping list. 2014-05-13 12:14:09 -04:00
irungentoo
8d50e4a866
Fixed tox_test sometimes timing out. 2014-05-13 12:09:40 -04:00
irungentoo
2ea0657a6d
Fixed some issues.
Friends with multiple ips (on LAN) should be handled better.

Remade the function to check the crypto connection status.
2014-05-12 20:59:51 -04:00
irungentoo
5b58da35f9
Fixed segfault. 2014-05-12 19:48:19 -04:00