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:
faumarayandClaude Opus 5.5 committed 2026-10-27 02:12:02 +03:00
1 parent 757bebbb1d
commit 6ed7a3b1c6
7 files changed
+152 -9

No files matched your search

+4 -4
View File
@@ -2,7 +2,7 @@
//! `xray run -test`, when they are on PATH (the dev shell has both).
use std::collections::BTreeMap;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::process::Command;
use ps_core::config::*;
@@ -22,7 +22,7 @@ fn scratch(name: &str) -> PathBuf {
dir
}
fn env(dir: &PathBuf) -> Env {
fn env(dir: &Path) -> Env {
let empty = dir.join("empty.json");
std::fs::write(&empty, r#"{"version":1,"rules":[]}"#).unwrap();
let mut warp = BTreeMap::new();
@@ -45,7 +45,7 @@ fn no_files(path: &str) -> Result<String, String> {
Err(format!("{path}: not found"))
}
fn check_sing_box(config: &Value, dir: &PathBuf) {
fn check_sing_box(config: &Value, dir: &Path) {
if !have("sing-box") {
eprintln!("sing-box not on PATH: skipping the check");
return;
@@ -61,7 +61,7 @@ fn check_sing_box(config: &Value, dir: &PathBuf) {
);
}
fn check_xray(config: &Value, dir: &PathBuf) {
fn check_xray(config: &Value, dir: &Path) {
if !have("xray") {
return;
}