Commit graph

297 commits

Author SHA1 Message Date
Devon Hudson
b35aec69f5
Add DOMpurify to sim dockerfile (#85) 2025-03-04 15:55:58 +00:00
davidegirardi
218b280199
Merge commit from fork
* Add DOMPurify https://github.com/cure53/DOMPurify

* Use DOMPurify
2025-03-04 15:14:18 +00:00
Devon Hudson
ea4c33717f
Use new quic api 2023-08-09 19:06:12 -06:00
Devon Hudson
0b58977907
Update go version in CI 2023-08-09 17:18:04 -06:00
Devon Hudson
9e16ae8477
Bump quic-go version 2023-08-09 17:12:10 -06:00
Val Lorentz
64ce53bbb7
Fix incorrect assertion that all spanning trees are rooted (#79) 2023-06-23 14:56:51 +00:00
Till
8c3b24f264
Update to quic-go 0.32.0 (#78) 2023-02-10 18:12:30 +01:00
networkException
643089322c
Add flag for specifying secret key (#77)
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>
2023-01-19 19:26:40 +00:00
Devon Hudson
61850f0e63
Add TotalPeerCount to router api 2023-01-11 11:49:01 -07:00
Devon Hudson
56892e4ae5
Make hop limiting optional in the sim 2022-12-09 09:44:45 -07:00
Neil Alexander
6e3494efdf
Only start pprof if -tags debug 2022-11-28 10:14:39 +00:00
Devon Hudson
fef26631b8
Drop packets with unknown frame types 2022-11-18 12:20:51 -07:00
Devon Hudson
3998bafccc
Swap broadcast and traffic frame ids for backwards compatibility 2022-11-18 12:20:25 -07:00
devonh
218c39e0cd
Add broadcast & hop limiting functionality (#65)
* 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>
2022-11-17 21:45:03 +00:00
Neil Alexander
37f2e9b9ba
Use Go 1.18 in GHA 2022-11-03 12:58:49 +00:00
Neil Alexander
3faf7f2460
Require Go 1.18 2022-11-03 12:39:32 +00:00
Neil Alexander
ed36242800
Update quic-go to latest version 2022-11-03 12:38:33 +00:00
devonh
639feeff74
Change multicast interface to accept an external network callback (#76)
* Change multicast interface to accept an external callback for network interfaces

* Remove callback registration from gobind interface.

* Add comments explaining multicast interface callback registration.

* Further clarify multicast interface callback registration
2022-10-26 17:08:48 +01:00
devonh
ba39dd252d
Don't respond to first announcement received from a peer (#72) 2022-10-26 17:06:41 +01:00
0x1a8510f2
8c7047864f
Do not log ErrClosed in multicast (#70) 2022-10-26 17:06:25 +01:00
networkException
8e21bf17aa
Support connecting to multiple other static peers with --connect (#74)
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>
2022-10-26 17:05:03 +01:00
Neil Alexander
165e48623b
Update Dockerfile.sim 2022-10-24 14:36:27 +01:00
Neil Alexander
7a065312a9
Add Dockerfile for simulator 2022-10-24 14:28:38 +01:00
devonh
3adc85477d
Fix wireshark plugin for new hybrid routing (#71)
* Fix wireshark plugin for new hybrid routing

* Reorder forwarding frame types
2022-10-07 14:54:26 +00:00
devonh
4aa146a21e
Check root key and sequence for snek lowest latency next hop (#73) 2022-10-07 14:49:34 +00:00
devonh
d05e7fbb5d
Update docs with hybrid routing info. (#69) 2022-10-03 14:59:01 +01:00
devonh
2ce51dd4a4
Add capability to register interface info for multicast discovery (#68) 2022-09-29 15:52:34 +00:00
Neil Alexander
e6e59c3fc3
Don't shut down the conn if it isn't set (in the case of local peer) 2022-09-29 12:51:07 +01:00
Neil Alexander
20c54cefc0
Don't shut down local port 2022-09-29 12:46:28 +01:00
Neil Alexander
f7e35c1b62
Fix shutdown crash 2022-09-29 12:38:23 +01:00
Neil Alexander
957f51725e
Fix capabilities check 2022-09-29 09:10:13 +01:00
Neil Alexander
d0beb180f4
Hybrid routing (#67)
* 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>
2022-09-27 11:15:13 +01:00
devonh
0900fceecb
Don't use atomics for bandwidth tracking (#66)
* 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>
2022-09-23 16:19:05 +01:00
Neil Alexander
df85cb5026
Update peer type 2022-09-15 16:42:06 +01:00
Neil Alexander
59b87b5956
Gobind tweaks 2022-09-15 16:40:15 +01:00
Neil Alexander
608215eb1b
Watermark tweaks 2022-09-14 14:15:22 +01:00
Neil Alexander
5f18cf3f0a
Stronger frame reuse 2022-09-13 14:48:48 +01:00
Neil Alexander
b00b5e3144
Option refactor, allow blackholing local traffic 2022-09-13 14:41:45 +01:00
Neil Alexander
18cfdabc19
Enable manhole on pinecone 2022-09-13 14:11:57 +01:00
Neil Alexander
b215925d55
Remove logging line in fair queue 2022-09-12 10:34:34 +01:00
devonh
565beccfeb
Fix logic for bootstrap payload protection (#64) 2022-09-01 13:34:33 +00:00
0x1a8510f2
f106cfa910
Implement (*SessionProtocol).Close() (#60)
* 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>
2022-08-25 12:45:29 +01:00
Neil Alexander
df478f4d17
Fix accept errors in pinecone standalone (#30) 2022-08-25 12:43:16 +01:00
Neil Alexander
0905dfd337
Don't panic if we can't start multicast (cough Android cough) 2022-08-25 12:32:28 +01:00
Till
b7a830c08f
Update quic-go to v0.28.1 (#62) 2022-08-03 10:38:10 +01:00
devonh
548f79f87e
Sim bandwidth reporting (#59)
* Sim - update route graph to allow for showing a variety of analytics

* Sim - stub in network bandwidth graphs

* Sim - control graph update rate

* Sim - add bandwidth analytics

* Sim - add bandwidth analytics

* Sim - cleanup bandwidth reporting time

* Sim - refine bandwidth graphing

* Remove unnecessary variable initialization

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
2022-07-27 15:34:51 +00:00
devonh
c511735401
Sim - fix route table size event emission (#58) 2022-07-27 14:52:24 +01:00
devonh
2b04d9c00f
Fix sim ping deadlock by adding router read deadline (#55)
* 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>
2022-07-12 21:11:03 +00:00
Neil Alexander
1ce778fcde
Soft-SNEK (#43)
* 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>
2022-07-08 14:52:11 +01:00
devonh
c05f24e907
Remove ping frames from wireshark dissector (#48) 2022-06-08 16:43:31 +00:00