This patch adds a command line flag allowing users to pass a hex encoded
ed25519 private key to be used for the router identity keypair.
Signed-off-by: networkException <git@nwex.de>
* Add optional hop limiting to overlay traffic
* Cleanup commented code
* Add optional broadcast functionality for wakeup messages
* Update simulator to better handle changing network connections.
* Update wireshark plugin
* Fix frame tests
* Fix incorrect broadcast signature verification
* Move broadcast consts to consts file
* Only send broadcasts on the best connection to a peer
* Send broadcast immediately to newly added peer
* Fix broadcast frame marshalling
* Move keepalive timeouts to consts file
* Hook broadcasts into the sim logic
* Add broadcast info to sim ui
* Fix sim broadcast timestamps
* Add proper timestamps to broadcast events
* Drain timer when disabling broadcasts
* Update licensing comments for new broadcast files
* Remove unnecessary logging
* Filter broadcasts based on time since last seen broadcast
* Fix traffic forwarding comment
* Only send broadcasts to peer using best connection
* Ensure bootstraps have same root key and sequence
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This patch adds support for connecting to multiple other static peers by
seperating each with a comma in the --connect argument.
Signed-off-by: networkException <git@nwex.de>
Signed-off-by: networkException <git@nwex.de>
* Hybrid routing
* Clear the coords cache when the root changes
* Define `coordsCacheLifetime`
* Refactor sim pings to use router FilterFn for hop counting
* Various tweaks, fix stretch calc, two packet types again temporarily
* Back to a single packet type again
* Speed up sim, link prioritisation for tree routing
* Put consts together
* Preamble pings so `simws` peers don't cause panics
* Don't drop things that aren't pings
* Smaller tree announcements
* Don't send a watermark when tree-routing
* Fix frame test and add new test for hybrid routing variants
* Cleanup sim adversaries to match new protocol types
* Refactor sim stretch reporting
* Start ping hop count at 1 since dest node doesn't increment count
* Move coords cache timer interval to a constant
* Add TODO
Co-authored-by: Devon Hudson <devonhudson@librem.one>
* Change to 32 bit atomics for bandwidth tracking
* Use actor-protected `uint64` instead of atomics
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Fix error message after switching from utp to quic
* Implement (*SessionProtocol).Close()
* Update deps
* Handle repeat calls to (*SessionProtocol).Close()
Based on https://github.com/lucas-clemente/quic-go/blob/master/server.go#L283
* Update deps again and fix related issues
* Use sync.Once instead of sync.Mutex+bool
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Sim - only test pings between regular nodes (not adversaries)
* Sim - recalculate graph used for stretch when appropriate
* Set read deadline to prevent sim deadlock
* Cleanup read deadline
* Move read deadline behind router actor access
* Change read deadline to be atomic
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
* Initial soft-state testing
* Fix `pineconeip`
* Try raising the intervals a bit
* Tighter expiry
* Tweaks
* Try to speed up convergence but reduce idle noise
* More tweaks
* Handle disconnections on destination ports, tweak next-hops
* All traffic is either bootstrap or not, more tweaking
* Protocol calming, loop detection, bootstrap signatures
* Tidy up sim
* Fix unit test
* Don't drop pong responses as looping traffic
* Remove unused snake path id
* Remove unused variable from nextHopsSNEK
* Unassign setup acks capability from soft state capabilites
* Cleanup comments to reflect new softstate logic
* Remove unused candidate variable from state
* Update sim and events to reflect softstate changes
* Update wireshark dissector to match softstate frames
* Add unit test for snake bootstrap
* Fix incorrect comment about bootstrap forwarding conditions
* Add `queue` interface
* Initial docs update for softstate algorithm
* Softstate doc updates
* Fix logic for selecting lowest latency links
* Update docs with watermark information (#52)
* Update docs with watermark information
* Further clarifications to watermark docs
* Fix `pinecone.lua`
Co-authored-by: Devon Hudson <devonhudson@librem.one>