improve experience of subnet/kcp proxy

1. add self to windows firewall on windows
2. android always use smoltcp
This commit is contained in:
sijie.sun
2025-02-06 11:19:10 +08:00
committed by Sijie.Sun
parent 8b89a037e8
commit e833c2a28b
6 changed files with 156 additions and 45 deletions

View File

@@ -89,6 +89,7 @@ fn get_os_hostname() -> Result<String, String> {
#[tauri::command]
fn set_logging_level(level: String) -> Result<(), String> {
#[allow(static_mut_refs)]
let sender = unsafe { LOGGER_LEVEL_SENDER.as_ref().unwrap() };
sender.send(level).map_err(|e| e.to_string())?;
Ok(())
@@ -188,7 +189,10 @@ pub fn run() {
let Ok(Some(logger_reinit)) = utils::init_logger(config, true) else {
return Ok(());
};
unsafe { LOGGER_LEVEL_SENDER.replace(logger_reinit) };
#[allow(static_mut_refs)]
unsafe {
LOGGER_LEVEL_SENDER.replace(logger_reinit)
};
// for tray icon, menu need to be built in js
#[cfg(not(target_os = "android"))]