Skip to content

Commit e566351

Browse files
committed
refactor: cleanup and decouple
1 parent 0f579cb commit e566351

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+4494
-763
lines changed

.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@
131131
"osascript",
132132
"oscpu",
133133
"outpath",
134+
"OVPN",
134135
"patchelf",
135136
"pathex",
136137
"pathlib",
@@ -183,6 +184,7 @@
183184
"stefanzweifel",
184185
"subdirs",
185186
"subkey",
187+
"subsec",
186188
"SUPPRESSMSGBOXES",
187189
"swatinem",
188190
"sysinfo",
@@ -212,6 +214,7 @@
212214
"venv",
213215
"vercel",
214216
"VERYSILENT",
217+
"vpns",
215218
"wayfern",
216219
"webgl",
217220
"webrtc",

src-tauri/Cargo.lock

Lines changed: 110 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ quick-xml = { version = "0.39", features = ["serialize"] }
100100

101101
# VPN support
102102
boringtun = "0.7"
103+
smoltcp = { version = "0.11", default-features = false, features = ["std", "medium-ip", "proto-ipv4", "proto-ipv6", "socket-tcp", "socket-udp"] }
103104

104105
# Daemon dependencies (tray icon)
105106
tray-icon = "0.21"

src-tauri/src/api_server.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,7 @@ async fn create_profile(
601601
&request.version,
602602
request.release_type.as_deref().unwrap_or("stable"),
603603
request.proxy_id.clone(),
604+
None, // vpn_id
604605
camoufox_config,
605606
wayfern_config,
606607
request.group_id.clone(),

src-tauri/src/auto_updater.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -511,6 +511,7 @@ mod tests {
511511
version: version.to_string(),
512512
process_id: None,
513513
proxy_id: None,
514+
vpn_id: None,
514515
last_launch: None,
515516
release_type: "stable".to_string(),
516517
camoufox_config: None,

src-tauri/src/bin/donut_daemon.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,8 @@ fn run_daemon() {
243243

244244
// Use swap to only run cleanup once
245245
if SHOULD_QUIT.swap(false, Ordering::SeqCst) {
246-
// Cleanup
246+
tray::quit_gui();
247+
247248
let mut state = read_state();
248249
state.daemon_pid = None;
249250
let _ = write_state(&state);
@@ -357,10 +358,6 @@ fn main() {
357358

358359
match args[1].as_str() {
359360
"start" => {
360-
// "start" is now an alias for "run"
361-
// On macOS, the daemon should be started via launchctl (see daemon_spawn.rs)
362-
// This command is kept for backward compatibility
363-
eprintln!("Starting daemon...");
364361
run_daemon();
365362
}
366363
"stop" => {

0 commit comments

Comments
 (0)