Commit Graph

160 Commits

Author SHA1 Message Date
Killian Kemps b027e70eea doc: Fix env var for rejoin 2022-02-08 11:59:03 +01:00
killian 91d192a0af Merge pull request 'doc: Add rejoin' (#2) from doc-rejoin into master
Reviewed-on: https://git.weko.io/resilien/wesher/pulls/2
2022-02-08 11:55:34 +01:00
Killian Kemps 440810c1d7 doc: Add rejoin 2022-02-08 11:54:53 +01:00
killian b4a5b61255 Merge pull request 'Add keepalive to wesher' (#1) from keepalive into master
Reviewed-on: https://git.weko.io/resilien/wesher/pulls/1
2022-02-08 11:04:26 +01:00
Jacob McSwain 480cbb45f5 Add keepalive to wesher
(cherry picked from commit 982cac3b1a69d5759eaf477785301a564b551bc5)
2022-02-08 10:59:20 +01:00
kaiyou fd8b63c291 Make the MTU configurable 2020-11-29 09:31:54 +01:00
DeepSource Bot 00bd0820f5 Add .deepsource.toml 2020-11-29 09:31:54 +01:00
dependabot-preview[bot] 96bba09395 Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
Bumps [github.com/sirupsen/logrus](https://github.com/sirupsen/logrus) from 1.6.0 to 1.7.0.
- [Release notes](https://github.com/sirupsen/logrus/releases)
- [Changelog](https://github.com/sirupsen/logrus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/sirupsen/logrus/compare/v1.6.0...v1.7.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>
2020-11-29 09:31:54 +01:00
Leo Antunes 7184f7e3d7 readme: minor rewording on wireguard installation
fixes #51
2020-11-29 09:31:54 +01:00
kaiyou a420769bd4 Add e2e test for fixe IP address 2020-06-22 18:29:17 +02:00
kaiyou a52d693f56 Allow specific address to be specified 2020-06-22 18:29:03 +02:00
kaiyou f8fc765936 Remove the entrypoint 2020-06-22 17:36:29 +02:00
kaiyou ba59b0ab34 Replace binary build with a Docker build 2020-06-17 15:35:02 +02:00
kaiyou 7045b23ed3 Announce only local dev routes 2020-06-16 10:46:52 +02:00
kaiyou eae21ef5d7 Add rejoin e2e test 2020-06-16 10:46:52 +02:00
kaiyou da04afe24b Rejoin join nodes automatically
This adds a --rejoin setting for rejoining
cluter nodes automatically when gone.
2020-06-16 10:46:52 +02:00
kaiyou 62d9c44c11 Refactor cluster.Join to prepare for rejoin
Now cluster.Join will resolve hostnames itself, then
will avoid trying to join hosts that
are already cluster members.
2020-06-16 10:46:52 +02:00
kaiyou 0ab363f218 Add Gitlab build file 2020-06-16 10:46:52 +02:00
kaiyou ddef84c573 Protect against rogue routes by adversarial nodes
Do not blindly trust routes announced by other nodes.
This first step simply checks that announced routes are
inside the configured routed network.
2020-06-16 10:37:55 +02:00
kaiyou 8637377cec Implement networks routed through wesher
This adds an option for specifying a routed network. Every node route
that belongs to that routed network will be announced to the cluster and
every other node will direct traffic to that node for said route.
2020-06-16 10:37:55 +02:00
Leo Antunes e9aae4dc3b fix and reword README [skip ci] 2020-05-28 18:44:46 +02:00
kaiyou b154851d40 Use docker exec -d to detach test commands 2020-05-27 23:26:29 +02:00
kaiyou fbd48468c4 Use the new tests entrypoint in e2e.sh 2020-05-27 23:26:29 +02:00
kaiyou e788b3eaef Update README.md
Co-authored-by: Leo Antunes <leo@costela.net>
2020-05-27 23:26:29 +02:00
kaiyou 129291e848 Use interface name instead of cluster name
The cluster name option is not required anymore and
removed, the interface name is used to name the cluster
directly. For backward compatibility, the old path for storing
cluster state is tried as a fallback when loading.
2020-05-27 23:26:29 +02:00
kaiyou ca3064f6a7 Add documentation about cluster-name setting 2020-05-27 23:26:29 +02:00
kaiyou adc7a807df Expose ClusterName instead of Banner/StatePath 2020-05-27 23:26:29 +02:00
kaiyou b9df078538 Fix a typo in the etc/hosts banner
Co-authored-by: Leo Antunes <leo@costela.net>
2020-05-27 23:26:29 +02:00
kaiyou 404b332e6a Fix the state tests using custom statePath 2020-05-27 23:26:29 +02:00
kaiyou 5930f332b8 Add an e2e test running two clusters 2020-05-27 23:26:29 +02:00
kaiyou 31b8263e96 Use the StatePath to config when loading the state 2020-05-27 23:26:29 +02:00
kaiyou a0882dad49 Use the custom etc/hosts banner 2020-05-27 23:26:29 +02:00
kaiyou f1de2def7f Add Banner and StatePath settings
Banner is used to carry a custom etc/hosts banner while StatePath holds
the path to cluster state storage.
2020-05-27 23:26:29 +02:00
Leo Antunes 7910b5c379 ci: add MIPS* arches to releases; bump go 1.14.3
refs #47
2020-05-27 17:49:10 +02:00
kaiyou 61988692a1 Parse arguments in the tests entrypoint
Add an argument parsing routine to the tests entrypoint, and use it
to parse the interface name, passed to
wireguard-go.
2020-05-21 10:17:48 +02:00
Leo Antunes 2fe308cd1d tests: fix e2e image build 2020-05-19 23:00:54 +02:00
kaiyou 49c0d7f802 Make statePath a variable (temporary)
This is a temporary fix until the state path is made
configurable.
2020-05-13 13:52:54 +02:00
kaiyou 66b0321bf7 Fail more explicitely in cluster state tests
Co-authored-by: Leo Antunes <leo@costela.net>
2020-05-13 13:52:54 +02:00
kaiyou e9b9239eae Reinstante cluster.LocalNode
This makes for more straightforward calls. Also, generate
the localNode directly in wg.New.
2020-05-13 13:52:54 +02:00
kaiyou a0aa0bcc0e Fix unit tests due to unexported assignOverlayAddr 2020-05-13 13:52:54 +02:00
kaiyou 5b6923c272 Unexporter AssignOverlayAddress
Instead, the overlay address is assigned upon creation.
Also, the wireguard state is responsible for populating
the local node object.
2020-05-13 13:52:54 +02:00
kaiyou c50011bc36 Use errors.Wrap instead of manual formatting 2020-05-13 13:52:54 +02:00
kaiyou 32a300ffeb Rename node.Decode and node.Encode
EncodeMeta and DecodeMeta are more explicit.
2020-05-13 13:52:54 +02:00
kaiyou 078946dbdd Use localNode to store the local node name
Also rename setupDelegate to SetLocalNode, so that
main can call SetLocalNode then Update().
2020-05-13 13:52:54 +02:00
kaiyou 28a31efc1f Rename saveState to state.save 2020-05-13 13:52:54 +02:00
kaiyou d85fb84398 Unexport state from the cluster package 2020-05-13 13:52:54 +02:00
kaiyou 9ddcbb7914 Apply suggestions from code review
Review suggestions in the documentation

Co-authored-by: Leo Antunes <leo@costela.net>
2020-05-13 13:52:54 +02:00
kaiyou faf1c35d96 Implement the delegate interface on Node
Implementing on Node makes a bit more sense than implementing on Cluster
even if the difference in code is insignificant.
2020-05-13 13:52:54 +02:00
kaiyou f715cfa787 Remove the unneeded writeToEtcHosts function 2020-05-13 13:52:54 +02:00
kaiyou 61104a9272 Add some comments to the main function 2020-05-13 13:52:54 +02:00