Commit Graph
691 Commits
Author SHA1 Message Date
Lee Smet e78bdfa9fd Install rustfmt action when installing rust in CI
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:50:38 +01:00
Lee Smet 3fa5b8a55c Put args in the proper place in CI action
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:34:52 +01:00
Lee Smet 9a3219257e Attempt to use a different fmt check action
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:31:59 +01:00
Lee Smet 008588085b Update deprecated rust actions in CI action
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:21:48 +01:00
Lee Smet 7ef3d0bb69 Update CI action to use latest checkout version
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 12:13:37 +01:00
Lee Smet d54bd31005 Bump version to v0.4.2
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 11:50:44 +01:00
Lee Smet b8200c6e86 Name the return from Stack::new
Because the returned `Stack` is actually never used, it was explicitly
not assigned (`let _ = ...`). However since the Stack contains the only
reference to the http API, it needs to be kept in scope to prevent that
from shutting down. Instead, we now assign the return value to an
underscored variable name. Semantically this is different, as it keeps
the return value in scope with the usual variable rules instead of
dropping it outright, but still satisfies clippy's unused variable rule.

Fix #140

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-28 11:32:07 +01:00
Lee Smet 2bd6d11997 Bump version to v0.4.1
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 23:34:32 +01:00
Lee Smet 7fa1bfb0f7 Add key file permission changes to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 23:24:45 +01:00
Lee Smet 04e52075c0 Merge pull request #135 from flokli/systemd-unit-updates
Update systemd unit file
2024-02-27 23:23:27 +01:00
Lee Smet 9feff0806d Merge pull request #134 from flokli/keyfile-mode
Set mode when creating key file
2024-02-27 23:19:57 +01:00
Florian Klink ed959c767e Update systemd unit file
- Set a nicer unit description.
 - Use `network.target` instead of `network-online.target`.
   As per https://www.freedesktop.org/software/systemd/man/latest/systemd.special.html#network-online.target,
   mycelium doesn't strictly require a configured network connection
   (whatever that means).
   `network.target` should be sufficient, we probably need the IP stack
   and a loopback interface, but everything else should be OK to change
   later on.
 - Use `StateDirectory=mycelium` and -k `%S/mycelium-key.bin`.
   Key material is state, not config, especially if it's autocreated
   on first startup. Combine with `StateDirectoryMode=0700`, to ensure
   the directory can't be accessed by other users.
2024-02-27 22:33:15 +02:00
Florian Klink f140167454 Set mode when creating key file
Make sure a generated key file is not readable by others.

This ensures the file is not group/world-readable.
2024-02-27 22:32:39 +02:00
Lee Smet 80bf154dc1 Remove remaining internal state dump
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 17:29:56 +01:00
Lee Smet 26819c2953 Expose API method to remove existing peer
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 17:20:06 +01:00
Lee Smet d982a9c3f3 Add method to remove existing peers (endpoints)
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 17:01:59 +01:00
Lee Smet a8122f8621 Fix operationId typo for addPeer in docs/api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 16:01:41 +01:00
Lee Smet c26d8f8812 Expose API method to add new peer
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 15:58:00 +01:00
Lee Smet 354a065b71 Add general info API endpoint to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 15:18:17 +01:00
Lee Smet 43c961181a Add some cross compilation notes in README.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 15:03:38 +01:00
Lee Smet cce1cc6c20 Remove linker entries from .cargo/config.toml
These were previously added for aarch64-linux cross compilation.
However, this also interferes with regular compilation on these
platforms, since the linkers generally don't include the target triplet
in their name if they are for the native platform. Additionally, the `ar`
field is deprecated.

Fixes #132

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 14:52:30 +01:00
Lee Smet 9df5ddda38 Add removal of tokio_unstable flag to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 14:41:35 +01:00
Lee Smet 3470762ff1 Remove tokio_unstable build flag
It was used at some point to use tokio_console, but since we don't use
that right now this flag can be removed.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 14:12:57 +01:00
Lee Smet d4e51524cb Add method to inject new peers (endpoints)
This allows adding new peers while the system is running

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 13:47:40 +01:00
Lee Smet e2d1c52231 Add get_info endpoint to docs/api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 11:45:49 +01:00
Lee Smet aca36211ca Correct get peers path in docs/api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 11:30:12 +01:00
Lee Smet b640d95e15 Add API handler for general node info
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 11:29:17 +01:00
Lee Smet d0d872324b Remove part of the debug dump
This info is now available as part of the admin API

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-27 10:50:03 +01:00
Lee Smet 1254b1a63c Merge pull request #131 from flokli/typos
fix some typos, update example IPs to 400:/7 subnet
2024-02-27 09:52:08 +01:00
Florian Klink f1b785c42d fix some typos, update example IPs to 400:/7 subnet 2024-02-26 20:55:47 +02:00
Lee Smet 1940a41f36 Update CHANGELOG.md
Add listing of selected and fallback routes

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 16:55:16 +01:00
Lee Smet b61581d52d Add get_fallback_routes endpoint to docs/api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 15:48:32 +01:00
Lee Smet 58b08a515f Expose API handler to list fallback routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 15:47:12 +01:00
Lee Smet 13b00d95d5 Add method on router to list fallback routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 15:42:55 +01:00
Lee Smet 38df75fd28 Add get_selected_routes endpoint to docs/api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 15:07:50 +01:00
Lee Smet bef7eb180c Encode infinite metric as string in API
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 14:44:39 +01:00
Lee Smet a24ed4f0b1 Add Route tag to docs/api.yaml
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 12:11:17 +01:00
Lee Smet 5ef68994d2 Expose API handler to list selected routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 12:01:16 +01:00
Lee Smet 08c58645ec Inject router in API State
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 12:00:49 +01:00
Lee Smet 1fb8e0ec55 Add method on router to list selected routes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 11:59:43 +01:00
Lee Smet ab3626b281 Update addresses in README.md to new range
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-26 10:31:13 +01:00
Lee Smet 9b2edb2fee Add get_peers to CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-23 16:09:10 +01:00
Lee Smet f8bc7f976f Document get_peers method in API spec
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-23 16:08:10 +01:00
Lee Smet 7e1d9cb85d Add get_peers method to http API
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-23 16:07:54 +01:00
Lee Smet 52e93ae345 Inject PeerManager in Http server
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-23 16:07:13 +01:00
Lee Smet fa05b80d73 Add exposed PeerStats in PeerManager
Includes info about peers we already keep track of in other structs

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-23 16:04:10 +01:00
Lee Smet e22272a44a Derive additional bounds on Peer related types
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-23 16:02:13 +01:00
Lee Smet 422a33176c Add wintun.dll to .gitignore
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-22 10:37:52 +01:00
Lee Smet b46d294507 Add .vs to .gitignore
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-22 10:36:54 +01:00
Lee Smet 80b1db1f7e Bump version to v0.4.0
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-02-22 10:05:59 +01:00