1
0
forked from extern/smegmesh
Commit Graph

154 Commits

Author SHA1 Message Date
Tim Beatham
255d3c8b39 66-improve-graph-dot-tool
- Showing services a node provides
- Showing all meshes not just one
- Showing the default route
2023-12-25 01:25:20 +00:00
Tim Beatham
41899c5831 66-improve-graph-dot-tool
Improving the graph dot tool so that it shows all
meshes
2023-12-25 01:10:11 +00:00
Tim Beatham
0b91ba744a 61-improve-unit-test-coverage
- Provided unit tests for g_map and 2p_map
2023-12-22 23:57:10 +00:00
Tim Beatham
67483c2a90 64-unit-test-two-phase-set
Provide unit tests for two phase set to make it more
transparent what exactly they are doing.
2023-12-22 23:57:10 +00:00
Tim Beatham
0cc3141b58 61-improve-unit-testing-coverage
- Added missing files to commit
2023-12-22 21:49:47 +00:00
Tim Beatham
ceb43a1db1 61-improve-unit-testing-coverage
- Got unit tests passing
- Improved manager unit tests
2023-12-22 21:47:56 +00:00
Tim Beatham
6ed32f3a79 bugfix-push-pull
Organised groups as a tree so that there
isn't a limit to dissemination
2023-12-19 00:50:17 +00:00
Tim Beatham
b6199892f0 bugfix-pull-only
Bugfix with inter-cluster communication pull not working
2023-12-18 22:17:46 +00:00
Tim Beatham
ad22f04b0d bugfix-pull-only
After certain period of time if no changes have
occurred then pull
2023-12-18 20:45:56 +00:00
Tim Beatham
092d9a4af5 checking-latency-for-pull-only 2023-12-17 09:44:32 +00:00
Tim Beatham
19abf712a6 Fixing bug with nodes being removed 2023-12-12 12:45:41 +00:00
Tim Beatham
2dc89d171b 55-cli-optionifor-peer-type
- Ability to specify WireGuard keepalive in the CLI formatter
- Ability to specify publicly routeable endpoint
- Ability to specify whether to advetise routes into the mesh,
and whether to advertise default routes.
2023-12-12 11:58:47 +00:00
Tim Beatham
13bea10638 main - bugfix
- Nodes not being removed when deleted because when node gossips again
  it is readded.
- Keep track of highest vector clock we have removed and used this as a
  mark for determining if something is stale.
2023-12-11 11:09:02 +00:00
Tim Beatham
3222d7e388 main - adding WireGuard stats to JSON objects
- Adding WireGuard stats through to IPC calls so that they can be used
by the API
2023-12-11 09:55:25 +00:00
Tim Beatham
1789d203f6 main - fix default routing being deleted
Default route keeps fluctuating on configuration
update.
2023-12-10 23:35:00 +00:00
Tim Beatham
a5074a536e main - BUGFIX
- segfault BUGFIX
2023-12-10 22:31:24 +00:00
Tim Beatham
fe14f63217 53-run-commands-pre-up-and-post-down
- Ability to run a command pre up and post down
- Ability to be a client in one mesh and a peer in the other
- Added dev card to specify different sync rate, keepalive rate per
  mesh.
2023-12-10 19:21:54 +00:00
Tim Beatham
1e263cc6a8 51-bugfix-routes-not-removing-when-withdrawn
- Routes are not being removed despite being withdrawn from the
configuration.
- Best path routes are not shared across interfaces
- Bug in consistent hashing wrong parameter passed caused by
refactorings.
2023-12-10 15:10:36 +00:00
Tim Beatham
f855f53fbf 50-give-client-ability-to-bridge-meshes
Client can act as a route bridging meshes. Cient send keepalives
to all of it's peers in the different meshes act as a bridge between
the meshes
2023-12-08 23:56:07 +00:00
Tim Beatham
815c4484ee 47-default-routing
Implemented default routing and improved size of gossip. Using 64 bit
hash funciton to identify vector.
2023-12-08 20:02:57 +00:00
Tim Beatham
0058c9f4c9 47-default-routing
Implementing default routing so that all traffic goes out of an
exit point.
2023-12-08 11:49:24 +00:00
Tim Beatham
661fb0d54c 45-use-statistical-testing
Keepalive is based on per mesh and not per node.
Using total ordering mechanism similar to paxos to elect a leader
if leader doesn't update it's timestamp within 3 * keepAlive then
give the leader a gravestone and elect the next leader.
Leader is bassed on lexicographically ordered public key.
2023-12-07 18:18:13 +00:00
Tim Beatham
64885f1055 45-use-statistical-testing
Using statistical testing to test whether the node has failed.
2023-12-07 01:44:54 +00:00
Tim Beatham
a3ceff019d 43-use-gravestones
Change of approach from keepalive to a noiseless protocol
2023-12-06 22:45:04 +00:00
Tim Beatham
1b18d89c9f 41-bugfix-fluctuating-ips
Fluctuating ips creating hub and spoke.
2023-12-05 02:00:16 +00:00
Tim Beatham
245a2c5f58 41-bugfix-fluctuating-ips
If the node is a peer then add the client in the WG
configuration.
2023-12-04 17:40:24 +00:00
Tim Beatham
c40f7510b8 41-bugfix-fluctuating-ips
IPs of clients fluctuating because there isn't a strict order on
clients. Client's need to be processed before the peers.
2023-12-04 17:32:50 +00:00
Tim Beatham
78d748770c BUGIX Hash client by public key 2023-12-04 17:13:51 +00:00
Tim Beatham
0ff2a8eef9 BUGFIX: Allowed IPs fluctuating 2023-12-04 17:11:37 +00:00
Tim Beatham
fd7bd80485 BUGFIX
Don't get device each time it is an expensive operation.
2023-12-04 16:40:15 +00:00
Tim Beatham
3ef1b68ba5 BUGFIX: Hashing datastore to work out changes
Changed hashing implementation to work out if there are changes
in the data store
2023-11-30 15:58:26 +00:00
Tim Beatham
650901aba1 39-implement-two-phase-map
Implemented my own two phase map based on vector clocks
2023-11-30 02:02:38 +00:00
Tim Beatham
a82eab0686 Bugfix
Added replace peers so that deleted nodes are automatically removed
2023-11-28 14:43:55 +00:00
Tim Beatham
32e7e4c7df main
Bugfix. Fixed issue where consistent hashing was not working.
2023-11-28 14:42:09 +00:00
Tim Beatham
d8e156f13f 36-add-route-path-into-route-object
Added the route path into the route object so that we can
see what meshes packets are routed across.
2023-11-27 18:55:41 +00:00
Tim Beatham
a2517a1e72 34-fix-routing
- Added mesh-to-mesh routing of hop count > 1
- If there is a tie-breaker with respect to the hop-count use consistent
hashing to determine the route to take based on the public key.
2023-11-27 15:56:30 +00:00
Tim Beatham
aef8b59f22 32-fix-routing
Flooding routes into other meshes a bit like BGP.
2023-11-25 03:15:58 +00:00
Tim Beatham
4030d17b41 Fixed routing issue 2023-11-24 17:49:06 +00:00
Tim Beatham
d1a74a7b95 32-incorporate-dns
Incorporated a DNS server. A DNS server can be run to resolve host
names.
2023-11-24 15:04:07 +00:00
Tim Beatham
2c406718df 29-only-ping-clients-who-have-updated-their-config
Only consider clients who have updated their config when synchronising
with peers. Consider a dead time where we don't have a handshake and
a prune time when we remove them from the WireGuard configuration.
2023-11-24 12:37:54 +00:00
Tim Beatham
7be11dbaa3 27-remove-client-grpc-endpoint
Removed a client's grpc endpoint value. Client's aren't publicly
available so there is no need for a client's gRPC endpoint.
Also changed a node ID's to their public key. A node id's public
address is an issue for mobility of clients as their endpoint
is subject to change
2023-11-24 12:07:03 +00:00
Tim Beatham
e7ac8c5542 Only updating WireGuard config if node exists 2023-11-22 13:08:02 +00:00
Tim Beatham
4c54022f63 25-modify-code-to-use-public-api
Modify the code to use a public IP address by default if none is
specified
2023-11-22 10:41:54 +00:00
Tim Beatham
624bd6e921 24-keepalive
Persistent keep alive working
2023-11-21 21:26:31 +00:00
Tim Beatham
7b939e0468 24-keepalive-holepunch
Added the ability to hole punch NAT
2023-11-21 20:42:43 +00:00
Tim Beatham
6e201ebaf5 24-keepalive-holepunch
Nodes acting as peers and nodes acting as clients
2023-11-21 16:42:49 +00:00
Tim Beatham
06542da03c main
Fixed problems with timestamp not updating
2023-11-21 13:31:34 +00:00
Tim Beatham
95f4495b0b 21-phonetic-words-ipv6
Simple what 8 words implementation
2023-11-20 18:07:52 +00:00
Tim Beatham
330fa74ef4 IPv6 What 8 Words
what 8 words for ipv6 started
2023-11-20 15:22:32 +00:00
Tim Beatham
b179cd3cf4 Hashing the WireGuard interface
Hashing the interface and using ephmeral ports so that the admin doesn't
choose an interface and port combination. An administrator can alteranatively
decide to provide port but this isn't critical.
2023-11-20 13:03:42 +00:00
Tim Beatham
388153e706 Stubbing out WireGuard components
Stubbing our WireGuard components so that I can use docker/podman
network_mode=host. This is much more efficient than the docker/podman
userspace network.
2023-11-20 11:28:12 +00:00
Tim Beatham
36c264b38e 25-ability-aliases
Fixed unit tests failing
2023-11-17 22:18:53 +00:00
Tim Beatham
68db795f47 Ability to specify aliases
Ability to specify aliases that automatically append to /etc/hosts
2023-11-17 22:13:51 +00:00
Tim Beatham
f6160fe138 Adding aliases that automatically gets added 2023-11-17 19:13:20 +00:00
Tim Beatham
5f176e731f Developed a rest API 2023-11-13 10:44:14 +00:00
Tim Beatham
1a864b7c80 Removed interface manipulation via os.Exec into
rtnetlink calls
2023-11-07 19:48:53 +00:00
Tim Beatham
acbeb689b5 Prune nodes if they exceed their timeout time 2023-11-06 13:37:28 +00:00
Tim Beatham
bc6cd4fdd5 Modified syncer 2023-11-06 10:05:23 +00:00
Tim Beatham
c88012cf71 Added health system to count how many times a node
fails to conenct.
2023-11-06 09:54:06 +00:00
Tim Beatham
ef614f5961 Add cert dependencies 2023-11-05 18:06:24 +00:00
Tim Beatham
9454d62417 Adding stubs and writing tests 2023-11-05 18:03:58 +00:00
Tim Beatham
bb07d35dcb Unit testing the automerge library and lib functions 2023-11-05 12:13:40 +00:00
Tim Beatham
d17dce3b1e Added clustering and clean up 2023-11-03 15:26:09 +00:00
Tim Beatham
843caddf6b Implemented clustering betweeen nodes 2023-11-03 15:24:18 +00:00
Tim Beatham
8d8a13d6ff Build error forgot to add query.go 2023-11-01 13:17:58 +00:00
Tim Beatham
d462d95d6d Ability for each node to set their description describing what
service they provide.
2023-11-01 11:58:10 +00:00
Tim Beatham
e63edea763 Fixing an issue where packets are dropped each time
we change wg configuration
2023-11-01 10:39:46 +00:00
Tim Beatham
aa3d40f82c Added JMESpath to query the state of specific
meshes.
2023-10-31 10:34:09 +00:00
Tim Beatham
e56780fdd4 Added ability to query the JSON data store 2023-10-30 19:02:28 +00:00
Tim Beatham
579426e32d Tidied up code, made changes for benchmarking. 2023-10-30 16:49:02 +00:00
Tim Beatham
472718c9a3 Standardising filenames, interfacing out
for tests and modifying network device
manipulation
2023-10-28 16:38:25 +01:00
Tim Beatham
5757d81a81 Advertising routes into the mesh 2023-10-27 17:49:18 +01:00
Tim Beatham
4c6bbcffcd Interfacing out components for unit testing 2023-10-26 16:53:12 +01:00
Tim Beatham
f1cfd52a91 Cleaning up reposistory 2023-10-25 18:36:13 +01:00
Tim Beatham
c205be6748 Implemented the forwarding of packets between meshes 2023-10-25 18:34:38 +01:00
Tim Beatham
180f5e226c Ability to be in multiple meshes and refactored consensus 2023-10-24 16:00:46 +01:00
Tim Beatham
8e89281484 Tested with large number of nodes 2023-10-24 00:12:38 +01:00
Tim Beatham
ef2b57047d Bidirectional syncing 2023-10-23 18:13:08 +01:00
Tim Beatham
360f9d3c54 Few refactorings of managing the mesh and a graph
visualisation tool for seeing the state of a mesh.
2023-10-22 13:34:49 +01:00
Tim Beatham
c4dc984fc7 Added ability to detect if a node should be removed from the mesh. 2023-10-21 18:08:45 +01:00
Tim Beatham
976dbf2613 Automatically remove nodes from the mesh after a
certain threshold.
2023-10-20 17:35:02 +01:00
Tim Beatham
c200544cee Timer in go that syncs with random nodes in the mesh every
given time interval.
2023-10-20 12:41:06 +01:00
Tim Beatham
ec87afc235 Added sync 2023-10-10 20:14:40 +01:00
Tim Beatham
e729c5b181 CRDTs fully incorporated 2023-10-06 18:25:38 +01:00
Tim Beatham
47e260e310 Incorporated automerge 2023-10-06 11:52:51 +01:00
Tim Beatham
81e2d16316 Implementing CRDTs 2023-10-06 10:12:46 +01:00
Tim Beatham
923ca716ec Automerge changes 2023-10-05 17:48:54 +01:00
Tim Beatham
f191c4ff44 Added package changes 2023-10-04 17:17:53 +01:00
Tim Beatham
a069b89a9a Refactored client and server and interfaced out dependencies 2023-10-02 16:03:41 +01:00
Tim Beatham
52e5e3d33c JWT Authentication endpoint 2023-10-01 20:14:09 +01:00
Tim Beatham
94afd68460 Implemented JWT authentication 2023-10-01 19:01:35 +01:00
Tim Beatham
c819bec63d Interfaced problem out 2023-09-29 15:00:20 +01:00
Tim Beatham
a0c20e4d11 IPV6 SLAAC 2023-09-28 16:55:37 +01:00
Tim Beatham
ea2a073875 Added ability to set interface as up 2023-09-21 18:43:29 +01:00
Tim Beatham
6725a193aa Got it working with peer-to-peer network. Does not mark nodes as stale 2023-09-21 13:50:59 +01:00
Tim Beatham
d9dc0ba6b3 Added the gRPC proto file 2023-09-21 11:14:57 +01:00
Tim Beatham
91212e60cf Simple direct peer-to-peer communication 2023-09-20 19:05:29 +01:00
Tim Beatham
cfdf377567 Pseudo-random address allocation 2023-09-20 14:34:34 +01:00
Tim Beatham
dcf851a02e Ability to add peer to config 2023-09-19 23:50:44 +01:00
Tim Beatham
6e9ca4f31f Migrated to using grpc for handling rpc calls 2023-09-19 18:29:35 +01:00