mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-12-04 22:06:24 +01:00
Clear Yaak Proxy traffic at launch and follow the real system proxy
Captured traffic is now cleared as the app launches by default, with a "Keep between launches" choice that brings the size limit with it. An install that had a size limit set keeps its traffic. The Proxy settings tab is regrouped into Proxy, Decryption, Traffic and Terminal, and the per-body limit row is gone. The app now watches macOS proxy settings and follows them: when another app or the user points the system proxy elsewhere, the override shows as off and the settings saved for restoring are dropped, so quitting puts back nothing the app didn't set. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
13ef9c60f1
commit
4fc95d264c
15 files changed
+726
-76
No files matched your search
@@ -270,6 +270,21 @@ pub fn remove_captured(data_dir: &Path) -> std::result::Result<(), String> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Deletes `blobs.sqlite`, every body and message payload, for one made empty as it opens.
|
||||
/// The data key stays, as `proxy.db` is still encrypted with it. Nothing may have it open.
|
||||
pub fn remove_blobs(data_dir: &Path) -> std::result::Result<(), String> {
|
||||
for suffix in ["", "-wal", "-shm"] {
|
||||
let path = data_dir.join(format!("{BLOBS_DB}{suffix}"));
|
||||
match std::fs::remove_file(&path) {
|
||||
Err(e) if e.kind() != std::io::ErrorKind::NotFound => {
|
||||
return Err(format!("Failed to delete {}: {e}", path.display()));
|
||||
}
|
||||
_ => {}
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
/// Either database in `data_dir` is plain, left by a build from before encryption.
|
||||
pub fn needs_encrypting(data_dir: &Path) -> bool {
|
||||
[PROXY_DB, BLOBS_DB]
|
||||
|
||||
Reference in new issue
Block a user