Commit Graph

1000 Commits

Author SHA1 Message Date
Lee Smet 489ffa9c2d Update private network docs
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 13:31:30 +02:00
Lee Smet 4a0c820d83 Add small README.md to myceliumd-private
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 13:28:26 +02:00
Lee Smet ceb0370ef7 Add small README.md to myceliumd
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 13:21:44 +02:00
Lee Smet 8d4cf0a8d6 Adapt github release workflow
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 13:03:29 +02:00
Lee Smet f9fb02b616 Add lock file for myceliumd-private
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 12:10:18 +02:00
Lee Smet 0959c3011d Add separate binary changes in CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 12:05:06 +02:00
Lee Smet f46b58e6d9 Update flake dependencies to latest
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 12:03:14 +02:00
Lee Smet 246b7a7eab Try to build binaries in flake
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 12:02:28 +02:00
Lee Smet 87db38a9a0 Update ci.yaml to build and check binaries
Since they are no longer part of the workspace

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 11:07:42 +02:00
Lee Smet a456f0ec77 Remove binaries from cargo workspace
To avoid the resolver building the regular binary with private network
related code. In the future the regular binary might become part of the
workspace again, TBD.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 11:01:32 +02:00
dependabot[bot] fdf6b2d454 Bump etherparse from 0.14.3 to 0.15.0
Bumps [etherparse](https://github.com/JulianSchmid/etherparse) from 0.14.3 to 0.15.0.
- [Release notes](https://github.com/JulianSchmid/etherparse/releases)
- [Changelog](https://github.com/JulianSchmid/etherparse/blob/master/changelog.md)
- [Commits](https://github.com/JulianSchmid/etherparse/compare/v0.14.3...v0.15.0)

---
updated-dependencies:
- dependency-name: etherparse
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 10:47:58 +02:00
dependabot[bot] b2aef5b840 Bump serde from 1.0.202 to 1.0.203
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.202 to 1.0.203.
- [Release notes](https://github.com/serde-rs/serde/releases)
- [Commits](https://github.com/serde-rs/serde/compare/v1.0.202...v1.0.203)

---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 10:47:29 +02:00
dependabot[bot] 1a81ca2f9f Bump nix from 0.28.0 to 0.29.0
Bumps [nix](https://github.com/nix-rust/nix) from 0.28.0 to 0.29.0.
- [Changelog](https://github.com/nix-rust/nix/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nix-rust/nix/compare/v0.28.0...v0.29.0)

---
updated-dependencies:
- dependency-name: nix
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 10:47:14 +02:00
dependabot[bot] 15f44fb5a8 Bump rustls from 0.23.7 to 0.23.8
Bumps [rustls](https://github.com/rustls/rustls) from 0.23.7 to 0.23.8.
- [Release notes](https://github.com/rustls/rustls/releases)
- [Changelog](https://github.com/rustls/rustls/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustls/rustls/compare/v/0.23.7...v/0.23.8)

---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-28 10:44:41 +02:00
Iwan BK b0bdada330 feat(mobile): set log level for android & iOS.
- INFO as default log level
- WARN as log level for mycelium:router module
2024-05-28 10:44:27 +02:00
Lee Smet ec04b8c08e Add remaining public peer IP's
Now that they have been updated to v0.5.x

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-28 09:44:18 +02:00
Lee Smet 7b1064cec1 Add myceliumd-private to flake-nix
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 17:43:47 +02:00
Lee Smet d144b08f56 Remove private network reference in myceliumd
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 17:24:08 +02:00
Lee Smet 4c6a7b183e Copy binary code to myceliumd-private
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 17:22:33 +02:00
Lee Smet 3005ed0cb8 Feature gate private network functionality
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 16:57:36 +02:00
Lee Smet 84a7fd94cd Move Connection impl for tokio_openssl::SslStream
Move to its own file to make it easier to conditionally compile for
private networks.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 16:46:33 +02:00
Lee Smet accc8cefd6 Change periodic route announcement to 5 minutes
More delay between periodic announcements. This is mainly to observe the
effect on a larget scale in preparation for #253.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 15:11:38 +02:00
Lee Smet ff4712001e Manually implement Debug for SeqnoRequestCacheKey
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 15:10:32 +02:00
Lee Smet f36ec8cba4 Update CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:46:55 +02:00
Lee Smet ccb558bc84 Forward update if it's a reply for seqno requests
In case a triggered update to _all_ peers is not sent, send one to those
peers who sent us a seqno request which matches the update.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:43:08 +02:00
Lee Smet 8962f05c91 Use cache when forwarding seqno requests
Previously we just tried to find the same route when forwarding a seqno
request. Now we record the forward info in the cache, while also
improving the search. That is, we try to forward to a peer we haven't
used yet (but we don't do a fanout/broadcast search), and also actually
do our very best to forward the request. If we know that didn't work,
use a different peer.

Fixes #169

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:43:08 +02:00
Lee Smet abfa46a9d1 Record seqno forwarding info from router
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:43:08 +02:00
Lee Smet 8ae33523b1 Add Seqno request cache to router
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:43:08 +02:00
Lee Smet db189f4256 Implement basic seqno request cache
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:43:08 +02:00
Lee Smet 4114bafbfe Derive Hash for SeqNo
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-27 14:43:08 +02:00
Lee Smet 40d777615a Use a public node in the example command
People seem to just copy and paste without verifying the address, so use
a public node which has the highest chance of always working.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-23 16:12:45 +02:00
Lee Smet edc49d7c62 Document mycelium IP's of public nodes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-23 16:12:45 +02:00
Lee Smet 0335ce3ce1 Update example systemd file to use public peers
Use the new public peers

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-23 16:12:45 +02:00
Lee Smet c86b34e6f1 Update CHANGELOG.md
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-22 11:09:31 +02:00
Lee Smet 4062f682c7 Revert "configure tracing-log"
This reverts commit f2caf4f515.

Upon inspection tracing_subscriber, by default, attempts to install a
tracing_log subscriber (this is gated by a feature gate, which is
enabled by default). Thus, manually doing that actually causes a crash
at startup since the global logger is attempted to be initialized twice.
2024-05-22 11:03:47 +02:00
Florian Klink f2caf4f515 configure tracing-log
This makes log records emitted by third-party crates which still use the
`log` crate available as tracing events.
2024-05-22 10:26:43 +02:00
Florian Klink 6e8906a3fa switch logging to tracing ecosystem
This switches:
 - from android_logger to tracing-android
 - from oslog to tracing-oslog
 - from log to the default tracing log infrastructure

Most of the noise in here is changing the imports from
`log::{…}` to `tracing::{…}`.

In terms of log setup, for now this tries to stick with the existing
behaviour:

 - myceliumd now uses `EnvFilter` and the `compact()` default formatter,
   instead of `prety_env_logger`.
   Its CLI args are kept as-is. `RUST_LOG` env var still works, too.
 - The `setup_the_logger` function in the `mobile` crate is renamed to
   `setup_logging`.
2024-05-22 10:26:43 +02:00
Lee Smet d9a703696d Print an error if creating the tun device fails
It seems that it is not generally understood that network interface
names need to be unique, or that the error generated is "device
busy"/EBUSY in case of a collision. For now, explicitly add an error
log until #213 is implemented.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-21 17:10:30 +02:00
dependabot[bot] 493294377a ---
updated-dependencies:
- dependency-name: netdev
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 10:43:28 +02:00
dependabot[bot] 9fb7956b17 ---
updated-dependencies:
- dependency-name: rustls
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 10:43:12 +02:00
dependabot[bot] 2b5762b337 ---
updated-dependencies:
- dependency-name: serde
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 10:42:29 +02:00
dependabot[bot] bbea1a91bf ---
updated-dependencies:
- dependency-name: libc
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-21 10:42:13 +02:00
Iwan BK d864420bdf chore(ci): add CI for iOS and Android 2024-05-21 10:35:36 +02:00
Lee Smet f9caece23b Properly send seqno requests when we lose routes
Previously a seqno request was only sent when the selected route
received an unfeasible update. In accordance with the babel rfc, we now
also send seqno requests if we lose a selected route for a subnet
because of route selection (after an update or because we noticed a peer
disappeared).

Closes #233

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-16 16:17:30 +02:00
Lee Smet acb1fd9d21 Move sending seqno requests to dedicated function
Extract logic from the update handler, and refactor it slightly. The
update handler now drops the source table read lock instantly after
checking if a route is feasible as well.

In preparation of #233

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-16 15:16:07 +02:00
Iwan Budi Kusnanto 9356f787e4 feat(ios): add support for iOS (#252)
* feat(ios): add support for iOS

- add oslog as iOS logger
- add ios TUN device
- temporary disable QUIC for android
- change 'acquired route' logging level to debug. It is very noisy to
  use info

* undo unnessary changes
2024-05-15 19:17:06 +02:00
Lee Smet 4bfb834883 Abort PeerManager background tasks on Drop
Properly clean up all background tasks when PeerManager is dropped.
Should fix #251

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-15 11:30:07 +02:00
Lee Smet 02f8a3a362 Don't derive Clone for PeerManager
Cloning it is not needed

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-15 11:09:38 +02:00
Lee Smet 8577d1a652 Make Quic socket optional
Allow the peer manager to run without quic socket, even in public mode.
This will not create the socket, and prevent connections to quic peers.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-15 10:48:17 +02:00
Lee Smet ee34c14420 Fix Clippy warnings in mobile crate
- use tokio Mutex, to avoid holding a synchronous mutex across an await
  point.
- Ignore type complexity on the global channel which governs shutdown
  for now, as it's pretty clear what it does.

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-05-14 18:20:27 +02:00