feat(desktop): add promotion marquee and proxy fix

This commit is contained in:
leokun committed 2026-09-04 23:07:41 +08:00
1 parent 900364229e
commit 8fbbcd5ae9
20 files changed
+145 -154

No files matched your search

+2
View File
@@ -5,6 +5,7 @@ use serde_json::Value;
use crate::{Error, Result};
const NO_PROXY_KEY: &str = "http.noProxy";
const KEYS: [&str; 5] = [
"http.proxy",
"http.proxyKerberosServicePrincipal",
@@ -60,6 +61,7 @@ fn write(settings: &BTreeMap<String, Value>) -> Result<()> {
pub fn write_proxy_settings(proxy_url: &str) -> Result<()> {
let mut settings = read()?;
settings.remove(NO_PROXY_KEY);
settings.insert(KEYS[0].into(), Value::String(proxy_url.into()));
settings.insert(KEYS[1].into(), Value::String(proxy_url.into()));
settings.insert(KEYS[2].into(), Value::String("on".into()));