summaryrefslogtreecommitdiff
path: root/toxcore/onion_client.c
AgeCommit message (Collapse)Author
2016-12-22Wrap all sodium/nacl functions in crypto_core.c.iphydf
2016-11-09Remove new_nonce function in favour of random_nonce.iphydf
`new_nonce` has been an alias for `random_nonce` for a while now. Having two names for the same operation is confusing. `random_nonce` better expresses the intent. The documentation for `new_nonce` talks about guaranteeing that the nonce is different from previous ones, which is incorrect, it's just quite likely to be different.
2016-09-24Make toxcore code C++ compatible.iphydf
It is still C code, so still compatible with C compilers as well. This change lets us see more clearly where implicit conversions occur by making them explicit.
2016-09-16Ensure that all TODOs have an owner.iphydf
In the future, all TODOs added either need a bug number (TODO(#NN)) or a person's github user name. By default, I made irungentoo the owner of all toxcore TODOs, mannol the owner of toxav TODOs, and myself the owner of API TODOs.
2016-09-13Use <stdbool.h> and replace _Bool with bool.iphydf
This header is a requirement for the public API, therefore is assumed to exist. It is a C99 standard library header, and _Bool is not intended to be used directly, except in legacy code that defines bool (and true/false) itself. We don't use or depend on such code. None of our client code uses or depends on such code. There is no reason to not use bool.
2016-09-13Add some astyle options to make it do more.iphydf
It now enforces a bit more formatting. In particular, padding inside parentheses is removed. I would like it to remove padding after unary operators, but there seems to be no option for that.
2016-09-13Group #include directives in 3-4 groups.iphydf
1. Current module (if C file). 2. Headers from current library. 3. Headers from other library (e.g. toxcore includes in toxav). 4. System headers.
2016-09-06Make friend requests statelessGregory Mullen (grayhatter)
Messenger is slightly twisty when it comes to sending connection status callbacks It will very likely need at the very least a partial refactor to clean it up a bit. Toxcore shouldn't need void *userdata as deep as is currently does. (amend 1) Because of the nature of toxcore connection callbacks, I decided to change this commit from statelessness for connections changes to statelessness for friend requests. It's simpler this was and doesn't include doing anything foolish in the time between commits. group fixup because grayhatter doesn't want to do it "arguably correct" is not how you write security sensitive code Clear a compiler warning about types within a function.
2016-09-02Do not use `else` after `return`.iphydf
http://llvm.org/docs/CodingStandards.html#use-early-exits-and-continue-to-simplify-code
2016-09-01Sort #includes in all source files.iphydf
2016-08-31Add braces to all if statements.iphydf
2016-08-18Fix some compiler warnings.iphydf
2016-08-18Make tox_callback_friend_name stateless.iphydf
See #27 and #40 for details.
2016-01-27 fix: replace memset with sodium_memzero for sensitive dataRoman Proskuryakov
2016-01-27 add: comments about hairy codeRoman Proskuryakov
2016-01-27 fix: compare sensitive data with sodium_memcmpRoman Proskuryakov
fix: make increment_nonce & increment_nonce_number independent of user-controlled input fix: make crypto_core more stable agains null ptr dereference
2015-12-12Small onion search improvement.irungentoo
2015-12-11Unused variable.irungentoo
2015-12-11More DHT fixes.irungentoo
2015-12-11DHT improvements.irungentoo
Feed better nodes to onion, bootstrap off close clients when DHT friend is added.
2015-12-01Slightly increased number of peers to announce to.irungentoo
Some test fixes.
2015-07-03Fixed Tox reporting itself as being connected with TCP when using UDP only ↵irungentoo
on LAN.
2015-06-17Fixed warning.irungentoo
2015-06-11Reannounce if path is considered dead.irungentoo
2015-06-10Use real path num in onion client.irungentoo
2015-05-10TCP relays are not sure to be valid onion nodes.irungentoo
2015-05-01Added a define for the length of onion paths.irungentoo
2015-04-21Only allocate some TCP connections for onion use when needed.irungentoo
Added a function to enable and disable TCP onion connections.
2015-04-15Made net_crypto use TCP_connection.irungentoo
TODO: -Reconnection. -If UDP connction is good, connect to less TCP relays. -Store some TCP relays in friend connection associated to each friend?
2015-03-11tox_callback_connection_status() implemented.irungentoo
Attempted fix of connection checking to make it more stable.
2015-02-14Code cleanups.irungentoo
2015-02-12Code Cleanups.irungentoo
2015-02-11Code Cleanups.irungentoo
2015-02-11Code cleanups.irungentoo
2015-02-09Code Cleanups.irungentoo
2015-02-09Code Cleanups.irungentoo
2015-02-09Code cleanups.irungentoo
2015-02-09Code cleanups.irungentoo
2015-02-05Lowered CPU usage.irungentoo
Check if onion data will be sent before encrypting it, not after.
2015-01-29Code cleanups.irungentoo
Rename array in Node_format from client_id to public_key.
2015-01-26Code cleanup.irungentoo
2015-01-21Code cleanups.irungentoo
2015-01-16Tox should work better on TCP only when some people have broken TCPirungentoo
nodes and don't update them. Paths now try to use the same TCP node for their entire lifetime.
2015-01-11Attempted fix of Tox killing routers.irungentoo
This commit makes tox use one Onion_Client_Paths struct for all friends instead of one per friend. This should lower the number of ips tox sends packets to which is what I think causes the router issues.
2015-01-08Speed up connection to network on TCP only.irungentoo
Assume nodes we manage to connect to with TCP are good to use for the onion.
2014-12-30Remove useless code.irungentoo
2014-12-29Adjusted onion timeouts.irungentoo
2014-12-27onion_isconnected fix attempt.irungentoo
Try to make it more stable.
2014-12-25Onion client improvements.irungentoo
Put bootstrap nodes in a separate list than known good nodes.
2014-12-24Don't populate path nodes too much.irungentoo