Commit Graph

18 Commits

Author SHA1 Message Date
irungentoo
88ff81d9de Passed everything through astyle. 2013-08-16 13:11:09 -04:00
irungentoo
add81b3426 Merge pull request #471 from krisl/master
Add spam length to data length
2013-08-15 18:00:55 -07:00
irungentoo
b15230583c Fixed loading and a small problem with the length of crypto requests. 2013-08-15 20:56:22 -04:00
Aaron Lipinski
ff7b4f8418 Add spam length to data length in comparison against max size 2013-08-16 08:27:03 +12:00
irungentoo
4330bfbf87 Metadata collection prevention part 1 of ???.
Crypto requests packets are packets that can be routed by nodes in the
DHT. In this pull request I have merged both Natping requests and friend
requests into one common packet (Crypto request packets). Both these
packets should now only be distinguishable by the size of the data in
them to an outside observer for an example on how to send and recieve
data with these packets see: friend_requests.c

Note that these packets are prefixed with id 32 (friend request packets)
which means this change is compatible with the currently running DHT
bootstrap servers.

Also changed small thing in DHT_test.c
2013-08-14 18:26:00 -04:00
irungentoo
97f449a2f1 Fixed spam problem. (I broke the API so this will not build)
The friend address is what the byte string that you give away for people
to add you will be called.

1. Every friend address now contains a number set by the friend. This is
to prevent someone from randomly spamming people in the DHT with friend
requests and makes it so you need the person to actually give you the
address in some way to send the friend request. This number is expected
to be encrypted with the friend request. All requests that do not
contain this number will be rejected. This means the spammer can no
longer use the DHT to collect lists of valid addresses to spam. It also
enables users to quickly change the number in case a spammer gets hold
of the address and starts spamming it.

2. A 2 byte checksum will be added (not implemented yet) to prevent
people from accidentally adding random strings as friends. (NOTE that
this has nothing to do with the spam problem I just decided to add a
placeholder for it now.)
2013-08-13 09:32:31 -04:00
alek900
8d3e68b74d Added support for userdata in callbacks 2013-08-12 14:23:46 +02:00
slvr
7f27fcaf37 tabs -> spaces 2013-08-10 11:27:36 +01:00
slvr
6052b1f119 network_registerhandler 2013-08-10 00:43:50 +01:00
Christian Brueffer
0b8fa72914 Fix a recurring typo in code and comments. 2013-08-09 14:01:35 +02:00
Nick ODell
84607c8937 Fix bug where friendreq_handlepacket did not do bounds checking 2013-08-05 14:54:53 -06:00
irungentoo
14b43651c1 Ran the code through: astyle --style=linux 2013-07-27 08:43:36 -04:00
Konstantin Kowalski
241aca98bd A *lot* of style changes. 2013-07-26 23:07:25 -04:00
sometwo
a1fd6d53de Fix braces and a comment 2013-07-26 19:05:57 -03:00
irungentoo
056195be41 Fixed the multiple friends request recieved at the same time problem. 2013-07-26 17:06:03 -04:00
SilentSand
59b34e423b Formatting.
Many stylistic changes, mostly formatting code more closely to the
coding style.
2013-07-26 04:02:17 -04:00
SilentSand
f377eb9ca2 Licensing
Added the GPLv3 license to some files in addition to fixing some
comments at the beginning of the files.
2013-07-25 21:45:56 -04:00
irungentoo
55361eac6f Modified the way friend requests worked.
Added routing of friend requests.
2013-07-22 14:52:42 -04:00