Compare commits
15 Commits
dependenci
...
v1.6.2
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
4
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -8,13 +8,13 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
## 在提交问题之前,请确认以下事项:
|
## 在提交问题之前,请确认以下事项:
|
||||||
1. 请 **确保** 您已经查阅了 [Clash Verge Rev 官方文档](https://clash-verge-rev.github.io/guide.html) 以及 [常见问题](https://clash-verge-rev.github.io/faq/install/)
|
1. 请 **确保** 您已经查阅了 [Clash Verge Rev 官方文档](https://clash-verge-rev.github.io/guide/term.html) 以及 [常见问题](https://clash-verge-rev.github.io/faq/windows.html)
|
||||||
2. 请 **确保** [已有的问题](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue) 中没有人提交过相似issue,否则请在已有的issue下进行讨论
|
2. 请 **确保** [已有的问题](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue) 中没有人提交过相似issue,否则请在已有的issue下进行讨论
|
||||||
3. 请 **务必** 给issue填写一个简洁明了的标题,以便他人快速检索
|
3. 请 **务必** 给issue填写一个简洁明了的标题,以便他人快速检索
|
||||||
4. 请 **务必** 先下载 [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) 版本测试,确保问题依然存在
|
4. 请 **务必** 先下载 [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) 版本测试,确保问题依然存在
|
||||||
5. 请 **务必** 按照模板规范详细描述问题,否则issue将会被关闭
|
5. 请 **务必** 按照模板规范详细描述问题,否则issue将会被关闭
|
||||||
## Before submitting the issue, please make sure of the following checklist:
|
## Before submitting the issue, please make sure of the following checklist:
|
||||||
1. Please make sure you have read the [Clash Verge Rev official documentation](https://clash-verge-rev.github.io/guide.html) and [FAQ](https://clash-verge-rev.github.io/faq/install/)
|
1. Please make sure you have read the [Clash Verge Rev official documentation](https://clash-verge-rev.github.io/guide/term.html) and [FAQ](https://clash-verge-rev.github.io/faq/windows.html)
|
||||||
2. Please make sure there is no similar issue in the [existing issues](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue), otherwise please discuss under the existing issue
|
2. Please make sure there is no similar issue in the [existing issues](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue), otherwise please discuss under the existing issue
|
||||||
3. Please be sure to fill in a concise and clear title for the issue so that others can quickly search
|
3. Please be sure to fill in a concise and clear title for the issue so that others can quickly search
|
||||||
4. Please be sure to download the [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) version for testing to ensure that the problem still exists
|
4. Please be sure to download the [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) version for testing to ensure that the problem still exists
|
||||||
|
|||||||
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
4
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@@ -8,13 +8,13 @@ body:
|
|||||||
attributes:
|
attributes:
|
||||||
value: |
|
value: |
|
||||||
## 在提交问题之前,请确认以下事项:
|
## 在提交问题之前,请确认以下事项:
|
||||||
1. 请 **确保** 您已经查阅了 [Clash Verge Rev 官方文档](https://clash-verge-rev.github.io/guide.html) 确认软件不存在类似的功能
|
1. 请 **确保** 您已经查阅了 [Clash Verge Rev 官方文档](https://clash-verge-rev.github.io/guide/term.html) 确认软件不存在类似的功能
|
||||||
2. 请 **确保** [已有的问题](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue) 中没有人提交过相似issue,否则请在已有的issue下进行讨论
|
2. 请 **确保** [已有的问题](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue) 中没有人提交过相似issue,否则请在已有的issue下进行讨论
|
||||||
3. 请 **务必** 给issue填写一个简洁明了的标题,以便他人快速检索
|
3. 请 **务必** 给issue填写一个简洁明了的标题,以便他人快速检索
|
||||||
4. 请 **务必** 先下载 [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) 版本测试,确保该功能还未实现
|
4. 请 **务必** 先下载 [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) 版本测试,确保该功能还未实现
|
||||||
5. 请 **务必** 按照模板规范详细描述问题,否则issue将会被关闭
|
5. 请 **务必** 按照模板规范详细描述问题,否则issue将会被关闭
|
||||||
## Before submitting the issue, please make sure of the following checklist:
|
## Before submitting the issue, please make sure of the following checklist:
|
||||||
1. Please make sure you have read the [Clash Verge Rev official documentation](https://clash-verge-rev.github.io/guide.html) to confirm that the software does not have similar functions
|
1. Please make sure you have read the [Clash Verge Rev official documentation](https://clash-verge-rev.github.io/guide/term.html) to confirm that the software does not have similar functions
|
||||||
2. Please make sure there is no similar issue in the [existing issues](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue), otherwise please discuss under the existing issue
|
2. Please make sure there is no similar issue in the [existing issues](https://github.com/clash-verge-rev/clash-verge-rev/issues?q=is%3Aissue), otherwise please discuss under the existing issue
|
||||||
3. Please be sure to fill in a concise and clear title for the issue so that others can quickly search
|
3. Please be sure to fill in a concise and clear title for the issue so that others can quickly search
|
||||||
4. Please be sure to download the [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) version for testing to ensure that the function has not been implemented
|
4. Please be sure to download the [Alpha](https://github.com/clash-verge-rev/clash-verge-rev/releases/tag/alpha) version for testing to ensure that the function has not been implemented
|
||||||
|
|||||||
6
.github/build-for-linux/entrypoint.sh
vendored
6
.github/build-for-linux/entrypoint.sh
vendored
@@ -10,6 +10,12 @@ rustup target add "$INPUT_TARGET"
|
|||||||
if [ "$INPUT_TARGET" = "x86_64-unknown-linux-gnu" ]; then
|
if [ "$INPUT_TARGET" = "x86_64-unknown-linux-gnu" ]; then
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf
|
apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev librsvg2-dev patchelf
|
||||||
|
elif [ "$INPUT_TARGET" = "i686-unknown-linux-gnu" ]; then
|
||||||
|
dpkg --add-architecture i386
|
||||||
|
apt-get update
|
||||||
|
apt-get install -y libstdc++6:i386 libgdk-pixbuf2.0-dev:i386 libatomic1:i386 gcc-multilib g++-multilib libwebkit2gtk-4.0-dev:i386 libssl-dev:i386 libgtk-3-dev:i386 librsvg2-dev:i386 patchelf:i386 libayatana-appindicator3-dev:i386
|
||||||
|
export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig/:$PKG_CONFIG_PATH
|
||||||
|
export PKG_CONFIG_SYSROOT_DIR=/
|
||||||
elif [ "$INPUT_TARGET" = "aarch64-unknown-linux-gnu" ]; then
|
elif [ "$INPUT_TARGET" = "aarch64-unknown-linux-gnu" ]; then
|
||||||
dpkg --add-architecture arm64
|
dpkg --add-architecture arm64
|
||||||
apt-get update
|
apt-get update
|
||||||
|
|||||||
151
.github/workflows/alpha.yml
vendored
151
.github/workflows/alpha.yml
vendored
@@ -18,6 +18,8 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
|
- os: windows-latest
|
||||||
|
target: i686-pc-windows-msvc
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: aarch64-pc-windows-msvc
|
target: aarch64-pc-windows-msvc
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -77,8 +79,6 @@ jobs:
|
|||||||
run: pnpm portable ${{ matrix.target }} --alpha
|
run: pnpm portable ${{ matrix.target }} --alpha
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
|
|
||||||
alpha-for-linux:
|
alpha-for-linux:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -87,6 +87,8 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: i686-unknown-linux-gnu
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -111,52 +113,113 @@ jobs:
|
|||||||
echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
|
echo "VERSION=$(cat package.json | jq '.version' | tr -d '"')" >> $GITHUB_ENV
|
||||||
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
echo "BUILDTIME=$(TZ=Asia/Shanghai date)" >> $GITHUB_ENV
|
||||||
|
|
||||||
- run: |
|
|
||||||
cat > release.txt << 'EOF'
|
|
||||||
### 我应该下载哪个版本?
|
|
||||||
|
|
||||||
- Windows x86_64架构: x64-setup.exe (不支持win7)
|
|
||||||
- Windows arm64架构: arm64-setup.exe
|
|
||||||
- MacOS intel芯片: x64.dmg
|
|
||||||
- MacOS apple M芯片: aarch64.dmg (提示文件损坏看下面FAQ)
|
|
||||||
- Linux x64架构: amd64.AppImage/amd64.deb
|
|
||||||
- Linux arm64架构: arm64.deb
|
|
||||||
- Linux armv7架构: armhf.deb
|
|
||||||
- Windows 便携板 x86_64架构: x64_portable.zip (不推荐使用,无法自动更新)
|
|
||||||
- Windows 便携板 arm64架构: arm64_portable.zip (不推荐使用,无法自动更新)
|
|
||||||
|
|
||||||
### FAQ
|
|
||||||
|
|
||||||
- [FAQ](https://clash-verge-rev.github.io/faq/install/)
|
|
||||||
|
|
||||||
Created at ${{ env.BUILDTIME }}.
|
|
||||||
EOF
|
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
if: startsWith(matrix.target, 'x86_64')
|
if: startsWith(matrix.target, 'x86_64')
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: alpha
|
tag_name: alpha
|
||||||
name: "Clash Verge Rev Alpha"
|
name: "Clash Verge Rev Alpha"
|
||||||
body_path: release.txt
|
body: "More new features are now supported."
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage*
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage*
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: alpha
|
tag_name: alpha
|
||||||
name: "Clash Verge Rev Alpha"
|
name: "Clash Verge Rev Alpha"
|
||||||
body_path: release.txt
|
body: "More new features are now supported."
|
||||||
prerelease: true
|
prerelease: true
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
||||||
|
|
||||||
|
alpha-for-fixed-webview2:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
arch: x64
|
||||||
|
- os: windows-latest
|
||||||
|
target: i686-pc-windows-msvc
|
||||||
|
arch: x86
|
||||||
|
- os: windows-latest
|
||||||
|
target: aarch64-pc-windows-msvc
|
||||||
|
arch: arm64
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Add Rust Target
|
||||||
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: src-tauri
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v3
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Pnpm install and check
|
||||||
|
run: |
|
||||||
|
pnpm i
|
||||||
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Download WebView2 Runtime
|
||||||
|
run: |
|
||||||
|
invoke-webrequest -uri https://github.com/westinyang/WebView2RuntimeArchive/releases/download/109.0.1518.78/Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -outfile Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab
|
||||||
|
Expand .\Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -F:* ./src-tauri
|
||||||
|
Remove-Item .\src-tauri\tauri.windows.conf.json
|
||||||
|
Rename-Item .\src-tauri\webview2.${{ matrix.arch }}.json tauri.windows.conf.json
|
||||||
|
|
||||||
|
- name: Tauri build
|
||||||
|
id: build
|
||||||
|
uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
with:
|
||||||
|
tauriScript: pnpm
|
||||||
|
args: --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Rename
|
||||||
|
run: |
|
||||||
|
Rename-Item '.\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}-setup.exe' 'Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}_fixed_webview2-setup.exe'
|
||||||
|
Rename-Item '.\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}-setup.nsis.zip' 'Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}_fixed_webview2-setup.nsis.zip'
|
||||||
|
Rename-Item '.\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}-setup.nsis.zip.sig' 'Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}_fixed_webview2-setup.nsis.zip.sig'
|
||||||
|
|
||||||
|
- name: Upload Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: alpha
|
||||||
|
name: "Clash Verge Rev Alpha"
|
||||||
|
body: "More new features are now supported."
|
||||||
|
prerelease: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
||||||
|
|
||||||
|
- name: Portable Bundle
|
||||||
|
run: pnpm portable-fixed-webview2 ${{ matrix.target }} --alpha
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
update_tag:
|
update_tag:
|
||||||
name: Update tag
|
name: Update tag
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [alpha, alpha-for-linux]
|
needs: [alpha, alpha-for-linux, alpha-for-fixed-webview2]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -175,27 +238,41 @@ jobs:
|
|||||||
|
|
||||||
- run: |
|
- run: |
|
||||||
cat > release.txt << 'EOF'
|
cat > release.txt << 'EOF'
|
||||||
### 我应该下载哪个版本?
|
## 我应该下载哪个版本?
|
||||||
|
|
||||||
- Windows x86_64架构: x64-setup.exe (不支持win7)
|
### MacOS (提示文件损坏或开发者无法验证请查看下面FAQ)
|
||||||
- Windows arm64架构: arm64-setup.exe
|
|
||||||
- MacOS intel芯片: x64.dmg
|
- MacOS intel芯片: x64.dmg
|
||||||
- MacOS apple M芯片: aarch64.dmg (提示文件损坏看下面FAQ)
|
- MacOS apple M芯片: aarch64.dmg
|
||||||
- Linux x64架构: amd64.AppImage/amd64.deb
|
|
||||||
|
### Linux
|
||||||
|
- Linux 64位: amd64.AppImage/amd64.deb
|
||||||
|
- Linux 32位: i386.deb
|
||||||
- Linux arm64架构: arm64.deb
|
- Linux arm64架构: arm64.deb
|
||||||
- Linux armv7架构: armhf.deb
|
- Linux armv7架构: armhf.deb
|
||||||
- Windows 便携板 x86_64架构: x64_portable.zip (不推荐使用,无法自动更新)
|
|
||||||
- Windows 便携板 arm64架构: arm64_portable.zip (不推荐使用,无法自动更新)
|
### Windows (Win7 用户请查看下面FAQ手动替换内核使用)
|
||||||
|
#### 正常版本(推荐)
|
||||||
|
- 64位: x64-setup.exe
|
||||||
|
- 32位: x86-setup.exe
|
||||||
|
- arm64架构: arm64-setup.exe
|
||||||
|
#### 便携版(不推荐使用,无法自动更新)
|
||||||
|
- 64位: x64_portable.zip
|
||||||
|
- 32位: x86_portable.zip
|
||||||
|
- arm64架构: arm64_portable.zip
|
||||||
|
#### 内置Webview2版(体积较大,仅在企业版系统或Win7无法安装webview2时使用)
|
||||||
|
- 64位: x64_fixed_webview2-setup.exe
|
||||||
|
- 32位: x86_fixed_webview2-setup.exe
|
||||||
|
- arm64架构: arm64_fixed_webview2-setup.exe
|
||||||
|
|
||||||
### FAQ
|
### FAQ
|
||||||
|
|
||||||
- [FAQ](https://clash-verge-rev.github.io/faq/install/)
|
- [FAQ](https://clash-verge-rev.github.io/faq/windows.html)
|
||||||
|
|
||||||
Created at ${{ env.BUILDTIME }}.
|
Created at ${{ env.BUILDTIME }}.
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: alpha
|
tag_name: alpha
|
||||||
name: "Clash Verge Rev Alpha"
|
name: "Clash Verge Rev Alpha"
|
||||||
|
|||||||
124
.github/workflows/release.yml
vendored
124
.github/workflows/release.yml
vendored
@@ -15,6 +15,8 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: x86_64-pc-windows-msvc
|
target: x86_64-pc-windows-msvc
|
||||||
|
- os: windows-latest
|
||||||
|
target: i686-pc-windows-msvc
|
||||||
- os: windows-latest
|
- os: windows-latest
|
||||||
target: aarch64-pc-windows-msvc
|
target: aarch64-pc-windows-msvc
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
@@ -74,8 +76,6 @@ jobs:
|
|||||||
run: pnpm portable ${{ matrix.target }}
|
run: pnpm portable ${{ matrix.target }}
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
|
||||||
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
|
||||||
|
|
||||||
release-for-linux:
|
release-for-linux:
|
||||||
strategy:
|
strategy:
|
||||||
@@ -84,6 +84,8 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
|
- os: ubuntu-latest
|
||||||
|
target: i686-unknown-linux-gnu
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
@@ -109,7 +111,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
if: startsWith(matrix.target, 'x86_64')
|
if: startsWith(matrix.target, 'x86_64')
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: v${{env.VERSION}}
|
tag_name: v${{env.VERSION}}
|
||||||
name: "Clash Verge Rev v${{env.VERSION}}"
|
name: "Clash Verge Rev v${{env.VERSION}}"
|
||||||
@@ -118,7 +120,7 @@ jobs:
|
|||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage*
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage*
|
||||||
|
|
||||||
- name: Upload Release
|
- name: Upload Release
|
||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v2
|
||||||
with:
|
with:
|
||||||
tag_name: v${{env.VERSION}}
|
tag_name: v${{env.VERSION}}
|
||||||
name: "Clash Verge Rev v${{env.VERSION}}"
|
name: "Clash Verge Rev v${{env.VERSION}}"
|
||||||
@@ -126,22 +128,104 @@ jobs:
|
|||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
files: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb
|
||||||
|
|
||||||
|
release-for-fixed-webview2:
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- os: windows-latest
|
||||||
|
target: x86_64-pc-windows-msvc
|
||||||
|
arch: x64
|
||||||
|
- os: windows-latest
|
||||||
|
target: i686-pc-windows-msvc
|
||||||
|
arch: x86
|
||||||
|
- os: windows-latest
|
||||||
|
target: aarch64-pc-windows-msvc
|
||||||
|
arch: arm64
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout Repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Add Rust Target
|
||||||
|
run: rustup target add ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Rust Cache
|
||||||
|
uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
workspaces: src-tauri
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v3
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Pnpm install and check
|
||||||
|
run: |
|
||||||
|
pnpm i
|
||||||
|
pnpm check ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Download WebView2 Runtime
|
||||||
|
run: |
|
||||||
|
invoke-webrequest -uri https://github.com/westinyang/WebView2RuntimeArchive/releases/download/109.0.1518.78/Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -outfile Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab
|
||||||
|
Expand .\Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${{ matrix.arch }}.cab -F:* ./src-tauri
|
||||||
|
Remove-Item .\src-tauri\tauri.windows.conf.json
|
||||||
|
Rename-Item .\src-tauri\webview2.${{ matrix.arch }}.json tauri.windows.conf.json
|
||||||
|
|
||||||
|
- name: Tauri build
|
||||||
|
id: build
|
||||||
|
uses: tauri-apps/tauri-action@v0
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
|
||||||
|
TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
|
||||||
|
with:
|
||||||
|
tauriScript: pnpm
|
||||||
|
args: --target ${{ matrix.target }}
|
||||||
|
|
||||||
|
- name: Rename
|
||||||
|
run: |
|
||||||
|
Rename-Item '.\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}-setup.exe' 'Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}_fixed_webview2-setup.exe'
|
||||||
|
Rename-Item '.\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}-setup.nsis.zip' 'Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}_fixed_webview2-setup.nsis.zip'
|
||||||
|
Rename-Item '.\src-tauri\target\${{ matrix.target }}\release\bundle\nsis\Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}-setup.nsis.zip.sig' 'Clash Verge_${{steps.build.outputs.appVersion}}_${{ matrix.arch }}_fixed_webview2-setup.nsis.zip.sig'
|
||||||
|
|
||||||
|
- name: Upload Release
|
||||||
|
uses: softprops/action-gh-release@v2
|
||||||
|
with:
|
||||||
|
tag_name: v${{steps.build.outputs.appVersion}}
|
||||||
|
name: "Clash Verge Rev v${{steps.build.outputs.appVersion}}"
|
||||||
|
body: "More new features are now supported."
|
||||||
|
prerelease: true
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
files: src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*setup*
|
||||||
|
|
||||||
|
- name: Portable Bundle
|
||||||
|
run: pnpm portable-fixed-webview2 ${{ matrix.target }}
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
release-update:
|
release-update:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [release, release-for-linux]
|
needs: [release, release-for-linux]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 9
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Pnpm install
|
- name: Pnpm install
|
||||||
@@ -151,3 +235,29 @@ jobs:
|
|||||||
run: pnpm updater
|
run: pnpm updater
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
release-update-for-fixed-webview2:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
needs: [release-for-fixed-webview2]
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Pnpm install
|
||||||
|
run: pnpm i
|
||||||
|
|
||||||
|
- name: Release updater file
|
||||||
|
run: pnpm updater-fixed-webview2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
29
.github/workflows/updater.yml
vendored
29
.github/workflows/updater.yml
vendored
@@ -10,14 +10,14 @@ jobs:
|
|||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Install Node
|
- name: Install Node
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version: "20"
|
node-version: "20"
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v2
|
- uses: pnpm/action-setup@v2
|
||||||
name: Install pnpm
|
name: Install pnpm
|
||||||
with:
|
with:
|
||||||
version: 8
|
version: 9
|
||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Pnpm install
|
- name: Pnpm install
|
||||||
@@ -27,3 +27,28 @@ jobs:
|
|||||||
run: pnpm updater
|
run: pnpm updater
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
release-update-for-fixed-webview2:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Install Node
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: "20"
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 9
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Pnpm install
|
||||||
|
run: pnpm i
|
||||||
|
|
||||||
|
- name: Release updater file
|
||||||
|
run: pnpm updater-fixed-webview2
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ Supports Windows (x64/x86), Linux (x64/arm64) and macOS 10.15+ (intel/apple).
|
|||||||
|
|
||||||
### FAQ
|
### FAQ
|
||||||
|
|
||||||
Refer to [Doc FAQ Page](https://clash-verge-rev.github.io/faq/install/)
|
Refer to [Doc FAQ Page](https://clash-verge-rev.github.io/faq/windows.html)
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
|
|||||||
18
UPDATELOG.md
18
UPDATELOG.md
@@ -1,3 +1,21 @@
|
|||||||
|
## v1.6.2
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- 支持本地文件拖拽导入
|
||||||
|
- 重新支持 32 位 CPU
|
||||||
|
- 新增内置 Webview2 版本
|
||||||
|
- 优化 Merge 逻辑,支持深度合并
|
||||||
|
- 删除 Merge 配置中的 append/prepend-provider 字段
|
||||||
|
- 支持更新稳定版内核
|
||||||
|
|
||||||
|
### Bugs Fixes
|
||||||
|
|
||||||
|
- MacOS DNS 还原失败
|
||||||
|
- CMD 环境变量格式错误
|
||||||
|
- Linux 下与 N 卡的兼容性问题
|
||||||
|
- 修改 Tun 设置不立即生效
|
||||||
|
|
||||||
## v1.6.1
|
## v1.6.1
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
20
package.json
20
package.json
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "clash-verge",
|
"name": "clash-verge",
|
||||||
"version": "1.6.1",
|
"version": "1.6.2",
|
||||||
"license": "GPL-3.0-only",
|
"license": "GPL-3.0-only",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "tauri dev",
|
"dev": "tauri dev",
|
||||||
@@ -12,7 +12,9 @@
|
|||||||
"web:serve": "vite preview",
|
"web:serve": "vite preview",
|
||||||
"check": "node scripts/check.mjs",
|
"check": "node scripts/check.mjs",
|
||||||
"updater": "node scripts/updater.mjs",
|
"updater": "node scripts/updater.mjs",
|
||||||
|
"updater-fixed-webview2": "node scripts/updater-fixed-webview2.mjs",
|
||||||
"portable": "node scripts/portable.mjs",
|
"portable": "node scripts/portable.mjs",
|
||||||
|
"portable-fixed-webview2": "node scripts/portable-fixed-webview2.mjs",
|
||||||
"prepare": "husky install"
|
"prepare": "husky install"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@@ -22,25 +24,25 @@
|
|||||||
"@emotion/react": "^11.11.4",
|
"@emotion/react": "^11.11.4",
|
||||||
"@emotion/styled": "^11.11.5",
|
"@emotion/styled": "^11.11.5",
|
||||||
"@juggle/resize-observer": "^3.4.0",
|
"@juggle/resize-observer": "^3.4.0",
|
||||||
"@mui/icons-material": "^5.15.15",
|
"@mui/icons-material": "^5.15.16",
|
||||||
"@mui/lab": "5.0.0-alpha.149",
|
"@mui/lab": "5.0.0-alpha.149",
|
||||||
"@mui/material": "^5.15.15",
|
"@mui/material": "^5.15.16",
|
||||||
"@mui/x-data-grid": "^6.19.11",
|
"@mui/x-data-grid": "^6.19.11",
|
||||||
"@tauri-apps/api": "^1.5.4",
|
"@tauri-apps/api": "^1.5.4",
|
||||||
"@types/json-schema": "^7.0.15",
|
"@types/json-schema": "^7.0.15",
|
||||||
"ahooks": "^3.7.11",
|
"ahooks": "^3.7.11",
|
||||||
"axios": "^1.6.8",
|
"axios": "^1.6.8",
|
||||||
"dayjs": "1.11.5",
|
"dayjs": "1.11.5",
|
||||||
"i18next": "^23.11.2",
|
"i18next": "^23.11.3",
|
||||||
"lodash-es": "^4.17.21",
|
"lodash-es": "^4.17.21",
|
||||||
"meta-json-schema": "1.18.4-beta2",
|
"meta-json-schema": "1.18.4-beta4",
|
||||||
"monaco-editor": "^0.47.0",
|
"monaco-editor": "^0.47.0",
|
||||||
"monaco-yaml": "^5.1.1",
|
"monaco-yaml": "^5.1.1",
|
||||||
"nanoid": "^5.0.7",
|
"nanoid": "^5.0.7",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-error-boundary": "^3.1.4",
|
"react-error-boundary": "^3.1.4",
|
||||||
"react-hook-form": "^7.51.3",
|
"react-hook-form": "^7.51.4",
|
||||||
"react-i18next": "^13.5.0",
|
"react-i18next": "^13.5.0",
|
||||||
"react-markdown": "^9.0.1",
|
"react-markdown": "^9.0.1",
|
||||||
"react-router-dom": "^6.23.0",
|
"react-router-dom": "^6.23.0",
|
||||||
@@ -52,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@actions/github": "^5.1.1",
|
"@actions/github": "^5.1.1",
|
||||||
"@tauri-apps/cli": "^1.5.12",
|
"@tauri-apps/cli": "^1.5.13",
|
||||||
"@types/fs-extra": "^9.0.13",
|
"@types/fs-extra": "^9.0.13",
|
||||||
"@types/js-cookie": "^3.0.6",
|
"@types/js-cookie": "^3.0.6",
|
||||||
"@types/lodash-es": "^4.17.12",
|
"@types/lodash-es": "^4.17.12",
|
||||||
@@ -68,9 +70,9 @@
|
|||||||
"node-fetch": "^3.3.2",
|
"node-fetch": "^3.3.2",
|
||||||
"prettier": "^2.8.8",
|
"prettier": "^2.8.8",
|
||||||
"pretty-quick": "^3.3.1",
|
"pretty-quick": "^3.3.1",
|
||||||
"sass": "^1.75.0",
|
"sass": "^1.77.0",
|
||||||
"typescript": "^5.4.5",
|
"typescript": "^5.4.5",
|
||||||
"vite": "^5.2.10",
|
"vite": "^5.2.11",
|
||||||
"vite-plugin-monaco-editor": "^1.1.0",
|
"vite-plugin-monaco-editor": "^1.1.0",
|
||||||
"vite-plugin-svgr": "^4.2.0"
|
"vite-plugin-svgr": "^4.2.0"
|
||||||
},
|
},
|
||||||
|
|||||||
713
pnpm-lock.yaml
generated
713
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@@ -101,7 +101,7 @@ async function getLatestAlphaVersion() {
|
|||||||
/* ======= clash meta stable ======= */
|
/* ======= clash meta stable ======= */
|
||||||
const META_VERSION_URL =
|
const META_VERSION_URL =
|
||||||
"https://github.com/MetaCubeX/mihomo/releases/latest/download/version.txt";
|
"https://github.com/MetaCubeX/mihomo/releases/latest/download/version.txt";
|
||||||
const META_URL_PREFIX = `https://github.com/MetaCubeX/mihomo/releases/download`;
|
const META_URL_PREFIX = `https://github.com/clash-verge-rev/mihomo/releases/download`;
|
||||||
let META_VERSION;
|
let META_VERSION;
|
||||||
|
|
||||||
const META_MAP = {
|
const META_MAP = {
|
||||||
|
|||||||
100
scripts/portable-fixed-webview2.mjs
Normal file
100
scripts/portable-fixed-webview2.mjs
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
import fs from "fs-extra";
|
||||||
|
import path from "path";
|
||||||
|
import AdmZip from "adm-zip";
|
||||||
|
import { createRequire } from "module";
|
||||||
|
import { getOctokit, context } from "@actions/github";
|
||||||
|
|
||||||
|
const target = process.argv.slice(2)[0];
|
||||||
|
const alpha = process.argv.slice(2)[1];
|
||||||
|
|
||||||
|
const ARCH_MAP = {
|
||||||
|
"x86_64-pc-windows-msvc": "x64",
|
||||||
|
"i686-pc-windows-msvc": "x86",
|
||||||
|
"aarch64-pc-windows-msvc": "arm64",
|
||||||
|
};
|
||||||
|
|
||||||
|
const PROCESS_MAP = {
|
||||||
|
x64: "x64",
|
||||||
|
ia32: "x86",
|
||||||
|
arm64: "arm64",
|
||||||
|
};
|
||||||
|
const arch = target ? ARCH_MAP[target] : PROCESS_MAP[process.arch];
|
||||||
|
/// Script for ci
|
||||||
|
/// 打包绿色版/便携版 (only Windows)
|
||||||
|
async function resolvePortable() {
|
||||||
|
if (process.platform !== "win32") return;
|
||||||
|
|
||||||
|
const releaseDir = target
|
||||||
|
? `./src-tauri/target/${target}/release`
|
||||||
|
: `./src-tauri/target/release`;
|
||||||
|
|
||||||
|
const configDir = path.join(releaseDir, ".config");
|
||||||
|
|
||||||
|
if (!(await fs.pathExists(releaseDir))) {
|
||||||
|
throw new Error("could not found the release dir");
|
||||||
|
}
|
||||||
|
|
||||||
|
await fs.mkdir(configDir);
|
||||||
|
await fs.createFile(path.join(configDir, "PORTABLE"));
|
||||||
|
|
||||||
|
const zip = new AdmZip();
|
||||||
|
|
||||||
|
zip.addLocalFile(path.join(releaseDir, "Clash Verge.exe"));
|
||||||
|
zip.addLocalFile(path.join(releaseDir, "clash-meta.exe"));
|
||||||
|
zip.addLocalFile(path.join(releaseDir, "clash-meta-alpha.exe"));
|
||||||
|
zip.addLocalFolder(path.join(releaseDir, "resources"), "resources");
|
||||||
|
zip.addLocalFolder(
|
||||||
|
path.join(
|
||||||
|
releaseDir,
|
||||||
|
`Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${arch}`
|
||||||
|
),
|
||||||
|
`Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.${arch}`
|
||||||
|
);
|
||||||
|
zip.addLocalFolder(configDir, ".config");
|
||||||
|
|
||||||
|
const require = createRequire(import.meta.url);
|
||||||
|
const packageJson = require("../package.json");
|
||||||
|
const { version } = packageJson;
|
||||||
|
|
||||||
|
const zipFile = `Clash.Verge_${version}_${arch}_fixed_webview2_portable.zip`;
|
||||||
|
zip.writeZip(zipFile);
|
||||||
|
|
||||||
|
console.log("[INFO]: create portable zip successfully");
|
||||||
|
|
||||||
|
// push release assets
|
||||||
|
if (process.env.GITHUB_TOKEN === undefined) {
|
||||||
|
throw new Error("GITHUB_TOKEN is required");
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = { owner: context.repo.owner, repo: context.repo.repo };
|
||||||
|
const github = getOctokit(process.env.GITHUB_TOKEN);
|
||||||
|
const tag = alpha ? "alpha" : process.env.TAG_NAME || `v${version}`;
|
||||||
|
console.log("[INFO]: upload to ", tag);
|
||||||
|
|
||||||
|
const { data: release } = await github.rest.repos.getReleaseByTag({
|
||||||
|
...options,
|
||||||
|
tag,
|
||||||
|
});
|
||||||
|
|
||||||
|
let assets = release.assets.filter((x) => {
|
||||||
|
return x.name === zipFile;
|
||||||
|
});
|
||||||
|
if (assets.length > 0) {
|
||||||
|
let id = assets[0].id;
|
||||||
|
await github.rest.repos.deleteReleaseAsset({
|
||||||
|
...options,
|
||||||
|
asset_id: id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(release.name);
|
||||||
|
|
||||||
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
|
...options,
|
||||||
|
release_id: release.id,
|
||||||
|
name: zipFile,
|
||||||
|
data: zip.toBuffer(),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
resolvePortable().catch(console.error);
|
||||||
@@ -9,9 +9,16 @@ const alpha = process.argv.slice(2)[1];
|
|||||||
|
|
||||||
const ARCH_MAP = {
|
const ARCH_MAP = {
|
||||||
"x86_64-pc-windows-msvc": "x64",
|
"x86_64-pc-windows-msvc": "x64",
|
||||||
|
"i686-pc-windows-msvc": "x86",
|
||||||
"aarch64-pc-windows-msvc": "arm64",
|
"aarch64-pc-windows-msvc": "arm64",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const PROCESS_MAP = {
|
||||||
|
x64: "x64",
|
||||||
|
ia32: "x86",
|
||||||
|
arm64: "arm64",
|
||||||
|
};
|
||||||
|
const arch = target ? ARCH_MAP[target] : PROCESS_MAP[process.arch];
|
||||||
/// Script for ci
|
/// Script for ci
|
||||||
/// 打包绿色版/便携版 (only Windows)
|
/// 打包绿色版/便携版 (only Windows)
|
||||||
async function resolvePortable() {
|
async function resolvePortable() {
|
||||||
@@ -41,7 +48,7 @@ async function resolvePortable() {
|
|||||||
const packageJson = require("../package.json");
|
const packageJson = require("../package.json");
|
||||||
const { version } = packageJson;
|
const { version } = packageJson;
|
||||||
|
|
||||||
const zipFile = `Clash.Verge_${version}_${ARCH_MAP[target]}_portable.zip`;
|
const zipFile = `Clash.Verge_${version}_${arch}_portable.zip`;
|
||||||
zip.writeZip(zipFile);
|
zip.writeZip(zipFile);
|
||||||
|
|
||||||
console.log("[INFO]: create portable zip successfully");
|
console.log("[INFO]: create portable zip successfully");
|
||||||
|
|||||||
154
scripts/updater-fixed-webview2.mjs
Normal file
154
scripts/updater-fixed-webview2.mjs
Normal file
@@ -0,0 +1,154 @@
|
|||||||
|
import fetch from "node-fetch";
|
||||||
|
import { getOctokit, context } from "@actions/github";
|
||||||
|
import { resolveUpdateLog } from "./updatelog.mjs";
|
||||||
|
|
||||||
|
const UPDATE_TAG_NAME = "updater";
|
||||||
|
const UPDATE_JSON_FILE = "update-fixed-webview2.json";
|
||||||
|
const UPDATE_JSON_PROXY = "update-fixed-webview2-proxy.json";
|
||||||
|
|
||||||
|
/// generate update.json
|
||||||
|
/// upload to update tag's release asset
|
||||||
|
async function resolveUpdater() {
|
||||||
|
if (process.env.GITHUB_TOKEN === undefined) {
|
||||||
|
throw new Error("GITHUB_TOKEN is required");
|
||||||
|
}
|
||||||
|
|
||||||
|
const options = { owner: context.repo.owner, repo: context.repo.repo };
|
||||||
|
const github = getOctokit(process.env.GITHUB_TOKEN);
|
||||||
|
|
||||||
|
const { data: tags } = await github.rest.repos.listTags({
|
||||||
|
...options,
|
||||||
|
per_page: 10,
|
||||||
|
page: 1,
|
||||||
|
});
|
||||||
|
|
||||||
|
// get the latest publish tag
|
||||||
|
const tag = tags.find((t) => t.name.startsWith("v"));
|
||||||
|
|
||||||
|
console.log(tag);
|
||||||
|
console.log();
|
||||||
|
|
||||||
|
const { data: latestRelease } = await github.rest.repos.getReleaseByTag({
|
||||||
|
...options,
|
||||||
|
tag: tag.name,
|
||||||
|
});
|
||||||
|
|
||||||
|
const updateData = {
|
||||||
|
name: tag.name,
|
||||||
|
notes: await resolveUpdateLog(tag.name), // use updatelog.md
|
||||||
|
pub_date: new Date().toISOString(),
|
||||||
|
platforms: {
|
||||||
|
"windows-x86_64": { signature: "", url: "" },
|
||||||
|
"windows-aarch64": { signature: "", url: "" },
|
||||||
|
"windows-x86": { signature: "", url: "" },
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
const promises = latestRelease.assets.map(async (asset) => {
|
||||||
|
const { name, browser_download_url } = asset;
|
||||||
|
|
||||||
|
// win64 url
|
||||||
|
if (name.endsWith("x64_fixed_webview2-setup.nsis.zip")) {
|
||||||
|
updateData.platforms["windows-x86_64"].url = browser_download_url;
|
||||||
|
}
|
||||||
|
// win64 signature
|
||||||
|
if (name.endsWith("x64_fixed_webview2-setup.nsis.zip.sig")) {
|
||||||
|
const sig = await getSignature(browser_download_url);
|
||||||
|
updateData.platforms["windows-x86_64"].signature = sig;
|
||||||
|
}
|
||||||
|
|
||||||
|
// win32 url
|
||||||
|
if (name.endsWith("x86_fixed_webview2-setup.nsis.zip")) {
|
||||||
|
updateData.platforms["windows-x86"].url = browser_download_url;
|
||||||
|
}
|
||||||
|
// win32 signature
|
||||||
|
if (name.endsWith("x86_fixed_webview2-setup.nsis.zip.sig")) {
|
||||||
|
const sig = await getSignature(browser_download_url);
|
||||||
|
updateData.platforms["windows-x86"].signature = sig;
|
||||||
|
}
|
||||||
|
|
||||||
|
// win arm url
|
||||||
|
if (name.endsWith("arm64_fixed_webview2-setup.nsis.zip")) {
|
||||||
|
updateData.platforms["windows-aarch64"].url = browser_download_url;
|
||||||
|
}
|
||||||
|
// win arm signature
|
||||||
|
if (name.endsWith("arm64_fixed_webview2-setup.nsis.zip.sig")) {
|
||||||
|
const sig = await getSignature(browser_download_url);
|
||||||
|
updateData.platforms["windows-aarch64"].signature = sig;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
await Promise.allSettled(promises);
|
||||||
|
console.log(updateData);
|
||||||
|
|
||||||
|
// maybe should test the signature as well
|
||||||
|
// delete the null field
|
||||||
|
Object.entries(updateData.platforms).forEach(([key, value]) => {
|
||||||
|
if (!value.url) {
|
||||||
|
console.log(`[Error]: failed to parse release for "${key}"`);
|
||||||
|
delete updateData.platforms[key];
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// 生成一个代理github的更新文件
|
||||||
|
// 使用 https://hub.fastgit.xyz/ 做github资源的加速
|
||||||
|
const updateDataNew = JSON.parse(JSON.stringify(updateData));
|
||||||
|
|
||||||
|
Object.entries(updateDataNew.platforms).forEach(([key, value]) => {
|
||||||
|
if (value.url) {
|
||||||
|
updateDataNew.platforms[key].url =
|
||||||
|
"https://mirror.ghproxy.com/" + value.url;
|
||||||
|
} else {
|
||||||
|
console.log(`[Error]: updateDataNew.platforms.${key} is null`);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
// update the update.json
|
||||||
|
const { data: updateRelease } = await github.rest.repos.getReleaseByTag({
|
||||||
|
...options,
|
||||||
|
tag: UPDATE_TAG_NAME,
|
||||||
|
});
|
||||||
|
|
||||||
|
// delete the old assets
|
||||||
|
for (let asset of updateRelease.assets) {
|
||||||
|
if (asset.name === UPDATE_JSON_FILE) {
|
||||||
|
await github.rest.repos.deleteReleaseAsset({
|
||||||
|
...options,
|
||||||
|
asset_id: asset.id,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (asset.name === UPDATE_JSON_PROXY) {
|
||||||
|
await github.rest.repos
|
||||||
|
.deleteReleaseAsset({ ...options, asset_id: asset.id })
|
||||||
|
.catch(console.error); // do not break the pipeline
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// upload new assets
|
||||||
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
|
...options,
|
||||||
|
release_id: updateRelease.id,
|
||||||
|
name: UPDATE_JSON_FILE,
|
||||||
|
data: JSON.stringify(updateData, null, 2),
|
||||||
|
});
|
||||||
|
|
||||||
|
await github.rest.repos.uploadReleaseAsset({
|
||||||
|
...options,
|
||||||
|
release_id: updateRelease.id,
|
||||||
|
name: UPDATE_JSON_PROXY,
|
||||||
|
data: JSON.stringify(updateDataNew, null, 2),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// get the signature file content
|
||||||
|
async function getSignature(url) {
|
||||||
|
const response = await fetch(url, {
|
||||||
|
method: "GET",
|
||||||
|
headers: { "Content-Type": "application/octet-stream" },
|
||||||
|
});
|
||||||
|
|
||||||
|
return response.text();
|
||||||
|
}
|
||||||
|
|
||||||
|
resolveUpdater().catch(console.error);
|
||||||
@@ -45,10 +45,12 @@ async function resolveUpdater() {
|
|||||||
"darwin-intel": { signature: "", url: "" },
|
"darwin-intel": { signature: "", url: "" },
|
||||||
"darwin-x86_64": { signature: "", url: "" },
|
"darwin-x86_64": { signature: "", url: "" },
|
||||||
"linux-x86_64": { signature: "", url: "" },
|
"linux-x86_64": { signature: "", url: "" },
|
||||||
|
"linux-x86": { signature: "", url: "" },
|
||||||
"linux-aarch64": { signature: "", url: "" },
|
"linux-aarch64": { signature: "", url: "" },
|
||||||
"linux-armv7": { signature: "", url: "" },
|
"linux-armv7": { signature: "", url: "" },
|
||||||
"windows-x86_64": { signature: "", url: "" },
|
"windows-x86_64": { signature: "", url: "" },
|
||||||
"windows-aarch64": { signature: "", url: "" },
|
"windows-aarch64": { signature: "", url: "" },
|
||||||
|
"windows-x86": { signature: "", url: "" },
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -67,6 +69,16 @@ async function resolveUpdater() {
|
|||||||
updateData.platforms["windows-x86_64"].signature = sig;
|
updateData.platforms["windows-x86_64"].signature = sig;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// win32 url
|
||||||
|
if (name.endsWith("x64-setup.nsis.zip")) {
|
||||||
|
updateData.platforms["windows-x86"].url = browser_download_url;
|
||||||
|
}
|
||||||
|
// win32 signature
|
||||||
|
if (name.endsWith("x64-setup.nsis.zip.sig")) {
|
||||||
|
const sig = await getSignature(browser_download_url);
|
||||||
|
updateData.platforms["windows-x86"].signature = sig;
|
||||||
|
}
|
||||||
|
|
||||||
// win arm url
|
// win arm url
|
||||||
if (name.endsWith("arm64-setup.nsis.zip")) {
|
if (name.endsWith("arm64-setup.nsis.zip")) {
|
||||||
updateData.platforms["windows-aarch64"].url = browser_download_url;
|
updateData.platforms["windows-aarch64"].url = browser_download_url;
|
||||||
@@ -105,6 +117,7 @@ async function resolveUpdater() {
|
|||||||
if (name.endsWith("amd64.AppImage.tar.gz")) {
|
if (name.endsWith("amd64.AppImage.tar.gz")) {
|
||||||
updateData.platforms.linux.url = browser_download_url;
|
updateData.platforms.linux.url = browser_download_url;
|
||||||
updateData.platforms["linux-x86_64"].url = browser_download_url;
|
updateData.platforms["linux-x86_64"].url = browser_download_url;
|
||||||
|
updateData.platforms["linux-x86"].url = browser_download_url;
|
||||||
// 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage
|
// 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage
|
||||||
updateData.platforms["linux-aarch64"].url = browser_download_url;
|
updateData.platforms["linux-aarch64"].url = browser_download_url;
|
||||||
updateData.platforms["linux-armv7"].url = browser_download_url;
|
updateData.platforms["linux-armv7"].url = browser_download_url;
|
||||||
@@ -114,6 +127,7 @@ async function resolveUpdater() {
|
|||||||
const sig = await getSignature(browser_download_url);
|
const sig = await getSignature(browser_download_url);
|
||||||
updateData.platforms.linux.signature = sig;
|
updateData.platforms.linux.signature = sig;
|
||||||
updateData.platforms["linux-x86_64"].signature = sig;
|
updateData.platforms["linux-x86_64"].signature = sig;
|
||||||
|
updateData.platforms["linux-x86"].url = browser_download_url;
|
||||||
// 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage
|
// 暂时使用x64版本的url和sig,使得可以检查更新,但aarch64版本还不支持构建appimage
|
||||||
updateData.platforms["linux-aarch64"].signature = sig;
|
updateData.platforms["linux-aarch64"].signature = sig;
|
||||||
updateData.platforms["linux-armv7"].signature = sig;
|
updateData.platforms["linux-armv7"].signature = sig;
|
||||||
|
|||||||
2
src-tauri/Cargo.lock
generated
2
src-tauri/Cargo.lock
generated
@@ -788,7 +788,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clash-verge"
|
name = "clash-verge"
|
||||||
version = "1.6.1"
|
version = "1.6.2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"auto-launch",
|
"auto-launch",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "clash-verge"
|
name = "clash-verge"
|
||||||
version = "1.6.1"
|
version = "1.6.2"
|
||||||
description = "clash verge"
|
description = "clash verge"
|
||||||
authors = ["zzzgydi", "wonfen", "MystiPanda"]
|
authors = ["zzzgydi", "wonfen", "MystiPanda"]
|
||||||
license = "GPL-3.0-only"
|
license = "GPL-3.0-only"
|
||||||
|
|||||||
@@ -1,64 +1,38 @@
|
|||||||
use super::{use_filter, use_lowercase};
|
use super::{use_filter, use_lowercase};
|
||||||
use serde_yaml::{self, Mapping, Sequence, Value};
|
use serde_yaml::{self, Mapping, Sequence, Value};
|
||||||
|
|
||||||
const MERGE_FIELDS: [&str; 10] = [
|
const MERGE_FIELDS: [&str; 6] = [
|
||||||
"prepend-rules",
|
"prepend-rules",
|
||||||
"append-rules",
|
"append-rules",
|
||||||
"prepend-rule-providers",
|
|
||||||
"append-rule-providers",
|
|
||||||
"prepend-proxies",
|
"prepend-proxies",
|
||||||
"append-proxies",
|
"append-proxies",
|
||||||
"prepend-proxy-providers",
|
|
||||||
"append-proxy-providers",
|
|
||||||
"prepend-proxy-groups",
|
"prepend-proxy-groups",
|
||||||
"append-proxy-groups",
|
"append-proxy-groups",
|
||||||
];
|
];
|
||||||
|
|
||||||
pub fn use_merge(merge: Mapping, mut config: Mapping) -> Mapping {
|
fn deep_merge(a: &mut Value, b: &Value) {
|
||||||
// 直接覆盖原字段
|
match (a, b) {
|
||||||
use_lowercase(merge.clone())
|
(&mut Value::Mapping(ref mut a), &Value::Mapping(ref b)) => {
|
||||||
.into_iter()
|
for (k, v) in b {
|
||||||
.filter(|(key, _)| !MERGE_FIELDS.contains(&key.as_str().unwrap_or_default()))
|
deep_merge(a.entry(k.clone()).or_insert(Value::Null), v);
|
||||||
.for_each(|(key, value)| {
|
}
|
||||||
config.insert(key, value);
|
}
|
||||||
});
|
(a, b) => *a = b.clone(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn use_merge(merge: Mapping, config: Mapping) -> Mapping {
|
||||||
|
let mut config = Value::from(config);
|
||||||
|
let mut merge_without_append = use_lowercase(merge.clone());
|
||||||
|
for key in MERGE_FIELDS {
|
||||||
|
merge_without_append.remove(key).unwrap_or_default();
|
||||||
|
}
|
||||||
|
deep_merge(&mut config, &Value::from(merge_without_append));
|
||||||
|
|
||||||
|
let mut config = config.as_mapping().unwrap().clone();
|
||||||
let merge_list = MERGE_FIELDS.iter().map(|s| s.to_string());
|
let merge_list = MERGE_FIELDS.iter().map(|s| s.to_string());
|
||||||
let merge = use_filter(merge, &merge_list.collect());
|
let merge = use_filter(merge, &merge_list.collect());
|
||||||
|
|
||||||
["rule-providers", "proxy-providers"]
|
|
||||||
.iter()
|
|
||||||
.for_each(|key_str| {
|
|
||||||
let key_val = Value::from(key_str.to_string());
|
|
||||||
|
|
||||||
let mut map = Mapping::default();
|
|
||||||
|
|
||||||
map = config.get(&key_val).map_or(map.clone(), |val| {
|
|
||||||
val.as_mapping().map_or(map, |v| v.clone())
|
|
||||||
});
|
|
||||||
|
|
||||||
let pre_key = Value::from(format!("prepend-{key_str}"));
|
|
||||||
let post_key = Value::from(format!("append-{key_str}"));
|
|
||||||
|
|
||||||
if let Some(pre_val) = merge.get(&pre_key) {
|
|
||||||
if pre_val.is_mapping() {
|
|
||||||
let mut pre_val = pre_val.as_mapping().unwrap().clone();
|
|
||||||
pre_val.extend(map);
|
|
||||||
map = pre_val;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if let Some(post_val) = merge.get(&post_key) {
|
|
||||||
if post_val.is_mapping() {
|
|
||||||
map.extend(post_val.as_mapping().unwrap().clone());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if !map.is_empty() {
|
|
||||||
config.insert(key_val, Value::from(map));
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
["rules", "proxies", "proxy-groups"]
|
["rules", "proxies", "proxy-groups"]
|
||||||
.iter()
|
.iter()
|
||||||
.for_each(|key_str| {
|
.for_each(|key_str| {
|
||||||
|
|||||||
@@ -15,22 +15,14 @@ pub const ITEM_MERGE: &str = "# Profile Enhancement Merge Template for Clash Ver
|
|||||||
|
|
||||||
prepend-rules: []
|
prepend-rules: []
|
||||||
|
|
||||||
prepend-rule-providers: {}
|
|
||||||
|
|
||||||
prepend-proxies: []
|
prepend-proxies: []
|
||||||
|
|
||||||
prepend-proxy-providers: {}
|
|
||||||
|
|
||||||
prepend-proxy-groups: []
|
prepend-proxy-groups: []
|
||||||
|
|
||||||
append-rules: []
|
append-rules: []
|
||||||
|
|
||||||
append-rule-providers: {}
|
|
||||||
|
|
||||||
append-proxies: []
|
append-proxies: []
|
||||||
|
|
||||||
append-proxy-providers: {}
|
|
||||||
|
|
||||||
append-proxy-groups: []
|
append-proxy-groups: []
|
||||||
";
|
";
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||||
"package": {
|
"package": {
|
||||||
"productName": "Clash Verge",
|
"productName": "Clash Verge",
|
||||||
"version": "1.6.1"
|
"version": "1.6.2"
|
||||||
},
|
},
|
||||||
"build": {
|
"build": {
|
||||||
"distDir": "../dist",
|
"distDir": "../dist",
|
||||||
|
|||||||
38
src-tauri/webview2.arm64.json
Normal file
38
src-tauri/webview2.arm64.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||||
|
"tauri": {
|
||||||
|
"systemTray": {
|
||||||
|
"iconPath": "icons/tray-icon.png"
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"identifier": "io.github.clash-verge-rev.clash-verge-rev",
|
||||||
|
"targets": ["nsis", "updater"],
|
||||||
|
"windows": {
|
||||||
|
"certificateThumbprint": null,
|
||||||
|
"digestAlgorithm": "sha256",
|
||||||
|
"timestampUrl": "",
|
||||||
|
"webviewInstallMode": {
|
||||||
|
"type": "fixedRuntime",
|
||||||
|
"path": "./Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.arm64/"
|
||||||
|
},
|
||||||
|
"nsis": {
|
||||||
|
"displayLanguageSelector": true,
|
||||||
|
"installerIcon": "icons/icon.ico",
|
||||||
|
"languages": ["SimpChinese", "English"],
|
||||||
|
"license": "../LICENSE",
|
||||||
|
"installMode": "perMachine",
|
||||||
|
"template": "./template/installer.nsi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"active": true,
|
||||||
|
"dialog": false,
|
||||||
|
"endpoints": [
|
||||||
|
"https://mirror.ghproxy.com/https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2-proxy.json",
|
||||||
|
"https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2.json"
|
||||||
|
],
|
||||||
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
38
src-tauri/webview2.x64.json
Normal file
38
src-tauri/webview2.x64.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||||
|
"tauri": {
|
||||||
|
"systemTray": {
|
||||||
|
"iconPath": "icons/tray-icon.png"
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"identifier": "io.github.clash-verge-rev.clash-verge-rev",
|
||||||
|
"targets": ["nsis", "updater"],
|
||||||
|
"windows": {
|
||||||
|
"certificateThumbprint": null,
|
||||||
|
"digestAlgorithm": "sha256",
|
||||||
|
"timestampUrl": "",
|
||||||
|
"webviewInstallMode": {
|
||||||
|
"type": "fixedRuntime",
|
||||||
|
"path": "./Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.x64/"
|
||||||
|
},
|
||||||
|
"nsis": {
|
||||||
|
"displayLanguageSelector": true,
|
||||||
|
"installerIcon": "icons/icon.ico",
|
||||||
|
"languages": ["SimpChinese", "English"],
|
||||||
|
"license": "../LICENSE",
|
||||||
|
"installMode": "perMachine",
|
||||||
|
"template": "./template/installer.nsi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"active": true,
|
||||||
|
"dialog": false,
|
||||||
|
"endpoints": [
|
||||||
|
"https://mirror.ghproxy.com/https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2-proxy.json",
|
||||||
|
"https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2.json"
|
||||||
|
],
|
||||||
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
38
src-tauri/webview2.x86.json
Normal file
38
src-tauri/webview2.x86.json
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../node_modules/@tauri-apps/cli/schema.json",
|
||||||
|
"tauri": {
|
||||||
|
"systemTray": {
|
||||||
|
"iconPath": "icons/tray-icon.png"
|
||||||
|
},
|
||||||
|
"bundle": {
|
||||||
|
"identifier": "io.github.clash-verge-rev.clash-verge-rev",
|
||||||
|
"targets": ["nsis", "updater"],
|
||||||
|
"windows": {
|
||||||
|
"certificateThumbprint": null,
|
||||||
|
"digestAlgorithm": "sha256",
|
||||||
|
"timestampUrl": "",
|
||||||
|
"webviewInstallMode": {
|
||||||
|
"type": "fixedRuntime",
|
||||||
|
"path": "./Microsoft.WebView2.FixedVersionRuntime.109.0.1518.78.x86/"
|
||||||
|
},
|
||||||
|
"nsis": {
|
||||||
|
"displayLanguageSelector": true,
|
||||||
|
"installerIcon": "icons/icon.ico",
|
||||||
|
"languages": ["SimpChinese", "English"],
|
||||||
|
"license": "../LICENSE",
|
||||||
|
"installMode": "perMachine",
|
||||||
|
"template": "./template/installer.nsi"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"updater": {
|
||||||
|
"active": true,
|
||||||
|
"dialog": false,
|
||||||
|
"endpoints": [
|
||||||
|
"https://mirror.ghproxy.com/https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2-proxy.json",
|
||||||
|
"https://github.com/clash-verge-rev/clash-verge-rev/releases/download/updater/update-fixed-webview2.json"
|
||||||
|
],
|
||||||
|
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEQyOEMyRjBCQkVGOUJEREYKUldUZnZmbStDeStNMHU5Mmo1N24xQXZwSVRYbXA2NUpzZE5oVzlqeS9Bc0t6RVV4MmtwVjBZaHgK"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -97,19 +97,17 @@ export const ClashCoreViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
<Box display="flex" justifyContent="space-between">
|
<Box display="flex" justifyContent="space-between">
|
||||||
{t("Clash Core")}
|
{t("Clash Core")}
|
||||||
<Box>
|
<Box>
|
||||||
{clash_core !== "clash-meta" && (
|
<LoadingButton
|
||||||
<LoadingButton
|
variant="contained"
|
||||||
variant="contained"
|
size="small"
|
||||||
size="small"
|
startIcon={<SwitchAccessShortcut />}
|
||||||
startIcon={<SwitchAccessShortcut />}
|
loadingPosition="start"
|
||||||
loadingPosition="start"
|
loading={upgrading}
|
||||||
loading={upgrading}
|
sx={{ marginRight: "8px" }}
|
||||||
sx={{ marginRight: "8px" }}
|
onClick={onUpgrade}
|
||||||
onClick={onUpgrade}
|
>
|
||||||
>
|
{t("Upgrade")}
|
||||||
{t("Upgrade")}
|
</LoadingButton>
|
||||||
</LoadingButton>
|
|
||||||
)}
|
|
||||||
<Button
|
<Button
|
||||||
variant="contained"
|
variant="contained"
|
||||||
size="small"
|
size="small"
|
||||||
|
|||||||
@@ -65,7 +65,9 @@ export const ControllerViewer = forwardRef<DialogRef>((props, ref) => {
|
|||||||
sx={{ width: 175 }}
|
sx={{ width: 175 }}
|
||||||
value={secret}
|
value={secret}
|
||||||
placeholder={t("Recommended")}
|
placeholder={t("Recommended")}
|
||||||
onChange={(e) => setSecret(e.target.value)}
|
onChange={(e) =>
|
||||||
|
setSecret(e.target.value?.replace(/[^\x00-\x7F]/g, ""))
|
||||||
|
}
|
||||||
/>
|
/>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
Reference in New Issue
Block a user