Commit Graph

2441 Commits

Author SHA1 Message Date
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
irungentoo
53cc5ea6a9
Fixed onion test. 2014-05-12 19:43:44 -04:00
irungentoo
8783bea25e
Use ping_array to store onion announce information instead of sending
over a huge cookie.

This reduces the size of the onion announce packets by 100 bytes.
2014-05-12 14:39:12 -04:00
irungentoo
10da970e0d
Added ping_array, a special efficient array for use in operations
that require sending ping type packets.

Made ping packets use it.
2014-05-12 14:07:03 -04:00
irungentoo
87cec79206
Fixed issue where callbacks were not set for accepted connection. 2014-05-11 19:35:23 -04:00
irungentoo
1580a5c696
Added kill packets.
There should be no more delay between a peer closing their client
and their friend being notified of them going offline. (unless the
kill packet is lost)
2014-05-11 18:27:23 -04:00
irungentoo
ff4368add7
Fixed build by adding librt to build system. 2014-05-10 16:09:44 -04:00
irungentoo
1e485b2c2f
Added basic congestion control to net_crypto. 2014-05-10 13:42:59 -04:00
mannol
9bb910a370 This should work 2014-05-10 18:00:49 +02:00
irungentoo
b0731f54cd
Fixed small issues.
Added set_buffer_end().

File transfer test now checks if pieces arrive correctly.
2014-05-09 21:46:37 -04:00
irungentoo
a26ced5fcb
Merge branch 'master' into TCP 2014-05-08 18:26:01 -04:00
irungentoo
89022326d3
Fixed major denial of service issue. 2014-05-08 18:07:51 -04:00
irungentoo
98f20c76de
Connection between toxes is lossless once again. 2014-05-08 18:04:46 -04:00
irungentoo
9fccb80eec
Fixed bug.
memcmp is easy to confuse visually with memcpy but they do very different
things.

It was also comparing (copying) the senders real public key with their DHT
public key.
2014-05-07 14:18:14 -04:00
irungentoo
9cabfe845e
Removed useless code. 2014-05-06 17:37:50 -04:00
irungentoo
52bfd7cd55
Merge branch 'zetok-readme' 2014-05-06 08:43:57 -04:00
Zetok Zalbavar
1d87660fc4 Update README.md
fixes #828
closes #829
2014-05-05 17:37:41 +01:00
irungentoo
32c8d5114c
Fixed bug. 2014-05-05 10:00:37 -04:00
irungentoo
8369ac98b0
Updated A/V to new time function. 2014-05-04 20:33:08 -04:00
irungentoo
fca5e1b99a
Added arrays to store packets on send/recv in net crypto.
Wrote down more of the protocol.

Padding support has been added and implemented which will make it
possible for us to pad packets to mitigate length related attacks.
2014-05-04 20:04:43 -04:00
irungentoo
4dc0af61c6
All time in core is now monotonic. 2014-05-03 11:58:45 -04:00
irungentoo
20e9d9c079
Fixed other test. 2014-05-02 21:51:55 -04:00
irungentoo
38ebfc2989
Fixed one test. 2014-05-02 21:44:09 -04:00
irungentoo
db78c99ff4
Messenger now works with the new net_crypto api.
Added callbacks in net_crypto for the data packets and status changes.

Added onion_getfriend_DHT_pubkey to onion_client.

Net crypto isn't done yet so connections between toxes are not
lossless, this means file sending is broken hence why the test fails.
2014-05-02 21:25:23 -04:00
mannol
0fa03b9240 Bunch of random changes 2014-05-03 01:46:03 +02:00
irungentoo
8ae0a79305
Move the handshake creating code to a function.
Fixed another instance where it was not sent.
2014-05-02 15:59:13 -04:00
irungentoo
8b29ac8eae
Fixed one case of the handshake not being sent. 2014-05-02 15:25:18 -04:00
irungentoo
aca18f65c3
Small fixes. 2014-05-02 15:13:10 -04:00
irungentoo
8e24771fc4
Remove Lossless UDP (This breaks Tox.) 2014-05-02 10:36:48 -04:00