1
1
Fork 0
mirror of https://github.com/oxen-io/lokinet synced 2023-12-14 06:53:00 +01:00
Commit graph

342 commits

Author SHA1 Message Date
Thomas Winget bd4f239aa3 preconstructed dicts for error/timeout/ok
also move messages' statuses into their own namespace
2023-11-16 15:35:58 -05:00
Thomas Winget 32395caec1 build fixes, clang-format, minor touch-ups 2023-11-08 15:13:44 -05:00
Thomas Winget 9e9c1ea732 chahca nonce size is 24 bytes
Lots of code was using 32-byte nonces for xchacha20 symmetric
encryption, but this just means 8 extra bytes per packet wasted as
chacha is only using the first 24 bytes of that nonce anyway.

Changing this resulted in a lot of dead/dying code breaking, so this
commit also removes a lot of that (and comments a couple places with
TODO instead)

Also nounce -> nonce where it came up.
2023-11-08 15:13:44 -05:00
Thomas Winget abb2f63ec6 path control message response status changes
change path control message inner message response to take just a
string, which will be a bt-encoded response with an early key for
status.  If there is a timeout we pass a bt dict that only has that as
the status, else the response we de-onioned should have either an OK
status or some other error.

change messages to use new status key

correctly call Path::EnterState on path build response
2023-11-08 15:12:38 -05:00
Thomas Winget b0fb194e2c path control messages and onioning fleshed out
- control messages can be sent along a path
- the path owner onion-encrypts the "inner" message for each hop in the
  path
- relays on the path will onion the payload in both directions, such
  that the terminal relay will get the plaintext "inner" message and the
  client will get the plaintext "response" to that.
- control messages have (mostly, see below) been changed to be invokable
  either over a path or directly to a relay, as appropriate.

TODO:
  - exit messages need looked at, so they have not yet been changed for
    this
  - path transfer messages (traffic from client to client over 2 paths
    with a shared "pivot") are not yet implemented
2023-11-06 12:31:24 -05:00
Thomas Winget c25ced50a3 path build message handling mostly finished
there are a few TODOs which merit further discussion
2023-11-06 12:24:03 -05:00
dr7ana af0ac28119 Review fixes + misc fixes 2023-11-02 11:00:06 -07:00
dr7ana fa4471f566 {Remote,Local}RC's
- RemoteRC supplants most of the functionality throughout the code of RouterContact
- Next step will be to sort out CI issues, then see if we can get rid of either LocalRC (and therefore RouterContact entirely)
2023-11-02 05:30:49 -07:00
dr7ana 07271f9ae7 RC refactor layout
- Local and Remote RC's now implemented with discrete functionalities and uses
2023-10-31 13:49:14 -07:00
dr7ana 7314c2a22a CI Fixes, squash 2023-10-25 12:43:32 -07:00
dr7ana 46ad8d4058 Clang format include sorting + CMake
- includes are now sorted in consistent, logical order; first step in an attempt to fix the tomfoolery (no relation to Tom) brought in by include-what-you-use
- shuffled around some cmake linking to simplify dependency graph
- superfluous files removed
2023-10-24 12:11:51 -07:00
dr7ana bda8b211dd Cmake restructuring 2023-10-24 08:40:18 -07:00
Jason Rhinelander f4f5ab0109 "Refactor" aka delete Crypto/CryptoManager
- Get rid of CryptoManager.
- Get rid of Crypto.
- Move all the Crypto instance methods to llarp::crypto functions.
  (None of them needed to be methods at all, so this is simple).
- Move sodium/ntru initialization into static initialization.
- Add llarp::csrng, which is an available llarp::CSRNG instance which is
  a bit easier than needing to construct a `CSRNG rng{};` in various
  places.
- Various related small simplifications/cleanups.
2023-10-24 08:40:18 -07:00
dr7ana e710cfea47 Review commit 2023-10-24 08:40:18 -07:00
dr7ana 0e451db77f Compilation fixes
- almost all errors have been commented out for refactor or already refactored
- committing this prior to sorting out the cmake structure
- upcoming include-what-you-use application
2023-10-24 08:40:18 -07:00
dr7ana 3ae8fce77d Outbound context absorbed sendcontex
- message transmission routed through refactored handling
- still work to be done, but now to make it compile at least
2023-10-24 08:40:18 -07:00
dr7ana 41312abab0 introset and message transmission underway
- message handling through classes that inherit from PathSet
- cleanups around link_manager
- etc etc
2023-10-24 08:40:18 -07:00
Jason Rhinelander 6d1566572b
Coalesce from_string/from_string_view
The version taking a string_view will already be perfectly callable with
a string, so just combine them into one.
2023-10-18 12:44:37 -03:00
dr7ana e4315cdc69 More message handling underway 2023-10-16 11:05:07 -07:00
dr7ana 6b1e3fbbc0 Touched up path build message handling 2023-10-16 06:39:57 -07:00
dr7ana a6f901a3a9 RIP everything 2023-10-12 13:37:45 -07:00
dr7ana 577f5e61ea De-mutexing
- mutexes in nodedb and rc_lookup_handler removed
- implemented thread-safe queueing to event loop for previously locked accesses
2023-10-12 11:46:41 -07:00
dr7ana 5ccec24470 callsafe
- Added call_get to ev.hpp to queue event loop operations w/ a return value
- de-mutexed NodeDB and made all operations via event loop. Some calls to NodeDB methods (like ::put_if_newer) were wrapped in call->get's, but some weren't. All function bodies were using mutex locks
2023-10-12 06:43:18 -07:00
dr7ana c8dae875b5 Path routing partially implementing
- Reworking how paths to services and snodes
- pushing for Tom to rebase for path handling
2023-10-11 14:17:11 -07:00
Thomas Winget 2cc02d7b60 handle path build requests, generate responses 2023-10-11 05:35:07 -07:00
dr7ana bd81357f62 Path message transmission
- implementing DHT message transmission methods and surrounding functionalities across paths
2023-10-10 13:50:04 -07:00
dr7ana 65bd224cf0 Exit endpoints implemented
- free standing functions in link_manager
- sign and serialize functionalities siloed in llarp/messages/exit.hpp
2023-10-06 08:35:34 -07:00
dr7ana 4ed6a01e02 following up before Tom meeting 2023-10-04 07:12:16 -07:00
Thomas Winget f35f7fe3f2 refactor path build message construction, no more async nonsense 2023-10-04 04:17:30 -07:00
dr7ana 206bd0b85e wawaweewa 2023-10-03 13:11:51 -07:00
dr7ana 1a9f977208 Message method implementation continued
- tons of surrounding stupid refactoring required
2023-10-03 13:00:32 -07:00
dr7ana ad007ff832 libquic/oxen-mq/oxenc version bumps 2023-09-29 10:44:31 -07:00
dr7ana d9ead7d0f6 crypto and message encoding
- libsodium calls streamlined and moved away from stupid typedefs
- buffer handling taken away from buffer_t and towards ustrings and strings
- lots of stuff deleted
- team is working well
- re-implementing message handling in proper link_manager methods
2023-09-29 10:29:05 -07:00
dr7ana d0c3837384 libquic bparser merged
- bumped version to latest main branch commit
- wired up callbacks to set RPC request stream on creation
- methods for I/O of control and data messages through link_manager
2023-09-25 13:52:23 -07:00
dr7ana a3e6cec7e7 Address type migration + libquic bump
- llarp/router/router.hpp, route_poker, and platform code moved to libquic Address types
- implementing required methods in link_manager for connection establishment
- coming along nicely
2023-09-19 13:15:59 -07:00
dr7ana bfa9629779 More carving + libquic bump
- bumped libquic to begin implementing dependent features on connection open/close signals
- more gutting of interface classes
2023-09-18 14:50:23 -07:00
dr7ana aaf688cf81 Deleted a lot
- RIP llarp/iwp/* and most of llarp/link
2023-09-15 14:15:03 -07:00
dr7ana fd527d612f Carving through llarp/link 2023-09-14 07:54:51 -07:00
dr7ana 7f8207d5d3 Nuked superfluous interface classes
RIP:
- i_link_manager
- i_outbound_message_handler
- i_gossiper
- i_outbound_session_maker
- i_rc_lookup_handler
2023-09-13 13:34:34 -07:00
dr7ana 11e54f6552 More message refactoring
- routing messages and surrounding code
- shim code in place for iteration and optimization after deciding what to do with buffer, string handling, and subsequent function calls
2023-08-31 09:28:16 -07:00
dr7ana a921575c55 mein gott 2023-08-30 12:25:47 -07:00
Thomas Winget e2e7ed3490 pass datagram data cb to endpoint ctor, not listen/connect
Still ngtcp2 link errors, but everything else seems to build.  Have not
checked tests; not likely they will build or be correct if broken.
2023-08-28 19:32:02 -04:00
Thomas Winget a44fdab460 LinkManager linker issues / explicit constructor 2023-08-28 17:21:03 -04:00
Jason Rhinelander c92facc15e
Minor cleanups 2023-08-28 18:09:23 -03:00
Thomas Winget 99be31b72f compiles, but does not link 2023-08-28 16:54:11 -04:00
dr7ana 0260da6bd9 cleaning up after tom 2023-08-28 10:39:40 -07:00
dr7ana 620f916e65 Bump oxen-libquic to latest PR's 2023-08-28 10:17:44 -07:00
Thomas Winget ab86318404 Partial implementation of libquic as wire protocol
TODO:

- set up all the callbacks for libquic

- define control message requests, responses, commands

- plug new control messages into lokinet (path creation, network state, etc)

- plug connection state changes (established, failed, closed, etc.) into lokinet

- lots of cleanup and miscellanea
2023-08-28 11:06:10 -04:00
dr7ana ad5055b85f cmake tweaks for redundant dependencies (WIP) 2023-08-28 11:06:06 -04:00
Thomas Winget 22ac3cd26e initial quic wire proto Endpoint skeleton 2023-08-28 10:59:13 -04:00