summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src/main.rs
AgeCommit message (Collapse)AuthorFilesLines
2025-07-15Run `crago +nightly clippy --fix`Markus Pettersson1-4/+4
2025-07-10Run `cargo fmt`Sebastian Holmin1-2/+2
2025-02-25Replace libc::getuid with nixJoakim Hulthe1-2/+1
2025-01-02Change how daemon is startedEmīls1-11/+10
2025-01-02Remove global API endpointEmīls1-0/+2
2024-11-26Make unix signal-handler signal-safeJoakim Hulthe1-1/+14
Other changes: - Re-enable the signal handler in release-builds. - Disable backtrace printing by default since it's not signal-safe. - Add `MULLVAD_BACKTRACE_ON_FAULT` env variable to enable backtracing. - Remove the alternate signal stack. The reasons for this are: - Setting up an alt-stack in a safe way is not trivial, our previous attempt was unsound in the presence of stack overflows. It can be done safely with mmap, but would require careful review. - The alt-stack is thread-local, meaning it would need to be initialized on a per-thread basis. We would need to hook into tokio and std::thread::spawn to be able to get good coverage, and even then there would no good way to ensure that *all* threads have an alternate stack, except that... - Rust (by default) allocates an alternate stack for every thread. Unfortunately, the prescence of Go code in our linked binary disables this feature. IMO, we should strive towards not having any Go code linked into the daemon for this reason.
2024-11-26Fix exception_logging module being included twiceJoakim Hulthe1-2/+2
2024-08-07Fix shutdown issue on AndroidMarkus Pettersson1-1/+6
The daemon never received the shutdown event, causing it to never actually triggering a shutdown. This was fixed by actually using the correct `DaemonCommandChannel` to send the shutdown event.
2024-08-06Shut down gRPC server gracefullyMarkus Pettersson1-35/+5
This commit also removes the `EventListener` trait and the daemon is no longer parameterized over it.
2024-06-20Move UDS cleanup out of DaemonDavid Lönnhager1-0/+3
2024-06-17Get value of data directory value at app startupMarkus Pettersson1-5/+14
Remove `APP_PATH` from `mullvad-paths` on Android since it should not be a constant value. Instead, it is passed down from the Android app startup. As it turns out, it is really ever used for pointing to the RPC socket in use.
2024-05-29Migrate to gRPCDavid Göransson1-6/+4
Co-authored-by: Jonatan Rhodin <jonatan.rhodin@mullvad.net> Co-authored-by: Markus Pettersson <markus.pettersson@mullvad.net> Co-authored-by: David Lönnhager <david.l@mullvad.net>
2024-04-09Use single-threaded runtime when launching serviceDavid Lönnhager1-8/+15
2024-04-09Initialize logging when running Windows serviceDavid Lönnhager1-1/+1
2024-03-27Exit before dropping tokio runtimeDavid Lönnhager1-11/+12
2024-03-27Warn when running --launch-daemon-status on devJoakim Hulthe1-0/+4
2024-03-21Do uniqueness check when starting windows serviceJoakim Hulthe1-4/+12
2024-03-21Refactor daemon oneshot commandsJoakim Hulthe1-68/+58
2024-02-22Do daemon uniqueness check before rotating logsJoakim Hulthe1-9/+11
2024-01-04Add workspace level lintsLinus Färnstrand1-2/+0
2023-08-30Fix clippy lintsEmīls1-5/+4
2023-04-21Apply clippy --fix fixesLinus Färnstrand1-9/+7
This commit does not contain everything that `cargo clippy --fix` changed on Windows. But the least controversial and simplest subset. The remaining fixes I felt could use some manual cleanup also.
2023-02-01Add option for querying launch daemon state on macOSDavid Lönnhager1-1/+16
2023-01-30Run `cargo clippy --fix` with the new Rust 1.67 preferred formatLinus Färnstrand1-2/+2
2022-10-28Don't expect logging to work during early bootEmīls Piņķis1-23/+33
2022-10-10Disable logging for early boot blockerEmīls Piņķis1-17/+21
2022-09-21Always block on shutdownEmīls Piņķis1-2/+8
2022-09-20Add shutdown detection for Windows serviceDavid Lönnhager1-7/+1
2022-09-13Make AllowedEndpoint optionalEmīls Piņķis1-6/+6
2022-09-12Add argument to initialize firewall to a blocking stateEmīls Piņķis1-2/+27
2022-01-07Always use logging macros prefixed with log::Linus Färnstrand1-8/+7
2021-11-09Close management interface server when all broadcasters are closedDavid Lönnhager1-6/+4
2021-10-25Complement logging during startupOdd Stranne1-1/+3
2021-07-13Fix tokio runtime buildersDavid Lönnhager1-1/+1
2021-06-10Add --restart-service option to the daemon on WindowsDavid Lönnhager1-0/+6
2021-03-08Ignore IPC socket on AndroidEmīls1-1/+1
2021-03-08Remove old RPC socketEmīls1-0/+7
Remove old RPC socket in the case that no other daemon instance exists.
2021-01-12Replace the old cache directoryDavid Lönnhager1-3/+0
2021-01-04Always prefer the last used API addressDavid Lönnhager1-0/+3
2020-09-01Reduce excessive thread countDavid Lönnhager1-9/+7
2020-09-01Replace tokio handle references in `Daemon` with async/await syntaxDavid Lönnhager1-1/+1
2020-09-01Share tokio runtime between the management interface and daemonDavid Lönnhager1-27/+29
2020-09-01Update tunnel state machine event loop and remove tokio 0.1David Lönnhager1-1/+1
2020-08-20Use gRPC for management interface in backend and CLIDavid Lönnhager1-2/+9
2020-04-22Use resource dir to store settings file on AndroidJanito Vaqueiro Ferreira Filho1-0/+3
2020-02-28Factor exception logging to be multi-platformEmīls1-4/+2
2020-02-24Uncouple the management interface from the daemonJanito Vaqueiro Ferreira Filho1-2/+2
2020-02-24Spawn management interface outside daemonJanito Vaqueiro Ferreira Filho1-4/+35
2020-02-24Check for another daemon outside of `Daemon`Janito Vaqueiro Ferreira Filho1-1/+5
2020-02-24Create command channel out of the daemonJanito Vaqueiro Ferreira Filho1-2/+4