Commit Graph

31 Commits

Author SHA1 Message Date
Lee Smet
979e79a8d5 Update mobile crate with latest peer discovery changes
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2026-01-22 17:00:24 +01:00
AhmedHanafy725
f56a212155 Revert "Only enable the quic port if there are quic peers"
This reverts commit b27acd48ae.
2025-12-30 10:47:34 +02:00
AhmedHanafy725
4637657599 Add api server to the mycelium mobile package 2025-12-24 15:20:09 +02:00
AhmedHanafy725
b27acd48ae Only enable the quic port if there are quic peers 2025-12-24 15:09:12 +02:00
AhmedHanafy725
61151de2ec Update mobile/src/lib.rs
Add the default quic listen port to the mobile package
2025-12-23 14:54:22 +00:00
Lee Smet
a04be1bd44 Add optional forwarding DNS implementation
This prepares for an eventual DNS implementation where certain TLD's are
redirected to an alternative backend

Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-10-24 10:54:39 +02:00
AhmedHanafy725
f4bab1f7d0 Fix the tx usage and return all the peer info 2025-10-01 11:48:38 +02:00
Lee Smet
eb4f892fd6 Update mobile with proxy commands
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-09-19 13:39:34 +02:00
Lee Smet
8f3addf66f Fix cdn_cache field name in mobile config
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-07-15 13:40:47 +02:00
Lee Smet
c33547a259 Disable CDN for mobile builds
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-07-15 12:29:19 +02:00
Lee Smet
c8cfbf4a8a Remove unused message feature in mobile config
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-24 14:23:15 +02:00
Lee Smet
6627a85540 Add feature gated topic config in mobile
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2025-04-24 14:23:15 +02:00
Iwan BK
c404576656 feat(mactunfd): add flag for macos to use tun FD
When macos app distributed on appstore, it can't create the TUN device
from Rust code.
It has to create the TUN device from Swift then pass the FD to the
mycelium Rust code.
2024-09-20 10:19:46 +02:00
Lee Smet
f5e3d7ba8e Limit mobile to a single update worker for now
Signed-off-by: Lee Smet <lee.smet@hotmail.com>
2024-08-02 13:46:01 +02:00
Maxime Van Hees
d5d879f878 disabling quic protocol rework 2024-07-15 16:10:37 +02:00
Maxime Van Hees
3e76455e35 first step towards option to disable quic protocol to find peers 2024-07-15 16:10:37 +02:00
Iwan BK
a0e6560add feat(mobile): expose peer stats
Also add timeout to the send/recv channel.

The mobile API returns `Vec<String>` instead of `Result<T, Error>`
because the current rust bridge method can't support `Result<T,
Error>`.
For it to be supported, we need to change the bridging method, which may
not worth it for now.
2024-06-19 11:27:08 +02:00
Iwan Budi Kusnanto
24600ff2f0 fix(android): handle second tracing init. (#273)
* fix(android): handle second tracing init.

ignore error when register the tracing subscriber as global default
because it is harmless.

* fix(mobile): call tracing init only once.

Call it once with lazy_static
2024-05-30 09:54:03 +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
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
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
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
Iwan BK
ceeef0fa5e feat(mobile): start & stop mycelium.
Start & stop implemented by adding a global channel.

Upon startup `Node` listens to ctrl-c and channel receiver.
On stop, we send message to that channel and Node can exit..
2024-05-07 16:01:32 +02:00
Iwan BK
4baef0fb91 cleanup Cargo.toml and myceliumd conditional compilation 2024-05-06 10:00:08 +02:00
Iwan BK
7cbe84dbf5 add ios as target.
iOS is not working yet.
This change only mean for mycelium flutter app to be compiled
2024-05-06 10:00:08 +02:00
Iwan BK
93a88b11f7 create TunConfig as shared config for the TUN devices.
Android have different config than darwin, windows, and Linux
2024-05-06 10:00:08 +02:00
Iwan BK
c780885e10 fix(mobile): cleanup based on the PR review 2024-05-06 10:00:08 +02:00
Iwan BK
c04825912d feat(android): initial support for android 2024-05-06 10:00:08 +02:00