diff --git a/package.json b/package.json index 8d7d2bd3..2f766c21 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "clash-verge", + "name": "koala-clash", "version": "0.2.4", "license": "GPL-3.0-only", "scripts": { diff --git a/scripts/portable-fixed-webview2.mjs b/scripts/portable-fixed-webview2.mjs index 93526eb8..d8504fd5 100644 --- a/scripts/portable-fixed-webview2.mjs +++ b/scripts/portable-fixed-webview2.mjs @@ -42,9 +42,9 @@ async function resolvePortable() { const zip = new AdmZip(); - zip.addLocalFile(path.join(releaseDir, "Clash Verge.exe")); - zip.addLocalFile(path.join(releaseDir, "verge-mihomo.exe")); - zip.addLocalFile(path.join(releaseDir, "verge-mihomo-alpha.exe")); + zip.addLocalFile(path.join(releaseDir, "Koala Clash.exe")); + zip.addLocalFile(path.join(releaseDir, "koala-mihomo.exe")); + zip.addLocalFile(path.join(releaseDir, "koala-mihomo-alpha.exe")); zip.addLocalFolder(path.join(releaseDir, "resources"), "resources"); zip.addLocalFolder( path.join( diff --git a/scripts/portable.mjs b/scripts/portable.mjs index 49aafdb9..1bb06ee6 100644 --- a/scripts/portable.mjs +++ b/scripts/portable.mjs @@ -35,9 +35,9 @@ async function resolvePortable() { } const zip = new AdmZip(); - zip.addLocalFile(path.join(releaseDir, "clash-verge.exe")); - zip.addLocalFile(path.join(releaseDir, "verge-mihomo.exe")); - zip.addLocalFile(path.join(releaseDir, "verge-mihomo-alpha.exe")); + zip.addLocalFile(path.join(releaseDir, "koala-clash.exe")); + zip.addLocalFile(path.join(releaseDir, "koala-mihomo.exe")); + zip.addLocalFile(path.join(releaseDir, "koala-mihomo-alpha.exe")); zip.addLocalFolder(path.join(releaseDir, "resources"), "resources"); zip.addLocalFolder(configDir, ".config"); diff --git a/scripts/prebuild.mjs b/scripts/prebuild.mjs index fd7a9cd0..605cb307 100644 --- a/scripts/prebuild.mjs +++ b/scripts/prebuild.mjs @@ -175,8 +175,8 @@ function clashMetaAlpha() { const zipFile = `${name}-${META_ALPHA_VERSION}.${urlExt}`; return { - name: "verge-mihomo-alpha", - targetFile: `verge-mihomo-alpha-${SIDECAR_HOST}${isWin ? ".exe" : ""}`, + name: "koala-mihomo-alpha", + targetFile: `koala-mihomo-alpha-${SIDECAR_HOST}${isWin ? ".exe" : ""}`, exeFile, zipFile, downloadURL, @@ -192,8 +192,8 @@ function clashMeta() { const zipFile = `${name}-${META_VERSION}.${urlExt}`; return { - name: "verge-mihomo", - targetFile: `verge-mihomo-${SIDECAR_HOST}${isWin ? ".exe" : ""}`, + name: "koala-mihomo", + targetFile: `koala-mihomo-${SIDECAR_HOST}${isWin ? ".exe" : ""}`, exeFile, zipFile, downloadURL, @@ -381,7 +381,7 @@ const resolvePlugin = async () => { // service chmod const resolveServicePermission = async () => { const serviceExecutables = [ - "clash-verge-service*", + "koala-clash-service*", "install-service*", "uninstall-service*", ]; @@ -429,14 +429,14 @@ async function resolveLocales() { /** * main */ -const SERVICE_URL = `https://github.com/clash-verge-rev/clash-verge-service/releases/download/${SIDECAR_HOST}`; +const SERVICE_URL = `https://github.com/coolcoala/koala-clash-service/releases/download/${SIDECAR_HOST}`; const resolveService = () => { let ext = platform === "win32" ? ".exe" : ""; let suffix = platform === "linux" ? "-" + SIDECAR_HOST : ""; resolveResource({ - file: "clash-verge-service" + suffix + ext, - downloadURL: `${SERVICE_URL}/clash-verge-service${ext}`, + file: "koala-clash-service" + suffix + ext, + downloadURL: `${SERVICE_URL}/koala-clash-service${ext}`, }); }; @@ -489,13 +489,13 @@ const resolveWinSysproxy = () => const tasks = [ // { name: "clash", func: resolveClash, retry: 5 }, { - name: "verge-mihomo-alpha", + name: "koala-mihomo-alpha", func: () => getLatestAlphaVersion().then(() => resolveSidecar(clashMetaAlpha())), retry: 5, }, { - name: "verge-mihomo", + name: "koala-mihomo", func: () => getLatestReleaseVersion().then(() => resolveSidecar(clashMeta())), retry: 5, diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2cc5fac6..82124b29 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1059,80 +1059,6 @@ dependencies = [ "inout", ] -[[package]] -name = "clash-verge" -version = "0.2.4" -dependencies = [ - "ab_glyph", - "aes-gcm", - "anyhow", - "async-trait", - "base64 0.22.1", - "boa_engine", - "chrono", - "deelevate", - "delay_timer", - "dirs 6.0.0", - "dunce", - "futures", - "gethostname 1.0.2", - "getrandom 0.3.3", - "hex", - "hmac", - "image", - "imageproc", - "lazy_static", - "libc", - "log", - "log4rs", - "machine-uid", - "mihomo_api", - "nanoid", - "network-interface", - "once_cell", - "open", - "os_info", - "parking_lot", - "percent-encoding", - "port_scanner", - "regex", - "reqwest", - "reqwest_dav", - "runas", - "scopeguard", - "serde", - "serde_json", - "serde_yaml", - "sha2 0.10.9", - "sys-locale", - "sysinfo", - "sysproxy", - "tauri", - "tauri-build", - "tauri-plugin-autostart", - "tauri-plugin-clipboard-manager", - "tauri-plugin-deep-link", - "tauri-plugin-devtools", - "tauri-plugin-dialog", - "tauri-plugin-fs", - "tauri-plugin-global-shortcut", - "tauri-plugin-notification", - "tauri-plugin-process", - "tauri-plugin-shell", - "tauri-plugin-updater", - "tauri-plugin-window-state", - "tempfile", - "tokio", - "tokio-tungstenite 0.27.0", - "tungstenite 0.27.0", - "url", - "users", - "warp", - "winapi", - "winreg 0.55.0", - "zip", -] - [[package]] name = "clipboard-win" version = "5.4.0" @@ -3622,6 +3548,81 @@ dependencies = [ "unicode-segmentation", ] +[[package]] +name = "koala-clash" +version = "0.2.4" +dependencies = [ + "ab_glyph", + "aes-gcm", + "anyhow", + "async-trait", + "base64 0.22.1", + "boa_engine", + "chrono", + "deelevate", + "delay_timer", + "dirs 6.0.0", + "dunce", + "futures", + "gethostname 1.0.2", + "getrandom 0.3.3", + "hex", + "hmac", + "image", + "imageproc", + "lazy_static", + "libc", + "log", + "log4rs", + "machine-uid", + "mihomo_api", + "nanoid", + "network-interface", + "once_cell", + "open", + "os_info", + "parking_lot", + "percent-encoding", + "port_scanner", + "regex", + "reqwest", + "reqwest_dav", + "runas", + "scopeguard", + "serde", + "serde_json", + "serde_yaml", + "sha2 0.10.9", + "sys-locale", + "sysinfo", + "sysproxy", + "tauri", + "tauri-build", + "tauri-plugin-autostart", + "tauri-plugin-clipboard-manager", + "tauri-plugin-deep-link", + "tauri-plugin-devtools", + "tauri-plugin-dialog", + "tauri-plugin-fs", + "tauri-plugin-global-shortcut", + "tauri-plugin-notification", + "tauri-plugin-process", + "tauri-plugin-shell", + "tauri-plugin-single-instance", + "tauri-plugin-updater", + "tauri-plugin-window-state", + "tempfile", + "tokio", + "tokio-tungstenite 0.27.0", + "tungstenite 0.27.0", + "url", + "users", + "warp", + "winapi", + "winreg 0.55.0", + "zip", +] + [[package]] name = "kuchikiki" version = "0.8.8-speedreader" @@ -3887,11 +3888,12 @@ dependencies = [ [[package]] name = "machine-uid" -version = "0.2.0" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f1595709b0a7386bcd56ba34d250d626e5503917d05d32cdccddcd68603e212" +checksum = "0c4506fa0abb0a2ea93f5862f55973da0a662d2ad0e98f337a1c5aac657f0892" dependencies = [ - "winreg 0.6.2", + "libc", + "winreg 0.52.0", ] [[package]] @@ -6846,9 +6848,9 @@ dependencies = [ [[package]] name = "sysinfo" -version = "0.35.2" +version = "0.36.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c3ffa3e4ff2b324a57f7aeb3c349656c7b127c3c189520251a648102a92496e" +checksum = "252800745060e7b9ffb7b2badbd8b31cfa4aa2e61af879d0a3bf2a317c20217d" dependencies = [ "libc", "memchr", @@ -7294,6 +7296,21 @@ dependencies = [ "tokio", ] +[[package]] +name = "tauri-plugin-single-instance" +version = "2.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "50a0e5a4ce43cb3a733c3aef85e8478bc769dac743c615e26639cbf5d953faf7" +dependencies = [ + "serde", + "serde_json", + "tauri", + "thiserror 2.0.12", + "tracing", + "windows-sys 0.60.2", + "zbus", +] + [[package]] name = "tauri-plugin-updater" version = "2.9.0" @@ -9323,15 +9340,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "winreg" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2986deb581c4fe11b621998a5e53361efe6b48a151178d0cd9eeffa4dc6acc9" -dependencies = [ - "winapi", -] - [[package]] name = "winreg" version = "0.10.1" @@ -9568,9 +9576,9 @@ dependencies = [ [[package]] name = "zbus" -version = "5.7.1" +version = "5.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a7c7cee313d044fca3f48fa782cb750c79e4ca76ba7bc7718cd4024cdf6f68" +checksum = "4bb4f9a464286d42851d18a605f7193b8febaf5b0919d71c6399b7b26e5b0aad" dependencies = [ "async-broadcast", "async-executor", @@ -9602,9 +9610,9 @@ dependencies = [ [[package]] name = "zbus_macros" -version = "5.7.1" +version = "5.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a17e7e5eec1550f747e71a058df81a9a83813ba0f6a95f39c4e218bdc7ba366a" +checksum = "ef9859f68ee0c4ee2e8cde84737c78e3f4c54f946f2a38645d0d4c7a95327659" dependencies = [ "proc-macro-crate 3.3.0", "proc-macro2", diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index c484b485..fe4dae35 100755 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -1,16 +1,16 @@ [package] -name = "clash-verge" +name = "koala-clash" version = "0.2.4" -description = "clash verge" +description = "koala clash" authors = ["zzzgydi", "wonfen", "MystiPanda", "coolcoala"] license = "GPL-3.0-only" repository = "https://github.com/coolcoala/clash-verge-rev-lite.git" -default-run = "clash-verge" +default-run = "koala-clash" edition = "2021" build = "build.rs" [package.metadata.bundle] -identifier = "io.github.clash-verge-rev.clash-verge-rev" +identifier = "io.github.koala-clash" [build-dependencies] tauri-build = { version = "2.3.0", features = [] } @@ -18,7 +18,7 @@ tauri-build = { version = "2.3.0", features = [] } [dependencies] url = "2.5.4" os_info = "3.0" -machine-uid = "0.2" +machine-uid = "0.5.3" warp = "0.3.7" anyhow = "1.0.98" dirs = "6.0" @@ -28,7 +28,7 @@ dunce = "1.0.5" log4rs = "1.3.0" nanoid = "0.4" chrono = "0.4.41" -sysinfo = "0.35.2" +sysinfo = "0.36.1" boa_engine = "0.20.0" serde_json = "1.0.140" serde_yaml = "0.9.34-deprecated" @@ -110,6 +110,7 @@ users = "0.11.0" [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies] tauri-plugin-autostart = "2.5.0" tauri-plugin-global-shortcut = "2.3.0" +tauri-plugin-single-instance = "2" tauri-plugin-updater = "2.9.0" [features] diff --git a/src-tauri/packages/linux/clash-verge.desktop b/src-tauri/packages/linux/koala-clash.desktop similarity index 100% rename from src-tauri/packages/linux/clash-verge.desktop rename to src-tauri/packages/linux/koala-clash.desktop diff --git a/src-tauri/packages/linux/post-install.sh b/src-tauri/packages/linux/post-install.sh index f398791c..8d302bcf 100644 --- a/src-tauri/packages/linux/post-install.sh +++ b/src-tauri/packages/linux/post-install.sh @@ -1,4 +1,4 @@ #!/bin/bash chmod +x /usr/bin/install-service chmod +x /usr/bin/uninstall-service -chmod +x /usr/bin/clash-verge-service +chmod +x /usr/bin/koala-clash-service diff --git a/src-tauri/packages/macos/entitlements.plist b/src-tauri/packages/macos/entitlements.plist index bfd172dd..354907ad 100644 --- a/src-tauri/packages/macos/entitlements.plist +++ b/src-tauri/packages/macos/entitlements.plist @@ -6,7 +6,7 @@ com.apple.security.application-groups - io.github.clash-verge-rev.clash-verge-rev + io.github.koala-clash com.apple.security.inherit diff --git a/src-tauri/packages/windows/installer.nsi b/src-tauri/packages/windows/installer.nsi index 15a2689e..9058b0c0 100644 --- a/src-tauri/packages/windows/installer.nsi +++ b/src-tauri/packages/windows/installer.nsi @@ -427,52 +427,52 @@ Function .onInit !endif FunctionEnd -!macro CheckAllVergeProcesses - ; Check if clash-verge-service.exe is running +!macro CheckAllKoalaProcesses + ; Check if koala-clash-service.exe is running !if "${INSTALLMODE}" == "currentUser" - nsis_tauri_utils::FindProcessCurrentUser "clash-verge-service.exe" + nsis_tauri_utils::FindProcessCurrentUser "koala-clash-service.exe" !else - nsis_tauri_utils::FindProcess "clash-verge-service.exe" + nsis_tauri_utils::FindProcess "koala-clash-service.exe" !endif Pop $R0 ${If} $R0 = 0 - DetailPrint "Kill clash-verge-service.exe..." + DetailPrint "Kill koala-clash-service.exe..." !if "${INSTALLMODE}" == "currentUser" - nsis_tauri_utils::KillProcessCurrentUser "clash-verge-service.exe" + nsis_tauri_utils::KillProcessCurrentUser "koala-clash-service.exe" !else - nsis_tauri_utils::KillProcess "clash-verge-service.exe" + nsis_tauri_utils::KillProcess "koala-clash-service.exe" !endif ${EndIf} - ; Check if verge-mihomo-alpha.exe is running + ; Check if koala-mihomo-alpha.exe is running !if "${INSTALLMODE}" == "currentUser" - nsis_tauri_utils::FindProcessCurrentUser "verge-mihomo-alpha.exe" + nsis_tauri_utils::FindProcessCurrentUser "koala-mihomo-alpha.exe" !else - nsis_tauri_utils::FindProcess "verge-mihomo-alpha.exe" + nsis_tauri_utils::FindProcess "koala-mihomo-alpha.exe" !endif Pop $R0 ${If} $R0 = 0 - DetailPrint "Kill verge-mihomo-alpha.exe..." + DetailPrint "Kill koala-mihomo-alpha.exe..." !if "${INSTALLMODE}" == "currentUser" - nsis_tauri_utils::KillProcessCurrentUser "verge-mihomo-alpha.exe" + nsis_tauri_utils::KillProcessCurrentUser "koala-mihomo-alpha.exe" !else - nsis_tauri_utils::KillProcess "verge-mihomo-alpha.exe" + nsis_tauri_utils::KillProcess "koala-mihomo-alpha.exe" !endif ${EndIf} - ; Check if verge-mihomo.exe is running + ; Check if koala-mihomo.exe is running !if "${INSTALLMODE}" == "currentUser" - nsis_tauri_utils::FindProcessCurrentUser "verge-mihomo.exe" + nsis_tauri_utils::FindProcessCurrentUser "koala-mihomo.exe" !else - nsis_tauri_utils::FindProcess "verge-mihomo.exe" + nsis_tauri_utils::FindProcess "koala-mihomo.exe" !endif Pop $R0 ${If} $R0 = 0 - DetailPrint "Kill verge-mihomo.exe..." + DetailPrint "Kill koala-mihomo.exe..." !if "${INSTALLMODE}" == "currentUser" - nsis_tauri_utils::KillProcessCurrentUser "verge-mihomo.exe" + nsis_tauri_utils::KillProcessCurrentUser "koala-mihomo.exe" !else - nsis_tauri_utils::KillProcess "verge-mihomo.exe" + nsis_tauri_utils::KillProcess "koala-mihomo.exe" !endif ${EndIf} @@ -509,22 +509,22 @@ FunctionEnd ${EndIf} !macroend -!macro StartVergeService +!macro StartKoalaService ; Check if the service exists - SimpleSC::ExistsService "clash_verge_service" + SimpleSC::ExistsService "koala_clash_service" Pop $0 ; 0:service exists;other: service not exists ; Service exists ${If} $0 == 0 Push $0 ; Check if the service is running - SimpleSC::ServiceIsRunning "clash_verge_service" + SimpleSC::ServiceIsRunning "koala_clash_service" Pop $0 ; returns an errorcode (<>0) otherwise success (0) Pop $1 ; returns 1 (service is running) - returns 0 (service is not running) ${If} $0 == 0 Push $0 ${If} $1 == 0 - DetailPrint "Restart Clash Verge Service..." - SimpleSC::StartService "clash_verge_service" "" 30 + DetailPrint "Restart Koala Clash Service..." + SimpleSC::StartService "koala_clash_service" "" 30 ${EndIf} ${ElseIf} $0 != 0 Push $0 @@ -535,35 +535,35 @@ FunctionEnd ${EndIf} !macroend -!macro RemoveVergeService +!macro RemoveKoalaService ; Check if the service exists - SimpleSC::ExistsService "clash_verge_service" + SimpleSC::ExistsService "koala_clash_service" Pop $0 ; 0:service exists;other: service not exists ; Service exists ${If} $0 == 0 Push $0 ; Check if the service is running - SimpleSC::ServiceIsRunning "clash_verge_service" + SimpleSC::ServiceIsRunning "koala_clash_service" Pop $0 ; returns an errorcode (<>0) otherwise success (0) Pop $1 ; returns 1 (service is running) - returns 0 (service is not running) ${If} $0 == 0 Push $0 ${If} $1 == 1 - DetailPrint "Stop Clash Verge Service..." - SimpleSC::StopService "clash_verge_service" 1 30 + DetailPrint "Stop Koala Clash Service..." + SimpleSC::StopService "koala_clash_service" 1 30 Pop $0 ; returns an errorcode (<>0) otherwise success (0) ${If} $0 == 0 - DetailPrint "Removing Clash Verge Service..." - SimpleSC::RemoveService "clash_verge_service" + DetailPrint "Removing Koala Clash Service..." + SimpleSC::RemoveService "koala_clash_service" ${ElseIf} $0 != 0 Push $0 SimpleSC::GetErrorMessage Pop $0 - MessageBox MB_OK|MB_ICONSTOP "Clash Verge Service Stop Error ($0)" + MessageBox MB_OK|MB_ICONSTOP "Koala Clash Service Stop Error ($0)" ${EndIf} ${ElseIf} $1 == 0 - DetailPrint "Removing Clash Verge Service..." - SimpleSC::RemoveService "clash_verge_service" + DetailPrint "Removing Koala Clash Service..." + SimpleSC::RemoveService "koala_clash_service" ${EndIf} ${ElseIf} $0 != 0 Push $0 @@ -764,7 +764,7 @@ Section Install SetOutPath $INSTDIR nsExec::Exec 'netsh int tcp res' !insertmacro CheckIfAppIsRunning - !insertmacro CheckAllVergeProcesses + !insertmacro CheckAllKoalaProcesses ; 清理自启动注册表项 DetailPrint "Cleaning auto-launch registry entries..." @@ -772,32 +772,32 @@ Section Install StrCpy $R1 "Software\Microsoft\Windows\CurrentVersion\Run" SetRegView 64 - ; 清理旧版本的注册表项 (Clash Verge) - ReadRegStr $R2 HKCU "$R1" "Clash Verge" + ; 清理旧版本的注册表项 (Koala Clash) + ReadRegStr $R2 HKCU "$R1" "Koala Clash" ${If} $R2 != "" - DeleteRegValue HKCU "$R1" "Clash Verge" + DeleteRegValue HKCU "$R1" "Koala Clash" ${EndIf} - ReadRegStr $R2 HKLM "$R1" "Clash Verge" + ReadRegStr $R2 HKLM "$R1" "Koala Clash" ${If} $R2 != "" - DeleteRegValue HKLM "$R1" "Clash Verge" + DeleteRegValue HKLM "$R1" "Koala Clash" ${EndIf} - ; 清理新版本的注册表项 (clash-verge) - ReadRegStr $R2 HKCU "$R1" "clash-verge" + ; 清理新版本的注册表项 (koala-clash) + ReadRegStr $R2 HKCU "$R1" "koala-clash" ${If} $R2 != "" - DeleteRegValue HKCU "$R1" "clash-verge" + DeleteRegValue HKCU "$R1" "koala-clash" ${EndIf} - ReadRegStr $R2 HKLM "$R1" "clash-verge" + ReadRegStr $R2 HKLM "$R1" "koala-clash" ${If} $R2 != "" - DeleteRegValue HKLM "$R1" "clash-verge" + DeleteRegValue HKLM "$R1" "koala-clash" ${EndIf} ; Delete old files before installation - ; Delete clash-verge.desktop - IfFileExists "$INSTDIR\Clash Verge.exe" 0 +2 - Delete "$INSTDIR\Clash Verge.exe" + ; Delete koala-clash.desktop + IfFileExists "$INSTDIR\Koala Clash.exe" 0 +2 + Delete "$INSTDIR\Koala Clash.exe" ; Copy main executable File "${MAINBINARYSRCPATH}" @@ -815,7 +815,7 @@ Section Install File /a "/oname={{this}}" "{{@key}}" {{/each}} - !insertmacro StartVergeService + !insertmacro StartKoalaService ; Create uninstaller WriteUninstaller "$INSTDIR\uninstall.exe" @@ -918,11 +918,11 @@ FunctionEnd Section Uninstall ;删除 window-state.json 文件 SetShellVarContext current - Delete "$APPDATA\io.github.clash-verge-rev.clash-verge-rev\window-state.json" + Delete "$APPDATA\io.github.koala-clash\window-state.json" !insertmacro CheckIfAppIsRunning - !insertmacro CheckAllVergeProcesses - !insertmacro RemoveVergeService + !insertmacro CheckAllKoalaProcesses + !insertmacro RemoveKoalaService ; 清理自启动注册表项 DetailPrint "Cleaning auto-launch registry entries..." @@ -930,26 +930,26 @@ Section Uninstall StrCpy $R1 "Software\Microsoft\Windows\CurrentVersion\Run" SetRegView 64 - ; 清理旧版本的注册表项 (Clash Verge) - ReadRegStr $R2 HKCU "$R1" "Clash Verge" + ; 清理旧版本的注册表项 (Koala Clash) + ReadRegStr $R2 HKCU "$R1" "Koala Clash" ${If} $R2 != "" - DeleteRegValue HKCU "$R1" "Clash Verge" + DeleteRegValue HKCU "$R1" "Koala Clash" ${EndIf} - ReadRegStr $R2 HKLM "$R1" "Clash Verge" + ReadRegStr $R2 HKLM "$R1" "Koala Clash" ${If} $R2 != "" - DeleteRegValue HKLM "$R1" "Clash Verge" + DeleteRegValue HKLM "$R1" "Koala Clash" ${EndIf} - ; 清理新版本的注册表项 (clash-verge) - ReadRegStr $R2 HKCU "$R1" "clash-verge" + ; 清理新版本的注册表项 (koala-clash) + ReadRegStr $R2 HKCU "$R1" "koala-clash" ${If} $R2 != "" - DeleteRegValue HKCU "$R1" "clash-verge" + DeleteRegValue HKCU "$R1" "koala-clash" ${EndIf} - ReadRegStr $R2 HKLM "$R1" "clash-verge" + ReadRegStr $R2 HKLM "$R1" "koala-clash" ${If} $R2 != "" - DeleteRegValue HKLM "$R1" "clash-verge" + DeleteRegValue HKLM "$R1" "koala-clash" ${EndIf} ; Delete the app directory and its content from disk @@ -966,9 +966,9 @@ Section Uninstall Delete "$INSTDIR\\{{this}}" {{/each}} - ; Delete clash-verge.desktop - IfFileExists "$INSTDIR\Clash Verge.exe" 0 +2 - Delete "$INSTDIR\Clash Verge.exe" + ; Delete koala-clash.desktop + IfFileExists "$INSTDIR\Koala Clash.exe" 0 +2 + Delete "$INSTDIR\Koala Clash.exe" ; Delete uninstaller Delete "$INSTDIR\uninstall.exe" @@ -982,20 +982,20 @@ Section Uninstall !insertmacro UnpinShortcut "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk" !insertmacro UnpinShortcut "$DESKTOP\${PRODUCTNAME}.lnk" ; 兼容旧名称快捷方式 - !insertmacro UnpinShortcut "$SMPROGRAMS\$AppStartMenuFolder\clash-verge.lnk" - !insertmacro UnpinShortcut "$DESKTOP\clash-verge.lnk" + !insertmacro UnpinShortcut "$SMPROGRAMS\$AppStartMenuFolder\koala-clash.lnk" + !insertmacro UnpinShortcut "$DESKTOP\koala-clash.lnk" ; Remove start menu shortcut !insertmacro MUI_STARTMENU_GETFOLDER Application $AppStartMenuFolder Delete "$SMPROGRAMS\$AppStartMenuFolder\${PRODUCTNAME}.lnk" ; 兼容旧名称快捷方式 - Delete "$SMPROGRAMS\$AppStartMenuFolder\clash-verge.lnk" + Delete "$SMPROGRAMS\$AppStartMenuFolder\koala-clash.lnk" RMDir "$SMPROGRAMS\$AppStartMenuFolder" ; Remove desktop shortcuts Delete "$DESKTOP\${PRODUCTNAME}.lnk" ; 兼容旧名称快捷方式 - Delete "$DESKTOP\clash-verge.lnk" + Delete "$DESKTOP\koala-clash.lnk" ; Remove registry information for add/remove programs !if "${INSTALLMODE}" == "both" @@ -1017,7 +1017,7 @@ Section Uninstall ;删除 window-state.json 文件 SetShellVarContext current - Delete "$APPDATA\io.github.clash-verge-rev.clash-verge-rev\window-state.json" + Delete "$APPDATA\io.github.koala-clash\window-state.json" ${GetOptions} $CMDLINE "/P" $R0 IfErrors +2 0 diff --git a/src-tauri/src/config/clash.rs b/src-tauri/src/config/clash.rs index 2379b298..b009fe82 100644 --- a/src-tauri/src/config/clash.rs +++ b/src-tauri/src/config/clash.rs @@ -129,7 +129,7 @@ impl IClashTemp { help::save_yaml( &dirs::clash_path()?, &self.0, - Some("# Generated by Clash Verge"), + Some("# Generated by Koala Clash"), ) } diff --git a/src-tauri/src/config/config.rs b/src-tauri/src/config/config.rs index c0429b12..a4da0ac3 100644 --- a/src-tauri/src/config/config.rs +++ b/src-tauri/src/config/config.rs @@ -11,8 +11,8 @@ use once_cell::sync::OnceCell; use std::path::PathBuf; use tokio::time::{sleep, Duration}; -pub const RUNTIME_CONFIG: &str = "clash-verge.yaml"; -pub const CHECK_CONFIG: &str = "clash-verge-check.yaml"; +pub const RUNTIME_CONFIG: &str = "koala-clash.yaml"; +pub const CHECK_CONFIG: &str = "koala-clash-check.yaml"; pub struct Config { clash_config: Draft>, @@ -141,7 +141,7 @@ impl Config { .as_ref() .ok_or(anyhow!("failed to get runtime config"))?; - help::save_yaml(&path, &config, Some("# Generated by Clash Verge"))?; + help::save_yaml(&path, &config, Some("# Generated by Koala Clash"))?; Ok(path) } diff --git a/src-tauri/src/config/prfitem.rs b/src-tauri/src/config/prfitem.rs index ddaa14ba..3fd74323 100644 --- a/src-tauri/src/config/prfitem.rs +++ b/src-tauri/src/config/prfitem.rs @@ -4,11 +4,11 @@ use crate::utils::{ tmpl, }; use anyhow::{bail, Context, Result}; +use base64::{engine::general_purpose::STANDARD, Engine as _}; use reqwest::StatusCode; use serde::{Deserialize, Serialize}; use serde_yaml::Mapping; use std::{fs, time::Duration}; -use base64::{engine::general_purpose::STANDARD, Engine as _}; use url::Url; use super::Config; @@ -407,7 +407,8 @@ impl PrfItem { Some(value) => { let str_value = value.to_str().unwrap_or(""); if let Some(b64_data) = str_value.strip_prefix("base64:") { - STANDARD.decode(b64_data) + STANDARD + .decode(b64_data) .ok() .and_then(|bytes| String::from_utf8(bytes).ok()) } else { @@ -423,7 +424,7 @@ impl PrfItem { bail!(announce_msg.clone()); } } - + let announce_url = match header.get("announce-url") { Some(value) => { let str_value = value.to_str().unwrap_or(""); @@ -436,7 +437,8 @@ impl PrfItem { Some(value) => { let str_value = value.to_str().unwrap_or(""); if let Some(b64_data) = str_value.strip_prefix("base64:") { - STANDARD.decode(b64_data) + STANDARD + .decode(b64_data) .ok() .and_then(|bytes| String::from_utf8(bytes).ok()) } else { @@ -448,7 +450,9 @@ impl PrfItem { let uid = help::get_uid("R"); let file = format!("{uid}.yaml"); - let name = name.or(profile_title).unwrap_or(filename.unwrap_or("Remote File".into())); + let name = name + .or(profile_title) + .unwrap_or(filename.unwrap_or("Remote File".into())); let data = resp.text_with_charset("utf-8").await?; // process the charset "UTF-8 with BOM" diff --git a/src-tauri/src/config/profiles.rs b/src-tauri/src/config/profiles.rs index eec6f047..17fb255c 100644 --- a/src-tauri/src/config/profiles.rs +++ b/src-tauri/src/config/profiles.rs @@ -66,7 +66,7 @@ impl IProfiles { help::save_yaml( &dirs::profiles_path()?, self, - Some("# Profiles Config for Clash Verge"), + Some("# Profiles Config for Koala Clash"), ) } diff --git a/src-tauri/src/config/verge.rs b/src-tauri/src/config/verge.rs index 91584935..833a4fce 100644 --- a/src-tauri/src/config/verge.rs +++ b/src-tauri/src/config/verge.rs @@ -238,7 +238,7 @@ pub struct IVergeTheme { impl IVerge { /// 有效的clash核心名称 - pub const VALID_CLASH_CORES: &'static [&'static str] = &["verge-mihomo", "verge-mihomo-alpha"]; + pub const VALID_CLASH_CORES: &'static [&'static str] = &["koala-mihomo", "koala-mihomo-alpha"]; /// 验证并修正配置文件中的clash_core值 pub fn validate_and_fix_config() -> Result<()> { @@ -257,10 +257,10 @@ impl IVerge { warn, Type::Config, true, - "启动时发现无效的clash_core配置: '{}', 将自动修正为 'verge-mihomo'", + "启动时发现无效的clash_core配置: '{}', 将自动修正为 'koala-mihomo'", core ); - config.clash_core = Some("verge-mihomo".to_string()); + config.clash_core = Some("koala-mihomo".to_string()); needs_fix = true; } } else { @@ -268,16 +268,16 @@ impl IVerge { info, Type::Config, true, - "启动时发现未配置clash_core, 将设置为默认值 'verge-mihomo'" + "启动时发现未配置clash_core, 将设置为默认值 'koala-mihomo'" ); - config.clash_core = Some("verge-mihomo".to_string()); + config.clash_core = Some("koala-mihomo".to_string()); needs_fix = true; } // 修正后保存配置 if needs_fix { logging!(info, Type::Config, true, "正在保存修正后的配置文件..."); - help::save_yaml(&config_path, &config, Some("# Clash Verge Config"))?; + help::save_yaml(&config_path, &config, Some("# Koala Clash Config"))?; logging!( info, Type::Config, @@ -321,7 +321,7 @@ impl IVerge { pub fn get_valid_clash_core(&self) -> String { self.clash_core .clone() - .unwrap_or_else(|| "verge-mihomo".to_string()) + .unwrap_or_else(|| "koala-mihomo".to_string()) } fn get_system_language() -> String { @@ -340,18 +340,15 @@ impl IVerge { } pub fn new() -> Self { - match dirs::verge_path().and_then(|path| help::read_yaml::(&path)) { - Ok(config) => config, - Err(err) => { - log::error!(target: "app", "{err}"); - Self::template() - } - } + dirs::verge_path().and_then(|path| help::read_yaml::(&path)).unwrap_or_else(|err| { + log::error!(target: "app", "{err}"); + Self::template() + }) } pub fn template() -> Self { Self { - clash_core: Some("verge-mihomo".into()), + clash_core: Some("koala-mihomo".into()), language: Some(Self::get_system_language()), theme_mode: Some("system".into()), #[cfg(not(target_os = "windows"))] @@ -415,7 +412,7 @@ impl IVerge { /// Save IVerge App Config pub fn save_file(&self) -> Result<()> { - help::save_yaml(&dirs::verge_path()?, &self, Some("# Clash Verge Config")) + help::save_yaml(&dirs::verge_path()?, &self, Some("# Koala Clash Config")) } /// patch verge config diff --git a/src-tauri/src/core/backup.rs b/src-tauri/src/core/backup.rs index fa6e831e..da892fa4 100644 --- a/src-tauri/src/core/backup.rs +++ b/src-tauri/src/core/backup.rs @@ -108,7 +108,7 @@ impl WebDavClient { reqwest::Client::builder() .danger_accept_invalid_certs(true) .timeout(Duration::from_secs(op.timeout())) - .user_agent(format!("clash-verge/{APP_VERSION} ({OS} WebDAV-Client)")) + .user_agent(format!("koala-clash/{APP_VERSION} ({OS} WebDAV-Client)")) .redirect(reqwest::redirect::Policy::custom(|attempt| { // 允许所有请求类型的重定向,包括PUT if attempt.previous().len() >= 5 { diff --git a/src-tauri/src/core/core.rs b/src-tauri/src/core/core.rs index 6a4224a6..79e37af6 100644 --- a/src-tauri/src/core/core.rs +++ b/src-tauri/src/core/core.rs @@ -146,7 +146,7 @@ impl CoreManager { help::save_yaml( &runtime_path, &Config::clash().latest().0, - Some("# Clash Verge Runtime"), + Some("# Koala Clash Runtime"), )?; handle::Handle::notice_message(msg_type, msg_content); Ok(()) @@ -443,7 +443,7 @@ impl CoreManager { child_guard.as_ref().map(|child| child.pid()) }; - let target_processes = ["verge-mihomo", "verge-mihomo-alpha"]; + let target_processes = ["koala-mihomo", "koala-mihomo-alpha"]; // 并行查找所有目标进程 let mut process_futures = Vec::new(); diff --git a/src-tauri/src/core/service.rs b/src-tauri/src/core/service.rs index 91b2ce28..c16d9ecf 100644 --- a/src-tauri/src/core/service.rs +++ b/src-tauri/src/core/service.rs @@ -578,7 +578,7 @@ pub async fn check_ipc_service_status() -> Result { } Err(e) => { logging!(error, Type::Service, true, "IPC通信失败: {}", e); - bail!("无法连接到Clash Verge Service: {}", e) + bail!("无法连接到Koala Clash Service: {}", e) } } } @@ -667,7 +667,7 @@ pub async fn check_service_version() -> Result { } Err(e) => { logging!(error, Type::Service, true, "IPC通信失败: {}", e); - bail!("无法连接到Clash Verge Service: {}", e) + bail!("无法连接到Koala Clash Service: {}", e) } } } @@ -814,7 +814,7 @@ pub(super) async fn start_with_existing_service(config_file: &PathBuf) -> Result } Err(e) => { logging!(error, Type::Service, true, "启动核心IPC通信失败: {}", e); - bail!("无法连接到Clash Verge Service: {}", e) + bail!("无法连接到Koala Clash Service: {}", e) } } } @@ -910,7 +910,7 @@ pub(super) async fn stop_core_by_service() -> Result<()> { let payload = serde_json::json!({}); let response = send_ipc_request(IpcCommand::StopClash, payload) .await - .context("无法连接到Clash Verge Service")?; + .context("无法连接到Koala Clash Service")?; if !response.success { bail!(response.error.unwrap_or_else(|| "停止核心失败".to_string())); diff --git a/src-tauri/src/core/service_ipc.rs b/src-tauri/src/core/service_ipc.rs index 4aad2e62..9ffb6695 100644 --- a/src-tauri/src/core/service_ipc.rs +++ b/src-tauri/src/core/service_ipc.rs @@ -6,9 +6,9 @@ use sha2::{Digest, Sha256}; use std::time::{SystemTime, UNIX_EPOCH}; const IPC_SOCKET_NAME: &str = if cfg!(windows) { - r"\\.\pipe\clash-verge-service" + r"\\.\pipe\koala-clash-service" } else { - "/tmp/clash-verge-service.sock" + "/tmp/koala-clash-service.sock" }; // 定义命令类型 @@ -43,7 +43,7 @@ pub struct IpcResponse { fn derive_secret_key() -> Vec { // to do // 从系统安全存储中获取或从程序安装时生成的密钥文件中读取 - let unique_app_id = "clash-verge-app-secret-fuck-me-until-daylight"; + let unique_app_id = "koala-clash-app-secret-fuck-me-until-daylight"; let mut hasher = Sha256::new(); hasher.update(unique_app_id.as_bytes()); hasher.finalize().to_vec() diff --git a/src-tauri/src/core/tray/mod.rs b/src-tauri/src/core/tray/mod.rs index 9bdbba59..63cd5330 100644 --- a/src-tauri/src/core/tray/mod.rs +++ b/src-tauri/src/core/tray/mod.rs @@ -414,7 +414,7 @@ impl Tray { if let Some(tray) = app_handle.tray_by_id("main") { let _ = tray.set_tooltip(Some(&format!( - "Clash Verge {version}\n{}: {}\n{}: {}\n{}: {}", + "Koala Clash {version}\n{}: {}\n{}: {}\n{}: {}", t("SysProxy"), switch_map[system_proxy], t("TUN"), diff --git a/src-tauri/src/enhance/chain.rs b/src-tauri/src/enhance/chain.rs index 2fb7e951..5efa3f4c 100644 --- a/src-tauri/src/enhance/chain.rs +++ b/src-tauri/src/enhance/chain.rs @@ -108,8 +108,8 @@ impl ChainSupport { (self, core.as_str()), (ChainSupport::All, _) | (ChainSupport::Clash, "clash") - | (ChainSupport::ClashMeta, "verge-mihomo") - | (ChainSupport::ClashMetaAlpha, "verge-mihomo-alpha") + | (ChainSupport::ClashMeta, "koala-mihomo") + | (ChainSupport::ClashMetaAlpha, "koala-mihomo-alpha") ), None => true, } diff --git a/src-tauri/src/utils/autostart.rs b/src-tauri/src/utils/autostart.rs index df04b810..4c7faf06 100644 --- a/src-tauri/src/utils/autostart.rs +++ b/src-tauri/src/utils/autostart.rs @@ -39,7 +39,7 @@ pub fn get_exe_path() -> Result { pub fn create_shortcut() -> Result<()> { let exe_path = get_exe_path()?; let startup_dir = get_startup_dir()?; - let shortcut_path = startup_dir.join("Clash-Verge.lnk"); + let shortcut_path = startup_dir.join("Koala-Clash.lnk"); // 如果快捷方式已存在,直接返回成功 if shortcut_path.exists() { @@ -77,7 +77,7 @@ pub fn create_shortcut() -> Result<()> { #[cfg(target_os = "windows")] pub fn remove_shortcut() -> Result<()> { let startup_dir = get_startup_dir()?; - let shortcut_path = startup_dir.join("Clash-Verge.lnk"); + let shortcut_path = startup_dir.join("Koala-Clash.lnk"); // 如果快捷方式不存在,直接返回成功 if !shortcut_path.exists() { @@ -96,7 +96,7 @@ pub fn remove_shortcut() -> Result<()> { #[cfg(target_os = "windows")] pub fn is_shortcut_enabled() -> Result { let startup_dir = get_startup_dir()?; - let shortcut_path = startup_dir.join("Clash-Verge.lnk"); + let shortcut_path = startup_dir.join("Koala-Clash.lnk"); Ok(shortcut_path.exists()) } diff --git a/src-tauri/src/utils/dirs.rs b/src-tauri/src/utils/dirs.rs index 23b3a1ab..0856144f 100644 --- a/src-tauri/src/utils/dirs.rs +++ b/src-tauri/src/utils/dirs.rs @@ -5,14 +5,14 @@ use std::{fs, path::PathBuf}; use tauri::Manager; #[cfg(not(feature = "verge-dev"))] -pub static APP_ID: &str = "io.github.clash-verge-rev.clash-verge-rev"; +pub static APP_ID: &str = "io.github.koala-clash"; #[cfg(not(feature = "verge-dev"))] -pub static BACKUP_DIR: &str = "clash-verge-rev-backup"; +pub static BACKUP_DIR: &str = "io.github.koala-clash-backup"; #[cfg(feature = "verge-dev")] -pub static APP_ID: &str = "io.github.clash-verge-rev.clash-verge-rev.dev"; +pub static APP_ID: &str = "io.github.koala-clash.dev"; #[cfg(feature = "verge-dev")] -pub static BACKUP_DIR: &str = "clash-verge-rev-backup-dev"; +pub static BACKUP_DIR: &str = "io.github.koala-clash-backup-dev"; pub static PORTABLE_FLAG: OnceCell = OnceCell::new(); @@ -188,13 +188,13 @@ pub fn profiles_path() -> Result { #[cfg(target_os = "macos")] pub fn service_path() -> Result { let res_dir = app_resources_dir()?; - Ok(res_dir.join("clash-verge-service")) + Ok(res_dir.join("koala-clash-service")) } #[cfg(windows)] pub fn service_path() -> Result { let res_dir = app_resources_dir()?; - Ok(res_dir.join("clash-verge-service.exe")) + Ok(res_dir.join("koala-clash-service.exe")) } pub fn service_log_file() -> Result { diff --git a/src-tauri/src/utils/init.rs b/src-tauri/src/utils/init.rs index d2c916ea..08049b4b 100644 --- a/src-tauri/src/utils/init.rs +++ b/src-tauri/src/utils/init.rs @@ -246,7 +246,7 @@ fn init_dns_config() -> Result<()> { help::save_yaml( &dns_path, &default_dns_config, - Some("# Clash Verge DNS Config"), + Some("# Koala Clash DNS Config"), )?; } @@ -274,14 +274,14 @@ pub fn init_config() -> Result<()> { crate::log_err!(dirs::clash_path().map(|path| { if !path.exists() { - help::save_yaml(&path, &IClashTemp::template().0, Some("# Clash Vergeasu"))?; + help::save_yaml(&path, &IClashTemp::template().0, Some("# Koala Clash"))?; } >::Ok(()) })); crate::log_err!(dirs::verge_path().map(|path| { if !path.exists() { - help::save_yaml(&path, &IVerge::template(), Some("# Clash Verge"))?; + help::save_yaml(&path, &IVerge::template(), Some("# Koala Clash"))?; } >::Ok(()) })); @@ -291,7 +291,7 @@ pub fn init_config() -> Result<()> { crate::log_err!(dirs::profiles_path().map(|path| { if !path.exists() { - help::save_yaml(&path, &IProfiles::template(), Some("# Clash Verge"))?; + help::save_yaml(&path, &IProfiles::template(), Some("# Koala Clash"))?; } >::Ok(()) })); @@ -371,8 +371,8 @@ pub fn init_scheme() -> Result<()> { let hkcu = RegKey::predef(HKEY_CURRENT_USER); let (clash, _) = hkcu.create_subkey("Software\\Classes\\Clash")?; - clash.set_value("", &"Clash Verge")?; - clash.set_value("URL Protocol", &"Clash Verge URL Scheme Protocol")?; + clash.set_value("", &"Koala Clash")?; + clash.set_value("URL Protocol", &"Koala Clash URL Scheme Protocol")?; let (default_icon, _) = hkcu.create_subkey("Software\\Classes\\Clash\\DefaultIcon")?; default_icon.set_value("", &app_exe)?; let (command, _) = hkcu.create_subkey("Software\\Classes\\Clash\\Shell\\Open\\Command")?; @@ -384,7 +384,7 @@ pub fn init_scheme() -> Result<()> { pub fn init_scheme() -> Result<()> { let output = std::process::Command::new("xdg-mime") .arg("default") - .arg("clash-verge.desktop") + .arg("koala-clash.desktop") .arg("x-scheme-handler/clash") .output()?; if !output.status.success() { diff --git a/src-tauri/src/utils/mod.rs b/src-tauri/src/utils/mod.rs index 4989c94c..837090ee 100644 --- a/src-tauri/src/utils/mod.rs +++ b/src-tauri/src/utils/mod.rs @@ -8,6 +8,6 @@ pub mod network; pub mod notification; pub mod resolve; pub mod server; +pub mod sys_info; pub mod tmpl; pub mod window_manager; -pub mod sys_info; diff --git a/src-tauri/src/utils/network.rs b/src-tauri/src/utils/network.rs index af7a3e58..0ec63cdb 100644 --- a/src-tauri/src/utils/network.rs +++ b/src-tauri/src/utils/network.rs @@ -40,7 +40,7 @@ impl NetworkManager { // 创建专用的异步运行时,线程数限制为4个 let runtime = Builder::new_multi_thread() .worker_threads(4) - .thread_name("clash-verge-network") + .thread_name("koala-clash-network") .enable_io() .enable_time() .build() @@ -323,8 +323,8 @@ impl NetworkManager { use crate::utils::resolve::VERSION; let version = match VERSION.get() { - Some(v) => format!("clash-verge/v{v}"), - None => "clash-verge/unknown".to_string(), + Some(v) => format!("koala-clash/v{v}"), + None => "koala-clash/unknown".to_string(), }; builder = builder.user_agent(version); diff --git a/src-tauri/src/utils/resolve.rs b/src-tauri/src/utils/resolve.rs index 0230f29c..9150811f 100644 --- a/src-tauri/src/utils/resolve.rs +++ b/src-tauri/src/utils/resolve.rs @@ -549,7 +549,7 @@ pub async fn resolve_scheme(param: String) -> Result<()> { } }; - if link_parsed.scheme() == "clash" || link_parsed.scheme() == "clash-verge" { + if link_parsed.scheme() == "clash" || link_parsed.scheme() == "koala-clash" { let mut name: Option = None; let mut url_param: Option = None; diff --git a/src-tauri/src/utils/tmpl.rs b/src-tauri/src/utils/tmpl.rs index 5d421a8c..9dda446c 100644 --- a/src-tauri/src/utils/tmpl.rs +++ b/src-tauri/src/utils/tmpl.rs @@ -1,7 +1,7 @@ //! Some config file template /// template for new a profile item -pub const ITEM_LOCAL: &str = "# Profile Template for Clash Verge +pub const ITEM_LOCAL: &str = "# Profile Template for Koala Clash proxies: [] @@ -11,13 +11,13 @@ rules: [] "; /// enhanced profile -pub const ITEM_MERGE: &str = "# Profile Enhancement Merge Template for Clash Verge +pub const ITEM_MERGE: &str = "# Profile Enhancement Merge Template for Koala Clash profile: store-selected: true "; -pub const ITEM_MERGE_EMPTY: &str = "# Profile Enhancement Merge Template for Clash Verge +pub const ITEM_MERGE_EMPTY: &str = "# Profile Enhancement Merge Template for Koala Clash "; @@ -30,7 +30,7 @@ function main(config, profileName) { "; /// enhanced profile -pub const ITEM_RULES: &str = "# Profile Enhancement Rules Template for Clash Verge +pub const ITEM_RULES: &str = "# Profile Enhancement Rules Template for Koala Clash prepend: [] @@ -40,7 +40,7 @@ delete: [] "; /// enhanced profile -pub const ITEM_PROXIES: &str = "# Profile Enhancement Proxies Template for Clash Verge +pub const ITEM_PROXIES: &str = "# Profile Enhancement Proxies Template for Koala Clash prepend: [] @@ -50,7 +50,7 @@ delete: [] "; /// enhanced profile -pub const ITEM_GROUPS: &str = "# Profile Enhancement Groups Template for Clash Verge +pub const ITEM_GROUPS: &str = "# Profile Enhancement Groups Template for Koala Clash prepend: [] diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index 514bc00b..67231f79 100755 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -13,7 +13,7 @@ ], "resources": ["resources", "resources/locales/*"], "publisher": "Koala Clash", - "externalBin": ["sidecar/verge-mihomo", "sidecar/verge-mihomo-alpha"], + "externalBin": ["sidecar/koala-mihomo", "sidecar/koala-mihomo-alpha"], "copyright": "GNU General Public License v3.0", "category": "DeveloperTool", "shortDescription": "Koala Clash", @@ -26,7 +26,7 @@ "devUrl": "http://localhost:3000/" }, "productName": "Koala Clash", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "plugins": { "updater": { "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IERCQjQ1QjQ0QUJDQTU1RTkKUldUcFZjcXJSRnUwMjdXSERoZVQ1R0hHRDMrT3VkSmpvbDJmb01sN3ZpYWhVYnEwaWpYUWU4YU0K", @@ -40,7 +40,7 @@ }, "deep-link": { "desktop": { - "schemes": ["clash", "clash-verge"] + "schemes": ["clash", "koala-clash"] } } }, diff --git a/src-tauri/tauri.linux.conf.json b/src-tauri/tauri.linux.conf.json index 398bff03..497f94d2 100644 --- a/src-tauri/tauri.linux.conf.json +++ b/src-tauri/tauri.linux.conf.json @@ -1,34 +1,34 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "bundle": { "targets": ["deb", "rpm"], "linux": { "deb": { "depends": ["openssl"], - "desktopTemplate": "./packages/linux/clash-verge.desktop", - "provides": ["clash-verge"], - "conflicts": ["clash-verge"], - "replaces": ["clash-verge"], + "desktopTemplate": "./packages/linux/koala-clash.desktop", + "provides": ["koala-clash"], + "conflicts": ["koala-clash"], + "replaces": ["koala-clash"], "postInstallScript": "./packages/linux/post-install.sh", "preRemoveScript": "./packages/linux/pre-remove.sh" }, "rpm": { "depends": ["openssl"], - "desktopTemplate": "./packages/linux/clash-verge.desktop", - "provides": ["clash-verge"], - "conflicts": ["clash-verge"], - "obsoletes": ["clash-verge"], + "desktopTemplate": "./packages/linux/koala-clash.desktop", + "provides": ["koala-clash"], + "conflicts": ["koala-clash"], + "obsoletes": ["koala-clash"], "postInstallScript": "./packages/linux/post-install.sh", "preRemoveScript": "./packages/linux/pre-remove.sh" } }, "externalBin": [ - "./resources/clash-verge-service", + "./resources/koala-clash-service", "./resources/install-service", "./resources/uninstall-service", - "./sidecar/verge-mihomo", - "./sidecar/verge-mihomo-alpha" + "./sidecar/koala-mihomo", + "./sidecar/koala-mihomo-alpha" ] } } diff --git a/src-tauri/tauri.macos.conf.json b/src-tauri/tauri.macos.conf.json index 059931a1..334200b0 100644 --- a/src-tauri/tauri.macos.conf.json +++ b/src-tauri/tauri.macos.conf.json @@ -1,6 +1,6 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "productName": "Koala Clash", "bundle": { "targets": ["app", "dmg"], diff --git a/src-tauri/tauri.windows.conf.json b/src-tauri/tauri.windows.conf.json index e72bee51..d6daf971 100644 --- a/src-tauri/tauri.windows.conf.json +++ b/src-tauri/tauri.windows.conf.json @@ -1,6 +1,6 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "bundle": { "targets": ["nsis"], "windows": { diff --git a/src-tauri/webview2.arm64.json b/src-tauri/webview2.arm64.json index eff1286c..18f87dcb 100644 --- a/src-tauri/webview2.arm64.json +++ b/src-tauri/webview2.arm64.json @@ -1,6 +1,6 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "bundle": { "targets": ["nsis"], "windows": { diff --git a/src-tauri/webview2.x64.json b/src-tauri/webview2.x64.json index 96a40f5a..9a341fe8 100644 --- a/src-tauri/webview2.x64.json +++ b/src-tauri/webview2.x64.json @@ -1,6 +1,6 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "bundle": { "targets": ["nsis"], "windows": { diff --git a/src-tauri/webview2.x86.json b/src-tauri/webview2.x86.json index 1fc30946..5f66e049 100644 --- a/src-tauri/webview2.x86.json +++ b/src-tauri/webview2.x86.json @@ -1,6 +1,6 @@ { "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", - "identifier": "io.github.clash-verge-rev.clash-verge-rev", + "identifier": "io.github.koala-clash", "bundle": { "targets": ["nsis"], "windows": { diff --git a/src/components/setting/mods/clash-core-viewer.tsx b/src/components/setting/mods/clash-core-viewer.tsx index 434968a3..789732ad 100644 --- a/src/components/setting/mods/clash-core-viewer.tsx +++ b/src/components/setting/mods/clash-core-viewer.tsx @@ -26,8 +26,8 @@ import { showNotice } from "@/services/noticeService"; // Константы и интерфейсы const VALID_CORE = [ - { name: "Mihomo", core: "verge-mihomo", chip: "Release Version" }, - { name: "Mihomo Alpha", core: "verge-mihomo-alpha", chip: "Alpha Version" }, + { name: "Mihomo", core: "koala-mihomo", chip: "Release Version" }, + { name: "Mihomo Alpha", core: "koala-mihomo-alpha", chip: "Alpha Version" }, ]; export const ClashCoreViewer = forwardRef((props, ref) => { @@ -44,7 +44,7 @@ export const ClashCoreViewer = forwardRef((props, ref) => { close: () => setOpen(false), })); - const { clash_core = "verge-mihomo" } = verge ?? {}; + const { clash_core = "koala-mihomo" } = verge ?? {}; const onCoreChange = useLockFn(async (core: string) => { if (core === clash_core) return;