windows: install puts the app in the Start Menu and starts it at sign-in
- install copies proxy-suite.exe with the rest, closes running copies before replacing files, makes an all-users Start Menu shortcut, starts the app at every sign-in in the tray (HKLM Run, --hidden), and starts it now as the signed-in user (through Explorer, not elevated). - uninstall closes it, removes the shortcut and the sign-in start, and turns off the user's system proxy if the app left it on the local proxy (another proxy of theirs is left alone). - The app does not take its own left-over system proxy for the user's. - Lints: the last of clippy's, in the app, the service and a test. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
757bebbb1d
commit
6ed7a3b1c6
7 files changed
+152
-9
No files matched your search
@@ -29,7 +29,10 @@ impl SystemProxy {
|
||||
return Ok(());
|
||||
}
|
||||
if self.saved.is_none() {
|
||||
self.saved = Some(platform::read()?);
|
||||
// One the app left set (it was killed) is not the user's: theirs was off.
|
||||
let now = platform::read()?;
|
||||
let left = now.enable && now.server == ours.server;
|
||||
self.saved = Some(if left { Settings { enable: false, ..now } } else { now });
|
||||
}
|
||||
platform::write(&ours)?;
|
||||
self.applied = Some(ours);
|
||||
@@ -113,7 +116,7 @@ mod platform {
|
||||
}
|
||||
|
||||
fn text(bytes: Vec<u8>) -> String {
|
||||
let units: Vec<u16> = bytes.chunks_exact(2).map(|c| u16::from_le_bytes([c[0], c[1]])).take_while(|u| *u != 0).collect();
|
||||
let units: Vec<u16> = bytes.as_chunks::<2>().0.iter().map(|c| u16::from_le_bytes(*c)).take_while(|u| *u != 0).collect();
|
||||
String::from_utf16_lossy(&units)
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user