diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 93ea2fc..0821278 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -115,7 +115,7 @@ jobs: run: | sudo apt-get update sudo apt-get install jq - echo "VERSION=$(cat package.json | jq '.version')" >> $GITHUB_ENV + echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV - name: Upload Release if: startsWith(matrix.target, 'x86_64') uses: softprops/action-gh-release@v1 diff --git a/README.md b/README.md index 960cdd7..2c49f7a 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ Download from [release](https://github.com/clash-verge-rev/clash-verge-rev/relea - [Linux x64 AppImage](https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v1.4.3/clash-verge_1.4.3_amd64.AppImage) - [Linux x64 deb](https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v1.4.3/clash-verge_1.4.3_amd64.deb) +- [Linux x86 deb](https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v1.4.3/clash-verge_1.4.3_i386.deb) - [Linux arm64 deb](https://github.com/clash-verge-rev/clash-verge-rev/releases/download/v1.4.3/clash-verge_1.4.3_arm64.deb) Or you can build it yourself. Supports Windows, Linux and macOS 10.15+ diff --git a/package.json b/package.json index cf5361a..12c288e 100644 --- a/package.json +++ b/package.json @@ -4,6 +4,7 @@ "license": "GPL-3.0", "scripts": { "dev": "tauri dev", + "dev:diff": "tauri dev -f verge-dev", "build": "tauri build", "tauri": "tauri", "web:dev": "vite", diff --git a/scripts/check.mjs b/scripts/check.mjs index 2066a6a..a88692e 100644 --- a/scripts/check.mjs +++ b/scripts/check.mjs @@ -58,6 +58,7 @@ const META_ALPHA_MAP = { "darwin-x64": "mihomo-darwin-amd64", "darwin-arm64": "mihomo-darwin-arm64", "linux-x64": "mihomo-linux-amd64-compatible", + "linux-ia32": "mihomo-linux-386", "linux-arm64": "mihomo-linux-arm64", "linux-arm": "mihomo-linux-armv7", }; @@ -86,6 +87,7 @@ const META_MAP = { "darwin-x64": "mihomo-darwin-amd64", "darwin-arm64": "mihomo-darwin-arm64", "linux-x64": "mihomo-linux-amd64-compatible", + "linux-ia32": "mihomo-linux-386", "linux-arm64": "mihomo-linux-arm64", "linux-arm": "mihomo-linux-armv7", }; diff --git a/src-tauri/Cargo.lock b/src-tauri/Cargo.lock index 2eb9bab..a3557bf 100644 --- a/src-tauri/Cargo.lock +++ b/src-tauri/Cargo.lock @@ -1954,20 +1954,6 @@ dependencies = [ "want", ] -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http", - "hyper", - "rustls", - "tokio", - "tokio-rustls", -] - [[package]] name = "hyper-tls" version = "0.5.0" @@ -3616,7 +3602,6 @@ dependencies = [ "http", "http-body", "hyper", - "hyper-rustls", "hyper-tls", "ipnet", "js-sys", @@ -3626,15 +3611,12 @@ dependencies = [ "once_cell", "percent-encoding", "pin-project-lite", - "rustls", - "rustls-pemfile", "serde", "serde_json", "serde_urlencoded", "system-configuration", "tokio", "tokio-native-tls", - "tokio-rustls", "tokio-util", "tower-service", "url", @@ -3642,7 +3624,6 @@ dependencies = [ "wasm-bindgen-futures", "wasm-streams", "web-sys", - "webpki-roots", "winreg 0.50.0", ] @@ -3670,20 +3651,6 @@ dependencies = [ "windows 0.37.0", ] -[[package]] -name = "ring" -version = "0.17.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "684d5e6e18f669ccebf64a92236bb7db9a34f07be010e3627368182027180866" -dependencies = [ - "cc", - "getrandom 0.2.11", - "libc", - "spin", - "untrusted", - "windows-sys 0.48.0", -] - [[package]] name = "rquickjs" version = "0.3.1" @@ -3778,18 +3745,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rustls" -version = "0.21.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "629648aced5775d558af50b2b4c7b02983a04b312126d45eeead26e7caa498b9" -dependencies = [ - "log 0.4.20", - "ring", - "rustls-webpki", - "sct", -] - [[package]] name = "rustls-pemfile" version = "1.0.4" @@ -3799,16 +3754,6 @@ dependencies = [ "base64 0.21.5", ] -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "rustversion" version = "1.0.14" @@ -3857,16 +3802,6 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring", - "untrusted", -] - [[package]] name = "security-framework" version = "2.9.2" @@ -4927,16 +4862,6 @@ dependencies = [ "tokio", ] -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - [[package]] name = "tokio-stream" version = "0.1.14" @@ -5222,12 +5147,6 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f28467d3e1d3c6586d8f25fa243f544f5800fec42d97032474e17222c2b75cfa" -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - [[package]] name = "url" version = "2.5.0" @@ -5530,12 +5449,6 @@ dependencies = [ "system-deps 6.2.0", ] -[[package]] -name = "webpki-roots" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1778a42e8b3b90bff8d0f5032bf22250792889a5cdc752aa0020c84abe3aaf10" - [[package]] name = "webview2-com" version = "0.19.1" diff --git a/src-tauri/Cargo.toml b/src-tauri/Cargo.toml index baad6f2..6ce6d09 100644 --- a/src-tauri/Cargo.toml +++ b/src-tauri/Cargo.toml @@ -37,7 +37,7 @@ percent-encoding = "2.3.1" window-shadows = { version = "0.2" } tokio = { version = "1", features = ["full"] } serde = { version = "1.0", features = ["derive"] } -reqwest = { version = "0.11", features = ["json", "rustls-tls"] } +reqwest = { version = "0.11", features = ["json"] } sysproxy = { git="https://github.com/zzzgydi/sysproxy-rs", branch = "main" } tauri = { version = "1.5", features = ["icon-png", "clipboard-all", "global-shortcut-all", "process-all", "shell-all", "system-tray", "updater", "window-all"] } @@ -53,6 +53,7 @@ windows-sys = { version = "0.52", features = ["Win32_System_LibraryLoader", "Win [features] default = ["custom-protocol"] custom-protocol = ["tauri/custom-protocol"] +verge-dev = [] [profile.release] panic = "abort" diff --git a/src-tauri/src/utils/dirs.rs b/src-tauri/src/utils/dirs.rs index cdef561..6240f2a 100644 --- a/src-tauri/src/utils/dirs.rs +++ b/src-tauri/src/utils/dirs.rs @@ -62,8 +62,8 @@ pub fn app_home_dir() -> Result { #[cfg(not(target_os = "windows"))] Ok(data_dir() - .ok_or(anyhow::anyhow!("failed to get the app home dir"))? - .join("io.github.clash_verge_rev.clash_verge_rev")) + .ok_or(anyhow::anyhow!("failed to get app home dir"))? + .join(APP_ID)) } /// get the resources dir